Page display consistency detection method and device

The server-based method for detecting page display consistency addresses inefficiencies in existing screenshot comparison methods by directly comparing display parameters with user-defined rules, enhancing accuracy and efficiency in locating inconsistent elements.

CN119089070APending Publication Date: 2024-12-06HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311159933.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-06-06
Filing Date
2023-09-08
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Existing methods for detecting page display consistency, such as comparing screenshots, fail to accurately locate inconsistently displayed elements due to processing screenshots, leading to inefficiencies and resource wastage.

Method used

A server-based method that compares display parameters of elements against user-defined display rules, directly determining consistency at the element level, reducing the need for screenshot processing and improving detection efficiency.

Benefits of technology

Enhances detection accuracy and efficiency by directly comparing display parameters with user-defined rules, saving computing resources and time while accurately identifying inconsistent elements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089070A_ABST
    Figure CN119089070A_ABST
Patent Text Reader

Abstract

The invention discloses a page display consistency detection method and device, and relates to the technical field of computers. And the server compares the display mode of the element on the page with the target display mode indicated by the display rule, and directly determines the consistency between the display mode of the to-be-tested element contained in the page and the target display mode of the to-be-tested element indicated by the display rule, so that the positioning precision is improved. In the embodiment of the invention, the server does not need to process the screenshot and obtain the page display consistency detection result according to the processed screenshot, so that the computing resource and the computing time required by the server for processing the screenshot are saved, and the detection efficiency of the page display consistency is improved. And meanwhile, the problem that the page display consistency detection of the to-be-detected elements cannot be completed due to different pages for bearing the to-be-detected elements, different servers for loading the pages for bearing the to-be-detected elements and different types of the to-be-detected elements is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on June 6, 2023, with application number 202310664864.2 and application name “A Page Consistency Detection Method”, all contents of which are incorporated by reference in this application. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to a method and device for detecting page display consistency. Background Art

[0003] Electronic devices use page display information to interact with users. The page display may be inconsistent with the expected display due to code implementation, interaction method, browser rendering anomalies, etc. The processing device uses different display parameters to display the same page in the same browser, and compares the screenshots of the same page displayed with different display parameters to detect the consistency of the display of the same page under different display parameters. When the processing device detects page display consistency by comparing screenshots, it cannot detect whether the elements contained in the page are consistent, resulting in the inability to accurately locate the inconsistently displayed elements in the page. Summary of the invention

[0004] The present application provides a method and device for detecting page display consistency, which is used to solve the problem that when a processing device compares screenshots to detect page display consistency, it is unable to detect whether the elements contained in the page are consistent, resulting in an inability to accurately locate the inconsistently displayed elements in the page.

[0005] In a first aspect, the present application provides a method for detecting page display consistency. The detection method is executed by a server, and the detection method includes: the server obtains page information input by a user. The page information is used to determine the page to be tested, and the page to be tested includes the element to be tested. The server obtains display parameters of the element to be tested after being loaded on the client. The display parameters are used to indicate: the display mode of the element to be tested in the page to be tested. The server obtains display rules input by the user. The display rules are used to indicate the target display mode of the element to be tested in the page to be tested. The server determines the detection result based on the display parameters and the display rules. The detection result is used to indicate the consistency between the display mode and the target display mode. The server outputs the detection result.

[0006] Compared with the screenshots of the server comparison page, the page display consistency detection result is obtained. In the present application, the server directly compares the display mode of the element to be tested on the page to be tested with the target display mode of the element to be tested, and obtains the page display consistency detection result of the element to be tested. The server uses the element to be tested as the smallest unit for page display consistency detection, and can directly locate the page display consistency of the element to be tested contained in the page to be tested, thereby improving the positioning accuracy. The server does not need to process the screenshots, and obtains the page display consistency detection result according to the processed screenshots, saving the computing resources and computing time required for the server to process the screenshots, and improving the detection efficiency of the page display consistency. At the same time, it avoids the problem of being unable to complete the page display consistency detection of the element to be tested due to the difference in the page carrying the element to be tested, the difference in the server loading the page carrying the element to be tested, and the difference in the category of the element to be tested. In a possible implementation method, the server determines the detection result according to the display parameters and the display rules, including: the server determines whether the display parameters match the display rules, and if not, it determines that the display mode is inconsistent with the target display mode. In this way, the server determines whether the display parameters of the element to be tested match the display rules of the element to be tested, thereby realizing the detection of the page display consistency at the element level.

[0007] In another possible implementation, when the display parameters match the display rules, the server outputs the detection results in a first manner. And when the display parameters do not match the display rules, the server outputs the detection results in a second manner; wherein the first manner and the second manner are different. In this way, the server presents different detection results in different manners. When a certain detection result needs to be obtained, it is only necessary to pay attention to the presentation manner corresponding to the detection result, quickly locate the required detection result, and improve the detection efficiency.

[0008] In another possible implementation, the page to be tested includes multiple pages, and each page includes an element to be tested.

[0009] In another possible implementation, the display rule may include a combination of one or more of the following information 1 to information 5.

[0010] Information 1: Rule name, used to identify the display rule.

[0011] Information 2: Rule type, used to indicate the category of the display rule.

[0012] Information 3: Detection attributes are used to indicate the style parameters of an element.

[0013] Information 4: Detection value data type, used to indicate the data category of the display parameter of the element.

[0014] Information 5: rule attribute value, used to indicate the detection strategy when using the display rule to detect the display mode of the element to be detected.

[0015] In another possible implementation, the server may obtain the display rule input by the user in a variety of ways. Two possible examples are given below.

[0016] Example 1: The server obtains a target page input by a user, and determines a display rule according to the target page, wherein the target page includes an element to be tested, and the display mode of the element to be tested in the target page is a target display mode.

[0017] Example 2: The server obtains configuration information input by the user, and determines a display rule according to the configuration information.

[0018] The configuration information may be a combination of one or more of the following information 1 to information 5.

[0019] Information 1: Rule name, used to identify the display rule.

[0020] Information 2: Rule type, used to indicate the category of the display rule.

[0021] Information 3: Detection attributes are used to indicate the style parameters of an element.

[0022] Information 4: Detection value data type, used to indicate the data category of the display parameter of the element.

[0023] Information 5: rule attribute value, used to indicate the detection strategy when using the display rule to detect the display mode of the element to be detected.

[0024] The server can obtain the display rules according to the configuration information input by the user. In this way, the user can directly obtain the display rules by inputting information, which is intuitive and interactive. The server obtains the display rules according to the target page. In this way, compared with obtaining the display rules according to the information input by the user, the user's operation is reduced, the waiting time for the server to wait for the user to input the display rules is shortened, and the efficiency of obtaining the display rules is improved.

[0025] In another possible implementation, the display rule input by the user is one of multiple preconfigured display rules.

[0026] In another possible implementation, the server obtains display parameters of the element to be tested after being loaded on the client, including: the server obtains display parameters of all elements in the page to be tested after being loaded on the client, and the server obtains display parameters of the element to be tested from the display parameters of all elements after being loaded on the client.

[0027] In another possible implementation, the page information includes the path information of the element to be tested in the page to be tested, and the server obtains the display parameters of the element to be tested after being loaded on the client, including: the server obtains the display parameters of the element to be tested after being loaded on the client according to the path information of the element to be tested in the page to be tested included in the page information. In this way, the server directly obtains the display parameters of the element to be tested after being loaded on the client according to the path information of the element to be tested in the page to be tested. This avoids the server obtaining the display parameters of all elements contained in the page to be tested and detecting the page display consistency of all elements, thereby saving the server's computing resources and storage resources.

[0028] In another possible implementation, when the display parameters do not match the display rules, the server outputs the number of unmatched display parameters and / or the category of unmatched display parameters. In this way, based on the number and category of unmatched display parameters, the content of the inconsistent display of the element to be tested page can be quickly obtained, thereby improving the detection efficiency.

[0029] In a second aspect, the present application provides a device for detecting page display consistency, wherein the device comprises modules for executing the detection method in the first aspect or any possible design of the first aspect.

