Application page detection methods and devices, storage media and electronic devices

By comparing files in the target page folder, the system automatically detects the stability and consistency of application pages under different network environments, solving the problem of low detection efficiency in existing technologies, improving detection efficiency and reducing labor costs.

CN119311551BActive Publication Date: 2026-07-17HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
Filing Date
2024-09-26
Publication Date
2026-07-17

AI Technical Summary

Technical Problem

Existing page detection methods are inefficient, require manual setup of different testing environments, and are prone to inaccurate verification.

Method used

By obtaining the target page files of the target client in multiple network environments, files that meet the preset conditions are moved to the candidate folder, files that do not meet the conditions are moved to the abnormal folder, and if no files are found in the abnormal folder, the page is determined to have passed the test.

Benefits of technology

It achieves automated detection of the stability and consistency of target pages under different network environments, improves detection efficiency, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311551B_ABST
    Figure CN119311551B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, storage medium, and electronic device for detecting application pages. The method includes: acquiring multiple target page files displayed in multiple network environments on a target client; comparing any two target page files among the multiple target page files, moving target page files that meet preset comparison conditions to a candidate folder, and moving target page files that do not meet the preset comparison conditions to a first abnormal folder; comparing a reference page file with the target page files in the candidate folder, moving the reference page file and target page files that do not meet the preset comparison conditions to a second abnormal folder; and determining that the target page passes the detection if neither the reference page file nor the target page file exists in the first or second abnormal folder. This application solves the technical problem of low efficiency in application page detection methods provided by related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of mobile testing, and more specifically, to a method and apparatus for detecting application pages, a storage medium, and an electronic device. Background Technology

[0002] In mobile application development, different networks and clients can affect application performance, response speed, and page display. Therefore, in order to provide users with a stable and consistent user experience, it is necessary to ensure that the application performs the same way for the same application page scenario in different network environments or different clients. In other words, it is necessary to test the application in different network environments or clients.

[0003] However, in related technologies, when testing applications in different network environments or on different clients, testers need to manually set up different test environments to verify the display and processing logic of application pages under different networks and clients. This process requires manual execution, which is time-consuming when there is a lot of test content, and is prone to errors in setting up the verification environment, leading to inaccurate verification. In other words, the application page testing methods provided by related technologies have the problem of low efficiency.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This application provides a method and apparatus for detecting application pages, a storage medium, and an electronic device, to at least solve the technical problem of low efficiency in application page detection methods provided by related technologies.

[0006] According to one aspect of the embodiments of this application, a method for detecting an application page is provided, comprising: acquiring multiple target page files displayed in a target client under multiple network environments, wherein each network environment corresponds one-to-one with a target page file; comparing any two target page files among the multiple target page files, moving target page files that meet preset comparison conditions to a candidate folder, and moving target page files that do not meet the preset comparison conditions to a first abnormal folder; acquiring a reference folder in a reference client corresponding to the target page, wherein each reference page file in the reference folder is used to indicate a page file that meets the preset comparison conditions obtained by the reference client in a network environment; comparing the reference page files and the target page files in the candidate folder respectively, and moving the reference page files and target page files that do not meet the preset comparison conditions to a second abnormal folder; and determining that the target page passes the detection if there are no target page files in the first abnormal folder and no reference page files or target page files in the second abnormal folder.

[0007] According to another aspect of the embodiments of this application, an application page detection device is also provided, comprising: a target page file acquisition unit, configured to acquire multiple target page files displayed in multiple network environments for a target page in a target client, wherein each network environment corresponds one-to-one with a target page file; a first comparison unit, configured to compare any two target page files among the multiple target page files, move target page files that meet preset comparison conditions to a candidate folder, and move target page files that do not meet preset comparison conditions to a first abnormal folder; a reference folder acquisition unit, configured to acquire a reference folder in a reference client corresponding to the target page, wherein each reference page file in the reference folder is used to indicate a page file that meets preset comparison conditions acquired by the reference client in a network environment; a second comparison unit, configured to compare the reference page file and the target page file in the candidate folder respectively, and move the reference page file and the target page file that do not meet preset comparison conditions to a second abnormal folder; and a detection and judgment unit, configured to determine that the target page passes the detection when there is no target page file in the first abnormal folder and no reference page file or target page file in the second abnormal folder.

[0008] Optionally, the first comparison unit includes: a target file combination module, used to select all combinations of two target page files from N target page files to obtain H target page file combinations, where N is a positive integer and H is a positive integer; a target operation execution module, used to traverse the H target page file combinations, take each target page file combination in the H target page file combinations as the kth target page file combination in turn, and perform the following operations: compare the two target page files in the kth target page file combination to obtain the corresponding first comparison result, where k is an integer greater than or equal to 1 and less than or equal to H; and a first set composition module, used to obtain a first comparison result set composed of the first comparison results corresponding to each of the H target page file combinations after the operation is performed on the Hth target page file combination.

[0009] Optionally, the aforementioned target operation execution module is further configured to: obtain first image data, first text data, second image data, and second text data corresponding to each of the two target page files in the k-th target page file combination, wherein the first image data and the first text data indicate the same target page file, and the second image data and the second text data indicate the same target page file; obtain a first histogram corresponding to the first image data and a second histogram corresponding to the second image data, and compare the first histogram and the second histogram to obtain a target image comparison value corresponding to the k-th target page file combination; compare the first text data and the second text data to obtain a target text comparison value corresponding to the k-th target page file combination; and determine a first comparison result based on the target image comparison value and the target text comparison value.

[0010] Optionally, the first comparison unit further includes: an anomaly detection module, used to sequentially perform anomaly detection on N target page files, move the target page files whose image data meets the anomaly detection conditions to a third anomaly folder, and obtain updated multiple target page files, wherein the anomaly detection conditions are used to indicate the image quality of the image data.

[0011] Optionally, the second comparison unit includes: a reference file combination module, used to select all combinations of two reference page files and target page files from M reference page files and multiple target page files to obtain L reference page file combinations, where M is a positive integer and L is a positive integer; a reference operation execution module, used to traverse the L reference page file combinations, take each of the L reference page file combinations as the j-th reference page file combination in turn, and perform the following operations: compare the reference page files and target page files in the j-th reference page file combination to obtain the corresponding second comparison result, where j is an integer greater than or equal to 1 and less than or equal to L; and a second set composition module, used to obtain a second comparison result set composed of the second comparison results corresponding to each of the L reference page file combinations after the operation has been performed on the L-th reference page file combination.

[0012] Optionally, the aforementioned reference operation execution module is further configured to: obtain the third image data, third text data, fourth image data, and fourth text data corresponding to the reference page file and the target page file in the j-th reference page file combination, wherein the third image data and third text data indicate the same reference file or target page file, and the fourth image data and fourth text data indicate the same reference file or target page file; obtain the third histogram corresponding to the third image data and the fourth histogram corresponding to the fourth image data, and compare the third histogram and the fourth histogram to obtain a reference image comparison value corresponding to the j-th reference page file combination; compare the third text data and the fourth text data to obtain a reference text comparison value corresponding to the j-th reference page file combination; and determine a second comparison result based on the reference image comparison value and the reference text comparison value.

[0013] Optionally, the target page file acquisition unit includes: a network traversal module, used to traverse N network environments, taking each of the N network environments as the q-th network environment in sequence, and obtaining N target page files corresponding to each of the N network environments after performing operations on the N-th network environment, where q is an integer greater than or equal to 1 and less than or equal to N; a loading module, used to load the target page in the q-th network environment; and a page file generation module, used to acquire the image data and text data of the target page in the q-th network environment and generate the target page file.

