Popup window display method and device and storage medium

By intercepting the trigger event of the target application and judging the matching of the preset enumeration value, sending the trigger event to the pop-up window processing module to perform the pop-up operation, solving the problems of complexity of multiple pop-up window display code and high test regression cost in the prior art, and achieving the effect of flexible control and accurate display.

CN119829181APending Publication Date: 2025-04-15BEIJING 58 INFORMATION TTECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411885200.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

When the existing technology displays multiple pop-up windows in applications, the code is complex and it is difficult to flexibly adjust the pop-up window sequence and add pop-up windows, which increases the cost of testing regression.

Method used

By intercepting the trigger event of the target application, it is determined whether the preset enumeration value in the method to be executed matches the target enumeration value in the server page configuration data. If it matches, the trigger event will be sent to the pop-up processing module to perform the pop-up operation.

Benefits of technology

It realizes flexible control of multiple pop-up displays in the application and precisely control pop-up displays, reducing code complexity and test regression costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119829181A_ABST
    Figure CN119829181A_ABST
Patent Text Reader

Abstract

The invention provides a pop-up window display method and device and a storage medium, and the method comprises the steps: monitoring a trigger event issued by a target application program if it is detected that the target application program is started; and if the trigger event is the to-be-intercepted event, intercepting the trigger event, and determining a corresponding to-be-executed method for responding to the trigger event according to the trigger event. And if a preset enumeration value contained in the to-be-executed method is matched with a target enumeration value in page configuration data issued by the server, sending the trigger event to a pop-up window processing module to enable the pop-up window processing module to execute a pop-up operation corresponding to a corresponding preset pop-up window, and displaying the preset pop-up window in the target application program. Wherein the target enumeration value is used for representing a triggering condition corresponding to the preset popup window. According to the scheme, whether the popup window triggering condition is met or not is judged by intercepting the triggering event, if yes, original execution is interrupted, the preset popup window is displayed, and popup window display in the application program is flexibly controlled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information technology, and in particular to a pop-up window display method, device and storage medium. Background Art

[0002] In order to improve user interactivity, pop-up windows are often added to applications to display information in the form of pop-up windows. At present, many active projects in applications have the need to display multiple pop-up windows. When users click to enter the page, multiple pop-up windows pop up one by one in the display order. The commonly used processing method is to use a callback function to control the pop-up and closing of the pop-up window, and process the next callback in the pop-up callback. In this processing method, each pop-up window is developed independently and relies on a callback function to control the pop-up and closing of the pop-up window. This not only increases the complexity of the code, but also easily requires a large adjustment of the code due to temporary changes in the order of pop-up windows or the addition of new pop-ups, which also increases the cost of test regression. Summary of the invention

[0003] The embodiments of the present invention provide a pop-up window display method, device and storage medium, which are used to flexibly control the display of multiple pop-up windows in an application.

[0004] In a first aspect, an embodiment of the present invention provides a pop-up window display method, the method comprising:

[0005] If it is detected that the target application has been started, monitoring the trigger event sent by the target application;

[0006] If the triggering event is an event to be intercepted, intercepting the triggering event;

[0007] According to the triggering event, determining a method to be executed in response to the triggering event;

[0008] If the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module performs the pop-up operation corresponding to the corresponding preset pop-up window and displays the preset pop-up window in the target application;

[0009] The target enumeration value is used to represent the triggering condition corresponding to the preset pop-up window in the target application.

[0010] In a second aspect, an embodiment of the present invention provides a pop-up window display device, the device comprising:

[0011] A detection module, configured to monitor a trigger event sent by the target application if it is detected that the target application has been started;

[0012] An interception module, configured to intercept the triggering event if the triggering event is an event to be intercepted;

[0013] A determination module, used to determine, according to the triggering event, a method to be executed in response to the triggering event;

[0014] A display module is used to send the trigger event to a pop-up window processing module if the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, so that the pop-up window processing module executes the pop-up operation corresponding to the corresponding preset pop-up window and displays the preset pop-up window in the target application; wherein the target enumeration value is used to represent the trigger condition corresponding to the preset pop-up window in the target application.

[0015] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the pop-up display method as described in the first aspect.

[0016] In a fourth aspect, an embodiment of the present invention provides a non-temporary machine-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor can at least implement the pop-up display method described in the first aspect.

[0017] In a fifth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor can implement the pop-up display method as described in the first aspect above.

[0018] In the pop-up window display scheme provided by the embodiment of the present invention, when it is detected that the target application has been started, the trigger event issued by the target application is monitored. After the trigger event issued by the target application is monitored, it is determined whether the trigger event is an event to be intercepted. If it is an event to be intercepted, the trigger event issued by the target application is intercepted. And according to the trigger event, the method to be executed corresponding to the response trigger event is determined. Then, it is determined whether the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data issued by the server. If the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data issued by the server, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module performs the corresponding pop-up operation corresponding to the preset pop-up window, and displays the preset pop-up window in the target application. Among them, the target enumeration value is used to characterize the trigger condition corresponding to the preset pop-up window in the target application.