[0030] In a third aspect, the present application provides a server. The server includes: an interface circuit and a processor. The interface circuit is used to: receive data from other devices outside the server and transmit it to the processor, or send data from the processor to other devices outside the server. The processor is used to execute the operation steps of the detection method in the first aspect or any possible design of the first aspect through a logic circuit or execution code instructions.

[0031] In a fourth aspect, the present application provides a computer-readable storage medium, including: computer software instructions; when the computer software instructions are executed in a computing device, the computing device executes the operation steps of the detection method described in the first aspect or any possible implementation of the first aspect.

[0032] In a fifth aspect, the present application provides a computer program product. When the computer program product is run on a computer, the computing device is caused to execute the operation steps of the detection method described in the first aspect or any possible implementation of the first aspect.

[0033] In a sixth aspect, the present application provides a chip system. The chip system includes a processor for implementing the function of the server in the detection method of the first aspect. In a possible design, the chip system also includes a memory for storing program instructions and / or data. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0034] The beneficial effects of the third to sixth aspects above can refer to the description of the first aspect or any implementation of the first aspect, and will not be repeated here. Based on the implementations provided by the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 A schematic diagram of a page display consistency detection process provided in an embodiment of the present application;

[0036] Figure 2A A schematic diagram of the structure of a first page display consistency detection system provided in an embodiment of the present application;

[0037] Figure 2B A schematic diagram of the structure of a second page display consistency detection system provided in an embodiment of the present application;

[0038] Figure 2C A schematic diagram of the structure of a third page display consistency detection system provided in an embodiment of the present application;

[0039] Figure 3 A schematic diagram of a flow chart of a first method for detecting page display consistency provided in an embodiment of the present application;

[0040] Figure 4 A schematic diagram of a display of an element to be tested on a page provided in an embodiment of the present application;

[0041] Figure 5 A schematic diagram of obtaining an element to be tested provided in an embodiment of the present application;

[0042] Figure 6 A schematic diagram of a display rule provided in an embodiment of the present application;

[0043] Figure 7 A schematic diagram of a configuration of a detection attribute provided in an embodiment of the present application;

[0044] Figure 8 A schematic diagram of a configuration of a rule attribute value provided in an embodiment of the present application;

[0045] Fig. 9 A schematic diagram of outputting the first page display consistency detection result provided in an embodiment of the present application;

[0046] Fig.10 A schematic diagram of outputting the detection result of the second page display consistency provided in an embodiment of the present application;

[0047] Fig.11 A schematic diagram of outputting the third page display consistency detection result provided in an embodiment of the present application;

[0048] Fig.12 A schematic diagram of outputting the detection result of the fourth page display consistency provided in an embodiment of the present application;

[0049] Fig.13 A schematic diagram of a flow chart of a second method for detecting consistency of page display provided in an embodiment of the present application;

[0050] Fig.14 A schematic diagram of the structure of a device for detecting page display consistency provided in an embodiment of the present application;

[0051] Fig.15 A schematic diagram of the structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0052] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given.

[0053] The processing device can use the browser to load and render the page to display the information. The same page may be displayed inconsistently due to code implementation, interaction mode, browser rendering anomalies, etc., affecting the customer experience. The page display consistency can be detected by human eyes or by comparing screenshots. The following briefly describes the above two methods in different situations.

[0054] Method 1: Human Eye Detection

[0055] Figure 1 A schematic diagram of a page display consistency detection process provided in an embodiment of the present application, such as Figure 1 As shown, the human eye can Figure 1 The following are the a Fitts' law, b eye focus rule, c main buttons hanging in the air, d pop-up button size, e content area button size and f bottom operation bar button size to complete the page display consistency detection. This detection method requires staff to detect the display mode of the elements contained in the page one by one, which has the problems of large workload and low detection efficiency.

[0056] Method 2: Compare screenshots

[0057] The processing device displays the same page in the same browser using different display parameters, takes screenshots and compares the same page displayed with different display parameters, and completes the detection of the consistency of the display mode of the same page under different display parameters. This detection method detects in units of pages, resulting in the inability to accurately locate the inconsistently displayed elements in the page.

[0058] To this end, an embodiment of the present application provides a page display consistency detection system, and the page display consistency detection system can have different composition forms, which are described below.

[0059] In a first possible scenario, the page display consistency detection system includes: a terminal.

[0060] Figure 2A A schematic diagram of the structure of the first page display consistency detection system provided in the embodiment of the present application, such as Figure 2A As shown, the detection system 200A includes: a terminal 210. In this case, the terminal 210 can obtain the display parameters of the elements to be tested in the page, and the elements to be tested can be all elements contained in the page, or some elements of all elements contained in the page, which is not limited in this application. The terminal 210 can directly use the storage resources and computing resources carried by itself, and use the page display consistency detection method described below to realize the page display consistency detection.

[0061] The terminal 210 may be, but is not limited to: user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The terminal 210 may be a tablet computer (such as Figure 2A The terminal 1 shown in FIG. 1 ), the mobile phone (such as Figure 2A The terminal 2 shown in FIG. 2 ), a computer with a wireless transceiver function (such as Figure 2A 4), Virtual Reality (VR) terminal devices (such as Figure 2A The terminal shown in 3), augmented reality (AR) terminal equipment, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in smart cities, wireless terminals in smart homes, etc.

[0062] In a possible implementation, the terminal 210 includes: a display device, a memory, a memory controller (MemoryController) and a processor (Processor).

[0063] The display device is used to display the page containing the element to be tested. The display device can be or include any type of display for representing the page, such as an integrated or external display screen or display. For example, the display screen can include a liquid crystal display (LCD), an organic light emitting diode (OLED) display, a plasma display, a projector, a micro LED display, a liquid crystal on silicon (LCoS), a digital light processor (DLP), or any other type of display screen.

[0064] The memory is the main memory of the terminal 210. The memory is usually used to store various running software in the operating system, input and output data, and information exchanged with the external memory, etc. For example, the memory is used to store the information of the elements to be tested contained in the page displayed by the display device. In order to improve the access speed of the processor, the memory needs to have the advantage of fast access speed, such as using dynamic random access memory (DRAM) as the memory. The processor can access the memory at high speed through the memory controller and perform read and write operations on any storage unit in the memory. In addition to DRAM, the memory can also be other random access memories, such as static random access memory (SRAM). In addition, the memory can also be a read-only memory (ROM). As for the read-only memory, for example, it can be a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), etc. This embodiment does not limit the number and type of memory. In addition, the memory can be configured to have a power preservation function. The power-saving function means that the data stored in the memory will not be lost when the system loses power and then powers on again. Memory with the power-saving function is called non-volatile memory.

[0065] The memory controller is a bus circuit controller that controls the memory inside the terminal 210 and is used to manage and plan the data transmission from the memory to the processor core. Through the memory controller, data can be exchanged between the memory and the processor core. The memory controller can be a separate chip and connected to the processor core through the system bus. The memory controller can also be integrated into the processor, or built into the north bridge, or it can be an independent memory controller chip. The embodiments of the present application do not limit the specific location and existence form of the memory controller. In actual applications, the memory controller can control the necessary logic to write data to the memory or read data from the memory. The memory controller can be a memory controller in a processor system such as a general-purpose processor, a dedicated accelerator, a GPU, an FPGA, an embedded processor, etc.