[0014] Optionally, the network traversal module described above is further configured to: determine the first type of mobile communication network environment as the first network environment; determine the second type of mobile communication network environment as the second network environment when the first type of mobile communication network environment is turned off; determine the wireless communication network environment as the third network environment when the wireless communication network is turned on; obtain the bandwidth delay and network transmission parameters of the basic bandwidth, and determine the fourth network environment based on the bandwidth delay and network transmission parameters.

[0015] Optionally, the loading module described above is further configured to: obtain the network address of the target page and load the target page using the network address of the target page; obtain the operation combination corresponding to the target page and load the target page by executing the operation combination, wherein the operation combination is used to indicate a combination of simulated operations to be performed on the client.

[0016] Optionally, the page file generation module described above is further configured to: capture the display interface of the target page in the q-th network environment as image data; obtain the text information displayed on the target page in the q-th network environment, and use the text information as text data.

[0017] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described method for detecting application pages when it is run.

[0018] According to another aspect of the embodiments of this application, a computer program product is provided, the computer program product including a computer program / instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program / instructions from the computer-readable storage medium, and executes the computer program / instructions, causing the computer device to perform the detection method as described on the above application page.

[0019] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the application page detection method described above through the computer program.

[0020] In this embodiment, multiple target page files displayed in multiple network environments on a target client are obtained, wherein each network environment corresponds one-to-one with a target page file. Any two target page files are compared, and those meeting preset comparison conditions are moved to a candidate folder, while those not meeting the preset comparison conditions are moved to a first abnormal folder. A reference folder corresponding to the target page is obtained in a reference client, where each reference page file indicates a page file that meets preset comparison conditions obtained by the reference client in a network environment. The reference page files and target page files in the candidate folders are compared, and those not meeting the preset comparison conditions are moved to a second abnormal folder. If no target page file exists in the first abnormal folder, and neither a reference page file nor a target page file exists in the second abnormal folder, the target page is determined to have passed the detection. This method solves the technical problem of low efficiency in application page detection methods provided by related technologies.

[0021] In this embodiment, a page to be tested can be used as the target page. The target page is accessed in a client under different network environments to obtain target page files in different network environments. Different target page files are compared, and those that do not meet preset comparison conditions are placed in a first abnormal folder, while those that do meet the preset comparison conditions are placed in a candidate folder for subsequent comparisons across different clients. Reference page files for the target page under different clients can be obtained and compared with the target page files. Reference page files and target page files that do not meet the preset comparison conditions are moved to a second abnormal folder. Files in both the first and second abnormal folders do not meet the preset comparison conditions. The presence of such files indicates that the target page's display or text information differs across different networks or clients, failing to achieve consistent and stable performance under different conditions. The absence of such files indicates that the target page can achieve stable performance in the client of the tested network environment. This method automatically detects whether the target page's processing logic is correct under different conditions, improving detection efficiency, reducing manual costs, and achieving stability and consistency for the target page. Attached Figure Description

[0022] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0023] Figure 1 This is a schematic diagram of the hardware environment for an optional application page detection method according to an embodiment of this application;

[0024] Figure 2 This is a flowchart of an optional application page detection method according to an embodiment of this application;

[0025] Figure 3 This is a schematic diagram of an optional application page detection method according to an embodiment of this application;

[0026] Figure 4 This is a schematic diagram of another optional application page detection method according to an embodiment of this application;

[0027] Figure 5 This is a schematic diagram of another optional application page detection method according to an embodiment of this application;

[0028] Figure 6 This is a schematic diagram of an optional application page detection device according to an embodiment of this application;

[0029] Figure 7 This is a schematic diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0032] According to one aspect of the embodiments of this application, a method for detecting application pages is provided. As an optional implementation, the above-described method for detecting application pages can be applied to, but is not limited to, applications such as... Figure 1 The hardware environment shown illustrates an application page detection system. This system may include, but is not limited to, terminal device 102, network 110, server 112, database 114, and terminal device 118. Terminal device 102 runs a target program (such as...). Figure 1As shown, taking the target program as an example, which can detect application pages. The terminal device 102 includes a display 108, a processor 106, and a memory 104. The display 108 can be used to display target pages under different working conditions, and also to provide a human-computer interaction interface to receive human-computer interaction operations such as touch on different information. The processor is used to generate interaction instructions in response to the above human-computer interaction operations, and send the interaction instructions to the server to obtain the stored target page file and reference page file. The memory is used to store image data and text data of the target page displayed by the running client. The terminal device 118 includes a display 120, a processor 122, and a memory 124. The terminal device 118 can run a client and access the target page through the client.

[0033] In addition, server 112 includes a processing engine 116, which performs store or read operations on database 114. Specifically, processing engine 116 reads target page files and reference page files from database 114.

[0034] Assumption Figure 1 The terminal device 102 runs a program for detecting the target page of the application. The specific process in this embodiment is as follows: As in step S102, the terminal device 102 requests the target page file and the reference page file from the server 112 and / or the terminal device 118 through the network 110. The terminal device 102 may be one or more devices. After receiving the request from the terminal device 102, the server 112 obtains relevant information about the target page from the database 114 and sends the target page file and the reference page file to the terminal device 102, or the terminal device 118 obtains relevant information about the target page from the memory 124 and sends the target page file and the reference page file to the terminal device 102.

[0035] After terminal device 102 obtains the target page file and reference page file from server 112 and / or terminal device 118, steps S104-S110 are executed in terminal device 102. Any two target page files are compared, and target page files that meet preset comparison conditions are moved to a candidate folder, while those that do not meet the preset comparison conditions are moved to a first abnormal folder. Then, the reference page file is compared with all target page files in the candidate folder, and reference page files and target page files that do not meet the preset comparison conditions are moved to a second abnormal folder. Finally, the files in the first and second abnormal folders are used to determine whether the target page passes the detection.

[0036] Optionally, in this embodiment, the terminal device 102 can be a terminal device configured with a target program, including but not limited to at least one of the following: mobile phone (such as Android phone, iOS phone, etc.), laptop computer, tablet computer, handheld computer, MID (Mobile Internet Device), PAD, desktop computer, smart TV, etc. The terminal device 118 can be a device configured with different clients, including but not limited to at least one of the following: mobile phone (such as Android phone, iOS phone, etc.), laptop computer, tablet computer, handheld computer, MID (Mobile Internet Device), PAD, desktop computer, smart TV, etc. The client can be a video client, browser client, or other client that supports the detection task of providing application pages or can access the target page. The network can include but is not limited to: wired network, wireless network, wherein the wired network includes: local area network, metropolitan area network, and wide area network, and the wireless network includes: Bluetooth, WIFI, and other networks that enable wireless communication. The server can be a single server, a server cluster composed of multiple servers, or a cloud server. The above is only an example, and no limitation is made in this embodiment.

[0037] Optionally, in this embodiment, the application page detection method described above can be applied, but is not limited to, to detect the core page of an application. In mobile applications, the application's performance, response speed, and page display may be affected by the network and client in different usage scenarios. To determine whether an application's core page can maintain stable performance under different environments, the application page detection method described above can be used to detect the core page. Image and text data of the core page displayed under different clients and different networks can be obtained, and files corresponding to different environments can be compared to indicate whether the application's core page is stable and consistent under different environments.