[0019] In the above scheme, when the trigger event sent by the target application is monitored as an event to be intercepted, the trigger event is intercepted, and then it is determined whether the preset enumeration value contained in the method to be executed corresponding to the trigger event matches the target enumeration value in the page configuration data. If it matches, the pop-up operation corresponding to the corresponding preset pop-up window is executed. That is, by intercepting the trigger event corresponding to the method to be executed, the pop-up window display operation is inserted into the original execution process of the application, which not only realizes the precise control of the pop-up window display, but also can flexibly add pop-ups to the original execution process of the application dynamically. In addition, by using the preset enumeration value as the condition for triggering the pop-up window, after intercepting the trigger event corresponding to the method to be executed, the preset enumeration value can be used to determine whether each page needs to execute the pop-up window pop-up operation, and the pop-up window processing module is used to execute the pop-up operation of the corresponding preset pop-up window, so that the pop-up window processing module can flexibly control the display of multiple pop-up windows, which is more efficient. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 A flowchart of a pop-up window display method provided by an embodiment of the present invention;

[0022] Figure 2 A flowchart of another pop-up window display method provided by an embodiment of the present invention;

[0023] Figure 3 A flowchart of another pop-up window display method provided by an embodiment of the present invention;

[0024] Figure 4 A flowchart of another pop-up window display method provided by an embodiment of the present invention;

[0025] Figure 5 A schematic diagram of the structure of a pop-up window display device provided by an embodiment of the present invention;

[0026] Figure 6 A schematic diagram of the structure of an electronic device provided in this embodiment. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. In addition, the step timing in the following method embodiments is only an example, not a strict limitation.

[0028] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0029] In the embodiment of the present invention, a new pop-up window display scheme is provided, which inserts a pop-up window display operation into the original execution process of the application by intercepting the input content corresponding to the method to be executed, so as to not only realize the precise control of the pop-up window display, but also can flexibly add pop-ups to the original execution process of the application dynamically. In addition, by using enumeration values ​​to characterize the trigger conditions corresponding to each pop-up window, the trigger conditions corresponding to the pop-up window can be dynamically configured, so that the pop-up window processing module can uniformly control the display of multiple pop-up windows, which is more efficient.

[0030] In the following, some embodiments of the present invention are described in detail in conjunction with the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and features in the embodiments can be combined with each other.

[0031] Figure 1 A flowchart of a pop-up window display method provided by an embodiment of the present invention, such as Figure 1 As shown, the execution subject of the method may be a pop-up display device. It is understandable that the device may be implemented as software, or a combination of software and hardware. Specifically, the method may include the following steps:

[0032] 101. If it is detected that the target application has been started, a trigger event sent by the target application is monitored.

[0033] 102. If the triggering event is an event to be intercepted, intercept the triggering event.

[0034] 103. According to the triggering event, determine a method to be executed corresponding to the triggering event.

[0035] 104. If the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module executes the pop-up operation corresponding to the corresponding preset pop-up window and displays the preset pop-up window in the target application.

[0036] The pop-up window display solution provided by the embodiment of the present invention can be applied to various terminal devices installed with the target application to realize flexible control of the display of multiple pop-up windows in the target application. Among them, the target application can be any type of application, for example, a recruitment APP, an information browsing APP, a video APP, etc. In addition, the pop-up window display solution provided by the embodiment of the present invention can also be applied to display multiple pop-up windows in a mini program or multiple pop-up windows in a web page.

[0037] In specific implementation, if it is detected that the target application has been started, the trigger event sent by the target application is monitored. Among them, the trigger event refers to an event that can automatically execute a preset code caused by user behavior, application system status change, page status change or external signal. For example, a user clicks a button on the display page corresponding to the application, submits a form, and completes the loading of data, etc., which can all be regarded as trigger events.

[0038] The triggering events sent by the target application can be monitored by calling SDK or API and obtaining corresponding event information, or a plug-in can be added to the target application to monitor the triggering events sent by the target application.

[0039] In actual applications, the target application may trigger more trigger events during the actual execution process. In order to improve the efficiency of pop-up display, in an embodiment of the present invention, after monitoring the trigger event sent by the target application, it can be determined whether the trigger event is an event to be intercepted.

[0040] The event to be intercepted refers to a trigger event related to a user interaction operation or a display page state change corresponding to the target application. In an optional embodiment, the target interception object can also be determined according to the trigger conditions and configuration information corresponding to each pop-up window in the target application, and the event triggered by the target interception object is determined as the event to be intercepted.

[0041] If the trigger event is determined to be an event to be intercepted, the trigger event is intercepted. For example, when the user clicks button A, the target application sends a user click event, which is an event to be intercepted. At this time, the user click event is intercepted to determine whether the pop-up window operation can be performed at present, and then decide whether to perform the subsequent button click processing operation.

[0042] That is to say, when it is determined that the trigger event currently being monitored is an event to be intercepted, the trigger event is intercepted. In this way, when the trigger event occurs, it can be determined whether a pop-up operation is currently being executed to decide whether to allow the trigger event to continue to propagate or execute the method to be executed associated with the trigger event.