[0066] The processor is used to obtain information about the elements to be tested contained in the page displayed by the display device, and to complete the detection of page display consistency based on the information. The processor is the computing core and control core of the terminal 210, and the processor can be a very large-scale integrated circuit. The processor is installed with an operating system and other software programs, so that the processor can access the memory and various peripheral component interconnection standards (Peripheral Component Interconnect Express, PCIe) devices. The processor includes one or more processor cores. The processor core in the processor is, for example, a central processing unit (CPU) or other specific integrated circuit (Application Specific Integrated Circuit, ASIC). The processor can also be other general-purpose processors, digital signal processors (digital signal processing, DSP), application-specific integrated circuits, field programmable gate arrays (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. In practical applications, the terminal 210 may also include multiple processors.

[0067] Terminal 210 also includes various input / output (I / O) devices. I / O devices refer to hardware for data transmission, and can also be understood as devices connected to I / O interfaces. Common I / O devices include network cards, printers, keyboards, mice, etc. All external memories can also be used as I / O devices, such as hard disks, floppy disks, and optical disks.

[0068] The processor, memory, memory controller and I / O device can be connected via a bus. The bus may include a path for transmitting information between the above components (such as the processor and memory). In addition to the data bus, the bus may also include a power bus, a control bus and a status signal bus. However, for the sake of clarity, various buses are marked as buses in the figure. The bus may be a PCIe bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, a unified bus (Unified Bus, Ubus or UB), a computer fast link (Compute Express Link, CXL), a cache coherent interconnect for accelerators (cache coherent interconnect for accelerators, CCIX), etc. For example, the processor can access these I / O devices via the PCIe bus. The processor is connected to the memory via a double data rate (DDR) bus. Here, different memories may use different data buses to communicate with the processor, so the DDR bus can also be replaced by other types of data buses, and the embodiment of the present application does not limit the bus type.

[0069] It should be noted that the terminal 210 can be called a host. Figure 2A This is just a schematic diagram. The terminal 210 may also include other components, such as a hard disk, an optical drive, a power supply, a chassis, a cooling system, and other input and output controllers and interfaces. Figure 2A The embodiment of the present application does not limit the number of processors, memories, and memory controllers included in the terminal 210.

[0070] The above describes a situation in which the terminal directly obtains the elements contained in the page and directly uses the available computing resources and storage resources to implement the detection of page display consistency. In some possible situations, the terminal can also transmit the display parameters of the elements contained in the page to the server, and the server uses its own computing resources and storage resources to complete the page display consistency detection. The second possible situation is used below to illustrate.

[0071] In the second possible scenario, the page display consistency detection system includes: a terminal and a server.

[0072] Figure 2B A schematic diagram of the structure of the second page display consistency detection system provided in the embodiment of the present application is as follows: Figure 2BAs shown, the detection system 200B includes: a terminal 210, a server 220 and a network. In this case, the server 220 receives the display parameters of the element to be tested transmitted by the terminal 210. The element to be tested can be all the elements contained in the page, or it can be some of the elements contained in the page. In the case where the element to be tested is some of the elements contained in the page, the server 220 can call the computing resources and storage resources carried by itself, and use the page display consistency detection method described below to directly implement the page display consistency detection. In some possible examples, this detection method can also be called online detection.

[0073] The server 220 may be, but is not limited to: a server and a data center, etc., which are described below respectively.

[0074] Scenario ①: The service end 220 is a server. The server can be set on the terminal side or on the cloud side.

[0075] Scenario ②: The server 220 is a data center. The data center may include one or more physical devices with computing functions, such as mobile phones, tablet computers, etc. When the data center includes multiple physical devices with computing functions, the multiple physical devices may be set in the same physical location or in different physical locations. When multiple physical devices with computing functions are set in different physical locations, a network may be used to implement data interaction between the physical devices. The network may include one or more network devices, which may be devices with data forwarding functions such as routers or switches, such as switches.

[0076] The servers described in the above scenarios ① and ② can be implemented using computers or computer clusters, which are described below respectively.

[0077] In the first possible scenario, the server is implemented using a computer.

[0078] In this case, the computer may include a memory, a processor, and one or more interfaces.

[0079] The memory can be used to store the information of the element to be measured, and the information of the element to be measured after storage processing. The memory can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memory. Among them, the non-volatile memory can be a ROM, a PROM, an EPROM, an electrically erasable programmable read-only memory (electrically EPROM, EEPROM) or a flash memory. The volatile memory can be a random access memory (random access memory, RAM), which is used as an external cache. By way of exemplary but not limiting explanation, many forms of RAM are available, such as SRAM, DRAM, synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (doubledata date SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) and direct memory bus random access memory (direct rambus RAM, DR RAM). The embodiment of the present application does not limit the type of memory, such as the memory can also be a solid state drive or a mechanical hard disk.

[0080] The processor is used to process the information of the element to be tested and complete the detection of consistent page display. For the relevant content of the processor, please refer to the relevant description above and will not be repeated here.

[0081] The computer includes one or more interfaces that can receive information about the element to be measured, and can also transmit the processing results obtained by the computer processor to other devices, such as a display device for display. For the relevant content of the display device, please refer to the relevant description above, which will not be repeated here.

[0082] In the second possible scenario, the server is implemented using a computer cluster.

[0083] In this context, a computer cluster refers to a collection of computers connected via a local area network or the Internet (e.g. Figure 2BComputers 1 to 4 are shown in the figure. Each computer can complete the detection of the page display consistency of the received information of the element to be tested according to the received information of the element to be tested. Exemplarily, the computer cluster can have a rack, and the rack can establish communication for multiple computers contained in the computer cluster through a wired connection, such as a universal serial bus (USB) or a PCIe high-speed bus. Computer clusters are generally used to perform large tasks (also referred to as jobs). The jobs here are generally large jobs that require more resources to be processed in parallel. This embodiment does not limit the nature and number of jobs. A job may include multiple computing tasks generated in the process of detecting page display consistency, and these computing tasks can be assigned to multiple computing resources for execution. Each computer in the computer cluster uses the same hardware and the same operating system; different hardware and different operating systems can also be used in the computers in the computer cluster according to business needs.

[0084] The above text describes the schematic diagram of the structure of the page display consistency detection system when the element to be detected is part of all elements contained in the page in combination with the accompanying drawings. In some possible situations, the element to be detected may also be the information of all elements contained in the page. In this situation, the page display consistency detection system may include: a terminal, a storage system, and a server.

[0085] Figure 2C A schematic diagram of the structure of a third page display consistency detection system provided in an embodiment of the present application, such as Figure 2C As shown, the detection system 200C includes: a terminal 210, a server 220, a storage system and a network. In this case, the terminal 210 obtains the display parameters of all elements contained in the page, and the terminal 210 transmits the display parameters of all elements to the server 220 through the network. The server 220 uses its own computing and storage resources to pre-process the display parameters of all elements, and transmits the pre-processed display parameters of all elements to the storage system. In the case where it is necessary to detect the consistency of the page display, the server 220 obtains the display parameters of all pre-processed elements from the storage system, and calls its own storage and computing resources to realize the detection of the page display consistency. In some possible examples, this detection method can also be called offline detection.

[0086] The storage system may be composed of storage devices, such as a memory. The functions of the storage system may also be implemented through storage services, such as Data Warehouse Service (GaussDB (DWS)) and Object Storage Service (OBS). For more information about the memory, terminal 210, server 220, and network, please refer to the above description, which will not be repeated here.

[0087] The above text, in combination with the accompanying drawings, describes a page display consistency detection system provided in an embodiment of the present application. In some possible scenarios, an application (application, app) and the like may be deployed on a terminal or a server. The application may call upon the computing resources and storage resources of a device (such as a terminal or a server) on which the application is deployed, and the page display consistency detection method described below is used to complete the page display consistency detection.

[0088] The above describes the page display consistency detection system provided by the embodiment of the present application in combination with the accompanying drawings. The following describes the page display consistency detection method provided by the embodiment of the present application in combination with the accompanying drawings. Figure 3 The first method for detecting page display consistency provided in the embodiment of the present application is a flow chart, which can be executed by any one of the terminal and the server described above, or both. The method is described below by taking the server executing the method as an example, and the method includes the following S310 to S350.

[0089] S310: The server obtains page information input by the user.

[0090] The page information is used to determine the page to be tested, and the page to be tested includes the element to be tested.

[0091] The page to be tested may be one page or multiple pages. The page information may include the address of the page to be tested. For example, the page includes pages 1 to n. When the page to be tested is one page and is page 1, the server determines that page 1 is the page to be tested according to the address of page 1 input by the user. When there are multiple pages to be tested and they are pages 1 to n, the server determines that pages 1 to n are the pages to be tested according to the addresses of pages 1 to n input by the user.

[0092] In the case where the page to be tested is a plurality of pages, each page includes the element to be tested. For example, in the case where the page to be tested includes pages 1 to n, pages 1 to n all include the element to be tested. The number of elements to be tested included in pages 1 to n may be the same or different, and this application does not limit this.

[0093] The element to be tested can be an element with a unique identifier (such as a button, scroll bar, icon, etc.) or an element without a unique identifier. An element without a unique identifier is used to indicate a collection element containing one or more sub-elements (such as a table, text box, etc.). The page to be tested can include one or more elements to be tested. When the page to be tested includes multiple elements to be tested, the multiple elements to be tested can be elements of the same type or elements of different types. Figure 4 A schematic diagram of a display of an element to be tested on a page provided in an embodiment of the present application, such as Figure 4 As shown, the icon 1, icon 2, icon 3, icon x, button 1 and button 2 included in the page are all elements with unique identifiers. The table included in the page is an element without a unique identifier, and the text box is a sub-element of the table.

[0094] S320: The server obtains display parameters of the element to be tested after it is loaded on the client, wherein the display parameters are used to indicate: the display mode of the element to be tested in the page to be tested.

[0095] In a possible scenario, the server may use multiple methods to obtain the display parameters of the element to be tested after it is loaded on the client. Two possible scenarios are given below.

[0096] Scenario A: The server obtains the display parameters of all elements in the page to be tested after they are loaded on the client, and the server obtains the display parameters of the element to be tested from the display parameters of all elements after they are loaded on the client. For example, the page to be tested includes elements 1 to n. Among them, element 1 is the element to be tested. In this case, the server obtains all display parameters of elements 1 to n after they are loaded on the client, and obtains the display parameters of element 1 from all display parameters as the display parameters of the element to be tested. The page to be tested may be a page rendered by a browser. In the case where the page to be tested is a rendered page, the element to be tested may be: a document object model (dom) or other models, which is not limited in the embodiments of the present application.

[0097] Scenario B: The page information may also include path information of the element to be tested in the page to be tested. In this case, the server may directly obtain the display parameters of the element to be tested after it is loaded on the client according to the path information of the element to be tested in the page to be tested included in the page information. For example, the page to be tested includes elements 1 to n. Element 1 is the element to be tested. In this case, the server directly obtains the display parameters of element 1 after it is loaded on the client according to the path information of element 1 in the page to be tested.

[0098] The display parameters may include: location information of the element to be measured and attribute values ​​of the element to be measured, which are described below respectively.

[0099] (1) The location information of the element to be measured.

[0100] The location information of the element to be tested is used to indicate: the location of the element to be tested, such as the application identity (appid), the region (region) of the element to be tested in the page to be tested, the address (identitydocument, ID), formatted_fx, the absolute path (full xpath) of the page where the element to be tested is located, the selector, etc.

[0101] (2) The attribute value of the element to be tested.

[0102] The attribute value of the element to be tested is used to indicate: information related to the display style of the element to be tested in the page to be tested, such as the class (such as button, icon, etc.) and style (style) of the element to be tested. For example, the page to be tested (such as page 1) contains the element icon 0 to be tested. The attribute values ​​of icon 0 can be: the size of the icon rounded corners (15px), the icon color (RGB (255,0,0)), etc.

[0103] In a possible scenario, after the server obtains the display parameters of the element to be tested, the display parameters of the element to be tested are preprocessed and verified for legality, and elements that are not displayed in the page to be tested are filtered out, such as filtering out elements with a length or width of 0 pixels (px).

[0104] S330: The server obtains the display rule input by the user, wherein the display rule is used to indicate the target display mode of the element to be tested on the page to be tested.

[0105] In a possible scenario, the display rule may include a combination of one or more of the following information 1 to information 5. Figure 6 A schematic diagram of a display rule provided in an embodiment of the present application, such as Figure 6 As shown, the display rules include: rule name, specification type, detection attribute, detection value data type and rule attribute value.

[0106] Information 1, rule name, is used to identify the display rule. The user can set the name of the rule as needed, such as an icon rule, which is not limited in the embodiment of the present application.

[0107] Information 2, rule type, is used to indicate: the category of display rules. The categories of rules include: elements with unique identifiers and elements without unique identifiers. Fields such as "basic style specifications" can be used to prompt users to set display rules for elements with unique identifiers. And fields such as "component style specifications" can be used to prompt users to set display rules for elements without unique identifiers.

[0108] Information 3, detection attributes, is used to indicate the style parameters of the element. Figure 7 A configuration diagram of a detection attribute provided in an embodiment of the present application, such as Figure 7 As shown, the style parameters of an element may include, but are not limited to: text style (text_decoration, td), background color (bgcolor), multiple scroll bars (scrollNum), inner spacing (padding), outer spacing (margin), redundant page turning component (uselessPager), new version shadow rule _color (boxShadowColor), etc.

[0109] Information 4, detection value data type, is used to indicate the data type of the display parameter of the element. The data type of the display parameter can be: integer (int), long integer (long int), short integer (short int), double long integer (long longint), character type (char), string type (string), Boolean type (bool), single-precision floating point type (float), double-precision floating point type (double), complex floating point type (float_complex), etc.

[0110] Information 5, rule attribute value, is used to indicate the detection strategy when the display rule is used to detect the display mode of the element to be detected. Figure 8 A schematic diagram of a configuration of a rule attribute value provided in an embodiment of the present application, such as Figure 8 As shown, the detection strategy may include, but is not limited to: equal to, include, less than, not equal to, and not involved. In the case where multiple attribute values ​​need to be input, a separator may be used to separate the multiple attribute values. Exemplarily, a semicolon is used to separate the multiple attribute values. In some possible examples, a comma, a semicolon, etc. may also be used to separate the multiple attribute values, which is not limited in the embodiments of the present application.

[0111] Table 1 is an example of a target display mode of an element to be tested provided in an embodiment of the present application. According to the contents shown in Table 1, the target display mode of an icon is: the size of the icon rounded corners (20px), the icon color (RGB (0,0,255)).

[0112] Table 1

[0113] Serial number element Target display mode 1 Button Length*width(48dp*48dp), shape(rectangle), background color(RGB(0,0,255)) 2 Text Box Type (vertical column), number of rows * number of columns (10 * 5), background color (RGB (255, 225, 255)) 3 icon Icon corner size (20px), icon color (RGB (0,0,255)) 4 sheet Table properties, cell spacing, cell margins, and space between content

[0114] Table 1 takes buttons, text boxes, icons, and tables as examples to give an example of their respective corresponding target display modes. In actual applications, the target display modes of buttons, text boxes, icons, and tables may also include other attribute values, such as buttons may also include: style (classic), etc. In actual applications, the target display modes of other elements may be set as needed, or other target display modes may be set for buttons, text boxes, icons, tables, etc., that is, one element may correspond to multiple different target display modes, such as another target display mode of a button may be: length*width (48dp*48dp), shape (rounded rectangle), background color (RGB (0,0,255)), which is not limited in the embodiments of this application.

[0115] In another possible implementation, the server may obtain the display rule input by the user in a variety of ways. Two possible examples are given below.

[0116] Example 1: The server obtains a target page input by a user, and determines a display rule according to the target page, wherein the target page includes an element to be tested, and the display mode of the element to be tested in the target page is a target display mode.

[0117] In this case, the server can use the following steps ① to ③ to obtain the display rules from the target page.

[0118] Step 1: The server obtains the target page.

[0119] The display mode of each element in the target page is consistent with the target display mode of each element. For example, the target page includes icon 1, and the relationship between the display mode of the elements included in the target page and the target display mode of the elements is illustrated by taking icon 1 as an example, as shown in Table 2.

[0120] Table 2

[0121] Serial number parameter How the element is displayed in the target page The target display mode of the element 1 The size of the icon's rounded corners 20px 20px 2 Icon Color RGB(0,0,255) RGB(0,0,255)

[0122] Table 2 illustrates the parameters included in icon 1 by taking the icon rounded corner size and icon color as an example. In actual applications, icon 1 may also include other parameters, which are not limited in the embodiments of the present application.

[0123] Step ②: The server obtains the display parameters of each element in the target page.

[0124] Exemplarily, the target page includes icon 1. The display mode of icon 1 in the target page is the target display mode of the icon described in Table 1. Taking the display mode of icon 1 in the target page obtained by the server as an example, the display parameters of the elements in the target page obtained by the server are described. The server obtains the display mode of icon 1: the size of the rounded corner of the icon (20px), the color of the icon (RGB (0,0,255)), and uses the display mode of icon 1 as the target display mode of the icon.

[0125] Step ③: The server obtains the display rules corresponding to each element according to the display parameters of each element.

[0126] Exemplarily, still taking icon 1 contained in the target page as an example, the server obtains the corresponding display rules according to the display parameters of the element. The server uses the display method of icon 1: the size of the icon rounded corners (20px), the icon color (RGB (0,0,255)) as a display rule for the icon.

[0127] Example 2: The server obtains configuration information input by the user, and determines a display rule according to the configuration information.

[0128] Among them, the configuration information may include a combination of one or more of the information 1 to information 5 described above. For more information about information 1 to information 5, please refer to the description above, which will not be repeated here. The configuration information can be directly input by the user, such as the user can use an input device (such as a keyboard) to directly input the configuration information. In some possible situations, the configuration information can also come from other devices. For example, other devices use the network to transmit configuration information to the server, and other devices use the communication interface of the server to directly import the configuration information into the server. The configuration information can be stored in formats such as excel, txt, doc, docx, etc., which is not limited to this embodiment of the present application.

[0129] The following takes the configuration information including the combination of information 1 to information 5 as an example to illustrate the process of the server determining the display rule according to the configuration information.

[0130] The server can be displayed using a display device Figure 6 The interface shown is used to remind the user to input the values ​​corresponding to information 1 to information 5, and the server directly generates the display rule according to the values ​​input by the user. For example, if the reminder is used to input the name of the display rule, the server generates the display rule of the corresponding name according to the name of the display rule input by the user.

[0131] In one possible scenario, the server may use Spring Expression Language (SPEL) to implement logical calculation judgments. When the display rules change, only the SPEL expression needs to be modified. The use of SPEL expressions can improve the scalability of the calculation logic. For relevant content about SPEL expressions, please refer to the general technology, which will not be repeated here. The above describes the process by which the server obtains display rules based on information 1 to information 5 input by the user using an input device. In some possible examples, the server can also receive information 1 to information 5 transmitted by other devices, and obtain display rules based on the information 1 to information 5. This process is consistent with the process by which the server obtains display rules based on information input by the user using an input device, and will not be repeated here.

[0132] In a possible scenario, the server obtains a plurality of pre-configured display rules through the display rules input by the user. When the element to be tested needs to be detected, the server can obtain the type of the element to be tested (such as an element with a unique identifier) ​​according to the element to be tested (such as a button), the absolute path of the page where the element to be tested is located, the Uniform Resource Locator (URL) where the element to be tested is located, etc., and the server obtains a display rule matching the element to be tested from the pre-configured plurality of display rules according to the type of the element to be tested.

[0133] S340: The server determines a detection result according to the display parameters and the display rules, wherein the detection result is used to indicate the consistency between the display mode and the target display mode.

[0134] In one possible scenario, the server determines the detection result according to the display parameters and the display rules, including: the server determines whether the display parameters match the display rules, if not, determines that the display mode is inconsistent with the target display mode, and if so, determines that the display mode is consistent with the target display mode.

[0135] The following takes the element to be tested as an example, and describes the detection result of the page display consistency of the element to be tested obtained by the server by comparing the display parameters of the element to be tested in the page to be tested and the target display mode of the element to be tested in the page to be tested indicated by the display rules.

[0136] The server compares each attribute value corresponding to the display mode of the element to be tested in the page to be tested and the target display mode according to the detection strategy indicated by the rule attribute value in the display rule. If each attribute value of the element to be tested satisfies the detection strategy indicated by the rule attribute value in the display rule, the page display of the element to be tested is consistent.

[0137] Exemplarily, as shown in Table 3, the attribute values ​​corresponding to the target display mode of the icon indicated by the display rule of the icon are: the size of the icon rounded corners (20px), the icon color (RGB (0,0,255)). The page to be tested includes icon 1 to be tested, and the corresponding display parameters of icon 1 in the page to be tested are: the size of the icon rounded corners (15px), the color of icon 1 (RGB (255,0,0)). The detection strategy indicated by the rule attribute value in the display rule is equal to. The server compares the size of the icon rounded corners and the icon color of icon 1 in the page to be tested and the target display mode. Since the size of the icon rounded corners and the icon color are different, the server confirms that the page display of icon 1 is inconsistent.

[0138] Table 3

[0139] Serial number Display parameters How icon 1 is displayed on the page to be tested Target display mode of icons 1 The size of the icon's rounded corners Icon corner radius (15px) Icon corner radius size (20px) 2 Icon Color Icon color (RGB(255,0,0)) Icon color (RGB (0,0,255))

[0140] The above takes the element to be tested as an example, and explains how the server compares the display mode of the element to be tested on the page to be tested with the target display mode to obtain the detection result of the page display consistency of the element to be tested. In some possible situations, the elements to be tested include two or more. In this situation, the server can judge each element in the manner described above to obtain the detection result of the page display consistency of each element.

[0141] The server can also compare the display parameters of all elements of the page to be tested with the target display mode of all elements on the page to be tested to determine the detection result of the page display consistency of the elements to be tested. The server can directly compare the display parameters of the elements to be tested with the target display mode of the elements to be tested on the page to be tested indicated by the display rules to determine the detection result of the page display consistency of the elements to be tested, which is explained in different situations below.

[0142] In a first possible scenario, the server detects display parameters of all elements included in the page to be tested to obtain page consistency detection results of the elements to be tested.

[0143] Scenario ①: The server may directly receive the display parameters of all elements contained in the page to be tested transmitted by the terminal, and perform page display consistency detection on all elements to obtain the page display consistency detection results of the elements to be tested.

[0144] In this case, the terminal can use the method described below to obtain all elements contained in the page to be tested. The terminal determines the page to be tested based on the address of the page input by the user. When the terminal opens the page to be tested, it loads the page information collection script, which can be a JavaScript script. And after the page is loaded and rendered, the terminal collects detailed information of the DOM elements of the page to be tested, such as the selector (selector), absolute path (full xpath), element category (class), element address (id) in the page to be tested, and element display style (style), etc., to obtain the display parameters of all elements in the page to be tested. When the terminal collects the DOM elements of the page to be tested, it can use the createNodeIterator application programming interface (application programming interface, API) to traverse from the root node of the element, and obtain the cascading style sheets (cascading style sheets, css) of the final rendering effect of each element in the browser through the getComputedStyle API of the browser that displays the page to be tested.

[0145] Case ②: The server directly obtains the display parameters of all elements from the storage system.

[0146] The difference between this situation and situation ① is that the display parameters of all elements obtained by the server from the storage system are the display parameters of the elements after the format conversion. The specific process is described as follows: the server receives the display parameters of all elements contained in the page to be tested transmitted by the terminal, and converts the data format of the display parameters of all elements to obtain the display parameters after the data format conversion. Among them, the data format of the display parameters after the data format conversion matches the data format of the storage system. For example, OBS can be used to implement the storage of the display parameters of all elements after the data format conversion. The server stores the display parameters after the data format conversion to the storage system. And, in the case where the page display consistency of the element to be tested needs to be detected, the server obtains the display parameters of the element after the data format conversion from the storage system. In this way, the server converts the data format of the display parameters of the element to be tested and stores the display parameters after the data format conversion to the storage medium. In the case where the attribute value of the newly added element is required, it is only necessary to write the attribute value of the newly added element into the attributes string comment, without changing the style of the table, thereby reducing the development cost.

[0147] In a second possible scenario, the server detects display parameters of the element to be tested to obtain a page consistency test result of the element to be tested.

[0148] Scenario ①: The server receives display parameters of some elements among all elements contained in the page to be tested, and uses the some elements as the elements to be tested to complete the detection of page display consistency.

[0149] In this case, the terminal only obtains the display parameters of some elements included in the page to be tested, and transmits the display parameters of the some elements to the server. The terminal can obtain the display parameters of some elements included in the page to be tested according to the path information input by the user for determining the elements to be tested, and transmit the display parameters of the some elements as the display parameters of the elements to be tested to the server. Figure 5 A schematic diagram of obtaining an element to be tested is provided in an embodiment of the present application, such as Figure 5 As shown, page 1 includes area 1, and area 1 includes icon 1 and table 1. The terminal obtains the location information and attribute values ​​of table 1 in page 1 according to the path information of table 1 input by the user. For the method of the terminal obtaining some elements from the page to be tested, please refer to the method of the terminal obtaining all parameters of the page to be tested in the above situation ①, which will not be repeated here.

[0150] Scenario ②: The server receives display parameters of all elements contained in the page to be tested, and obtains some elements from all the elements as the elements to be tested, thereby completing the detection of page display consistency.

[0151] In this case, the terminal uses the method described above to obtain the display parameters of all elements contained in the page to be tested, and transmits the display parameters of all elements to the server. The server obtains the display parameters of some elements contained in the page to be tested according to the path information input by the user for determining the elements to be tested, and uses the display parameters of some elements as the display parameters of the elements to be tested to complete the page display consistency detection.

[0152] S350: The server outputs the detection result.

[0153] The server can transmit the page display consistency test results to other devices (such as terminals, displays, etc.) for display, and the server can also directly display the page display consistency test results through the display connected to it. In this way, the user can directly read the page display consistency test results through the display interface, which improves the efficiency of page display consistency detection.

[0154] Taking the example of the server using a display connected thereto to display the page display consistency test result of the element to be tested, the test result of the page display consistency of the element to be tested output by the server is described.

[0155] The detection results may include, but are not limited to: the page display of the element to be tested is consistent (i.e., the display parameters of the element to be tested match the display rules) and the page display of the element to be tested is inconsistent (i.e., the display parameters of the element to be tested do not match the display rules). Depending on the different detection results, the server may output the detection results of page display consistency in different ways.

[0156] In the first possible scenario, the page display of the element to be tested is consistent.

[0157] The server may provide a result that is consistent with the page display of the element to be tested in the form of text, image, audio, video, etc. The embodiment of the present application does not limit the manner in which the server provides a result that is consistent with the page display of the element to be tested. Fig. 9 The first embodiment of the present application provides a schematic diagram of the output of the detection result of the page display consistency, such as Fig. 9 As shown, the server outputs the text "Page display is consistent" to provide a result that the page display of the element to be tested is consistent. In actual applications, other texts can also be used to output a result that the page display of the element to be tested is consistent, and this embodiment of the application is not limited to this.

[0158] In the second possible scenario, the page display of the element under test is inconsistent.

[0159] In this case, the server outputs the number of unmatched display parameters and / or the categories of unmatched display parameters. Taking the element to be tested as an icon as an example, when the icon's rounded corner size and icon color do not match the icon's rounded corner size and icon color indicated by the display rule, the server outputs the number of unmatched display parameters as 2, and / or the unmatched display parameters are: icon's rounded corner size and icon color.

[0160] The above description takes the element to be tested as an example to explain the output method of inconsistent page display of the element to be tested. In some possible situations, the element to be tested may also include multiple elements, and the page display of at least one of the multiple elements is inconsistent. In this case, the server can output the result of inconsistent page display of the at least one element by category.

[0161] Fig.10 The output schematic diagram of the second page display consistency detection result provided in the embodiment of the present application is as follows: Fig.10 As shown, the server outputs the inconsistent display results of buttons, icons, tables, etc. For example, the problems of inconsistent icon display include: inconsistent display of icon rounded corner size and inconsistent display of icon color. The server classifies and outputs the inconsistent display results of pages, which can quickly locate the elements to be tested with inconsistent display in the pages to be tested, thereby improving the efficiency of locating the inconsistent elements to be tested.

[0162] As a possible example, when the server classifies and outputs inconsistent results of page displays of the elements to be tested, the number of problems and the number of problem types of inconsistent page displays of the elements to be tested may be output. Fig.11 The third page display consistency test result output schematic diagram provided in the embodiment of the present application is as follows: Fig.11 As shown, the page contains buttons, text boxes, tables, and icons. The server output buttons, text boxes, tables, and icons page shows inconsistent numbers of questions (such as 146) and numbers of question types (such as 25).

[0163] Optionally, the server can also output the number of problems and types of problems that are inconsistent with the page display of the elements under test contained in the page under test by category. Fig.11 , the server outputs the number of inconsistent questions and the number of question types displayed on the button, text box, table, and icon pages respectively. For example, the number of inconsistent questions displayed on the button page is 61, and the types are 11. For another example, the number of inconsistent questions displayed on the text box page is 5, and the types are 2. For another example, the number of inconsistent questions displayed on the table page is 50, and the types are 10.

[0164] Optionally, the server can also output the page display inconsistent problem names and the corresponding problem numbers for each element. Fig.11 , the problem name of the server output icon: Icon Corner Size and Icon Color. The server output icon corner size page shows 10 inconsistencies, and the icon color page shows 20 inconsistencies.

[0165] The server outputs the total number and total number of categories of inconsistencies contained in the page to be tested, and classifies and outputs the total number and total number of categories of inconsistencies contained in each element. In this way, when it is necessary to adjust the elements to be tested based on the detection results of the page display consistency, the accuracy of the adjustment is improved and omissions are avoided.

[0166] In one possible scenario, when the page display of the element to be tested is consistent, the server outputs the detection result in a first manner, and when the page display of the element to be tested is inconsistent, the server outputs the detection result in a second manner. The first manner is different from the second manner. Among them, the first manner and the second manner may include, but are not limited to: bolding, adding background color, italic font, highlighting, etc. The first manner and the second manner are different, such as when the first manner selects bolding, the second manner selects other manners other than bolding, such as highlighting.

[0167] For example, Fig.12 The fourth page display consistency detection result output schematic diagram provided in the embodiment of the present application is as follows: Fig.12As shown, the page to be tested includes button 1 and button 2, and both button 1 and button 2 are elements to be tested. The test result of button 1 is: the page display is consistent, and the test result of button 2 is: the page display is inconsistent. The server displays button 1 in the original way, and the server displays button 2 by adding background color.

[0168] In this embodiment, the server uses different display methods to display different test results. When a certain test result needs to be obtained, it is only necessary to pay attention to the presentation method corresponding to the test result, thereby shortening the time for obtaining the test result, facilitating rapid positioning of the required test result, and improving the efficiency of detection.

[0169] In the case where the type of the element to be tested is an element with a unique identifier (such as an icon), the server directly uses the method described above to detect the page display consistency of the element to be tested. In some possible situations, the type of the element to be tested can also be an element without a unique identifier (such as a table). In this case, the element without a unique identifier can be split first to obtain the sub-elements that constitute the element without a unique identifier, and then the method described above is used to perform page display consistency detection on each sub-element, and the results after the detection are aggregated to obtain the page display consistency detection result of the element without a unique identifier. The element without a unique identifier can be split by a terminal, a server or other computing device with processing power to obtain the sub-elements that constitute the element without a unique identifier. The following is an example of the server splitting the element without a unique identifier.

[0170] Fig.13 A flow chart of a second method for detecting consistency of pages provided in an embodiment of the present application is shown as follows: Fig.13 As shown, the method includes the following steps ① to ⑥.

[0171] Step ①: The server uses a message system to obtain display parameters of the elements to be tested included in the page to be tested, and transmits the display parameters of the elements to be tested to a storage system.

[0172] The message system can be a distributed streaming computing platform, such as Kafka. For more information about Kafka, please refer to the related technologies, which will not be repeated here.

[0173] Step ②: The storage system transmits the display parameters of the element to be tested to the server, and the server uses its own computing and storage resources to process the element to be tested.

[0174] The element to be tested may be an element with a unique identifier or an element without a unique identifier (such as a table). The server classifies the elements to be tested to obtain elements without a unique identifier (such as a table) and elements with a unique identifier (such as an icon) among the elements to be tested.

[0175] In the case where the element to be tested is an element with a unique identifier, the server executes steps ⑤ to ⑥ to complete the detection of page display consistency.

[0176] In the case that the element to be tested is an element without a unique identifier, the server executes steps ③ to ⑥ to complete the detection of page display consistency.

[0177] Step ③: For an element that does not have a unique identifier (such as a table), the server splits the element that does not have a unique identifier into sub-elements that constitute the element.

[0178] Step 4: The server performs compliance checks on the sub-elements, such as filtering out the sub-elements that are not displayed on the page. The server aggregates the sub-elements after the compliance check.

[0179] Step ⑤: The server uses its own storage and computing resources to detect the page display consistency of the sub-elements and the elements with unique identifiers (such as icons) to obtain the page display consistency detection result. For example, the server uses S310 to S350 described above to implement the page display consistency detection.

[0180] Step ⑥: The server output page displays the consistency test results.

[0181] In the first possible scenario, the server directly outputs a page showing the consistency detection result.

[0182] In the second possible scenario, the server transmits the page display consistency test result to other devices (such as terminals) for display. In this scenario, the server can transmit the page display consistency test result to the storage system, and the storage system transmits the page display consistency test result to other devices (such as terminals) for display. The storage system can be a combination of DWS and OBS. In this scenario, the server transmits the page display consistency test result to OBS.

[0183] In this embodiment, compared with the screenshot of the server comparison page, the detection result of the page display consistency is obtained. In the present application, the server directly compares the display mode of the element to be tested on the page to be tested with the target display mode of the element to be tested, and obtains the detection result of the page display consistency of the element to be tested. The server uses the element to be tested as the smallest unit for page display consistency detection, and can directly locate the page display consistency of the element to be tested contained in the page to be tested, thereby improving the accuracy of positioning. The server does not need to process the screenshots, and obtains the page display consistency detection result based on the processed screenshots, which saves the computing resources and computing time required for the server to process the screenshots, and improves the detection efficiency of the page display consistency. At the same time, it avoids the problem of being unable to complete the page display consistency detection of the element to be tested due to the differences in the pages carrying the element to be tested, the differences in the servers that load the pages carrying the element to be tested, and the differences in the categories of the element to be tested.

[0184] The above describes the page display consistency detection method provided by the embodiment of the present application in conjunction with the accompanying drawings. The following describes the page display consistency detection device provided by the embodiment of the present application in conjunction with the accompanying drawings. Fig.14 A schematic diagram of a device for detecting page display consistency provided in an embodiment of the present application is shown in FIG. Fig.14 As shown, the detection device 1400 includes: a transceiver module 1410 , a processing module 1420 and an output module 1430 .

[0185] The transceiver module 1410 is used to obtain page information input by the user. The page information is used to determine the page to be tested, and the page to be tested includes the element to be tested. The transceiver module 1410 is also used to obtain display parameters of the element to be tested after being loaded on the client. The display parameters are used to indicate the display mode of the element to be tested in the page to be tested. The transceiver module 1410 is also used to obtain display rules input by the user. The display rules are used to indicate the target display mode of the element to be tested in the page to be tested. The processing module 1420 is used to determine the detection result according to the display parameters and the display rules. The detection result is used to indicate the consistency between the display mode and the target display mode. The output module 1430 is used to output the detection result.

[0186] In a possible scenario, the processing module 1420 is specifically configured to determine whether the display parameter matches the display rule, and if not, determine that the display mode is inconsistent with the target display mode.

[0187] In a possible scenario, the detection device 1400 further includes: a display module 1440. The display module 1440 is used to: display the detection result in a first manner when the display parameter matches the display rule. The display module 1440 is also used to: display the detection result in a second manner when the display parameter does not match the display rule; wherein the first manner and the second manner are different.

[0188] In a possible scenario, the page to be tested includes multiple pages, and each page includes the element to be tested.

[0189] In a possible scenario, the display rule includes a combination of one or more of the following information 1 to information 5.

[0190] Information 1: Rule name, used to identify the display rule.

[0191] Information 2: Rule type, used to indicate the category of the display rule.

[0192] Information 3: Detection attributes are used to indicate the style parameters of an element.

[0193] Information 4: Detection value data type, used to indicate the data category of the display parameter of the element.

[0194] Information 5: rule attribute value, used to indicate the detection strategy when using the display rule to detect the display mode of the element to be detected.

[0195] In another possible implementation, the server may obtain the display rule input by the user in a variety of ways. Two possible examples are given below.

[0196] Example 1: The server obtains a target page input by a user, and determines a display rule according to the target page, wherein the target page includes an element to be tested, and the display mode of the element to be tested in the target page is a target display mode.

[0197] Example 2: The server obtains configuration information input by the user, and determines a display rule according to the configuration information.

[0198] The configuration information may be a combination of one or more of the following information 1 to information 5.

[0199] Information 1: Rule name, used to identify the display rule.

[0200] Information 2: Rule type, used to indicate the category of the display rule.

[0201] Information 3: Detection attributes are used to indicate the style parameters of an element.

[0202] Information 4: Detection value data type, used to indicate the data category of the display parameter of the element.

[0203] Information 5: rule attribute value, used to indicate the detection strategy when using the display rule to detect the display mode of the element to be detected.

[0204] In a possible scenario, the display rule input by the user is one of multiple preconfigured display rules.

[0205] In a possible scenario, the transceiver module 1410 is specifically used to obtain display parameters of all elements in the page to be tested after being loaded on the client. The transceiver module 1410 is also specifically used to obtain display parameters of the element to be tested from the display parameters of all elements after being loaded on the client.

[0206] In a possible scenario, the page information includes position information of the element to be tested in the page to be tested, and the transceiver module 1410 is specifically used to obtain display parameters of the element to be tested after being loaded on the client according to the position information of the element to be tested in the page to be tested included in the page information.

[0207] In a possible scenario, when the display parameters do not match the display rules, the output module 1430 is further configured to: output the number of the unmatched display parameters, and / or output the category of the unmatched display parameters.

[0208] For a more detailed description of the transceiver module 1410, the processing module 1420, the output module 1430 and the display module 1440, please refer to the aforementioned Appendix. Figures 3 to 13 The relevant description in the method embodiment shown is directly obtained and will not be repeated here. The detection device 1400 can be used to implement the function of the server in the above method embodiment, and thus can also achieve the beneficial effects possessed by the above method embodiment.

[0209] When the detection device 1400 is implemented by hardware, the hardware may be a server. Fig.15 A schematic diagram of the structure of a server provided in an embodiment of the present application, such as Fig.15 As shown, the server 1500 includes: a memory 1501, a processor 1502, a communication interface 1503 and a bus 1504. The memory 1501, the processor 1502 and the communication interface 1503 are connected to each other through the bus 1504.

[0210] The memory 1501 may be a static storage device, a dynamic storage device or a random access memory. The memory 1501 may store computer instructions. When the computer instructions stored in the memory 1501 are executed by the processor 1502, the processor 1502 is used to execute Figure 3 The described method for detecting consistency of page display. The memory may also store a data set, for example: the memory 1501 is used to store a variety of display rules and the like.

[0211] The processor 1502 may be a general-purpose CPU, ASIC, GPU or any combination thereof. The processor 1502 may include one or more chips, such as an NPU.

[0212] The communication interface 1503 uses a transceiver unit such as but not limited to a transceiver to implement communication between the server 1500 and other devices or communication networks. For example, the display parameters of the element to be tested in the page to be tested can be obtained through the communication interface 1503.

[0213] The bus 1504 may include a path for transmitting data between various components of the server 1500 (eg, the memory 1501 , the processor 1502 , and the communication interface 1503 ).

[0214] As an example, server 1500 may include multiple processors. The processor may be a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and / or computing units for processing data (e.g., computer program instructions).

[0215] It is worth mentioning that Fig.15 In the example, the server 1500 includes 1 processor and 1 memory. Here, the processor and the memory are respectively used to indicate a type of device or equipment. In a specific embodiment, the number of each type of device or equipment can be determined according to the requirements of the user information to be processed.

[0216] It should be understood that the server 1500 may be a data processing unit. The server 1500 according to this embodiment may correspond to the detection device 1400 in this embodiment, and may correspond to the above and other operations and / or functions performed by the server of the above embodiment, which will not be described here for brevity.

[0217] The method steps in this embodiment can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a computing device. Of course, the processor and the storage medium can also exist as discrete components in a network device or a terminal device.

[0218] The embodiment of the present application also provides a chip system, which includes a processor for implementing the functions of the terminal and / or server in the above method. In one possible design, the chip system also includes a memory for storing program instructions and / or data. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0219] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer program or instruction may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).