[0038] In this embodiment, multiple target page files displayed in multiple network environments on a target client are obtained, wherein each network environment corresponds one-to-one with a target page file. Any two target page files are compared, and those meeting preset comparison conditions are moved to a candidate folder, while those not meeting the preset comparison conditions are moved to a first abnormal folder. A reference folder corresponding to the target page is obtained in a reference client, where each reference page file indicates a page file that meets preset comparison conditions obtained by the reference client in a network environment. The reference page files and target page files in the candidate folders are compared, and those not meeting the preset comparison conditions are moved to a second abnormal folder. If no target page file exists in the first abnormal folder, and neither a reference page file nor a target page file exists in the second abnormal folder, the target page is determined to have passed the detection. This method solves the technical problem of low efficiency in application page detection methods provided by related technologies.

[0039] In this embodiment, a page to be tested can be used as the target page. The target page is accessed in a client under different network environments to obtain target page files in different network environments. Different target page files are compared, and those that do not meet preset comparison conditions are placed in a first abnormal folder, while those that do meet the preset comparison conditions are placed in a candidate folder for subsequent comparisons across different clients. Reference page files for the target page under different clients can be obtained and compared with the target page files. Reference page files and target page files that do not meet the preset comparison conditions are moved to a second abnormal folder. Files in both the first and second abnormal folders do not meet the preset comparison conditions. The presence of such files indicates that the target page's display or text information differs across different networks or clients, failing to achieve consistent and stable performance under different conditions. The absence of such files indicates that the target page can achieve stable performance in the client of the tested network environment. This method automatically detects whether the target page's processing logic is correct under different conditions, improving detection efficiency, reducing manual costs, and achieving stability and consistency for the target page.

[0040] As an optional implementation method, such as Figure 2 As shown, the detection method for the above application page includes the following steps:

[0041] S202, Obtain multiple target page files displayed in the target client under multiple network environments, wherein the network environment corresponds one-to-one with the target page file;

[0042] It should be noted that the target page can be a webpage of a mobile application. It can be the core page of the mobile application, such as the application's homepage or the application's default open page, or it can be a subpage of the mobile application, such as a page accessed by touching a control in the homepage or a subpage.

[0043] The target client can be software running on a terminal device, a program that provides local services to the user. It can transmit data with the server to achieve specific functions.

[0044] The target page can include image data and text data that indicate the target page.

[0045] In an optional implementation, after determining the terminal device, the target client can be opened on the terminal device, and the target client can be used to access the target webpage to obtain the image data and text data of the target webpage to obtain the target page file.

[0046] In an optional implementation, the target page stored on the server or terminal device can be directly obtained and the corresponding target page file can be run on the target client.

[0047] It should be noted that the interface displayed on the terminal device after the target client accesses the target page may be different under different network environments. Therefore, it is necessary to obtain the page file of the target page under different network environments.

[0048] In an optional implementation, within a network environment, a target client can access a target page and obtain its image and text data to obtain the target page file corresponding to the current network environment. After obtaining the corresponding target page file, the network environment can be switched, and the target client can access the target page again to obtain the currently displayed target page's image and text data as the corresponding target page file.

[0049] In an optional implementation, when it is necessary to detect the target page, the target page file corresponding to the target page in different network environments can be directly obtained from the server.

[0050] It should be noted that the image data of the target page can be different images, page structure, or other information about the target page, such as indicating different modules on the target page. In optional implementations, different modules on the page can correspond to different types of interactive intents. The application can be operated through touch commands received by different modules. Therefore, the image data can indicate the arrangement of modules on the target page, the display area of ​​modules, and the display of modules.

[0051] It should be noted that the text data of the target page can be the text displayed in different parts of the target page, such as relevant information in the header of the target page (interface name, logo, etc.), navigation information, etc. Any text displayed on the target page that can provide instructions to the user can be regarded as text information. Extracting and storing the text information yields the text data.

[0052] Figure 3 This is a schematic diagram of an optional application page detection method according to an embodiment of this application; as shown Figure 3 As shown, after the target page is opened through the target client, the target page can be displayed on the terminal device. By acquiring the resources of the target page, image data 302 and text data 304 of the target page can be obtained.

[0053] The methods for obtaining image and text data of target pages under different networks will be explained in detail below, and will not be repeated here.

[0054] S204, compare any two target page files among multiple target page files, move the target page files that meet the preset comparison conditions to the candidate folder, and move the target page files that do not meet the preset comparison conditions to the first abnormal folder;

[0055] It should be noted that after obtaining the target page files of the target client under different network environments, the corresponding image data and text data under different network environments can be loaded for comparison and detection one by one.

[0056] In an optional implementation, after obtaining N target page files, any two target page files can be compared. After comparing every two target page files, a first comparison result can be obtained. After comparing all target page files, a set of first comparison results (the first comparison result set) can be obtained. Here, N is a positive integer.

[0057] In an optional implementation, the two target page files are compared. The image data and text data in the two target page files are compared separately. The similarity between the image data and the overlap between the text data are compared to determine the first comparison result.

[0058] In an optional implementation, any two target page files among multiple target page files can be compared to obtain the first comparison result corresponding to any two target page files as described above, that is, the first comparison result set can be obtained, and the first comparison result in the first comparison result set can be compared with the preset comparison conditions.

[0059] In an optional implementation, the preset comparison condition can be that the first comparison result is considered to meet the preset comparison condition if it falls within a preset result range. The result range can be pre-set, and the page detection standard can be constrained by setting the result range. For example, for core pages, it may be desirable for them to display nearly consistently in different environments; the preset result range can be set to 99%-100% to raise the detection standard. Only when the first comparison result is within this range will the target page be considered stable. For some functional pages, it may be desirable for them to display most of the functions; the preset result range can be set to 90%-100%, which is a wider range compared to core pages.

[0060] In an optional implementation, if the first comparison result meets the preset comparison conditions, the two corresponding target page files can be placed in a candidate folder, and the two target page files can be named according to the network environment, the name of the target client, etc., for easy viewing.

[0061] In an optional implementation, if the first comparison result does not meet the preset comparison conditions, the two corresponding target page files can be placed in the first abnormal folder, and the two target page files can be named according to the network environment, the name of the target client, etc. Alternatively, the current network environment and the target client can be recorded in a specified file.

[0062] S206, Obtain the reference folder in the reference client corresponding to the target page, wherein each reference page file in the reference folder is used to indicate the page file that meets the preset comparison conditions obtained by the reference client in a network environment;

[0063] It should be noted that the reference client can be any running software on the terminal device other than the target client, a program that can provide local services to the user. It can transmit data with the server to achieve specific functions.

[0064] In an optional implementation, the reference folder may be a folder containing M reference page files. The reference page files may be image data and text data of target pages that have been tested under different network environments and meet preset comparison conditions. Here, M is a positive integer.

[0065] In an optional implementation, the reference folder can be a reference page file corresponding to a reference client. It can be a page file that meets preset comparison conditions after the target page runs and acquires image and text data in different network environments in the reference client and compares the data in different environments.

[0066] In optional implementations, the reference folder can be reference page files corresponding to multiple reference clients, or page files that meet preset comparison conditions under different network environments corresponding to each reference client. Alternatively, it can be a comparison of all page files corresponding to different reference clients that meet preset comparison conditions.

[0067] S208, compare the reference page file and the target page file in the candidate folder respectively, and move the reference page file and the target page file that do not meet the preset comparison conditions to the second abnormal folder;

[0068] It should be noted that after obtaining the reference folder, the reference page files can be compared with the target page files in the candidate folder. The preset comparison conditions can be the same as those set when detecting the network environment, or they can be different.

[0069] In an optional implementation, if the second comparison result meets the preset comparison conditions, the corresponding reference page file and target page file can be placed in the results folder. If the second comparison result does not meet the preset comparison conditions, the corresponding reference page file and target page file can be placed in the second anomaly folder. The second anomaly folder can be the same folder as the first anomaly folder, or it can be a different folder.