[0043] The method to be executed is a method used to respond to a trigger event. That is, intercepting a trigger event is equivalent to intercepting the input content corresponding to the method to be executed, and inserting the judgment of the pop-up window triggering condition and the operation for displaying the pop-up window into the original execution process of the target application, so as to interrupt the original execution process corresponding to the trigger event and display the preset pop-up window in the current target application.

[0044] In the embodiment of the present invention, whether a group of pages need to display a pop-up window is indicated by enumeration. A preset enumeration value can be added for each page to determine whether each page needs to perform a pop-up window pop-up operation by the preset enumeration value.

[0045] Usually, there are two common types of pop-up windows in the target application, one is the pop-up window triggered by user interaction, and the other is the pop-up window triggered by page display or page closing. Then, the preset enumeration values ​​corresponding to each user behavior and different page scenarios in the target application can be set. Among them, the preset enumeration values ​​include target enumeration values, and the target enumeration values ​​are used to represent the triggering conditions corresponding to each preset pop-up window in the target application.

[0046] In addition, in actual applications, for a page, there may be multiple preset enumeration values. For example, page A corresponds to 3 preset enumeration values, preset enumeration value 1, preset enumeration value 2, and preset enumeration value 3. Among them, preset enumeration value 1 and preset enumeration value 2 are used to indicate that a pop-up window pop-up operation needs to be performed, and preset enumeration value 3 is used to indicate that a pop-up window pop-up operation does not need to be performed.

[0047] From the above description, it can be seen that the preset enumeration value can be used as a condition for triggering a pop-up window, and the target enumeration value can be used to represent the triggering conditions corresponding to each preset pop-up window in the target application. In this way, in actual applications, a preset pop-up window can be flexibly added or deleted in the target application according to actual needs, thereby realizing dynamic configuration of the triggering conditions corresponding to the pop-up window and managing the pop-up window more flexibly.

[0048] In actual applications, the corresponding preset enumeration values ​​can be configured for each page according to the configuration data corresponding to the target application. Then, during the actual operation of the target application, when a trigger event is intercepted, the preset enumeration value can be used to determine whether to interrupt the original execution process of the target application so as to perform a pop-up window operation in the current page.

[0049] Specifically, the method to be executed corresponding to the triggering event can be determined first according to the triggering event. Then, the preset enumeration value contained in the method to be executed is obtained, and it is determined whether the preset enumeration value matches the target enumeration value in the page configuration data sent by the server to determine whether the pop-up window needs to be executed at present.

[0050] If the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, the trigger event will be sent to the pop-up window processing module, so that the pop-up window processing module will execute the pop-up operation corresponding to the preset pop-up window and display the preset pop-up window in the target application.

[0051] Among them, the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, indicating that a pop-up operation needs to be performed at this time, interrupting the original execution operation of the target application, and sending the intercepted trigger event to the pop-up processing module.

[0052] The pop-up window processing module is used to manage the pop-up operation and closing operation corresponding to multiple preset pop-up windows in the target application. In other words, the pop-up window processing module uniformly manages the pop-up operation of multiple pop-up windows, which is more efficient.

[0053] Specifically, after receiving the trigger event, the pop-up processing module determines the preset pop-up window associated with the trigger event according to the preset enumeration value contained in the trigger event and the method to be executed, and determines whether to perform the pop-up operation on the preset pop-up window according to the pop-up condition corresponding to the preset pop-up window. If the pop-up condition is met, the corresponding pop-up operation is performed on the preset pop-up window to display the preset pop-up window in the target application.

[0054] In actual applications, an application usually promotes new features, advertisements, activities, etc. by displaying multiple pop-up windows during the startup process or during use. That is, the application may be associated with multiple pop-up windows to be displayed, and in order to better display these new features, advertisements, activities, etc. to be promoted, in practice, multiple pop-up windows to be displayed need to be displayed in sequence according to a predetermined order or trigger conditions.

[0055] Therefore, in an embodiment of the present invention, the pop-up window processing module can use a queue data structure to manage the scheduling of multiple pop-up windows. Specifically, multiple pop-up windows associated with the trigger event can be added to the pop-up window queue in sequence according to a predetermined order, and the pop-up windows can be taken out from the head of the pop-up window queue in sequence to perform the pop-up operation corresponding to the pop-up window.

[0056] In addition, if the preset enumeration value contained in the method to be executed does not match the target enumeration value in the page configuration data sent by the server, indicating that the current page does not require a pop-up window, then the trigger event can be sent to the method to be executed to execute the original processing flow corresponding to the trigger event.

[0057] In an embodiment of the present invention, when it is detected that the trigger event sent by the target application is an event to be intercepted, the trigger event is intercepted, and then it is determined whether the preset enumeration value contained in the method to be executed corresponding to the trigger event matches the target enumeration value in the page configuration data. If they match, the pop-up operation corresponding to the corresponding preset pop-up window is executed. That is, by intercepting the trigger event corresponding to the method to be executed, a pop-up window display operation is inserted into the original execution process of the application, which not only realizes accurate control of the pop-up window display, but also allows the pop-up window to be added dynamically and flexibly in the original execution process of the application. In addition, by using the preset enumeration value as the condition for triggering the pop-up window, after intercepting the trigger event corresponding to the method to be executed, it is possible to determine whether each page needs to execute the pop-up window pop-up operation through the preset enumeration value, and the pop-up operation of the corresponding preset pop-up window is executed through the pop-up window processing module, so that the pop-up window processing module can flexibly control the display of multiple pop-up windows.