[0220] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for detecting page display consistency, characterized in that: The detection method comprises: Obtaining page information input by a user, wherein the page information is used to determine a page to be tested, wherein the page to be tested includes elements to be tested; Obtaining display parameters of the element to be tested after being loaded on the client, wherein the display parameters are used to indicate the display mode of the element to be tested in the page to be tested; Acquire the display rule input by the user, where the display rule is used to indicate a target display mode of the element to be tested on the page to be tested; Determining a detection result according to the display parameter and the display rule, wherein the detection result is used to indicate consistency between the display mode and the target display mode; The detection result is outputted.

2. The detection method according to claim 1, characterized in that: Determining a detection result according to the display parameter and the display rule includes: Determining whether the display parameter matches the display rule; If they do not match, it is determined that the display mode and the target display mode are inconsistent.

3. The detection method according to claim 1 or 2, characterized in that: When the display parameter matches the display rule, outputting the detection result in a first manner; When the display parameter does not match the display rule, the detection result is outputted in a second manner; wherein the first manner and the second manner are different.

4. The detection method according to claim 3, characterized in that: The second method includes: one or more combinations of bolding, adding background color, italicizing fonts, and highlighting.

5. The detection method according to any one of claims 1 to 4, characterized in that: The page to be tested includes a plurality of pages, wherein each page includes the element to be tested.