[0070] S210, if the target page file does not exist in the first abnormal folder and neither the reference page file nor the target page file exists in the second abnormal folder, the target page is determined to have passed the detection.

[0071] It should be noted that if neither the reference page file nor the target page file exists in the first or second abnormal folder, it can be assumed that the reference page file and the target page file meet the preset comparison conditions. Therefore, the target page can be considered stable and consistent across different network environments and clients. The target page has passed the detection.

[0072] In this embodiment, multiple target page files displayed in multiple network environments on a target client are obtained, wherein each network environment corresponds one-to-one with a target page file. Any two target page files are compared, and those meeting preset comparison conditions are moved to a candidate folder, while those not meeting the preset comparison conditions are moved to a first abnormal folder. A reference folder corresponding to the target page is obtained in a reference client, where each reference page file indicates a page file that meets preset comparison conditions obtained by the reference client in a network environment. The reference page files and target page files in the candidate folders are compared, and those not meeting the preset comparison conditions are moved to a second abnormal folder. If no target page file exists in the first abnormal folder, and neither a reference page file nor a target page file exists in the second abnormal folder, the target page is determined to have passed the detection. This method solves the technical problem of low efficiency in application page detection methods provided by related technologies.

[0073] In this embodiment, a page to be tested can be used as the target page. The target page is accessed in a client under different network environments to obtain target page files in different network environments. Different target page files are compared, and those that do not meet preset comparison conditions are placed in a first abnormal folder, while those that do meet the preset comparison conditions are placed in a candidate folder for subsequent comparisons across different clients. Reference page files for the target page under different clients can be obtained and compared with the target page files. Reference page files and target page files that do not meet the preset comparison conditions are moved to a second abnormal folder. Files in both the first and second abnormal folders do not meet the preset comparison conditions. The presence of such files indicates that the target page's display or text information differs across different networks or clients, failing to achieve consistent and stable performance under different conditions. The absence of such files indicates that the target page can achieve stable performance in the client of the tested network environment. This method automatically detects whether the target page's processing logic is correct under different conditions, improving detection efficiency, reducing manual costs, and achieving stability and consistency for the target page.

[0074] In an optional implementation, the above comparison of any two target page files among multiple target page files includes: selecting all combinations of two target page files from N target page files to obtain H target page file combinations, where N is a positive integer and H is a positive integer; traversing the H target page file combinations, taking each of the H target page file combinations as the k-th target page file combination in turn, and performing the following operations: comparing the two target page files in the k-th target page file combination to obtain the corresponding first comparison result, where k is an integer greater than or equal to 1 and less than or equal to H; after performing the operation on the H-th target page file combination, obtaining a first comparison result set composed of the first comparison results corresponding to each of the H target page file combinations.

[0075] In an optional implementation, after obtaining the target page files of the target client under different network environments, the target page files can be combined in pairs to obtain target page file combinations. The H target page file combinations are then traversed to compare the two target page files in each combination, obtaining the corresponding first comparison result. After the traversal is complete, the first comparison result corresponding to each target page file combination is obtained, generating a first comparison result set.

[0076] Through the above-described embodiments of this application, N target page files corresponding to the target page obtained by the target client under different network environments can be compared pairwise, and a first comparison result corresponding to each combination of target page files can be obtained. This facilitates the subsequent identification of the target page file corresponding to the first comparison result, thereby improving the accuracy of assigning target page files to their corresponding folders and thus improving the accuracy of target page detection. Furthermore, during the detection process, it is not necessary to separately design and verify the page files corresponding to each network environment, nor is it concerned with whether individual pages are correct, thus improving the accuracy of target page detection.

[0077] In an optional implementation, the above-mentioned comparison of two target page files in the k-th target page file combination to obtain a corresponding first comparison result includes: obtaining first image data, first text data, second image data, and second text data corresponding to each of the two target page files in the k-th target page file combination, wherein the first image data and the first text data indicate the same target page file, and the second image data and the second text data indicate the same target page file; obtaining a first histogram corresponding to the first image data and a second histogram corresponding to the second image data, and comparing the first histogram and the second histogram to obtain a target image comparison value corresponding to the k-th target page file combination; comparing the first text data and the second text data to obtain a target text comparison value corresponding to the k-th target page file combination; and determining the first comparison result based on the target image comparison value and the target text comparison value.

[0078] It should be noted that an image histogram is a graph that indicates the distribution of pixel brightness or color in an image. For color images, there are usually three color channels. After obtaining two target page files from a target page file combination, the first image data and the second image data corresponding to each of the two target page files can be obtained, and the first histogram of the first image data and the second histogram of the second image data can be obtained.

[0079] In an optional implementation, a comparison can be made between the first and second histograms to obtain a target image contrast value. As mentioned earlier, the histogram can display the number of pixels or color values ​​for each brightness or color in the image. The square of the difference in pixel count at corresponding positions between the first and second histograms can be calculated. All squared errors are then summed, and the sum is divided by the total number of pixels to obtain the mean. The square root of the mean is then calculated to obtain the root mean square error.

[0080] In an optional implementation, the first and second text data corresponding to each of the two target page files in a target page file combination can be obtained. The text data can be stored in text file (text, txt) format or in table (list) format.

[0081] In an optional implementation, the cosine similarity between the first and second text data can be used as the target text comparison value. Alternatively, the Euclidean distance between the first and second text data can be used as the target text comparison value.

[0082] In an optional implementation, an image processing model can be used to process the first image data and the second image data to obtain a target image comparison value. The image processing model can be a pre-trained image model or an image processing model obtained by fine-tuning the pre-trained image processing model using the image data corresponding to the page.

[0083] In an optional implementation, a text processing model can be used to process the first text data and the second text data to obtain the target text comparison value. The text processing model can be a pre-trained text model, or it can be a text processing model obtained by fine-tuning the pre-trained text processing model using the text data corresponding to the page.

[0084] In an optional implementation, the first comparison result can be determined by weighted summation of the obtained target image comparison value and target text comparison value. Alternatively, a multimodal model can be used to determine the first comparison result based on the first image data, the second image data, the first text data, and the second text data. Image and text features can be extracted from different data sets for image and text feature processing to obtain the first comparison result.

[0085] Through the above-described embodiments of this application, similarity calculation can be performed using the first image data, second image data, first text data, and second text data corresponding to two target page files in a target page file combination, to obtain a first comparison result between the two target page files. By comparing image data and text data in combination, the accuracy of the first comparison result is improved, thereby improving the accuracy of subsequent detection.

[0086] In an optional implementation, before comparing the two target page files in the k-th target page file combination to obtain the corresponding first comparison result, the method includes: performing anomaly detection on the N target page files in sequence, moving the target page files whose image data meets the anomaly detection conditions to the third anomaly folder, and obtaining the updated multiple target page files, wherein the anomaly detection conditions are used to indicate the image quality of the image data.

[0087] In an optional implementation, after switching between different networks and accessing the target page on a client, anomaly detection can be performed on the target page. This includes preliminary detection of common page anomalies, such as a blank screen or blank blocks, overlapping text, image and text obscuring each other, and garbled characters. If the target page meets the anomaly detection criteria after the anomaly detection, it is considered that the target page is abnormal in the current environment.

