Method, device and system for constructing abnormal sample data
By constructing exception sample data, incomplete exceptions are displayed for interface elements, rich exception sample data are generated, which solves the problem that existing models cannot detect and improves exception detection capabilities and user experience.
Patent Information
- Application Number
- CN202411001233.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-07-24
AI Technical Summary
The existing anomaly detection model cannot effectively detect abnormal situations incomplete display of interface elements, resulting in the inability to optimize the training-derived model recognition and response to such abnormal situations.
By constructing exception sample data, receive exception sample data collection tasks, control the operation of the target application, and perform exception display processing on interface elements based on exception display processing strategies before displaying the interface, generate interface elements that display exceptions, thereby obtaining rich Exception sample data.
It realizes effective detection of abnormal situations of incomplete display of interface elements, improves the detection capability of the abnormal detection model and the reliability of interface display technology, and ensures user experience.
Smart Images

Figure CN118520306B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the field of computer network technology, and in particular, to a method, device, and system for constructing abnormal sample data. Background Art
[0002] With the continuous development of various technologies based on neural network training models, the trained models are widely used in various fields. For example, in interface display technology, the trained anomaly detection model can be used to detect abnormal conditions of the display interface, such as white screen, garbled characters, misalignment, no response to clicks, loop jumps and errors. However, the current anomaly detection model cannot effectively detect one abnormal condition, that is, the abnormal condition of incomplete display of interface elements.
[0003] In order to enhance the anomaly detection model's ability to detect abnormal situations where interface elements are not fully displayed, it is necessary to optimize the anomaly detection model through a large amount of abnormal sample data so that the anomaly detection model obtained by the optimized training can recognize and respond to such abnormal situations.
[0004] Therefore, how to provide abnormal sample data for abnormal situations where interface elements are not fully displayed is a technical problem that urgently needs to be solved. Summary of the invention
[0005] In order to provide a large amount of abnormal sample data for abnormal situations where interface elements are not fully displayed, one or more embodiments of the present specification provide a method, device, and system for constructing abnormal sample data.
[0006] In a first aspect, one or more embodiments of the present specification provide a method for constructing abnormal sample data, the method comprising: receiving an abnormal sample data collection task; wherein the abnormal sample data collection task comprises interface information of a target display interface and an abnormal display processing strategy corresponding to the target display interface, the interface information comprising a target application corresponding to the target display interface; based on the interface information, controlling the target application to run; after the target application runs and before the target application displays the target display interface, performing abnormal display processing on the target display interface based on the abnormal display processing strategy corresponding to the target display interface; displaying the target display interface, wherein the target display interface comprises a first interface element, which is an interface element obtained after the abnormal display processing; acquiring the target display interface, and using the target display interface as abnormal sample data.
[0007] In one possible implementation, the abnormal display processing strategy includes a target interface element type for performing abnormal display processing and a target abnormal display setting method corresponding to the target interface element type; after the target application is run and before the target application displays the target display interface, based on the abnormal display processing strategy corresponding to the target display interface, abnormal display processing is performed on the target display interface, including: after the target application is run and before the target application displays the target display interface, based on the target interface element type corresponding to the target display interface, determining a second interface element in the target display interface that conforms to the target interface element type; based on the target abnormal display setting method corresponding to the target interface element type, performing abnormal display processing on part or all of the second interface elements in the target display interface.
[0008] In a possible implementation, the target interface element type includes text and / or icon, and the target abnormal display setting method includes a target text abnormal display setting method and / or a target icon abnormal display setting method; the target abnormal display setting method corresponding to the target interface element type performs abnormal display processing on part or all of the second interface elements in the target display interface, including: when the target interface element type includes text, selecting the target text abnormal display setting method from a pre-configured first display setting; wherein at least one text abnormal display setting method is pre-configured in the first display setting, and the target text abnormal display setting method is any one of the at least one text abnormal display setting method; based on the target text abnormal display setting method, performing abnormal display processing on part or all of the second interface elements including text in the target display interface.
[0009] In one possible implementation, the target abnormal display setting method corresponding to the target interface element type performs abnormal display processing on part or all of the second interface elements in the target display interface, including: when the target interface element type includes an icon, selecting the target icon abnormal display setting method from the pre-configured second display setting; wherein, at least one icon abnormal display setting method is pre-configured in the second display setting, and the target icon abnormal display setting method is any one of the at least one icon abnormal display setting method; based on the target icon abnormal display setting method, performing abnormal display processing on part or all of the second interface elements including icons in the target display interface.
[0010] In one possible implementation, the at least one text abnormal display setting method includes setting the last character of the text to be missing, setting the last character of the text to be a dot, and setting other characters in the text except the first character to be three dots; the at least one icon abnormal display setting method includes setting the icon to be missing.
[0011] In a possible implementation, the abnormal sample data collection task also includes an abnormal processing ratio, which is after the target application is run and before the target application displays the target display interface, based on the target interface element type corresponding to the target display interface, determining a second interface element in the target display interface that conforms to the target interface element type, including: after the target application is run and before the target application displays the target display interface, based on the target interface element type, determining an alternative interface element in the target display interface that conforms to the target interface element type; based on the abnormal processing ratio, determining the second interface element from the alternative interface elements; wherein the ratio of the second interface element to all interface elements in the target display interface satisfies the abnormal processing ratio.
[0012] In a possible implementation, the first interface element includes an interface element with abnormal text display and / or an interface element with abnormal icon display.
[0013] In a second aspect, one or more embodiments of the present specification provide a device for constructing abnormal sample data, the device comprising: a receiving module, used to receive an abnormal sample data collection task; wherein the abnormal sample data collection task includes interface information of a target display interface and an abnormal display processing strategy corresponding to the target display interface, and the interface information includes a target application corresponding to the target display interface; a control module, used to control the operation of the target application based on the interface information; a processing module, used to perform abnormal display processing on the target display interface based on the abnormal display processing strategy corresponding to the target display interface after the target application runs and before the target application displays the target display interface; a display module, used to display the target display interface, wherein the target display interface includes a first interface element, which is an interface element obtained after the abnormal display processing; an acquisition module, used to acquire the target display interface and use the target display interface as the abnormal sample data.
[0014] In a possible implementation, the abnormal display processing strategy includes a target interface element type for performing abnormal display processing and a target abnormal display setting method corresponding to the target interface element type; the processing module is used to perform abnormal display processing on the target display interface based on the abnormal display processing strategy corresponding to the target display interface after the target application is run and before the target application displays the target display interface, specifically:
[0015] The processing module is used to determine, after the target application is run and before the target application displays the target display interface, based on the target interface element type corresponding to the target display interface, a second interface element in the target display interface that conforms to the target interface element type; and perform abnormal display processing on part or all of the second interface elements in the target display interface based on the target abnormal display setting method corresponding to the target interface element type.
[0016] In a possible implementation, the target interface element type includes text and / or icon, and the target abnormal display setting method includes a target text abnormal display setting method and / or a target icon abnormal display setting method; the processing module is used to perform abnormal display processing on part or all of the second interface elements in the target display interface based on the target abnormal display setting method corresponding to the target interface element type, specifically:
[0017] The processing module is used to select the target text abnormal display setting method from a pre-configured first display setting when the target interface element type includes text; wherein at least one text abnormal display setting method is pre-configured in the first display setting, and the target text abnormal display setting method is any one of the at least one text abnormal display setting method; based on the target text abnormal display setting method, perform abnormal display processing on a second interface element in the target display interface that partially or completely includes text.
[0018] In a possible implementation, the processing module is used to perform abnormal display processing on the second interface element that partially or completely includes text in the target display interface based on the target text abnormal display setting method, specifically:
[0019] The processing module is used to select the target icon abnormal display setting method from the pre-configured second display setting when the target interface element type includes icons; wherein at least one icon abnormal display setting method is pre-configured in the second display setting, and the target icon abnormal display setting method is any one of the at least one icon abnormal display setting method; based on the target icon abnormal display setting method, abnormal display processing is performed on the second interface element that partially or completely includes icons in the target display interface.
[0020] In one possible implementation, the at least one text abnormal display setting method includes setting the last character of the text to be missing, setting the last character of the text to be a dot, and setting other characters in the text except the first character to be three dots; the at least one icon abnormal display setting method includes setting the icon to be missing.
[0021] In a possible implementation, the abnormal sample data collection task also includes an abnormal processing ratio, and the processing module is used to determine, after the target application is run and before the target application displays the target display interface, based on the target interface element type corresponding to the target display interface, a second interface element in the target display interface that conforms to the target interface element type, specifically:
[0022] The processing module is used to determine, in the target display interface, alternative interface elements that conform to the target interface element type based on the target interface element type after the target application is run and before the target application displays the target display interface; and to determine the second interface element from the alternative interface elements based on the exception handling ratio; wherein the ratio of the second interface element to all interface elements in the target display interface satisfies the exception handling ratio.
[0023] In a possible implementation, the first interface element includes an interface element with abnormal text display and / or an interface element with abnormal icon display.
[0024] In a third aspect, one or more embodiments of the present specification provide an electronic device, comprising: a memory for storing a computer program product; a processor for executing the computer program product stored in the memory, and when the computer program product is executed, implementing any one of the methods described in the first aspect above.
[0025] In a fourth aspect, one or more embodiments of the present specification provide a system for constructing abnormal sample data, characterized in that the system comprises an automation platform and at least one electronic device as described in the third aspect; wherein the automation platform is used to send an abnormal sample data collection task to the at least one electronic device.
[0026] In a fifth aspect, one or more embodiments of the present specification provide a computer-readable storage medium having computer program instructions stored thereon, which, when executed, implement the method described in any one of the above-mentioned first aspects.
[0027] In summary, the method for constructing abnormal sample data provided in one or more embodiments of this specification can perform abnormal display processing on the target display interface before the target application displays the target display interface based on the abnormal display processing strategy in the received abnormal sample data collection task, so that the target display interface after the abnormal display processing includes the corresponding interface element that displays the abnormality. In this way, the target display interface can be processed by performing abnormal display processing on the target display interface through different abnormal display processing strategies to obtain rich abnormal sample data.
[0028] In addition, the method for constructing abnormal sample data provided by one or more embodiments of this specification can dynamically issue abnormal sample data collection tasks to one or more electronic devices through an automation platform. In this way, on the one hand, each electronic device automatically collects abnormal sample data based on the received abnormal sample data collection task, thereby freeing up manpower and realizing the automatic collection of abnormal sample data. On the other hand, abnormal sample data can be collected by multiple electronic devices at the same time, thereby improving the efficiency of abnormal sample data collection. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions of one or more embodiments of the present specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of one or more embodiments of the present specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0030] Figure 1 A schematic diagram of a structure of a system 100 for constructing abnormal sample data provided by one or more embodiments of this specification;
[0031] Figure 2 A schematic diagram of a display interface of an electronic device provided for one or more embodiments of this specification;
[0032] Figure 3A flowchart of a method for constructing abnormal sample data provided by one or more embodiments of this specification;
[0033] Figure 4 A structural block diagram of a device for constructing abnormal sample data provided by one or more embodiments of this specification;
[0034] Figure 5 A structural block diagram of an electronic device provided for one or more embodiments of this specification. DETAILED DESCRIPTION
[0035] One or more embodiments of the present invention are further described in detail below through the accompanying drawings and examples. Through these descriptions, the features and advantages of one or more embodiments of the present invention will become clearer and more specific.
[0036] The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. Although various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise noted.
[0037] In addition, the technical features involved in different implementations of one or more embodiments of this specification described below can be combined with each other as long as they do not conflict with each other.
[0038] To facilitate understanding, the application scenarios of the technical solutions provided by one or more embodiments of this specification are first described below.
[0039] With the continuous development of various technologies based on neural network training models, the trained models are widely used in various fields. For example, in interface display technology, the trained anomaly detection model can be used to detect abnormal conditions of the display interface, such as white screen, garbled characters, misalignment, no response to clicks, loop jumps and errors. However, the current anomaly detection model cannot effectively detect one abnormal condition, that is, the abnormal condition of incomplete display of interface elements.
[0040] In order to enhance the detection capability of the anomaly detection model for the abnormal situation of incomplete display of interface elements, it is necessary to optimize and train the anomaly detection model through a large amount of abnormal sample data, so that the anomaly detection model obtained by the optimized training can recognize and respond to such abnormal situations, thereby improving the reliability of the interface display technology and the user experience, and ensuring that users can use the application or system normally. Therefore, how to provide a large amount of abnormal sample data for the abnormal situation of incomplete display of interface elements is a technical problem that needs to be solved urgently.
[0041] In a possible implementation, the abnormal sample data can be constructed in the following manner: based on the public opinion feedback of users, determine the application version where the interface elements are not fully displayed, and the abnormal display interface where the above abnormal situation occurs. Install the application version where the above abnormal situation occurs on the terminal device, and switch the display interface to the above abnormal display interface. Take a screenshot and save the abnormal display interface, and use the screenshot as the abnormal sample data.
[0042] It can be seen that the implementation method of constructing abnormal sample data provided above collects abnormal sample data based on the application version where the abnormal situation occurs. Therefore, the abnormal sample data collected by this implementation method is single and cannot provide rich abnormal sample data.
[0043] In order to provide a large amount of abnormal sample data for abnormal situations where interface elements are not fully displayed, one or more embodiments of this specification provide a method, device and system for constructing abnormal sample data. This method can be applied to Figure 1 The abnormal sample data shown in the construction system.
[0044] like Figure 1 As shown, the abnormal sample data construction system 100 may include: an automation platform 110 , at least one electronic device 120 and a cloud server 130 .
[0045] The automation platform 110 may issue an abnormal sample data collection task to at least one electronic device 120 to trigger each electronic device 120 to collect corresponding abnormal sample data based on the abnormal sample data collection task.
[0046] The electronic device 120 may be an in-vehicle device with display capability, a mobile device, a user terminal, a mobile terminal, a wireless communication device, a portable terminal, a user device, a service device or a user equipment (UE), etc. For example, the terminal device may be a mobile phone, a cordless phone, a smart watch, a wearable device, a tablet device, a handheld device with wireless communication function, a computing device, an in-vehicle communication module or other processing device connected to a wireless modem, etc.
[0047] The electronic device 120 may be installed with at least one application and a device for constructing abnormal sample data. Among them, at least one application includes an application in which a display abnormality has occurred. The device for constructing abnormal sample data may pre-configure one or more abnormal display setting methods for the abnormal display interface to be collected. When running the application, the device for constructing abnormal sample data may call one or more pre-configured abnormal display setting methods based on the abnormal sample data collection task issued by the automation platform 110, so that the display interface presents the corresponding abnormal display effect. In this way, a large amount of abnormal sample data with different abnormal display effects can be obtained through the above method, thereby enriching the abnormal sample data. Among them, the device for constructing abnormal sample data calls one or more pre-configured abnormal display setting methods based on the abnormal sample data collection task issued by the automation platform 110, which will be described in detail in the subsequent scheme and will not be repeated here.
[0048] After the electronic device 120 displays the abnormal interface, it can take a screenshot of the abnormal display interface. Then, the screenshot corresponding to the abnormal display interface is sent to the cloud server 130 as abnormal sample data. In this way, the cloud server 130 can receive a large amount of abnormal sample data with different abnormal display effects for use in abnormal detection model training.
[0049] Before describing an embodiment of a method for constructing abnormal sample data provided by one or more embodiments of this specification, a method for pre-configuring one or more abnormal display setting methods provided by one or more embodiments of this specification is described.
[0050] When the electronic device 120 runs an application, multiple display interfaces associated with the application can be displayed through interface switching operations. Each display interface can include one or more interface elements.
[0051] For example, Figure 2 As shown, the main interface 1201 of the electronic device 120 may include applications such as music, video, and Alipay. Taking the Alipay application as an example, after starting the Alipay application, the main interface 1202 of the Alipay application is entered, and the main interface 1202 may include interface elements such as recharge center, life payment, and Ant Forest.
[0052] Among them, interface elements can be divided into three types: the first type of interface element is text, for example, the interface element type corresponding to the control for displaying static text or description information (such as Labels) is a text type. The second type of interface element is an icon, for example, the interface element type corresponding to the control for displaying images or pictures in the display interface (such as ImageView) is an icon type. The third type of interface element is a combination of text and icons. For example, the control corresponding to Ant Forest in interface 1201 includes the text "Ant Forest" and the icon displayed above "Ant Forest".
[0053] Among them, the display effects of different interface element types can be achieved through different display setting methods.
[0054] For example, taking the iOS system as an example, the UIKit framework of the iOS system includes the UILabel class and the UIImageView class. Among them, the UILabel class is used to create a display control of the text type in the interface, and the UIImageView class is used to create a display control of the icon type in the interface.
[0055] Specifically, the UILabel class can set the displayed text content through the setText method. The UIImageView class can set the displayed icon content through the setImage method.
[0056] For example, for Figure 2 In the Ant Forest control, in the setText method, you can set the text content displayed by the Ant Forest control to: Ant Forest. In the setImage method, you can set the icon content displayed by the Ant Forest control to: the icon resource information and icon attribute information corresponding to the Ant Forest icon (such as icon size, clarity and other parameter information).
[0057] In this way, when the interface 1202 is displayed, the Ant Forest control can be displayed based on the text content and icon content pre-set in the setText method and the setImage method.
[0058] In order to construct abnormal sample data, one or more embodiments of this specification may modify the display setting methods corresponding to some or all interface elements in the display interface in advance as follows: first determine the display interface to be modified and the type of interface element to be modified. Then, if the type of interface element to be modified includes text, the first display setting may be configured in the text display setting. If the type of interface element to be modified includes icons, the second display setting may be configured in the icon display setting. Among them, the first display setting may include at least one text abnormal display setting method, and the second display setting may include at least one icon abnormal display setting method.
[0059] In a possible implementation, the original text display setting may be modified to the first display setting, and the original icon display setting may be modified to the second display setting.
[0060] In a possible implementation, the original text display settings and icon display settings may also be retained. Then, the first display settings are added to the original text display settings. The second display settings are added to the original icon display settings. This implementation does not involve modifying the source code of the text display settings and icon display settings, and therefore does not involve code privacy issues.
[0061] For example, taking the Ant Forest control as the interface element to be modified, the following text abnormal display setting method can be added to the setText method corresponding to the Ant Forest control:
[0062] setSRTextLastwordDelete, this text abnormal display setting method indicates the missing setting for the last character of the text. For example: "Ant Forest" is displayed as "Ant Forest". setSRTextLastwordPointeg, this text abnormal display setting method indicates setting the last character of the text to a dot ".". For example: "Ant Forest" is displayed as "Ant Forest.". setSRTextFirstwordAppend3Point, this text abnormal display setting method indicates setting the characters other than the first character in the text to three dots "...". For example: "Ant Forest" is displayed as "Ant...". Exemplarily, taking the Ant Forest control as an example where the interface element to be modified is an Ant Forest control, an icon abnormal display setting method setSREmpty4Image can be added to the setImage method corresponding to the Ant Forest control. This icon abnormal display setting method indicates the icon missing setting.
[0063] In this way, since at least one abnormal display setting method is pre-configured in the display settings corresponding to each interface element, when displaying the corresponding interface element, different abnormal display setting methods can be called to control the corresponding interface element in the display interface to show the corresponding display defect, thereby obtaining abnormal sample data.
[0064] It should be noted that the text abnormal display setting method and icon abnormal display setting method added in the setText method and the setImage method can be constructed based on actual needs, and the embodiments of the present application do not limit this.
[0065] It should also be noted that one or more embodiments of this specification only take the IOS system as an example to exemplify the method of modifying the display setting method, and does not represent a limitation on the application system. For example, the above method of modifying the display setting method can also be applied to other systems such as Android. If the above method of modifying the display setting method is applied to the Android system, the corresponding abnormal display setting method can be configured in the display setting interface corresponding to the Android system. For the display setting interface corresponding to other systems such as Android, refer to the relevant technology, which will not be described here.
[0066] In this way, based on the interface element configured with the text abnormality display setting method and / or the icon abnormality display setting method, the construction of abnormal sample data can be achieved.
[0067] The following describes an embodiment of a method for constructing abnormal sample data provided by one or more embodiments of this specification.
[0068] See also Figure 3 , Figure 3 A flowchart of a method for constructing abnormal sample data provided by one or more embodiments of this specification is provided. The method can be applied to an electronic device 120, such as Figure 3 As shown, the method may include the following steps:
[0069] Step S202 : The electronic device 120 receives the abnormal sample data collection task sent by the automation platform 110 .
[0070] The automation platform 110 may be responsible for generating one or more abnormal sample data collection tasks and assigning one or more abnormal sample data collection tasks to one or more electronic devices 120. The abnormal sample data collection tasks may include interface information of the target display interface and an abnormal display processing strategy corresponding to the target display interface.
[0071] The target display interface can be understood as the display interface to be used as abnormal sample data. That is, the abnormal sample data collection task instructs to perform abnormal display processing on the target display interface to obtain an abnormal display interface including an incomplete presentation effect of some or all interface elements.
[0072] For example, taking the interface elements as labels and image views, the final display effect of the target display interface after abnormal display processing may include partial or complete incomplete display of labels and / or partial or complete incomplete display of image views.
[0073] The interface information of the target display interface may include the target application corresponding to the target display interface and the target display interface corresponding to the target application when the target application is running. For example, the interface information may indicate that the target display interface is the main interface 1202 of the payment application.
[0074] Since the display effects of different types of interface elements can be achieved through different display setting methods, therefore, the abnormal display processing strategy in one or more embodiments of this specification may include abnormal display processing strategies for different types of interface elements.
[0075] Optionally, the abnormal display processing strategy may include a target interface element type and a target abnormal display setting method corresponding to the target interface element type.
[0076] The target interface element type may be any of the three types of text, icon, and combination of text and icon. The target abnormal display setting method may include any of at least one text abnormal display setting method and / or any of at least one icon abnormal display setting method.
[0077] Exemplarily, the abnormal display processing strategy may include executing a setting for missing the last character of the text for the interface element whose interface element type is text in the main interface 1202 of the payment application.
[0078] The abnormal display processing strategy may also include executing icon missing settings for interface elements whose interface element type is icons in the main interface 1202 of the payment application.
[0079] In this way, by implementing different abnormal display processing for different types of interface elements, a variety of different abnormal data samples can be obtained.
[0080] Step S204: Based on the interface information of the target display interface, control the target application to run.
[0081] After receiving the abnormal sample data collection task, the electronic device 120 can determine the target application corresponding to the target display interface based on the interface information in the abnormal sample data collection task, and then control the target application to run so as to control the target application to display the target display interface.
[0082] Step S206: After the target application is run and before the target application displays the target display interface, perform abnormal display processing on the target display interface based on the abnormal display processing strategy corresponding to the target display interface.
[0083] Step S208: displaying a target display interface, wherein the target display interface includes a first interface element, and the first interface element is an interface element obtained after abnormal display processing.
[0084] Step S210: Acquire a target display interface, and use the target display interface as abnormal sample data.
[0085] In one or more embodiments of the present specification, abnormal display processing may be performed on some or all of the interface elements in the target display interface.
[0086] In a possible implementation, after the target application is run and before the target application displays the target display interface, the interface element (which may be referred to as the second interface element) in the target display interface that conforms to the target interface element type may be determined based on the target interface element type corresponding to the target display interface in the abnormal display processing strategy. Then, based on the target abnormal display setting method corresponding to the target interface element type, abnormal display processing may be performed on part or all of the second interface elements in the target display interface.
[0087] Exemplarily, the target interface element types corresponding to the target display interface in the abnormal display processing strategy include text and icons. In this way, for the second interface elements in the target display interface that are partially or entirely of text type, abnormal display processing can be performed on them according to the text abnormal display setting method indicated in the abnormal display processing strategy. For the second interface elements in the target display interface that are partially or entirely of icon type, abnormal display processing can be performed on them according to the icon abnormal display setting method indicated in the abnormal display processing strategy.
[0088] In a possible implementation, for a second interface element in a target display interface that is partially or entirely text, abnormal display processing is performed on it according to a text abnormal display setting method indicated in an abnormal display processing strategy, which can be implemented in the following manner: when the target interface element type indicated in the abnormal display processing strategy includes text, a target text abnormal display setting method can be selected from at least one pre-configured text abnormal display setting method; wherein at least one text abnormal display setting method is pre-configured in the first display setting, and the target text abnormal display setting method is any one of the at least one text abnormal display setting method. Then, based on the target text abnormal display setting method, abnormal display processing is performed on the second interface element in the target display interface that is partially or entirely text.
[0089] Exemplarily, after determining the second interface element including text and the target text exception display setting method, the method exchange function method_exchangeImplementations can be used to replace the setText method originally corresponding to the second interface element including text with the newly configured target text exception display setting method.
[0090] For example, taking the second interface element including text as "Ant Forest" and the target text abnormal display setting method as setSRTextLastwordDelete, when displaying the target display interface, setSRTextLastwordDelete can be called. In this way, the interface element corresponding to "Ant Forest" in the target display interface is presented as "Ant Forest".
[0091] In a possible implementation, for the second interface element in the target display interface that is partially or entirely an icon, abnormal display processing is performed on it according to the icon abnormal display setting method indicated in the abnormal display processing strategy, which can be implemented in the following manner: when the target interface element type includes an icon, a target icon abnormal display setting method is selected from at least one pre-configured icon abnormal display setting method; wherein at least one icon abnormal display setting method is pre-configured in the second display setting, and the target icon abnormal display setting method is any one of the at least one icon abnormal display setting method. Then, based on the target icon abnormal display setting method, abnormal display processing is performed on the second interface element in the target display interface that is partially or entirely an icon.
[0092] Exemplarily, after determining the second interface element including the icon and the target icon abnormal display setting method, the method exchange function method_exchangeImplementations can be used to replace the setImage method originally corresponding to the second interface element including the icon with the newly configured target icon abnormal display setting method.
[0093] For example, taking the second interface element including the icon as the icon corresponding to "Ant Forest" and the target text abnormal display setting method as setSREmpty4Image, when displaying the target display interface, setSREmpty4Image can be called. In this way, the interface element corresponding to "Ant Forest" in the target display interface is displayed as the icon corresponding to "Ant Forest" is missing.
[0094] Among them, the pre-configured text abnormal display setting method and icon abnormal display setting method can refer to the description of the above embodiment, which will not be repeated here.
[0095] In order to further construct a large number of abnormal sample data with differences, the proportion of abnormal display in the target display interface can be set, and then the interface elements in the target display interface can be processed for abnormal display based on the proportion. In this way, the abnormal display processing can be randomly performed on the interface elements at different positions in the target display interface, so that a large number of abnormal sample data with differences can be constructed.
[0096] In a possible implementation, the abnormal sample data collection task may include an abnormal processing ratio. In this way, after the target application is run and before the target application displays the target display interface, the target display interface may first determine the alternative interface element that meets the target interface element type based on the target interface element type. Then, based on the abnormal processing ratio in the abnormal sample data collection task, determine the second interface element from the alternative interface elements. Afterwards, perform abnormal display processing on the second interface element according to the abnormal display processing strategy. Among them, the ratio of the second interface element to all interface elements in the target display interface satisfies the abnormal processing ratio.
[0097] Exemplarily, the exception processing ratio is 10%, and the target display interface includes 50 interface elements. In this way, 5 interface elements can be randomly selected from the candidate interface elements as the second interface elements, and the second interface elements can be subjected to exception display processing.
[0098] Specifically, the random function arc4random_uniform can be used to randomly select 5 interface elements from the candidate interface elements as the second interface elements. In this way, different electronic devices 120 may randomly select different interface elements when collecting abnormal sample data based on the same abnormal sample data collection task. Therefore, even if the abnormal sample data collection task is the same, different abnormal sample data can be collected by different electronic devices 120. In addition, when the same electronic device 120 collects abnormal sample data multiple times based on the same abnormal sample data collection task, the randomly selected interface elements each time may also be different. Therefore, even with the same electronic device 120 and the same abnormal sample data collection task, different abnormal sample data can be collected through different collection times.
[0099] After the target display interface is displayed in step S208, the electronic device 120 may obtain the target display interface including the interface element (also referred to as the first interface element) with the display abnormality by means of screenshots, and use the screenshot corresponding to the target display interface as abnormal sample data.
[0100] Optionally, the electronic device 120 may send the obtained abnormal sample data to the cloud server 130 for use in model training.
[0101] Optionally, the electronic device 120 may also store the obtained abnormal sample data in the electronic device 120 .
[0102] It should be noted that one or more embodiments of this specification only take the processing process of an abnormal sample data collection task by the electronic device 120 as an example for illustrative description, and do not limit the number of abnormal sample data collection tasks. The electronic device 120 can also process multiple abnormal sample data collection tasks. Among them, if the electronic device 120 processes multiple abnormal sample data collection tasks, each abnormal sample data collection task can be processed separately with reference to the construction method of abnormal sample data provided in the above embodiment, which will not be repeated here.
[0103] It should also be noted that the number of target display interfaces in an abnormal sample data collection task in one or more embodiments of this specification can be one or more, and this is not limited in this embodiment of the present application. In addition, multiple target display interfaces can be display interfaces associated with the same target application or display interfaces associated with different target applications, and this is not limited in this embodiment of the present application.
[0104] For example, there are multiple target display interfaces in an abnormal sample data collection task, and the multiple target display interfaces are all display interfaces associated with the same target application. For another example, there are multiple target display interfaces in an abnormal sample data collection task, and the multiple target display interfaces are display interfaces associated with two different target applications.
[0105] Correspondingly, if there are multiple target display interfaces in an abnormal sample data collection task, the abnormal sample data collection task may include an abnormal display processing strategy corresponding to each target display interface. In this way, different abnormal display processing strategies can be used for different target display interfaces, thereby improving the richness of abnormal sample data.
[0106] For example, an abnormal sample data collection task includes target display interface A and target display interface B.
[0107] Among them, the abnormal display processing strategy corresponding to the target display interface A can be: for the interface elements whose interface element type is text in the target display interface A, the last character of the text is missing setting is executed. For the interface elements whose interface element type is icon in the target display interface A, the icon is missing setting is executed. The abnormal display processing strategy corresponding to the target display interface B can be: for the interface elements whose interface element type is text in the target display interface B, the last character of the text is set to a dot.
[0108] In summary, the method for constructing abnormal sample data provided in one or more embodiments of this specification can perform abnormal display processing on the target display interface before the target application displays the target display interface based on the abnormal display processing strategy in the received abnormal sample data collection task, so that the target display interface after the abnormal display processing includes the corresponding interface element that displays the abnormality. In this way, the target display interface can be processed by performing abnormal display processing on the target display interface through different abnormal display processing strategies to obtain rich abnormal sample data.
[0109] In addition, the method for constructing abnormal sample data provided by one or more embodiments of this specification can dynamically issue abnormal sample data collection tasks to one or more electronic devices through an automation platform. In this way, on the one hand, each electronic device automatically collects abnormal sample data based on the received abnormal sample data collection task, thereby freeing up manpower and realizing the automatic collection of abnormal sample data. On the other hand, abnormal sample data can be collected by multiple electronic devices at the same time, thereby improving the efficiency of abnormal sample data collection.
[0110] It can be understood that the above embodiments are only examples and can be modified in actual implementation. Those skilled in the art can understand that the modification methods of the above embodiments without creative labor fall within the protection scope of one or more embodiments of this specification and will not be repeated in the embodiments.
[0111] Based on the same inventive concept, one or more embodiments of the present specification further provide a device for constructing abnormal sample data. Since the principle of the problem solved by the device for constructing abnormal sample data is similar to that of the aforementioned method for constructing abnormal sample data, the implementation of the device for constructing abnormal sample data can refer to the implementation of the aforementioned method for constructing abnormal sample data, and the repeated parts will not be repeated.
[0112] See also Figure 4 , Figure 4 This is a structural block diagram of a device for constructing abnormal sample data provided by one or more embodiments of this specification. Figure 4 As shown, the abnormal sample data construction device 300 may include: a receiving module 301, a control module 302, a processing module 303, a display module 304 and an acquisition module 305.
[0113] The receiving module 301 can be used to receive an abnormal sample data collection task; wherein the abnormal sample data collection task includes interface information of a target display interface and an abnormal display processing strategy corresponding to the target display interface, and the interface information includes a target application corresponding to the target display interface.
[0114] The control module 302 may be used to control the running of the target application based on the interface information.
[0115] The processing module 303 may be used to perform abnormal display processing on the target display interface based on an abnormal display processing strategy corresponding to the target display interface after the target application is run and before the target application displays the target display interface.
[0116] The display module 304 may be used to display the target display interface, wherein the target display interface includes a first interface element, and the first interface element is an interface element obtained after the abnormal display processing.
[0117] The acquisition module 305 may be used to acquire the target display interface and use the target display interface as abnormal sample data.
[0118] In a possible implementation, the abnormal display processing strategy includes a target interface element type for performing abnormal display processing and a target abnormal display setting method corresponding to the target interface element type; the processing module 303 is used to perform abnormal display processing on the target display interface based on the abnormal display processing strategy corresponding to the target display interface after the target application is run and before the target application displays the target display interface, specifically:
[0119] The processing module 303 is used to determine, after the target application is run and before the target application displays the target display interface, based on the target interface element type corresponding to the target display interface, a second interface element in the target display interface that conforms to the target interface element type; and perform abnormal display processing on part or all of the second interface elements in the target display interface based on the target abnormal display setting method corresponding to the target interface element type.
[0120] In a possible implementation, the target interface element type includes text and / or icon, and the target abnormal display setting method includes a target text abnormal display setting method and / or a target icon abnormal display setting method; the processing module 303 is used to perform abnormal display processing on part or all of the second interface elements in the target display interface based on the target abnormal display setting method corresponding to the target interface element type, specifically:
[0121] The processing module 303 is used to select the target text abnormal display setting method from a pre-configured first display setting when the target interface element type includes text; wherein at least one text abnormal display setting method is pre-configured in the first display setting, and the target text abnormal display setting method is any one of the at least one text abnormal display setting method; based on the target text abnormal display setting method, perform abnormal display processing on a second interface element in the target display interface that partially or completely includes text.
[0122] In a possible implementation, the processing module 303 is used to perform abnormal display processing on the second interface element that partially or completely includes text in the target display interface based on the target text abnormal display setting method, specifically:
[0123] The processing module 303 is used to select the target icon abnormal display setting method from the pre-configured second display setting when the target interface element type includes an icon; wherein at least one icon abnormal display setting method is pre-configured in the second display setting, and the target icon abnormal display setting method is any one of the at least one icon abnormal display setting method; based on the target icon abnormal display setting method, abnormal display processing is performed on the second interface element that partially or completely includes icons in the target display interface.
[0124] In one possible implementation, the at least one text abnormal display setting method includes setting the last character of the text to be missing, setting the last character of the text to be a dot, and setting other characters in the text except the first character to be three dots; the at least one icon abnormal display setting method includes setting the icon to be missing.
[0125] In a possible implementation, the abnormal sample data collection task also includes an abnormal processing ratio, and the processing module 303 is used to determine, after the target application is run and before the target application displays the target display interface, based on the target interface element type corresponding to the target display interface, a second interface element in the target display interface that conforms to the target interface element type, specifically:
[0126] The processing module 303 is used to determine, in the target display interface, alternative interface elements that meet the target interface element type based on the target interface element type after the target application is run and before the target application displays the target display interface; and to determine the second interface element from the alternative interface elements based on the exception handling ratio; wherein the ratio of the second interface element to all interface elements in the target display interface satisfies the exception handling ratio.
[0127] In a possible implementation, the first interface element includes an interface element with abnormal text display and / or an interface element with abnormal icon display.
[0128] See also Figure 5 , Figure 5 This is a structural block diagram of an electronic device provided in one or more embodiments of this specification. Figure 5 As shown, the electronic device 400 may include a processor 401 and a memory 402; the memory 402 may be coupled to the processor 401. It is worth noting that the Figure 5 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.
[0129] In a possible implementation, the function of the abnormal sample data construction device 300 may be integrated into the processor 401. The processor 401 may be configured to perform the following operations:
[0130] Receive an abnormal sample data collection task; wherein the abnormal sample data collection task includes interface information of a target display interface and an abnormal display processing strategy corresponding to the target display interface, and the interface information includes a target application corresponding to the target display interface;
[0131] Based on the interface information, controlling the target application to run;
[0132] After the target application is run and before the target application displays the target display interface, performing abnormal display processing on the target display interface based on the abnormal display processing strategy corresponding to the target display interface;
[0133] Displaying the target display interface, wherein the target display interface includes a first interface element, and the first interface element is an interface element obtained after the abnormal display processing;
[0134] The target display interface is acquired, and the target display interface is used as abnormal sample data.
[0135] In another possible implementation, the abnormal sample data construction device 300 may be configured separately from the processor 401 . For example, the abnormal sample data construction device 300 may be configured as a chip connected to the processor 401 , and the abnormal sample data construction is implemented under the control of the processor 401 .
[0136] In addition, in some optional implementations, the electronic device 400 may also include: a communication module, an input unit, an audio processor, a display, a power supply, etc. It is worth noting that the electronic device 400 does not necessarily include Figure 5 In addition, the electronic device 400 may also include Figure 5 For components not shown, reference may be made to the prior art.
[0137] In some optional implementations, the processor 401 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device, which receives input and controls the operation of various components of the electronic device 400.
[0138] The memory 402 may be, for example, a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The memory 402 may store the information related to the abnormal sample data construction device 300, and may also store a program for executing the related information. The processor 401 may execute the program stored in the memory 402 to implement information storage or processing.
[0139] The input unit can provide input to the processor 401. The input unit is, for example, a key or a touch input device. The power supply can be used to provide power to the electronic device 400. The display can be used to display display objects such as images and text. The display can be, for example, an LCD display, but is not limited thereto.
[0140] The memory 402 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that stores information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 402 may also be some other type of device. The memory 402 includes a buffer memory (sometimes referred to as a buffer). The memory 402 may include an application / function storage unit for storing application programs and function programs or processes for executing the operation of the electronic device 400 by the processor 401.
[0141] The memory 402 may also include a data storage unit for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit of the memory 402 may include various drivers for the communication function of the computer device and / or for executing other functions of the computer device (such as a messaging application, a contact book application, etc.).
[0142] The communication module is a transmitter / receiver that sends and receives signals via an antenna. The communication module (transmitter / receiver) is coupled to the processor 401 to provide input signals and receive output signals, which may be the same as in a conventional mobile communication terminal.
[0143] Based on different communication technologies, multiple communication modules may be provided in the same computer device, such as a cellular network module, a Bluetooth module and / or a wireless local area network module, etc. The communication module (transmitter / receiver) is also coupled to a speaker and a microphone via an audio processor to provide an audio output via the speaker and receive an audio input from the microphone, thereby realizing a common telecommunication function. The audio processor may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor is also coupled to the processor 401, so that recording can be performed on the machine through the microphone, and the sound stored on the machine can be played through the speaker.
[0144] One or more embodiments of the present specification also provide a computer-readable storage medium capable of implementing all steps in the method for constructing abnormal sample data in the above embodiment. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all steps in the method for constructing abnormal sample data in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:
[0145] Receive an abnormal sample data collection task; wherein the abnormal sample data collection task includes interface information of a target display interface and an abnormal display processing strategy corresponding to the target display interface, and the interface information includes a target application corresponding to the target display interface;
[0146] Based on the interface information, controlling the target application to run;
[0147] After the target application is run and before the target application displays the target display interface, performing abnormal display processing on the target display interface based on the abnormal display processing strategy corresponding to the target display interface;
[0148] Displaying the target display interface, wherein the target display interface includes a first interface element, and the first interface element is an interface element obtained after the abnormal display processing;
[0149] The target display interface is acquired, and the target display interface is used as abnormal sample data.
[0150] like Figure 1 As shown, one or more embodiments of the present specification also provide a system for constructing abnormal sample data, which system may include an automation platform, at least one Figure 5The electronic device shown; wherein the automation platform is used to send an abnormal sample data collection task to at least one of the electronic devices.
[0151] Although one or more embodiments of this specification provide method operation steps as described in the embodiments or flowcharts, more or fewer operation steps may be included based on conventional or non-creative labor. The order of steps listed in the embodiments is only one way of executing the order of many steps and does not represent the only execution order. When the actual device or client product is executed, it can be executed in the order of the method shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment).
[0152] Those skilled in the art should understand that the embodiments of this specification may be provided as methods, devices (systems) or computer program products. Therefore, the embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0153] One or more embodiments of this specification are described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to one or more embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0154] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0155] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0156] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0157] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. For those of ordinary skill in the art, the specific meaning of the above terms in one or more embodiments of this specification can be understood according to the specific circumstances.
[0158] It should be noted that, in the absence of conflict, one or more embodiments of this specification and the features in the embodiments may be combined with each other. One or more embodiments of this specification are not limited to any single aspect, nor to any single embodiment, nor to any combination and / or replacement of these aspects and / or embodiments. Moreover, each aspect and / or embodiment of one or more embodiments of this specification may be used alone or in combination with one or more other aspects and / or embodiments thereof.
[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of one or more embodiments of this specification, rather than to limit them. Although one or more embodiments of this specification have been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some or all of the technical features may be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of one or more embodiments of this specification, and they should all be included in the scope of the claims and the specification of one or more embodiments of this specification.
[0160] One or more embodiments of this specification are described above in conjunction with optional implementation methods, but these implementation methods are only exemplary and serve only as an illustration. On this basis, multiple replacements and improvements can be made to one or more embodiments of this specification, all of which fall within the scope of protection of one or more embodiments of this specification.
Claims
1. A method for constructing abnormal sample data, characterized in that: The method comprises: Receive an abnormal sample data collection task; wherein the abnormal sample data collection task includes interface information of a target display interface and an abnormal display processing strategy corresponding to the target display interface, and the interface information includes a target application corresponding to the target display interface; Based on the interface information, controlling the target application to run; After the target application is run and before the target application displays the target display interface, based on the abnormal display processing strategy corresponding to the target display interface, abnormal display processing is performed on the target display interface; wherein, based on the abnormal display processing strategy corresponding to the target display interface, abnormal display processing is performed on the target display interface, including: from pre-configured abnormal display setting methods, calling the abnormal display setting method indicated in the abnormal display processing strategy, and performing abnormal display processing on the target display interface; the pre-configured abnormal display setting method refers to an abnormal display setting method added on the basis of retaining the original display setting method of the target display interface; Displaying the target display interface, wherein the target display interface includes a first interface element, and the first interface element is an interface element obtained after the abnormal display processing; The target display interface is acquired, and the target display interface is used as abnormal sample data.
2. The method according to claim 1, characterized in that The abnormal display processing strategy includes a target interface element type for performing abnormal display processing and a target abnormal display setting method corresponding to the target interface element type; calling the abnormal display setting method indicated in the abnormal display processing strategy from the pre-configured abnormal display setting methods to perform abnormal display processing on the target display interface, including: Based on the target interface element type corresponding to the target display interface, determining a second interface element in the target display interface that matches the target interface element type; From the pre-configured abnormal display setting methods, the target abnormal display setting method corresponding to the target interface element type is called to perform abnormal display processing on part or all of the second interface elements in the target display interface.
3. The method according to claim 2, characterized in that The target interface element type includes text, and the target abnormal display setting method includes a target text abnormal display setting method; calling the target abnormal display setting method corresponding to the target interface element type from the pre-configured abnormal display setting methods, and performing abnormal display processing on part or all of the second interface elements in the target display interface, respectively, includes: In the case where the target interface element type includes text, calling the target text abnormal display setting method from a pre-configured first display setting; wherein at least one text abnormal display setting method is pre-configured in the first display setting, and the target text abnormal display setting method is any one of the at least one text abnormal display setting method; Based on the target text abnormal display setting method, abnormal display processing is performed on the second interface element in the target display interface that partially or completely includes text.
4. The method according to claim 3, characterized in that The target interface element type also includes an icon, and the target abnormal display setting method also includes a target icon abnormal display setting method; calling the target abnormal display setting method corresponding to the target interface element type from the pre-configured abnormal display setting method, and performing abnormal display processing on part or all of the second interface elements in the target display interface, respectively, also includes: In the case where the target interface element type includes an icon, calling the target icon abnormal display setting method from a pre-configured second display setting; wherein at least one icon abnormal display setting method is pre-configured in the second display setting, and the target icon abnormal display setting method is any one of the at least one icon abnormal display setting method; Based on the target icon abnormal display setting method, abnormal display processing is performed on the second interface element that partially or completely includes icons in the target display interface.
5. The method according to claim 4, characterized in that The at least one text abnormal display setting method includes setting the last character of the text to be missing, setting the last character of the text to be a dot, and setting other characters in the text except the first character to be three dots; the at least one icon abnormal display setting method includes setting the icon to be missing.
6. The method according to any one of claims 2 to 5, characterized in that: The abnormal sample data collection task also includes an abnormal processing ratio, and the determining, based on the target interface element type corresponding to the target display interface, a second interface element in the target display interface that conforms to the target interface element type includes: Based on the target interface element type, determining, in the target display interface, candidate interface elements that match the target interface element type; Based on the exception processing ratio, the second interface element is determined from the candidate interface elements; wherein the ratio of the second interface element to all interface elements in the target display interface satisfies the exception processing ratio.
7. The method according to claim 1, characterized in that The first interface element includes an interface element with abnormal text display and / or an interface element with abnormal icon display.
8. A device for constructing abnormal sample data, characterized in that: The device comprises: A receiving module, configured to receive an abnormal sample data collection task; wherein the abnormal sample data collection task includes interface information of a target display interface and an abnormal display processing strategy corresponding to the target display interface, and the interface information includes a target application corresponding to the target display interface; A control module, used for controlling the operation of the target application based on the interface information; A processing module, configured to perform abnormal display processing on the target display interface based on the abnormal display processing strategy corresponding to the target display interface after the target application is run and before the target application displays the target display interface; wherein, performing abnormal display processing on the target display interface based on the abnormal display processing strategy corresponding to the target display interface comprises: calling the abnormal display setting method indicated in the abnormal display processing strategy from the pre-configured abnormal display setting methods, and performing abnormal display processing on the target display interface; the pre-configured abnormal display setting method refers to an abnormal display setting method added on the basis of retaining the original display setting method of the target display interface; A display module, configured to display the target display interface, wherein the target display interface includes a first interface element, and the first interface element is an interface element obtained after the abnormal display processing; The acquisition module is used to acquire the target display interface and use the target display interface as abnormal sample data.
9. The device according to claim 8, characterized in that The abnormal display processing strategy includes a target interface element type for executing abnormal display processing and a target abnormal display setting method corresponding to the target interface element type; the processing module is used to call the abnormal display setting method indicated in the abnormal display processing strategy from the pre-configured abnormal display setting methods, and perform abnormal display processing on the target display interface, specifically: The processing module is used to determine, based on the target interface element type corresponding to the target display interface, a second interface element in the target display interface that conforms to the target interface element type; From the pre-configured abnormal display setting methods, the target abnormal display setting method corresponding to the target interface element type is called to perform abnormal display processing on part or all of the second interface elements in the target display interface.
10. The device according to claim 9, characterized in that The target interface element type includes text, and the target abnormal display setting method includes a target text abnormal display setting method; the processing module is used to call the target abnormal display setting method corresponding to the target interface element type from the pre-configured abnormal display setting methods, and perform abnormal display processing on part or all of the second interface elements in the target display interface, specifically: The processing module is used to call the target text abnormal display setting method from a pre-configured first display setting when the target interface element type includes text; wherein at least one text abnormal display setting method is pre-configured in the first display setting, and the target text abnormal display setting method is any one of the at least one text abnormal display setting method; based on the target text abnormal display setting method, perform abnormal display processing on a second interface element in the target display interface that partially or completely includes text.
11. The device according to claim 10, characterized in that The target interface element type further includes an icon, and the target abnormal display setting method further includes a target icon abnormal display setting method; the processing module is further used for: In the case where the target interface element type includes icons, the target icon abnormal display setting method is called from a preconfigured second display setting; wherein, at least one icon abnormal display setting method is preconfigured in the second display setting, and the target icon abnormal display setting method is any one of the at least one icon abnormal display setting method; based on the target icon abnormal display setting method, abnormal display processing is performed on the second interface elements in the target display interface that partially or completely include icons.
12. The device according to claim 11, characterized in that The at least one text abnormal display setting method includes setting the last character of the text to be missing, setting the last character of the text to be a dot, and setting other characters in the text except the first character to be three dots; the at least one icon abnormal display setting method includes setting the icon to be missing.
13. The device according to any one of claims 9 to 12, characterized in that The abnormal sample data collection task also includes an abnormal processing ratio, and the processing module is used to determine a second interface element in the target display interface that meets the target interface element type based on the target interface element type corresponding to the target display interface, specifically: The processing module is used to determine, based on the target interface element type, candidate interface elements that match the target interface element type in the target display interface; Based on the exception processing ratio, the second interface element is determined from the candidate interface elements; wherein the ratio of the second interface element to all interface elements in the target display interface satisfies the exception processing ratio.
14. The device according to claim 8, characterized in that The first interface element includes an interface element with abnormal text display and / or an interface element with abnormal icon display.
15. An electronic device, characterized in that: The electronic device comprises: A memory for storing a computer program product; A processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, the method described in any one of claims 1 to 7 is implemented.
16. A system for constructing abnormal sample data, characterized in that: The system comprises an automation platform and at least one electronic device as described in claim 15; wherein the automation platform is used to send an abnormal sample data collection task to the at least one electronic device.
17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which, when executed, implement the method described in any one of claims 1 to 7.