6. The detection method according to any one of claims 1 to 5, characterized in that: The display rules include: A rule name, used to identify the display rule; and / or, a rule type, used to indicate the category of the display rule; and / or, detecting attributes to indicate style parameters of an element; and / or, a detection value data type, used to indicate a data category of a display parameter of the element; And / or, a rule attribute value is used to indicate a detection strategy when the display rule is used to detect the display mode of the element to be detected.

7. The detection method according to any one of claims 1 to 6, characterized in that: The obtaining of the display rule of the user input includes: Acquire the target page input by the user, and determine a display rule according to the target page; Wherein, the target page includes the element to be tested, and the display mode of the element to be tested in the target page is the target display mode; and / or, obtaining configuration information input by a user, and determining the display rule according to the configuration information; The configuration information includes: A rule name, used to identify the display rule; and / or, a rule type, used to indicate the category of the display rule; and / or, detecting attributes to indicate style parameters of an element; and / or, a detection value data type, used to indicate a data category of a display parameter of the element; And / or, a rule attribute value is used to indicate a detection strategy when the display rule is used to detect the display mode of the element to be detected.

8. The detection method according to any one of claims 1 to 7, characterized in that: The display rule input by the user is one of a plurality of preconfigured display rules.

9. The detection method according to any one of claims 1 to 8, characterized in that: The obtaining of display parameters of the element to be tested after loading on the client includes: Obtain display parameters of all elements in the page to be tested after being loaded on the client; The display parameters of the element to be tested are obtained from the display parameters of all the elements after being loaded on the client.