[0058] In actual applications, there are mainly two types of pop-ups in the target application: the first type is pop-ups triggered by user interaction operations, and the other type is pop-ups triggered by page display or page closing. In the actual interception process, the intercepted method to be executed may be a page life cycle method or a response method of a user interaction control. However, the response method of a user interaction control is a user-defined method or a proxy method corresponding to an interaction control. In the actual execution process, the method names corresponding to these methods to be executed cannot be obtained, and the traditional method exchange method cannot be used to insert pop-up judgment operations and pop-up display operations in the original execution process of the target application.

[0059] Therefore, in the embodiment of the present invention, for different execution methods, different interception methods can be used to insert pop-up window judgment operations and pop-up window display operations in the original execution process of the target application. In specific implementation, after determining the method to be executed corresponding to the triggering event, the method signature or method call source corresponding to the method to be executed can be determined to determine whether the method to be executed is a page life cycle method or a response method of a user interaction control.

[0060] After determining the type of the method to be executed, the corresponding interception method can be determined according to the type of the method to be executed, so as to insert a pop-up window judgment operation and a pop-up window display operation into the original execution process of the target application.

[0061] The two execution processes are exemplarily described below in conjunction with the following embodiments.

[0062] Figure 2 A flowchart of another pop-up window display method provided by an embodiment of the present invention, such as Figure 2 As shown, specifically, when the method to be executed corresponding to the intercepted trigger event is a page life cycle method, the pop-up window display method may include the following steps:

[0063] 201. If it is detected that the target application has been started, a trigger event sent by the target application is monitored.

[0064] 202. If the triggering event is an event to be intercepted, intercept the triggering event.

[0065] 203. According to the triggering event, determine a method to be executed corresponding to the triggering event.

[0066] 204. If the method to be executed is a page lifecycle method, a mapping table entry corresponding to the method name of the method to be executed is searched in a set mapping table, where the mapping table entry is used to describe the correspondence between the method name of the method to be executed and a preset enumeration value.

[0067] 205. Determine the preset enumeration value included in the method to be executed according to the mapping table entry.

[0068] 206. If the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module executes the pop-up operation corresponding to the corresponding preset pop-up window and displays the preset pop-up window in the target application.

[0069] When it is detected that the target application has been started, the trigger event sent by the target application can be monitored. If the trigger event is an event to be intercepted, the trigger event is intercepted, and according to the trigger event, a method to be executed corresponding to the trigger event is determined. The specific implementation process is referred to the above embodiment and will not be repeated here.

[0070] After determining that the method to be executed is a page lifecycle method, obtain a preset mapping table, and search for a mapping table entry corresponding to the method name of the method to be executed in the set mapping table. And according to the mapping table entry, determine the preset enumeration value contained in the method to be executed. The mapping table entry is used to describe the correspondence between the method name of the method to be executed and the preset enumeration value.

[0071] In the specific implementation, the corresponding preset enumeration value can be set in advance for each page life cycle method in the target application, and the method name corresponding to each page life cycle method and the preset enumeration value corresponding to each page life cycle method can be stored in a set mapping table, so that the preset enumeration value corresponding to each page life cycle method can be quickly found according to the method name corresponding to each page life cycle method, thereby speeding up the pop-up display operation or the original execution process corresponding to the execution trigger event, so that the user cannot perceive the pause and the experience is better.

[0072] Among them, the preset enumeration values ​​corresponding to each page life cycle method in the target application can be pre-set according to the configuration information of multiple preset pop-up windows corresponding to the target application and the page configuration information corresponding to the target application.

[0073] The above method can be used to obtain the preset enumeration value corresponding to the method to be executed. After obtaining the preset enumeration value corresponding to the method to be executed, the preset enumeration value corresponding to the method to be executed can be compared with the target enumeration value in the page configuration data sent by the server to see if they are consistent.

[0074] Specifically, the preset enumeration value contained in the method to be executed is obtained. If the preset enumeration value matches the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module executes the pop-up operation corresponding to the corresponding preset pop-up window.

[0075] Among them, when the preset enumeration value corresponding to the method to be executed matches the target enumeration value in the page configuration data, it means that the current page to be displayed needs to display a pop-up window, and the trigger event is no longer sent to the method to be executed, but forwarded to the pop-up window processing module. The pop-up window processing module can execute the pop-up operation corresponding to the corresponding preset pop-up window according to the trigger event.

[0076] In addition, in actual applications, when the preset pop-up window in the target application performs a pop-up operation, it not only needs to meet the trigger condition corresponding to the preset pop-up window, but also requires certain data or instructions to perform the pop-up operation. Then in an optional embodiment, after the pop-up window processing module receives the trigger event, it obtains the pop-up condition corresponding to the preset pop-up window associated with the trigger, and determines whether the pop-up condition is currently met. If the pop-up condition is met, the pop-up window processing module can call the pop-up method corresponding to the associated preset pop-up window to perform the corresponding pop-up operation and display the associated preset pop-up window in the target application.