[0088] In an optional implementation, the anomaly detection conditions can be determined based on the items to be detected. For example, when detecting blank screens or blank blocks, the anomaly detection condition can be set to the presence of abnormal white blocks. This can be done by locating the white areas on the original image pixels based on the outlines of elements in the confirmed page, or by distinguishing white areas through boundaries. If blank blocks are present, the target page in the current environment can be considered abnormal. The target page in the current environment can be named according to the network environment, client, etc., and stored in a third anomaly folder. The third anomaly folder can be the same as the first and second anomaly folders, or it can be a separate folder.

[0089] In an optional implementation, anomaly detection can be performed on the image data in the target page file after the target page file is obtained, or anomaly detection can be performed directly after the target page is accessed, and the image data and text data of the target page that pass the anomaly detection are obtained to generate the target page file.

[0090] Through the above-described embodiments of this application, anomaly detection can be performed on target pages under different network environments before comparing target page files corresponding to different network environments. This allows target pages with common anomalies to be filtered out in advance, saving resources during subsequent target page comparisons, improving comparison efficiency, and thus improving page detection efficiency.

[0091] In an optional implementation, after comparing the N target page files corresponding to the target client in N network environments and dividing each target page file into a candidate folder and a first abnormal folder according to preset comparison conditions, the reference folder corresponding to the target page in the reference client can be obtained.

[0092] It should be noted that the reference folder can be a folder corresponding to a single reference client, or it can be a folder corresponding to multiple reference clients.

[0093] In an optional implementation, the page files corresponding to different network environments of each reference client can be obtained, and the page files of each reference client under different network environments can be compared. The page files that meet the preset comparison conditions are moved to the abnormal folder, and the page files that do not meet the preset comparison conditions are moved to the candidate folder corresponding to the reference client.

[0094] In an optional implementation, the exception folder can be named after the reference client, or page files that do not meet the preset comparison criteria can be placed in a unified exception folder. The candidate folder can also be named after the reference client, or page files that meet the preset comparison criteria can be placed in a unified candidate folder.

[0095] In an optional implementation, page files in at least one candidate folder corresponding to a reference client can be compared, and page files that meet preset comparison conditions can be moved to the reference folder as reference page files. Alternatively, all page files in the candidate folder can be moved to the reference folder as reference page files.

[0096] In an optional implementation, the above-mentioned comparison of the reference page file and the target page file in the candidate folder includes: selecting all combinations of two reference page files and target page files from M reference page files and multiple target page files to obtain L reference page file combinations, where M is a positive integer and L is a positive integer; traversing the L reference page file combinations, taking each of the L reference page file combinations as the j-th reference page file combination in turn, and performing the following operations: comparing the reference page file in the j-th reference page file combination with the target page file to obtain the corresponding second comparison result, where j is an integer greater than or equal to 1 and less than or equal to L; after performing the operation on the L-th reference page file combination, obtaining a second comparison result set composed of the second comparison results corresponding to each of the L reference page file combinations.

[0097] In an optional implementation, after obtaining a reference page file corresponding to at least one reference client, the reference page file can be compared with the target page file in the candidate folder. The reference page file and the target page file can be randomly combined to obtain a reference page file combination, and the two page files in each reference page file combination are compared to obtain the corresponding second comparison result.

[0098] In an optional implementation, after obtaining the reference page file corresponding to at least one reference client, the target page file and the reference page file in the candidate folder can be put together into a list to be combined. Two reference page files or a reference page file and a target page file can be combined to obtain a reference page file combination. The page files in the reference page file combination are compared to obtain the corresponding second comparison result.

[0099] Through the above-described embodiments of this application, reference page files obtained after network environment testing in different clients can be compared with target page files. The stability of the target page in different clients can be tested. By comparing them one by one, abnormal page files can be automatically detected, and the corresponding target client or reference client and the corresponding network environment can be indicated, thereby achieving automatic detection and improving the detection efficiency of the target page.

[0100] In an optional implementation, the above-mentioned comparison of the reference page file and the target page file in the j-th reference page file combination to obtain the corresponding second comparison result includes: obtaining the third image data, third text data, fourth image data, and fourth text data corresponding to the reference page file and the target page file in the j-th reference page file combination, wherein the third image data and the third text data indicate the same reference file or target page file, and the fourth image data and the fourth text data indicate the same reference file or target page file; obtaining the third histogram corresponding to the third image data and the fourth histogram corresponding to the fourth image data, and comparing the third histogram and the fourth histogram to obtain a reference image comparison value corresponding to the j-th reference page file combination; comparing the third text data and the fourth text data to obtain a reference text comparison value corresponding to the j-th reference page file combination; and determining the second comparison result based on the reference image comparison value and the reference text comparison value.

[0101] As mentioned earlier, image and text data from two page files can be used to determine image and text comparison values ​​between them, which can then be used to determine a second comparison result. The process of determining the second comparison result is similar to that of determining the first comparison result.

[0102] Figure 4 This is a schematic diagram of another optional application page detection method according to an embodiment of this application; as shown Figure 4 As shown, by loading the target page under different network environments using the target client, multiple target page files can be obtained. Combining these target page files in pairs yields multiple target page file combinations. The target page files in these combinations are compared based on image and text data. Target page file combinations that meet preset comparison criteria are stored in a candidate folder, while those that do not meet the criteria are stored in a first abnormal folder.

[0103] like Figure 4 As shown, given a candidate folder, the target page can be loaded synchronously or asynchronously in at least one reference client under different network environments. Following the method described above, page files from different reference clients that meet preset comparison criteria are grouped and stored in a reference folder, while page files that do not meet the preset comparison criteria are grouped and stored in a first abnormal folder. The network environment corresponding to the target page files in the first abnormal folder may be abnormal, and this can be recorded.

[0104] like Figure 4As shown, reference page file combinations can be obtained by pairwise combining target page files in the candidate folder and reference page files in the reference folder. Page files that do not meet the preset comparison criteria are then stored in the second exception folder. The clients corresponding to the page files in the second exception folder may have exceptions, which can be logged.

[0105] Record the client and network environment corresponding to the page files in the first and second abnormal folders as scenarios where verification fails.

[0106] In an optional implementation, the above-mentioned acquisition of multiple target page files displayed in multiple network environments for the target page in the target client includes: traversing N network environments, taking each of the N network environments as the q-th network environment in turn, and performing the following operations: loading the target page in the q-th network environment; acquiring the image data and text data of the target page in the q-th network environment, and generating the target page file; after performing the operation on the N-th network environment, obtaining the N target page files corresponding to each of the N network environments, where q is an integer greater than or equal to 1 and less than or equal to N.

[0107] In an optional implementation, before traversing N network environments, at least one of the following is included: determining a first type of mobile communication network environment as a first network environment; determining a second type of mobile communication network environment as a second network environment when the first type of mobile communication network environment is turned off; determining a wireless communication network environment as a third network environment when the wireless communication network is turned on; obtaining the bandwidth delay and network transmission parameters of the basic bandwidth, and determining a fourth network environment based on the bandwidth delay and network transmission parameters.

[0108] It should be noted that before simulating different network environments, the network environment needs to be configured first to facilitate switching between different network environments. The network environment can be configured as needed, such as configuring mobile networks, wireless networks, or custom networks.

[0109] In an optional implementation, the first type of mobile communication network card can be placed in the corresponding hardware module of the terminal device, and the mobile communication network can be invoked using a command-line tool to determine the first type of mobile communication network environment as the first network environment. The first type of mobile communication network environment can be a 5G network.

[0110] In an optional implementation, a second type of mobile communication network card can be placed in the hardware module of the terminal device, and the first type of mobile communication network card can be turned off. After using a command-line tool to invoke the mobile communication network, the second mobile communication network environment can be identified as the second network environment. The second type of mobile communication network environment can be a 4G network.