10. The detection method according to any one of claims 1 to 8, characterized in that: The page information includes the path information of the element to be tested in the page to be tested, The obtaining of display parameters of the element to be tested after loading on the client includes: According to the path information of the element to be tested in the page to be tested included in the page information, the display parameters of the element to be tested after being loaded on the client are obtained.

11. The detection method according to any one of claims 1 to 10, characterized in that: In the case where the display parameter does not match the display rule, the method further includes: Output the number of display parameters that do not match; And / or, output the categories of display parameters that do not match.

12. A device for detecting page display consistency, characterized in that: The detection device comprises: The transceiver module is used to: obtain page information input by the user, wherein the page information is used to determine the page to be tested, and the page to be tested includes the elements to be tested; The transceiver module is further used to: obtain display parameters of the element to be tested after being loaded on the client, wherein the display parameters are used to indicate the display mode of the element to be tested in the page to be tested; The transceiver module is further used to: obtain the display rule input by the user, wherein the display rule is used to indicate the target display mode of the element to be tested on the page to be tested; A processing module, used to: determine a detection result according to the display parameter and the display rule, wherein the detection result is used to indicate consistency between the display mode and the target display mode; The output module is used to output the detection result.

13. The detection device according to claim 12, characterized in that: The processing module is specifically used to: determine whether the display parameter matches the display rule, and if not, determine that the display mode is inconsistent with the target display mode.