[0077] The above describes the corresponding execution process when the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server. If the method to be executed is a page life cycle method, and the preset enumeration value contained in the method to be executed does not match the target enumeration value in the page configuration data sent by the server, the method to be executed can be called to process the triggering event to execute the original execution process corresponding to the triggering event.

[0078] In an embodiment of the present invention, when the method to be executed is a page life cycle method, a mapping table entry corresponding to the method name of the method to be executed is searched in a set mapping table to determine the preset enumeration value contained in the method to be executed. Furthermore, it is determined whether the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server. If not, a trigger event is sent to the pop-up window processing module, so that the pop-up window processing module executes the corresponding pop-up operation corresponding to the preset pop-up window, and displays the preset pop-up window in the target application, thereby realizing the insertion of the pop-up window display operation in the original execution process of the application. In this way, not only can the pop-up window display be accurately controlled, but also the pop-up window can be flexibly and dynamically added in the original execution process of the application.

[0079] Figure 3 A flowchart of another pop-up window display method provided by an embodiment of the present invention is shown in FIG. Figure 3 As shown, specifically, when the method to be executed corresponding to the intercepted trigger event is a response method of the user interaction control, the pop-up window display method may include the following steps:

[0080] 301. If it is detected that the target application has been started, a trigger event sent by the target application is monitored.

[0081] 302. If the triggering event is an event to be intercepted, intercept the triggering event.

[0082] 303. According to the triggering event, determine a method to be executed in response to the triggering event.

[0083] 304. If the method to be executed is a response method of a user interaction control, obtain a user interaction control object corresponding to the method to be executed and a preset enumeration value corresponding to the user interaction control object.

[0084] 305. Determine the preset enumeration value corresponding to the user interaction control object as the preset enumeration value included in the method to be executed.

[0085] 306. If the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module executes the pop-up operation corresponding to the corresponding preset pop-up window and displays the preset pop-up window in the target application.

[0086] When it is detected that the target application has been started, the trigger event sent by the target application can be monitored. If the trigger event is an event to be intercepted, the trigger event is intercepted, and according to the trigger event, a method to be executed corresponding to the trigger event is determined. The specific implementation process is referred to the above embodiment and will not be repeated here.

[0087] After determining that the method to be executed is the response method of the user interaction control, the preset enumeration value contained in the method to be executed is obtained. The specific implementation method for obtaining the preset enumeration value can be: obtaining the user interaction control object corresponding to the method to be executed and the preset enumeration value corresponding to the user interaction control object. The preset enumeration value corresponding to the user interaction control object is determined as the preset enumeration value contained in the method to be executed.

[0088] In an optional embodiment, before obtaining the user interaction control object corresponding to the method to be executed and the preset enumeration value corresponding to the user interaction control object, the method further includes: determining the user interaction control corresponding to the trigger event; creating a user interaction control object corresponding to the user interaction control, wherein the user interaction control object includes the method to be executed for responding to the trigger event. According to the page configuration data sent by the server, the preset enumeration value corresponding to the user interaction control object is determined.

[0089] After determining the preset enumeration value corresponding to the user interaction control object, the preset enumeration value included in the method to be executed can be determined according to the preset enumeration value. Then, if the preset enumeration value included in the method to be executed matches the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module executes the pop-up operation corresponding to the corresponding preset pop-up window.

[0090] In other words, by comparing whether the preset enumeration value contained in the method to be executed is consistent with the target enumeration value sent by the server, it is possible to determine whether the trigger conditions corresponding to multiple preset pop-up windows in the target application are met, to determine whether to interrupt the original execution process corresponding to the trigger event, and to forward the trigger event to the pop-up window processing module to execute the pop-up window operation.

[0091] Since the method to be executed is a user-defined method or a proxy method corresponding to a UI control, that is, the method name corresponding to the method to be executed cannot be directly obtained, then in an embodiment of the present invention, an intermediary can be created and the response event object corresponding to the triggering event can be replaced with the intermediary object, so that the triggering event can be received by the intermediary object, and the response event object is used to respond to the triggering event.

[0092] Then, the preset enumeration value contained in the method to be executed is obtained through the middleman object. If the preset enumeration value matches the target enumeration value in the page configuration data sent by the server, it is determined whether to execute the pop-up operation corresponding to the corresponding preset pop-up window. If it is determined to execute the pop-up operation corresponding to the corresponding preset pop-up window, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module executes the pop-up operation corresponding to the corresponding preset pop-up window.

[0093] Optionally, the specific implementation process of determining whether to execute the pop-up operation corresponding to the corresponding preset pop-up window can be: calling the pop-up method corresponding to the preset pop-up window through the middleman object, and determining whether to execute the pop-up operation corresponding to the corresponding preset pop-up window according to the pop-up method.

[0094] The above describes the corresponding execution process when the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server. If the method to be executed is a response event method of a user interaction control, and the preset enumeration value contained in the method to be executed does not match the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the response event object, so that the method to be executed is called through the response event object to process the trigger event. Among them, the response event object corresponds to the trigger event, and the response event object is the response object originally used to receive and process the trigger event in the target application.