[0111] In an optional implementation, the Wi-Fi network card can be placed in the hardware module of the terminal device, and the wireless communication network environment can be determined as a third network environment by using a command-line tool to call the wireless communication network.

[0112] Figure 5 This is a schematic diagram of another optional application page detection method according to an embodiment of this application; as shown Figure 5 As shown in (a), the terminal device is currently operating in a Type I mobile communication network environment 502, and its indication information can be displayed. In response to the activation operation of the wireless communication network, the network environment can be switched to wireless communication network 504 (e.g., ...). Figure 5 (As shown in (b)). The network environment in which the terminal device is running can be identified as wireless communication network 504, and its corresponding indication information can be displayed.

[0113] In an optional implementation, a weak network environment can be simulated, i.e., an environment with unstable network connectivity or slow network speed. In a weak network environment, pages may load slowly; therefore, simulating a weak network environment can be used to further detect the target page. The Python-based mitmproxy proxy tool can be used for simulation. The desired bandwidth delay time and network transmission parameters can be obtained. For example, to simulate a 2-second delay, you can use "set delay=2". To limit the bandwidth speed, you can use "set bandwidth=100" to simulate a speed of 100kb per second. The above is only one optional implementation method and is not limited to setting the network environment in the above way.

[0114] In an optional implementation, the aforementioned network environment can be encapsulated into a fixed API interface, and a pre-configured script can be used to switch the network environment. For example, a network switching script can be written using the Appium testing tool, so that when the network switching API is called, the network environment can be automatically switched upon receiving the network identifier corresponding to the network environment.

[0115] Through the above-described embodiments of this application, different network environments can be set up and placed in an interface API module. The API can be directly called to achieve fast switching of networks, thereby improving detection efficiency.

[0116] In an optional implementation, loading the target page in the q-th network environment includes at least one of the following: obtaining the network address of the target page and loading the target page through the network address of the target page; obtaining the operation combination corresponding to the target page and loading the target page by executing the operation combination, wherein the operation combination is used to indicate a combination of simulated operations performed on the client.

[0117] In an optional implementation, the target page can be accessed under different network environments after switching networks. Access can be made directly via the target page's network address, or through corresponding combinations of operations.

[0118] In an optional implementation, the Schema URL protocol can be used to determine the network address of the target page. Schema URL is an in-page redirection protocol that can be defined for each application. It can directly redirect to a specific page within the application, and addressing access can be automatically completed through specified fields in the protocol.

[0119] In an optional implementation, the corresponding operation combination for a page can be loaded to access the target page through the operation combination. In the application, users can enter or exit via touch operations to access the corresponding subpage. Touch operations for accessing the target page can be combined and encapsulated so that when access to the target page is desired, it can be accessed directly by loading the touch operations.

[0120] Through the above-described embodiments of this application, the target page can be accessed automatically via network address or operation combination, eliminating the need for manual repetition of client operations, saving operational resources and improving detection efficiency.

[0121] In an optional implementation, the above-mentioned acquisition of image data and text data of the target page in the q-th network environment includes: capturing the display interface of the target page in the q-th network environment as image data; acquiring the text information displayed on the target page in the q-th network environment, and using the text information as text data.

[0122] In an optional implementation, under different network environments, after accessing the target page, a screenshot of the currently displayed page can be taken using a terminal device to obtain image data, which is then saved to the corresponding storage address on the terminal device. The image data can then be sent to the server. When using this image data, a program can retrieve it from the server or the terminal device's memory.

[0123] In optional implementations, different methods can be used to acquire image data depending on the system. For example, when taking screenshots of Android system pages, a command-line tool (Android Debug Bridge, ADB) can be used. ADB can communicate and debug with Android applications. Its "adb shell screencap -p" command can be used to capture images and store them at a specified address. The image data can then be transferred using the "adb pull" command, for example, from a test phone to a computer running the testing program.

[0124] In an optional implementation, a testing framework (WebDriver Agent, WDA) can be used when taking screenshots of iOS systems. WDA can capture image data on the client-side device using the command "self.client = wda.Client(wda_url)". Alternatively, the captured image data can be stored in a specified address using the command "self.client.session.screenshot().save(path)", such as transferring it from the test phone to the computer running the testing program.

[0125] In optional implementations, different scripts can be used depending on the system when acquiring text data. For example, when acquiring page layout text for an Android system, the "uiautomator dump" command can be used to obtain the page layout information of the application on the current device, generating a file containing all elements on the current page. Elements can then be located through text file analysis. The acquired file can be stored on the device, and the text data can be transferred using the "adbpull" command.

[0126] In an alternative implementation, when obtaining the page layout file of the iOS system, the text file can be obtained using the "self.client.source()" command.

[0127] In an optional implementation, image data can be stored in a preset image format (such as a PNG file), and text data can be stored in a preset text format (such as a TXT file). For text files, they can be stored as lists, such as listing the top, main body, and footer of a webpage according to their positions, and storing the acquired data according to these lists.

[0128] Through the above-described embodiments of this application, image data and text data from different systems can be automatically acquired, so that data can be retrieved from the stored location when performing page detection. Alternatively, during detection, a data acquisition script can be automatically executed to acquire image data and text data, and then the target page can be detected, thereby improving page detection efficiency.

[0129] In this embodiment, a page to be tested can be used as the target page. The target page is accessed in a client under different network environments to obtain target page files in different network environments. Different target page files are compared, and those that do not meet preset comparison conditions are placed in a first abnormal folder, while those that do meet the preset comparison conditions are placed in a candidate folder for subsequent comparisons across different clients. Reference page files for the target page under different clients can be obtained and compared with the target page files. Reference page files and target page files that do not meet the preset comparison conditions are moved to a second abnormal folder. Files in both the first and second abnormal folders do not meet the preset comparison conditions. The presence of such files indicates that the target page's display or text information differs across different networks or clients, failing to achieve consistent and stable performance under different conditions. The absence of such files indicates that the target page can achieve stable performance in the client of the tested network environment. This method automatically detects whether the target page's processing logic is correct under different conditions, improving detection efficiency, reducing manual costs, and achieving stability and consistency for the target page.

[0130] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0131] According to another aspect of the embodiments of this application, an application page detection apparatus for implementing the above-described application page detection method is also provided. For example... Figure 6 As shown, the device includes:

[0132] The target page file acquisition unit 602 is used to acquire multiple target page files displayed in multiple network environments for the target page in the target client, wherein each network environment corresponds one-to-one with a target page file; the first comparison unit 604 is used to compare any two target page files among the multiple target page files, move the target page files that meet the preset comparison conditions to the candidate folder, and move the target page files that do not meet the preset comparison conditions to the first abnormal folder; the reference folder acquisition unit 606 is used to acquire the reference folder in the reference client corresponding to the target page, wherein each reference page file in the reference folder is used to indicate the page file that meets the preset comparison conditions acquired by the reference client in a network environment; the second comparison unit 608 is used to compare the reference page file and the target page file in the candidate folder respectively, and move the reference page file and the target page file that do not meet the preset comparison conditions to the second abnormal folder; the detection and judgment unit 610 is used to determine that the target page passes the detection if there is no target page file in the first abnormal folder and no reference page file or target page file in the second abnormal folder.

[0133] Optionally, the first comparison unit 604 includes: a target file combination module, used to select all combinations of two target page files from N target page files to obtain H target page file combinations, where N is a positive integer and H is a positive integer; a target operation execution module, used to traverse the H target page file combinations, take each target page file combination in the H target page file combinations as the kth target page file combination in turn, and perform the following operations: compare the two target page files in the kth target page file combination to obtain the corresponding first comparison result, where k is an integer greater than or equal to 1 and less than or equal to H; and a first set composition module, used to obtain a first comparison result set composed of the first comparison results corresponding to each of the H target page file combinations after the operation is performed on the Hth target page file combination.