14. The detection device according to claim 12 or 13, characterized in that: The detection device further comprises: a display module, The display module is used to: output the detection result in a first manner when the display parameter matches the display rule; The display module is further used to: when the display parameter does not match the display rule, output the detection result in a second manner; wherein the first manner and the second manner are different.

15. The detection device according to claim 14, characterized in that: The second method includes: one or more combinations of bolding, adding background color, italicizing fonts, and highlighting.

16. The detection device according to any one of claims 12 to 15, characterized in that: The page to be tested includes a plurality of pages, wherein each page includes the element to be tested.

17. The detection device according to any one of claims 12 to 16, characterized in that: The display rules include: A rule name, used to identify the display rule; and / or, a rule type, used to indicate the category of the display rule; and / or, detecting attributes to indicate style parameters of an element; and / or, a detection value data type, used to indicate a data category of a display parameter of the element; And / or, a rule attribute value is used to indicate a detection strategy when the display rule is used to detect the display mode of the element to be detected.

18. The detection device according to any one of claims 12 to 17, characterized in that: The transceiver module is specifically used to: obtain the target page input by the user; The processing module is further used to: determine a display rule according to the target page; Wherein, the target page includes the element to be tested, and the display mode of the element to be tested in the target page is the target display mode; And / or, the transceiver module is specifically used to: obtain configuration information input by a user; The processing module is further used to: determine the display rule according to the configuration information; The configuration information includes: A rule name, used to identify the display rule; and / or, a rule type, used to indicate the category of the display rule; and / or, detecting attributes to indicate style parameters of an element; and / or, a detection value data type, used to indicate a data category of a display parameter of the element; And / or, a rule attribute value is used to indicate a detection strategy when the display rule is used to detect the display mode of the element to be detected.