[0095] In an embodiment of the present invention, when the method to be executed is a response method of a user interaction control, the user interaction control object corresponding to the method to be executed and the preset enumeration value corresponding to the user interaction control object are obtained, and the preset enumeration value corresponding to the user interaction control object is determined as the preset enumeration value contained in the method to be executed. Then, it is determined whether the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server. If they do not match, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module executes the corresponding pop-up operation corresponding to the preset pop-up window, and displays the preset pop-up window in the target application, thereby realizing the insertion of the pop-up window display operation in the original execution process of the application. In this way, not only can the pop-up window display be accurately controlled, but also the pop-up window can be flexibly and dynamically added in the original execution process of the application.

[0096] In addition, in practical applications, the method to be executed in response to the triggering event can also be directly intercepted. This will be described in detail below in conjunction with the following embodiments.

[0097] Figure 4 A flowchart of another pop-up window display method provided by an embodiment of the present invention is shown in FIG. Figure 4 Specifically, the method may include the following steps:

[0098] 401. If it is detected that the target application has been started, a trigger event sent by the target application is monitored.

[0099] 102. If the triggering event is an event to be intercepted, determine a method to be executed corresponding to the triggering event according to the triggering event.

[0100] 103. Intercept the method to be executed.

[0101] 104. If the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module executes the pop-up operation corresponding to the corresponding preset pop-up window and displays the preset pop-up window in the target application.

[0102] When it is detected that the target application has been started, the trigger event sent by the target application can be monitored. If the trigger event is an event to be intercepted, the method to be executed corresponding to the trigger event is determined according to the trigger event. The specific implementation process is referred to the above embodiment and will not be repeated here.

[0103] After the method to be executed is determined, the method to be executed is intercepted, and it is determined whether the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server. If the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module performs the corresponding pop-up operation corresponding to the preset pop-up window, and displays the preset pop-up window in the target application.

[0104] The embodiment of the present invention intercepts the method to be executed to insert a pop-up window display operation into the original execution process of the application program. This not only realizes the precise control of the pop-up window display, but also can flexibly and dynamically add pop-ups into the original execution process of the application program.

[0105] In order to facilitate understanding of the above embodiment, the above implementation process is illustrated in combination with a specific application scenario. In specific implementation, the pop-up window display device is applied to an application on a mobile terminal to achieve flexible and unified control of multiple pop-up window displays in the target application.

[0106] Before controlling the display of multiple pop-up windows in the target application, the target enumeration value corresponding to the triggering condition of each pop-up window in the target application can be determined first. In addition, methods for setting enumeration properties and methods for obtaining enumeration properties are added to the root class of the UI control through classification extension, and the associated object mechanism is used to add enumeration properties to the root class of the UI control in the classification extension, so that all subclasses that inherit the root class can access and modify the enumeration properties.

[0107] Specifically, an enumeration type is defined, and the enumeration type includes preset enumeration values ​​corresponding to each UI control, and the multiple preset enumeration values ​​include the target enumeration value. A classification extension is created, and an enumeration attribute (attribute of the enumeration type) is added to the classification extension using an associated object to add the preset enumeration value in the enumeration type to each UI control object, and the UI control object is obtained by instantiating a subclass that inherits the root class of the UI control. The classification extension includes a method for setting enumeration attributes and a method for obtaining enumeration attributes. The classification extension is added to the root class of the UI control so that all subclasses that inherit the root class can access and modify the enumeration attribute.

[0108] In addition, the preset enumeration value corresponding to each page life cycle method in the target application is determined, and the method name and the preset enumeration value corresponding to each page life cycle method are stored in a set mapping table.

[0109] Next, when the pop-up display device detects that the target application has been started, it monitors the trigger event sent by the target application. If the trigger event is an event to be intercepted, the method to be executed corresponding to the trigger event is determined according to the trigger event. And intercept the method to be executed. If the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the pop-up processing module so that the pop-up processing module executes the corresponding pop-up operation corresponding to the preset pop-up window. If there is no match, the method to be executed is called to process the trigger event to execute the original processing flow.

[0110] Specifically, if the method to be executed is a page life cycle method, the page life cycle method can be intercepted by hooking the life cycle method of UIViewController, and the preset enumeration value in the page life cycle method is obtained at the interception point, and matched with the target enumeration value in the page configuration data sent by the server to determine whether there are multiple target enumeration values ​​corresponding to pop-up window trigger conditions in the intercepted page life cycle method. If so, the pop-up window processing module is called, and the pop-up window processing module distributes the trigger event to the pop-up window processing logic corresponding to each preset pop-up window to perform the corresponding pop-up operation.

[0111] If the method to be executed is a method for adding a response event to UIControl or a method for adding a response event to UIGestureRecognizer, the method for adding a response event is intercepted, and an NSProxy intermediary object is created. The target object of the response event is replaced with the NSProxy object, so that the NSProxy object receives the trigger event, and the pop-up method corresponding to the preset pop-up window is called. According to the pop-up method, it is determined whether to execute the pop-up operation corresponding to the corresponding preset pop-up window. If the pop-up is executed, the trigger event is sent to the pop-up window processing module to execute the corresponding pop-up window processing. If the pop-up is not executed, when NSProxy receives the trigger event, it will forward the trigger event to the real target object for processing, and continue the original processing flow.