[0134] Optionally, the aforementioned target operation execution module is further configured to: obtain first image data, first text data, second image data, and second text data corresponding to each of the two target page files in the k-th target page file combination, wherein the first image data and the first text data indicate the same target page file, and the second image data and the second text data indicate the same target page file; obtain a first histogram corresponding to the first image data and a second histogram corresponding to the second image data, and compare the first histogram and the second histogram to obtain a target image comparison value corresponding to the k-th target page file combination; compare the first text data and the second text data to obtain a target text comparison value corresponding to the k-th target page file combination; and determine a first comparison result based on the target image comparison value and the target text comparison value.

[0135] Optionally, the first comparison unit 604 further includes: an anomaly detection module, used to sequentially perform anomaly detection on N target page files, move the target page files whose image data meets the anomaly detection conditions to a third anomaly folder, and obtain updated multiple target page files, wherein the anomaly detection conditions are used to indicate the image quality of the image data.

[0136] Optionally, the second comparison unit 608 includes: a reference file combination module, used to select all combinations of two reference page files and target page files from M reference page files and multiple target page files to obtain L reference page file combinations, where M is a positive integer and L is a positive integer; a reference operation execution module, used to traverse the L reference page file combinations, take each of the L reference page file combinations as the j-th reference page file combination in turn, and perform the following operations: compare the reference page files and target page files in the j-th reference page file combination to obtain the corresponding second comparison result, where j is an integer greater than or equal to 1 and less than or equal to L; and a second set composition module, used to obtain a second comparison result set composed of the second comparison results corresponding to each of the L reference page file combinations after the operation is performed on the L-th reference page file combination.

[0137] Optionally, the aforementioned reference operation execution module is further configured to: obtain the third image data, third text data, fourth image data, and fourth text data corresponding to the reference page file and the target page file in the j-th reference page file combination, wherein the third image data and third text data indicate the same reference file or target page file, and the fourth image data and fourth text data indicate the same reference file or target page file; obtain the third histogram corresponding to the third image data and the fourth histogram corresponding to the fourth image data, and compare the third histogram and the fourth histogram to obtain a reference image comparison value corresponding to the j-th reference page file combination; compare the third text data and the fourth text data to obtain a reference text comparison value corresponding to the j-th reference page file combination; and determine a second comparison result based on the reference image comparison value and the reference text comparison value.

[0138] Optionally, the target page file acquisition unit 602 includes: a network traversal module, used to traverse N network environments, taking each of the N network environments as the q-th network environment in turn, and obtaining N target page files corresponding to each of the N network environments after performing operations on the N-th network environment, where q is an integer greater than or equal to 1 and less than or equal to N; a loading module, used to load the target page in the q-th network environment; and a page file generation module, used to acquire the image data and text data of the target page in the q-th network environment and generate the target page file.

[0139] Optionally, the network traversal module described above is further configured to: determine the first type of mobile communication network environment as the first network environment; determine the second type of mobile communication network environment as the second network environment when the first type of mobile communication network environment is turned off; determine the wireless communication network environment as the third network environment when the wireless communication network is turned on; obtain the bandwidth delay and network transmission parameters of the basic bandwidth, and determine the fourth network environment based on the bandwidth delay and network transmission parameters.

[0140] Optionally, the loading module described above is further configured to: obtain the network address of the target page and load the target page using the network address of the target page; obtain the operation combination corresponding to the target page and load the target page by executing the operation combination, wherein the operation combination is used to indicate a combination of simulated operations to be performed on the client.

[0141] Optionally, the page file generation module described above is further configured to: capture the display interface of the target page in the q-th network environment as image data; obtain the text information displayed on the target page in the q-th network environment, and use the text information as text data.

[0142] Optionally, in this embodiment, the implementation of each of the above-mentioned unit modules can be referred to the above-mentioned method embodiments, which will not be repeated here.

[0143] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described application page detection method is also provided. This electronic device may be... Figure 7 The terminal device or server shown. This embodiment uses this electronic device as an example for illustration. Figure 7 As shown, the electronic device includes a memory 702 and a processor 704. The memory 702 stores a computer program, and the processor 704 is configured to execute the steps in any of the above method embodiments via the computer program.

[0144] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0145] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0146] S1, obtain multiple target page files displayed in the target client under different network environments, wherein the network environment corresponds one-to-one with the target page file;

[0147] S2, compare any two target page files among multiple target page files, move the target page files that meet the preset comparison conditions to the candidate folder, and move the target page files that do not meet the preset comparison conditions to the first abnormal folder;

[0148] S3, obtain the reference folder in the reference client corresponding to the target page, wherein each reference page file in the reference folder is used to indicate the page file that meets the preset comparison conditions obtained by the reference client in a network environment;

[0149] S4, compare the reference page file and the target page file in the candidate folder respectively, and move the reference page file and the target page file that do not meet the preset comparison conditions to the second abnormal folder;

[0150] S5. If the target page file does not exist in the first abnormal folder, and neither the reference page file nor the target page file exists in the second abnormal folder, then the target page is determined to have passed the detection.

[0151] Alternatively, as those skilled in the art will understand, Figure 7The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 7 This does not limit the structure of the aforementioned electronic devices or electronic equipment. For example, electronic devices or electronic equipment may also include components that are more... Figure 7 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 7 The different configurations shown.

[0152] The memory 702 can be used to store software programs and modules, such as the program instructions / modules corresponding to the application page detection method and apparatus in this embodiment. The processor 704 executes various functional applications and data processing by running the software programs and modules stored in the memory 702, thereby implementing the aforementioned application page detection method. The memory 702 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 702 may further include memory remotely located relative to the processor 704, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 702 may be used, but is not limited to, to store information such as image data and text data. As an example, such as... Figure 7 As shown, the memory 702 may include, but is not limited to, the target page file acquisition unit 602, the first comparison unit 604, the reference folder acquisition unit 606, the second comparison unit 608, and the detection and judgment unit 610 in the application page detection device. Furthermore, it may include, but is not limited to, other module units in the application page detection device, which will not be elaborated in this example.

[0153] Optionally, the transmission device 706 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 706 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 706 is a radio frequency (RF) module, used for wireless communication with the Internet.

[0154] In addition, the aforementioned electronic device also includes: a display 708 for displaying a target page in the interface; and a connection bus 710 for connecting various module components in the aforementioned electronic device.

[0155] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0156] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions provided in embodiments of this application.

[0157] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0158] According to one aspect of this application, a computer-readable storage medium is provided, wherein a processor of a computer device reads computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the above-described application page detection method.

[0159] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0160] S1, obtain multiple target page files displayed in the target client under different network environments, wherein the network environment corresponds one-to-one with the target page file;

[0161] S2, compare any two target page files among multiple target page files, move the target page files that meet the preset comparison conditions to the candidate folder, and move the target page files that do not meet the preset comparison conditions to the first abnormal folder;

[0162] S3, obtain the reference folder in the reference client corresponding to the target page, wherein each reference page file in the reference folder is used to indicate the page file that meets the preset comparison conditions obtained by the reference client in a network environment;

[0163] S4, compare the reference page file and the target page file in the candidate folder respectively, and move the reference page file and the target page file that do not meet the preset comparison conditions to the second abnormal folder;

[0164] S5. If the target page file does not exist in the first abnormal folder, and neither the reference page file nor the target page file exists in the second abnormal folder, then the target page is determined to have passed the detection.