19. The detection device according to any one of claims 12 to 18, characterized in that: The display rule input by the user is one of a plurality of preconfigured display rules.

20. The detection device according to any one of claims 12 to 19, characterized in that: The transceiver module is specifically used to: obtain display parameters of all elements in the page to be tested after being loaded on the client; The transceiver module is further specifically used to obtain the display parameters of the element to be tested from the display parameters of all the elements after being loaded on the client.

21. The detection device according to any one of claims 12 to 19, characterized in that: The page information includes the path information of the element to be tested in the page to be tested, The transceiver module is specifically used to obtain display parameters of the element to be tested after being loaded on the client according to the path information of the element to be tested in the page to be tested included in the page information.

22. The detection device according to any one of claims 12 to 21, characterized in that: In the case where the display parameters do not match the display rules, The output module is further used to: output the number of unmatched display parameters; And / or, output the categories of display parameters that do not match.

23. A server, characterized in that: The server comprises: an interface circuit and a processor, wherein the interface circuit is used to: receive data from other devices outside the server and transmit it to the processor, or send data from the processor to other devices outside the server; The processor is used to implement the detection method according to any one of claims 1 to 11 through a logic circuit or executing code instructions.

24. A computer-readable storage medium, characterized in that: The storage medium stores a computer program or instruction, and when the computer program or instruction is executed by a processing device, the detection method according to any one of claims 1 to 11 is implemented.