[0112] Among them, after calling the pop-up method corresponding to the preset pop-up window, the pop-up method corresponding to the preset pop-up window can return a BOOL value. The middleman object determines whether to interrupt the original process based on the bool value. If not, the user event is forwarded to the real target object for processing. If interrupted, the pop-up window processing module is notified to perform a specific pop-up operation.

[0113] If the method to be executed is the UITableView add proxy method or the UICollectionView add proxy method, the add proxy method is intercepted and an NSProxy intermediary object is created. The target object that responds to the event is replaced with the NSProxy object so that the NSProxy object can receive the trigger event and call the pop-up method corresponding to the preset pop-up window. According to the pop-up method, it is determined whether to execute the pop-up operation corresponding to the corresponding preset pop-up window. If the pop-up is executed, the trigger event is sent to the pop-up window processing module to execute the corresponding pop-up window processing. If the pop-up is not executed, when NSProxy receives the trigger event, it will forward the trigger event to the real target object for processing and continue the original processing flow.

[0114] The following will describe in detail one or more embodiments of the pop-up display device of the present invention. Those skilled in the art will appreciate that these devices can be configured using commercially available hardware components through the steps taught in this solution.

[0115] Figure 5 A schematic diagram of a pop-up window display device provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the device includes: a detection module 11, an interception module 12, a determination module 13, and a display module 14.

[0116] The detection module 11 is used for monitoring a trigger event sent by the target application if it is detected that the target application has been started.

[0117] The interception module 12 is used to intercept the triggering event if the triggering event is an event to be intercepted.

[0118] The determination module 13 is used to determine, according to the triggering event, a method to be executed in response to the triggering event.

[0119] The display module 14 is used to send the trigger event to the pop-up window processing module if the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, so that the pop-up window processing module executes the pop-up operation corresponding to the corresponding preset pop-up window and displays the preset pop-up window in the target application; wherein the target enumeration value is used to represent the trigger condition corresponding to the preset pop-up window in the target application.

[0120] Optionally, the device also includes an acquisition module, which is specifically used to: if the method to be executed is a page life cycle method, search for a mapping table entry corresponding to the method name of the method to be executed in a set mapping table, and the mapping table entry is used to describe the correspondence between the method name of the method to be executed and a preset enumeration value; determine the preset enumeration value contained in the method to be executed according to the mapping table entry.

[0121] Optionally, the acquisition module is also used to: if the method to be executed is a response method of a user interaction control, then obtain the user interaction control object corresponding to the method to be executed and the preset enumeration value corresponding to the user interaction control object; and determine the preset enumeration value corresponding to the user interaction control object as the preset enumeration value contained in the method to be executed.

[0122] Optionally, the acquisition module is also used to: determine the user interaction control corresponding to the trigger event; create a user interaction control object corresponding to the user interaction control, the user interaction control object including a method to be executed for responding to the trigger event; and determine a preset enumeration value corresponding to the user interaction control object based on the page configuration data sent by the server.

[0123] Optionally, the display module 14 is specifically used to: if the method to be executed is a page life cycle method, obtain a preset enumeration value contained in the method to be executed, and if the preset enumeration value matches a target enumeration value in the page configuration data sent by the server, send the trigger event to a pop-up window processing module, so that the pop-up window processing module executes a pop-up operation corresponding to the corresponding preset pop-up window;

[0124] Or; if the method to be executed is the response event method of the user interaction control, a middleman object is created, and the response event object corresponding to the trigger event is replaced by the middleman object, so that the trigger event is received by the middleman object, and the response event object is used to respond to the trigger event; the preset enumeration value contained in the method to be executed is obtained through the middleman object, and if the preset enumeration value matches the target enumeration value in the page configuration data sent by the server, it is determined whether to execute the pop-up operation corresponding to the corresponding preset pop-up window; if it is determined to execute the pop-up operation corresponding to the corresponding preset pop-up window, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module executes the pop-up operation corresponding to the corresponding preset pop-up window.

[0125] Optionally, the display module 14 is specifically used to: call a pop-up method corresponding to the preset pop-up window through the middleman object; and determine whether to execute a pop-up operation corresponding to the preset pop-up window according to the pop-up method.

[0126] Optionally, the display module 14 is also used to: if the method to be executed is a page life cycle method, and the preset enumeration value contained in the method to be executed does not match the target enumeration value in the page configuration data sent by the server, then call the method to be executed to process the trigger event.

[0127] Optionally, the display module 14 is also used for: if the method to be executed is a response event method of a user interaction control, and the preset enumeration value contained in the method to be executed does not match the target enumeration value in the page configuration data sent by the server, then the trigger event is sent to the response event object, so as to call the method to be executed to process the trigger event through the response event object; wherein the response event object corresponds to the trigger event.

[0128] Figure 5 The device shown can execute the steps in the pop-up display method in the aforementioned embodiment. The detailed execution process and technical effects can be found in the description in the aforementioned embodiment, which will not be repeated here.