[0165] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0166] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause 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 methods described in the various embodiments of this application.

[0167] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0168] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0169] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0170] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0171] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for detecting application pages, characterized in that, include: Obtain multiple target page files displayed in the target client under multiple network environments, wherein each network environment corresponds one-to-one with the target page file; Compare any two target page files among the plurality of target page files, move the target page files that meet the preset comparison conditions to the candidate folder, and move the target page files that do not meet the preset comparison conditions to the first abnormal folder; Obtain the reference folder in the reference client corresponding to the target page, wherein each reference page file in the reference folder is used to indicate the page file that the reference client obtains in a network environment and meets the preset comparison conditions; The reference page file and the target page file in the candidate folder are compared respectively, and the reference page file and the target page file that do not meet the preset comparison conditions are moved to the second abnormal folder; If the target page file is not found in the first abnormal folder, and neither the reference page file nor the target page file is found in the second abnormal folder, then the target page is determined to have passed the detection. The process of obtaining multiple target page files displayed in multiple network environments in the target client includes: calling an interface that encapsulates the network environment through a network switching script to switch the network environment, wherein the encapsulated network environment includes a first network environment, a second network environment, a third network environment, and a fourth network environment. Before calling the interface encapsulating the network environment through the network switching script, at least one of the following is included: determining a first type of mobile communication network environment as the first network environment; determining a second type of mobile communication network environment as the second network environment when the first type of mobile communication network environment is turned off; determining the wireless communication network environment as the third network environment when the wireless communication network is turned on; obtaining the bandwidth delay and network transmission parameters of the basic bandwidth, and determining a fourth network environment based on the bandwidth delay and network transmission parameters.

2. The method according to claim 1, characterized in that, The comparison of any two target page files among the plurality of target page files includes: All combinations of two target page files are selected from N target page files to obtain H target page file combinations, where N is a positive integer and H is a positive integer; Iterate through the H target page file combinations, taking each of the H target page file combinations as the k-th target page file combination, and perform the following operations: The two target page files in the k-th target page file combination are compared to obtain the corresponding first comparison result, wherein k is an integer greater than or equal to 1 and less than or equal to H; After performing the operation on the Hth target page file combination, a first comparison result set is obtained, consisting of the first comparison results corresponding to each of the H target page file combinations.

3. The method according to claim 2, characterized in that, The step of comparing two target page files in the k-th target page file combination to obtain the corresponding first comparison result includes: Obtain the first image data, first text data, second image data, and second text data corresponding to each of the two target page files in the k-th target page file combination, wherein the first image data and the first text data indicate the same target page file, and the second image data and the second text data indicate the same target page file; Obtain the first histogram corresponding to the first image data and the second histogram corresponding to the second image data, and compare the first histogram and the second histogram to obtain the target image comparison value corresponding to the k-th target page file combination; The first text data and the second text data are compared to obtain the target text comparison value corresponding to the k-th target page file combination; The first comparison result is determined based on the comparison value of the target image and the comparison value of the target text.

4. The method according to claim 2, characterized in that, Before comparing the two target page files in the k-th target page file combination to obtain the corresponding first comparison result, the following steps are included: Anomaly detection is performed on the N target page files sequentially. Target page files whose image data meets the anomaly detection conditions are moved to a third anomaly folder to obtain the updated target page files. The anomaly detection conditions are used to indicate the image quality of the image data.

5. The method according to claim 1, characterized in that, The step of comparing the reference page file and the target page file in the candidate folder includes: All combinations of two reference page files and two target page files are selected from the M reference page files and the plurality of target page files to obtain L combinations of reference page files, where M is a positive integer and L is a positive integer; Iterate through the L reference page file combinations, taking each of the L reference page file combinations as the j-th reference page file combination, and perform the following operations: The reference page file and the target page file in the j-th reference page file combination are compared to obtain the corresponding second comparison result, wherein j is an integer greater than or equal to 1 and less than or equal to L; After performing the operation on the Lth reference page file combination, a second comparison result set is obtained, consisting of the second comparison results corresponding to each of the L reference page file combinations.

6. The method according to claim 5, characterized in that, The step of comparing the reference page file and the target page file in the j-th reference page file combination to obtain the corresponding second comparison result includes: Obtain the third image data, third text data, fourth image data, and fourth text data corresponding to the reference page file and the target page file in the j-th reference page file combination, wherein the third image data and the third text data indicate the same reference file or the target page file, and the fourth image data and the fourth text data indicate the same reference file or the target page file; Obtain the third histogram corresponding to the third image data and the fourth histogram corresponding to the fourth image data, and compare the third histogram and the fourth histogram to obtain the reference image comparison value corresponding to the j-th reference page file combination; The third text data and the fourth text data are compared to obtain the reference text comparison value corresponding to the j-th reference page file combination; The second comparison result is determined based on the comparison value of the reference image and the comparison value of the reference text.

7. The method according to any one of claims 1 to 6, characterized in that, The acquisition of multiple target page files displayed in multiple network environments on the target client includes: Traverse N network environments, taking each of the N network environments as the q-th network environment, and perform the following operations: In the q-th network environment, the target page is loaded; Obtain the image and text data of the target page in the q-th network environment, and generate the target page file; After performing the operation on the Nth network environment, N target page files corresponding to each of the N network environments are obtained, where q is an integer greater than or equal to 1 and less than or equal to N.

8. The method according to claim 7, characterized in that, Loading the target page in the q-th network environment includes at least one of the following: Obtain the network address of the target page, and load the target page using the network address of the target page; Obtain the operation combination corresponding to the target page, and load the target page by executing the operation combination, wherein the operation combination is used to indicate a combination of simulated operations to be performed on the client.

9. The method according to claim 7, characterized in that, The step of obtaining the image data and text data of the target page in the q-th network environment includes: The display interface of the target page in the q-th network environment is captured as the image data; Obtain the text information displayed on the target page in the q-th network environment, and use the text information as text data.

10. A device for detecting application pages, characterized in that, include: The target page file acquisition unit is used to acquire multiple target page files displayed in the target client under multiple network environments, wherein the network environment corresponds one-to-one with the target page file; The first comparison unit is used to compare any two target page files among the plurality of target page files, move the target page files that meet the preset comparison conditions to the candidate folder, and move the target page files that do not meet the preset comparison conditions to the first abnormal folder. The reference folder acquisition unit is used to acquire the reference folder in the reference client corresponding to the target page, wherein each reference page file in the reference folder is used to indicate the page file that the reference client has acquired in a network environment and that meets the preset comparison conditions; The second comparison unit is used to compare the reference page file and the target page file in the candidate folder respectively, and move the reference page file and the target page file that do not meet the preset comparison conditions to the second abnormal folder; The detection and judgment unit is used to determine that the target page passes the detection when the target page file does not exist in the first abnormal folder and neither the reference page file nor the target page file exists in the second abnormal folder. The target page file acquisition unit is further configured to: call the interface of the encapsulated network environment through the network switching script to switch the network environment, wherein the encapsulated network environment includes a first network environment, a second network environment, a third network environment, and a fourth network environment; determine the first type of mobile communication network environment as the first network environment; when the first type of mobile communication network environment is turned off, determine the second type of mobile communication network environment as the second network environment; when the wireless communication network is turned on, determine the wireless communication network environment as the third network environment; acquire the bandwidth delay and network transmission parameters of the basic bandwidth, and determine the fourth network environment based on the bandwidth delay and network transmission parameters.

11. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method described in any one of claims 1 to 9.

12. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 9 through the computer program.