[0129] The embodiment of the present invention also provides an electronic device, such as Figure 6 As shown, the electronic device may include: a processor 21, a memory 22, and a communication interface 23. The memory 22 stores executable codes, and when the executable codes are executed by the processor 21, the processor 21 implements the pop-up window display method in the above-mentioned embodiment.

[0130] In addition, an embodiment of the present invention provides a non-temporary machine-readable storage medium, on which executable code is stored. When the executable code is executed by a processor of an electronic device, the processor can at least implement the pop-up display method provided in the aforementioned embodiment.

[0131] In addition, an embodiment of the present invention provides a computer program product. The computer program product includes a computer program or an instruction. When the computer program or the instruction is executed by a processor, the processor is enabled to implement the above Figure 1-4 The steps or functions of the method shown.

[0132] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art may understand and implement the present invention without creative effort.

[0133] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by adding a necessary general hardware platform, and of course can also be implemented by combining hardware and software. Based on such an understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a computer product, and the present invention can be in 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.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A pop-up window display method, characterized in that: include: If it is detected that the target application has been started, monitoring the trigger event sent by the target application; If the triggering event is an event to be intercepted, intercepting the triggering event; According to the triggering event, determining a method to be executed in response to the triggering event; If the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module performs the pop-up operation corresponding to the corresponding preset pop-up window and displays the preset pop-up window in the target application; The target enumeration value is used to represent the triggering condition corresponding to the preset pop-up window in the target application.

2. The method according to claim 1, characterized in that If the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, before sending the trigger event to the pop-up window processing module, the method further includes: If the method to be executed is a page lifecycle method, a mapping table entry corresponding to the method name of the method to be executed is searched in a set mapping table, where the mapping table entry is used to describe the correspondence between the method name of the method to be executed and a preset enumeration value; According to the mapping table entry, a preset enumeration value included in the method to be executed is determined.

3. The method according to claim 2, characterized in that The method further comprises: If the method to be executed is a response method of a user interaction control, obtaining a user interaction control object corresponding to the method to be executed and a preset enumeration value corresponding to the user interaction control object; The preset enumeration value corresponding to the user interaction control object is determined as the preset enumeration value included in the method to be executed.

4. The method according to claim 3, characterized in that Before obtaining the user interaction control object corresponding to the method to be executed and the preset enumeration value corresponding to the user interaction control object, the method further includes: Determine and send a user interaction control corresponding to the triggering event; Creating a user interaction control object corresponding to the user interaction control, wherein the user interaction control object includes a method to be executed for responding to the trigger event; According to the page configuration data sent by the server, a preset enumeration value corresponding to the user interaction control object is determined.

5. The method according to claim 1, characterized in that If the preset enumeration value contained in the method to be executed matches the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the pop-up window processing module so that the pop-up window processing module performs the pop-up operation corresponding to the corresponding preset pop-up window, including: If the method to be executed is a page life cycle method, then obtaining a preset enumeration value contained in the method to be executed, and if the preset enumeration value matches a target enumeration value in the page configuration data sent by the server, then sending the trigger event to a pop-up window processing module, so that the pop-up window processing module executes a pop-up operation corresponding to the corresponding preset pop-up window; or If the method to be executed is a response event method of a user interaction control, a middleman object is created, and the response event object corresponding to the trigger event is replaced with the middleman object, so that the trigger event is received by the middleman object, and the response event object is used to respond to the trigger event; Obtaining a preset enumeration value contained in the method to be executed through the middleman object, and if the preset enumeration value matches a target enumeration value in the page configuration data sent by the server, determining whether to execute a pop-up operation corresponding to the corresponding preset pop-up window; If it is determined to execute the pop-up operation corresponding to the corresponding preset pop-up window, the trigger event is sent to the pop-up window processing module, so that the pop-up window processing module executes the pop-up operation corresponding to the corresponding preset pop-up window.

6. The method according to claim 5, characterized in that The determining whether to execute a pop-up operation corresponding to a corresponding preset pop-up window includes: Calling the pop-up method corresponding to the preset pop-up window through the middleman object; According to the pop-up method, determine whether to execute the pop-up operation corresponding to the corresponding preset pop-up window.

7. The method according to claim 5, characterized in that The method further comprises: If the method to be executed is a page life cycle method, and the preset enumeration value contained in the method to be executed does not match the target enumeration value in the page configuration data sent by the server, the method to be executed is called to process the trigger event.

8. The method according to claim 5, characterized in that The method further comprises: If the method to be executed is a response event method of a user interaction control, and the preset enumeration value contained in the method to be executed does not match the target enumeration value in the page configuration data sent by the server, the trigger event is sent to the response event object, so as to call the method to be executed to process the trigger event through the response event object; The response event object corresponds to the trigger event.

9. An electronic device, characterized in that: include: A memory, a processor, and a communication interface; wherein the memory stores executable code, and when the executable code is executed by the processor, the processor executes the pop-up display method as described in any one of claims 1 to 8.

10. A non-transitory machine-readable storage medium, characterized in that: The non-transitory machine-readable storage medium stores executable code, and when the executable code is executed by a processor of an electronic device, the processor executes the pop-up display method as described in any one of claims 1 to 8.