WO2020258663A1 - 页面展示数据清除方法、装置、计算机设备和存储介质 - Google Patents

页面展示数据清除方法、装置、计算机设备和存储介质 Download PDF

Info

Publication number
WO2020258663A1
WO2020258663A1 PCT/CN2019/118037 CN2019118037W WO2020258663A1 WO 2020258663 A1 WO2020258663 A1 WO 2020258663A1 CN 2019118037 W CN2019118037 W CN 2019118037W WO 2020258663 A1 WO2020258663 A1 WO 2020258663A1
Authority
WO
WIPO (PCT)
Prior art keywords
callback
trigger event
observer
preset trigger
service object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2019/118037
Other languages
English (en)
French (fr)
Inventor
陈旭敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2020258663A1 publication Critical patent/WO2020258663A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9577Optimising the visualization of content, e.g. distillation of HTML documents

Definitions

  • This application relates to a method, device, computer equipment and storage medium for clearing page display data.
  • a method, device, computer equipment, and storage medium for clearing page display data are provided.
  • a method for clearing page display data includes:
  • the first module responds to the callback instruction to clear the page display data corresponding to the callback instruction.
  • a device for clearing page display data includes:
  • Observer service object acquisition module used to obtain the observer service object, and inject the observer service object into the first page module and the second page module respectively;
  • the observer registration module is used to call the observer service object in the second page module to register the observer for the preset trigger event, and add the corresponding callback method during registration to the preset trigger event The corresponding array;
  • the callback instruction generation module is used to call the observer service object to send a notification to the callback method in the array to trigger the callback when the preset trigger event is successfully monitored in the first page module Method generates a callback instruction;
  • the data clearing module is configured to respond to the callback instruction in the second page module to clear the page display data corresponding to the callback instruction.
  • a computer device including a memory and one or more processors, the memory stores computer readable instructions, when the computer readable instructions are executed by the processor, the one or more processors execute The following steps:
  • the first module responds to the callback instruction to clear the page display data corresponding to the callback instruction.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions.
  • the one or more processors execute the following steps:
  • the first module responds to the callback instruction to clear the page display data corresponding to the callback instruction.
  • Fig. 1 is an application scenario diagram of a method for clearing page display data according to one or more embodiments.
  • Fig. 2 is a schematic flowchart of a method for clearing page display data according to one or more embodiments.
  • Fig. 3 is a block diagram of a device for clearing page display data according to one or more embodiments.
  • Figure 4 is a block diagram of a computer device according to one or more embodiments.
  • the method for clearing page display data provided in this application can be applied to the application environment as shown in FIG. 1.
  • the terminal 102 communicates with the server 104 through the network.
  • the terminal 102 first obtains the observer service object corresponding to the pre-defined observer service, injects the observer service object into the first page module and the second page module respectively, and calls the observer service object on the preset trigger event in the second page module.
  • Observer registration add the callback method corresponding to the registration to the array corresponding to the preset trigger event.
  • the terminal 102 obtains relevant data from the server 104, it can be displayed through the second page module.
  • the observer service object When the first page module is monitored When the trigger event is preset, the observer service object is called to send a notification to the callback method in the array to trigger the callback method to generate a callback instruction, and finally the first module responds to the callback instruction to automatically clear the data displayed by the second page module. Improve the efficiency of data removal.
  • the terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
  • a method for clearing page display data is provided. Taking the method applied to the terminal in FIG. 1 as an example for description, the method includes the following steps:
  • Step S202 Obtain the observer service object, and inject the observer service object into the first page module and the second page module respectively.
  • the terminal page view of the e-marketing system in this embodiment can be developed based on angularJS, each page module has a tree structure, and an observer service object can be constructed in the parent page module of the tree structure, and the terminal is from Obtain the observer service object from the parent page module, and inject the observer service object into the first page module and the second page module through dependency injection.
  • the first page module may be used to receive page operations corresponding to a preset trigger event.
  • the preset trigger event may be one event or multiple events.
  • the first page module may display a control corresponding to the preset trigger event, and receive the page operation corresponding to the preset trigger event through the control.
  • the preset trigger event may be the submission of the current customer's e-sales result.
  • the second page module is used for data display, and there can be one or more second page modules.
  • the second page module may include a sales process information display page module, a loan information display page module, and a customer information display Page module
  • the sales process information display page module is used to display the current customer’s sales process information
  • the loan information display page module is used to display the current customer’s loan information
  • the customer information display page module is used to display the current customer’s identity information To show.
  • step S204 the observer service object is called in the second page module to perform observer registration for the preset trigger event, and the callback method corresponding to the registration is added to the array corresponding to the preset trigger event.
  • the callback method is encapsulated according to the processing logic corresponding to the clear display data in the second page module.
  • the second page module is Becomes an observer corresponding to the preset trigger event, and when the preset trigger event occurs, the page display data clearing operation can be performed in the second page module.
  • each preset trigger event sets an array to store the callback methods of each observer corresponding to the preset trigger event.
  • any second page module registers When becoming an observer of a certain preset trigger event, add the callback method corresponding to the page module to the array corresponding to the preset trigger event.
  • Step S206 When the preset trigger event is successfully monitored in the first page module, the observer service object is called to send a notification to the callback method in the array to trigger the callback method to generate a callback instruction.
  • Step S208 Respond to the callback instruction in the second page module to clear the page display data corresponding to the callback instruction.
  • the terminal when the terminal monitors an interaction event in the first page module, it can compare the monitored interaction event with a preset trigger event to determine whether the current interaction event is a preset trigger event. When the comparison result is When the interaction event is the same as the preset trigger event, it is determined that the preset trigger event is successfully monitored. At this time, the terminal can query the array corresponding to the preset trigger event, and call the observer service in the first page module to the array Each callback method in sends a notification, which can trigger the callback method in the array to generate a callback instruction.
  • the callback instruction refers to the instruction with status information notification generated according to the callback method. It can be used as a signal instruction to transmit the trigger event to the observer to trigger the observer to adjust its own functional state.
  • the control corresponding to the interaction event may be compared with the control corresponding to the preset trigger event. If the comparison is consistent, it is determined that the interaction event is The preset trigger events are the same.
  • the terminal sends the callback instruction to the corresponding observer.
  • the observer here refers to the second page module that has registered as an observer. Therefore, the terminal can respond to the callback instruction in the second page module and execute the callback instruction The corresponding data clearing operation automatically clears the data displayed on the second page module.
  • calling the observer service object to send a notification to the callback method in the array to trigger the callback method to generate a callback instruction includes: obtaining the current customer ID corresponding to the preset trigger event; calling the observer service object to the The callback method sends a notification carrying the current customer identification to trigger the callback method to generate a callback instruction carrying the current customer identification; respond to the callback instruction in the second page module to clear the page display data corresponding to the callback instruction, including: on the second page The module responds to the callback instruction to clear the page display data corresponding to the current customer identifier in the second page module.
  • the preset trigger event is the submission of the current customer's e-sales result
  • the e-sales result may include a result that characterizes the success of the current customer's loan and a result that characterizes the failure of the current customer's loan.
  • the second page module can display data corresponding to multiple customers, and display multiple buttons for submitting e-sales results. Each button corresponds to a different customer and is associated with a customer ID.
  • the agent can click the customer’s "Submit Telemarketing Results" button in the first page module.
  • the terminal will successfully monitor the preset trigger event of submitting the current customer's telemarketing results and determine the customer as the current customer ,
  • the terminal can further obtain the customer ID associated with the "Submit Telemarketing Results" button and determine it as the current customer ID.
  • the current customer ID can be composed of one or more of a preset number of digits, letters, or special symbols.
  • the terminal calls the observer service object to send a notification to each callback method in the array, and carries the current customer identification in the notification. After each callback method in the array receives the notification, it is based on the current customer identification in the notification Generate a callback instruction carrying the current customer ID.
  • the terminal sends a callback instruction to the corresponding observer.
  • the terminal responds to the callback instruction in the page module corresponding to the observer, and performs data corresponding to the current customer ID displayed in the page module. Clear, so that the page display data can be accurately cleared.
  • the observer here refers to the second page module that has been registered as an observer of the preset trigger event of submitting the current customer's telemarketing result.
  • the observer may be a page module for displaying customer information, and when the observer receives the callback instruction, the terminal clears the customer identity information corresponding to the current customer identifier displayed in the page module.
  • the second page module calls the first method corresponding to the observer service object to trigger the preset
  • the event is registered as an observer, and the callback method corresponding to the registration is added to the array corresponding to the preset trigger event.
  • the callback method of the observer service object in the array is called Send a notification to trigger the callback method to generate a callback instruction, and send the callback instruction to the corresponding observer.
  • the callback instruction is used to instruct the observer to clear the data corresponding to the callback instruction in the current page, because the data displayed on the page can be automatically cleared , No manual operation is required, thus saving the time of manual operation and improving the efficiency of clearing data.
  • calling the observer service object to send notifications to the callback methods in the array includes: obtaining the priority corresponding to each callback method in the array; and sending notifications to each callback method in order of priority from high to low.
  • the developer can set the priority according to the specific business requirements, and the priority corresponding to the observer is the corresponding callback method.
  • Priority When the preset trigger event is successfully monitored in the first page module, the terminal first needs to obtain the priority of each observer, and determine each callback method in the array corresponding to the preset trigger event according to the priority corresponding to the observer , And then send notifications to each callback method in the array in order of priority from high to low.
  • step S206 when there are multiple preset trigger events, when the preset trigger event is successfully monitored in the first page module in step S206, call the observer service object to send a notification to the callback method in the array, including : When an interaction event is monitored in the first page module, the monitored interaction event is compared with each preset trigger event; when the interaction event is successfully compared to the target preset trigger event, it is triggered by the target preset Multiple threads in the thread pool corresponding to the event respectively call the observer service object to send a notification to the callback method in the array corresponding to the target preset trigger event.
  • the interaction event can be compared with each preset trigger event separately, and when the monitored interaction event is successfully compared with any preset trigger event When the comparison succeeds, the preset trigger event is determined to be the target preset trigger event. Further, the terminal can obtain the thread pool corresponding to the target preset trigger event, and call the observer through multiple threads in the thread pool. The service object sends a notification to the callback method in the array corresponding to the target preset trigger event.
  • calling the observer service object to send a notification to the callback method in the array includes: when the preset trigger event is successfully monitored in the first page module When an event is triggered, the feedback information returned by the server is received; when it is determined that the preset processing result corresponding to the current client is submitted successfully according to the feedback information, the observer service object is called to send a notification to the callback method in the array.
  • the preset trigger event is the submission of a preset processing result corresponding to the current customer
  • the preset processing result refers to the result of processing related data of the current customer according to a preset process.
  • the preset processing result may be a telemarketing result.
  • the terminal calls the observer service object in the first page module to send a notification to the callback method in the array. Further, when the current customer is determined according to the feedback information returned by the server When the preset processing result fails to be saved, the terminal displays the feedback information of the submission failure in the first page module.
  • the observer service object is called to send a notification to the callback method in the array only when the submission of the preset processing result is successful, which can prevent the display data in the second page module from being incorrectly reported when the telemarketing result submission fails. Clear.
  • the above method further includes: calling the observer service object in the second page module to remove the observer from the preset trigger event, and remove the corresponding callback method from the array corresponding to the preset trigger event .
  • the terminal can call the observer service object in the second page module to preset Trigger the event to remove the observer, and remove the corresponding callback method from the array corresponding to the preset trigger event. It can be understood that after the callback method corresponding to any second page module is removed from the array corresponding to the preset trigger event, the terminal no longer clears the data in the second page module.
  • steps in the flowchart of FIG. 2 are displayed in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless specifically stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least some of the steps in FIG. 2 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution of these sub-steps or stages The sequence is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • a page display data clearing device 300 which includes an observer service object acquisition module 302, an observer registration module 304, a callback instruction generation module 306, and a data clearing module 308; wherein :
  • Observer service object acquisition module 302 configured to obtain the observer service object, and inject the observer service object into the first page module and the second page module respectively;
  • the observer registration module 304 is configured to call the observer service object in the second page module to register the observer for the preset trigger event, and add the corresponding callback method during registration to the array corresponding to the preset trigger event;
  • the callback instruction generation module 306 is configured to, when the preset trigger event is successfully monitored in the first page module, call the observer service object to send a notification to the callback method in the array, so as to trigger the callback method to generate a callback instruction;
  • the data clearing module 308 is used to respond to the callback instruction in the second page module to clear the page display data corresponding to the callback instruction.
  • the callback instruction generation module is also used to obtain the priority corresponding to each callback method in the array, and send notifications to each callback method in order from high to low in order to trigger each callback method to generate a callback instruction .
  • the callback instruction generation module is also used to obtain the current customer identification corresponding to the preset trigger event; call the observer service object to send a notification carrying the current customer identification to the callback method in the array to trigger the callback method to generate the current customer identification
  • the callback instruction of the customer identification is also used to respond to the callback instruction in the second page module to clear the page display data corresponding to the current customer identification in the second page module.
  • the callback instruction generation module is also used to, when an interaction event is monitored in the first page module, perform the monitored interaction event with each preset trigger event. Comparing, when the interaction event is successfully compared to the target preset trigger event, multiple threads in the thread pool corresponding to the target preset trigger event call the observer service object to add the target preset trigger event to the array corresponding to the target preset trigger event.
  • the callback method sends notifications.
  • the preset trigger event is to submit a preset processing result corresponding to the current client
  • the callback instruction generation module is also used to receive the feedback information returned by the server when the preset trigger event is successfully monitored in the first page module ,
  • the observer service object is called to send a notification to the callback method in the array.
  • the above-mentioned device further includes an observer removal module, which is used to call the observer service object to perform observer removal on the preset trigger event, and to move the corresponding callback method from the array corresponding to the preset trigger event. except.
  • the various modules in the above-mentioned page display data clearing device can be implemented in whole or in part by software, hardware and a combination thereof.
  • the foregoing modules may be embedded in the form of hardware or independent of the processor in the computer device, or may be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the foregoing modules.
  • a computer device is provided.
  • the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 4.
  • the computer equipment includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and computer readable instructions.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer readable instruction is executed by the processor, a method for clearing page display data is realized.
  • the display screen of the computer device can be a liquid crystal display or an electronic ink display screen
  • the input device of the computer device can be a touch layer covered on the display screen, or it can be a button, trackball or touchpad set on the computer device shell , It can also be an external keyboard, touchpad, or mouse.
  • FIG. 4 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a computer device including a memory and one or more processors.
  • the memory stores computer-readable instructions.
  • the one or more processors execute The following steps: Obtain the observer service object, inject the observer service object into the first page module and the second page module respectively; call the observer service object in the second page module to register the observer for the preset trigger event, and register it When the corresponding callback method is added to the array corresponding to the preset trigger event; when the first page module successfully listens to the preset trigger event, the observer service object is called to send a notification to the callback method in the array to trigger the callback method to generate a callback Instruction; and responding to the callback instruction in the second page module to clear the page display data corresponding to the callback instruction.
  • the processor further implements the following steps when executing computer-readable instructions: obtaining the priority corresponding to each callback method in the array; and sending notifications to each callback method in order of priority from high to low to trigger Each callback method generates a callback instruction.
  • the processor further implements the following steps when executing the computer-readable instructions: obtaining the current customer identification corresponding to the preset trigger event; calling the observer service object to send a notification carrying the current customer identification to the callback method in the array, to The triggering callback method generates a callback instruction carrying the current customer identifier; and responds to the callback instruction in the second page module to clear the page display data corresponding to the current customer identifier in the second page module.
  • the processor when there are multiple preset trigger events, the processor further implements the following steps when executing the computer-readable instructions: when an interaction event is monitored in the first page module, the monitored interaction event is respectively Each preset trigger event is compared; and when the interaction event is successfully compared to the target preset trigger event, multiple threads in the thread pool corresponding to the target preset trigger event call the observer service object to pre-set the target. Set the callback method in the array corresponding to the trigger event to send notification.
  • the preset trigger event is to submit a preset processing result corresponding to the current customer
  • the processor further implements the following steps when executing the computer-readable instruction: when the preset trigger event is successfully monitored in the first page module, Receive the feedback information returned by the server; and when it is determined that the preset processing result corresponding to the current client is submitted successfully according to the feedback information, call the observer service object to send a notification to the callback method in the array.
  • the processor further implements the following steps when executing the computer-readable instructions: call the observer service object to remove the observer from the preset trigger event, and remove the corresponding callback method from the array corresponding to the preset trigger event Remove.
  • one or more non-volatile computer-readable storage media storing computer-readable instructions are provided.
  • the one or more processors Perform the following steps: Obtain the observer service object, inject the observer service object into the first page module and the second page module respectively; call the observer service object in the second page module to register the observer for the preset trigger event, and When registering, the corresponding callback method is added to the array corresponding to the preset trigger event; when the preset trigger event is successfully monitored on the first page module, the observer service object is called to send a notification to the callback method in the array to trigger the generation of the callback method Callback instruction; and responding to the callback instruction in the second page module to clear the page display data corresponding to the callback instruction.
  • the following steps are also implemented: obtaining the priority corresponding to each callback method in the array; and sending notifications to each callback method in order from high to low in order Trigger each callback method to generate a callback instruction.
  • the following steps are also implemented: obtaining the current customer identification corresponding to the preset trigger event; calling the observer service object to send a notification carrying the current customer identification to the callback method in the array, Generate a callback instruction carrying the current customer identifier by triggering the callback method; and respond to the callback instruction in the second page module to clear the page display data corresponding to the current customer identifier in the second page module.
  • the following steps are further implemented: when an interaction event is monitored in the first page module, the monitored interaction events are respectively Compare with each preset trigger event; and when the interaction event is successfully compared to the target preset trigger event, multiple threads in the thread pool corresponding to the target preset trigger event call the observer service object to send the target The callback method in the array corresponding to the preset trigger event sends a notification.
  • the preset trigger event is to submit the preset processing result corresponding to the current customer
  • the computer-readable instruction also implements the following steps when being executed by the processor: when the preset trigger event is successfully monitored in the first page module , Receive the feedback information returned by the server; and when it is determined that the preset processing result corresponding to the current client is submitted successfully according to the feedback information, call the observer service object to send a notification to the callback method in the array.
  • the following steps are also implemented: call the observer service object to remove the observer from the preset trigger event, and remove the corresponding callback method from the array corresponding to the preset trigger event Removed.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
  • SRAM static RAM
  • DRAM dynamic RAM
  • SDRAM synchronous DRAM
  • DDRSDRAM double data rate SDRAM
  • ESDRAM enhanced SDRAM
  • SLDRAM synchronous chain Channel
  • memory bus Radbus direct RAM
  • RDRAM direct memory bus dynamic RAM
  • RDRAM memory bus dynamic RAM

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Telephonic Communication Services (AREA)

Abstract

一种页面展示数据清除方法,包括:获取观察者服务对象,将所述观察者服务对象分别注入第一页面模块及第二页面模块;在所述第二页面模块中调用所述观察者服务对象对所述预设触发事件进行观察者注册,并将注册时对应的回调方法加入到所述预设触发事件对应的数组;当在所述第一页面模块成功监听到所述预设触发事件时,调用所述观察者服务对象向数组中的回调方法发送通知,以触发所述回调方法生成回调指令;在所述第二页面模块中响应所述回调指令,以清除与所述回调指令对应的页面展示数据。

Description

页面展示数据清除方法、装置、计算机设备和存储介质
相关申请的交叉引用
本申请要求于2019年06月24日提交中国专利局,申请号为2019105490508,申请名称为“页面展示数据清除方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及一种页面展示数据清除方法、装置、计算机设备和存储介质。
背景技术
随着计算机技术的飞速发展,传统的通过人工随便拨打大量电话进行贷款产品业务推销的模式逐渐被电销系统取代,依托于电销系统,坐席人员可以更高效率的进行贷款业务推销。在贷款业务推销的过程中,进行推销的坐席人员常常需要打开电销系统的前端页面,并在该前端页面进行各项操作,在操作的过程中经常会出现由于对某个前端页面的某个模块的操作而需要对页面展示的数据进行清除的情况,然而发明人意识到,传统技术中,当需要进行页面数据清除时,通常由坐席人员手动点击对应页面模块的清除按钮,对数据进行清除,这种方式费时费力,效率低下。
发明内容
根据本申请公开的各种实施例,提供一种页面展示数据清除方法、装置、计算机设备和存储介质。
一种页面展示数据清除方法包括:
获取观察者服务对象,将所述观察者服务对象分别注入第一页面模块及第二页面模块;
在所述第二页面模块中调用所述观察者服务对象对所述预设触发事件进行观察者注册,并将注册时对应的回调方法加入到所述预设触发事件对应的数组;
当在所述第一页面模块成功监听到所述预设触发事件时,调用所述观察者服务对象向数组中的回调方法发送通知,以触发所述回调方法生成回调指令;及
在所述第一模块响应所述回调指令,以清除与所述回调指令对应的页面展示数据。
一种页面展示数据清除装置包括:
观察者服务对象获取模块,用于获取观察者服务对象,将所述观察者服务对象分别注入第一页面模块及第二页面模块;
观察者注册模块,用于在所述第二页面模块中调用所述观察者服务对象对所述预设触发事件进行观察者注册,并将注册时对应的回调方法加入到所述预设触发事件对应的数组;
回调指令生成模块,用于当在所述第一页面模块中成功监听到所述预设触发事件时,调用所述观察者服务对象向所述数组中的回调方法发送通知,以触发所述回调方法生成回调指令;及
数据清除模块,用于在所述第二页面模块中响应所述回调指令,以清除与所述回调指令对应的页面展示数据。
一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:
获取观察者服务对象,将所述观察者服务对象分别注入第一页面模块及第二页面模块;
在所述第二页面模块中调用所述观察者服务对象对所述预设触发事件进行观察者注册,并将注册时对应的回调方法加入到所述预设触发事件对应的数组;
当在所述第一页面模块成功监听到所述预设触发事件时,调用所述观察者服务对象向数组中的回调方法发送通知,以触发所述回调方法生成回调指令;及
在所述第一模块响应所述回调指令,以清除与所述回调指令对应的页面展示数据。
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:
获取观察者服务对象,将所述观察者服务对象分别注入第一页面模块及第二页面模块;
在所述第二页面模块中调用所述观察者服务对象对所述预设触发事件进行观察者注册,并将注册时对应的回调方法加入到所述预设触发事件对应的数组;
当在所述第一页面模块成功监听到所述预设触发事件时,调用所述观察者服务对象向数组中的回调方法发送通知,以触发所述回调方法生成回调指令;及
在所述第一模块响应所述回调指令,以清除与所述回调指令对应的页面展示数据。
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征和优点将从说明书、附图以及权利要求书变得明显。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。
图1为根据一个或多个实施例中页面展示数据清除方法的应用场景图。
图2为根据一个或多个实施例中页面展示数据清除方法的流程示意图。
图3为根据一个或多个实施例中页面展示数据清除装置的框图。
图4为根据一个或多个实施例中计算机设备的框图。
具体实施方式
为了使本申请的技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的页面展示数据清除方法,可以应用于如图1所示的应用环境中。终端102通过网络与服务器104进行通信。终端102首先获取预先定义的观察者服务对应的观察者服务对象,将观察者服务对象分别注入第一页面模块及第二页面模块,在第二页面模块调用观察者服务对象对预设触发事件进行观察者注册,将注册时对应的回调方法加入预设触发事件对应的数组,当终端102从服务器104获取到相关数据时,可通过第二页面模块进行展示,当在第一页面模块中监听到预设触发事件时,调用观察者服务对象向数组中的回调方法发送通知,以触发回调方法生成回调指令,最后在第一模块响应回调指令,从而对第二页面模块展示的数据进行自动清除,提高了数据清除效率。
终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一些实施例中,如图2所示,提供了一种页面展示数据清除方法,以该方法应用于图1中的终端为例进行说明,包括以下步骤:
步骤S202,获取观察者服务对象,将观察者服务对象分别注入第一页面模块及第二页面模块。
具体地,本实施例中电销系统的终端页面视图可以基于angularJS开发得到,各个页面模块之间为树形结构,可以在该树形结构的父页面模块中构建 一个观察者服务对象,终端从父页面模块中获取观察者服务对象,将该观察者服务对象通过依赖注入的方式注入到第一页面模块和第二页面模块中。
第一页面模块可以用于接收预设触发事件对应的页面操作,根据不同的业务场景需求,预设触发事件可以是一个事件或者多个事件。在一些实施例中,第一页面模块可以显示预设触发事件对应的控件,通过该控件接收预设触发事件对应的页面操作。在另一些实施例中,预设触发事件可以是提交当前客户的电销结果。第二页面模块用于进行数据展示,第二页面模块可以是一个,或者多个。
在一些实施例中,当第一页面模块显示的提交当前客户的电销结果这一事件对应的控件时,第二页面模块可以包括销售流程信息展示页面模块、贷款信息展示页面模块、客户信息展示页面模块,销售流程信息展示页面模块用于对当前客户的销售流程信息进行展示,贷款信息展示页面模块用于对当前客户的贷款信息进行展示,客户信息展示页面模块用于对当前客户的身份信息进行展示。
步骤S204,在第二页面模块中调用观察者服务对象对预设触发事件进行观察者注册,并将注册时对应的回调方法加入到预设触发事件对应的数组。
具体地,回调方法根据第二页面模块中清除展示数据对应的处理逻辑封装而成,当在第二页面模块中调用观察者服务对象对预设触发事件进行观察者注册后,第二页面模块即成为预设触发事件对应的观察者,当该预设触发事件发生时,可以在第二页面模块中执行页面展示数据清除操作。
在一些实施例中,预设触发事件可以有多个,每个预设触发事件分别设置一个数组用于保存该预设触发事件对应的各个观察者的回调方法,当任意一个第二页面模块注册成某个预设触发事件的观察者时,将该页面模块对应的回调方法加入该预设触发事件对应的数组中。
步骤S206,当在第一页面模块中成功监听到预设触发事件时,调用观察者服务对象向数组中的回调方法发送通知,以触发回调方法生成回调指令。
步骤S208,在第二页面模块中响应回调指令,以清除与回调指令对应的 页面展示数据。
具体地,当终端在第一页面模块中监听到交互事件时,可以将监听到的交互事件与预设触发事件进行比对,以判断当前的交互事件是否为预设触发事件,当比对结果为交互事件与预设触发事件相同时,判定为成功监听到预设触发事件,此时,终端可以查询该预设触发事件对应的数组,并在第一页面模块中调用观察者服务向该数组中的每一个回调方法发送通知,该通知可触发数组中的回调方法生成回调指令。回调指令指的是根据回调方法生成的具有状态信息通知的指令,可作为将触发事件传递给观察者的信号指令,以触发观察者调整自身的功能状态。
在一些实施例中,终端将交互事件与预设触发事件进行比对时,可以将该交互事件对应的控件与预设触发事件对应的控件进行比对,若比对一致,则判定交互事件与预设触发事件相同。
进一步,终端将回调指令发送给对应的观察者,这里的观察者指的是进行了观察者注册的第二页面模块,因此,终端可以在该第二页面模块中响应回调指令,并执行回调指令对应的数据清除操作,以对第二页面模块展示的数据进行自动清除。
在一些实施例中,调用观察者服务对象向数组中的回调方法发送通知,以触发回调方法生成回调指令,包括:获取预设触发事件对应的当前客户标识;调用观察者服务对象向数组中的回调方法发送携带当前客户标识的通知,以触发回调方法生成携带当前客户标识的回调指令;在第二页面模块中响应回调指令,以清除与回调指令对应的页面展示数据,包括:在第二页面模块中响应回调指令,以清除第二页面模块中与当前客户标识对应的页面展示数据。
本实施例中,预设触发事件为提交当前客户的电销结果,电销结果可以包括用于表征当前客户贷款成功的结果以及用于表征当前客户贷款失败的结果。第二页面模块中可展示多个客户对应的数据,并显示多个提交电销结果的按钮,每一个按钮对应不同的客户并与客户标识进行关联,当针对其中一 个客户的电销流程结束时,坐席人员可以在第一页面模块中点击该客户“提交电销结果”按钮,此时,终端会成功监听到提交当前客户的电销结果这一预设触发事件并将该客户确定为当前客户,终端可以进一步获取该“提交电销结果”按钮关联的客户标识并确定为当前客户标识,当前客户标识可由预设位数的数字、字母或者特殊符号中的一种或多种组成,在获取到当前客户标识后,终端调用观察者服务对象向数组中的各个回调方法发送通知,并在通知中携带当前客户标识,数组中的各个回调方法在接收到通知后,基于通知中的当前客户标识生成携带当前客户标识的回调指令。
进一步,终端将回调指令发送至对应的观察者,观察者在接收到回调指令后,终端在观察者对应的页面模块中响应该回调指令,对该页面模块中展示的当前客户标识对应的数据进行清除,从而可以对页面展示数据进行精准的清除。可以理解,这里的观察者指的是已注册成为提交当前客户的电销结果这一预设触发事件的观察者的第二页面模块。
在一些实施例中,观察者可以是用于展示客户信息的页面模块,则该观察者在接收到回调指令时,终端对页面模块中展示的当前客户标识对应的客户身份信息进行清除。
上述页面展示数据清除方法中,首先获取观察者服务对象,将观察者服务对象分别注入第一页面模块及第二页面模块,第二页面模块调用观察者服务对象对应的第一方法对预设触发事件进行观察者注册,并将注册时对应的回调方法加入到预设触发事件对应的数组,当通过第一页面模块成功监听到预设触发事件时,调用观察者服务对象向数组中的回调方法发送通知,以触发回调方法生成回调指令,并将回调指令发送至对应的观察者,回调指令用于指示观察者在当前页面中清除与回调指令对应的数据,由于页面中展示的数据可以自动清除,不需要人工操作,从而节省了手工操作的时间,提高了对数据进行清除的效率。
在一些实施例中,调用观察者服务对象向数组中的回调方法发送通知,包括:获取数组中各个回调方法对应的优先级;按照优先级从高到低的顺序 依次向各个回调方法发送通知。
本实施例中,对于注册成为预设触发事件的观察者的多个第二页面模块,可由开发人员根据具体的业务需求进行优先级设置,观察者对应的优先级即为其对应的回调方法的优先级,当在第一页面模块中成功监听到预设触发事件时,终端首先需要获取各个观察者的优先级,根据观察者对应的优先级确定该预设触发事件对应的数组中各个回调方法的优先级,然后按照优先级从高到低的顺序依次向数组中各个回调方法发送通知。
上述实施例中,通过获取各个回调方法对应的优先级,按照优先级从高到低的顺序依次向各个回调方法发送通知,可以使得需要优先执行数据清除操作的观察者能够优先接收到回调指令。
在一些实施例中,当存在多个预设触发事件时,步骤S206中当在第一页面模块中成功监听到预设触发事件时,调用观察者服务对象向数组中的回调方法发送通知,包括:当在第一页面模块中监听到交互事件时,将监听到的交互事件分别与各个预设触发事件进行比对;当交互事件成功比对上目标预设触发事件时,通过目标预设触发事件对应的线程池中的多个线程分别调用观察者服务对象,以向目标预设触发事件对应的数组中的回调方法发送通知。
具体地,当终端在第一页面模块中监听到交互事件时,可以将该交互事件与每一个预设触发事件分别进行比对,当监听到的交互事件与任意一个预设触发事件比对成功时,将该比对成功的预设触发事件确定为目标预设触发事件,进一步,终端可以获取该目标预设触发事件对应的线程池,并通过该线程池中的多个线程分别调用观察者服务对象,以向该目标预设触发事件对应的数组中的回调方法发送通知。
本实施例中,当存在多个预设触发事件时,通过对各个预设触发事件设置独立的线程池,可以保证各个预设触发事件之间互不影响,从而保证数据清除效率。
在一些实施例中,当在第一页面模块中成功监听到预设触发事件时,调用观察者服务对象向数组中的回调方法发送通知,包括:当在第一页面模块 中成功监听到预设触发事件时,接收服务器返回的反馈信息;当根据反馈信息判定当前客户对应的预设处理结果提交成功时,调用观察者服务对象向数组中的回调方法发送通知。
本实施例中,预设触发事件为提交当前客户对应的预设处理结果,预设处理结果指的是对当前客户的相关数据按照预设的流程进行处理得到的结果。例如,预设处理结果可以为电销结果。当在第一页面模块中成功监听到预设触发事件时,终端将当前客户对应的预设处理结果提交至服务器,服务器可以将预设处理结果保存至数据库中,当预设处理结果保存成功时,向终端返回一个提交成功的反馈信息,当保存失败时,向服务器返回一个提交失败的反馈信息,终端根据服务器返回的反馈信息判断当前客户对应的预设处理结果是否提交成功,当根据服务器返回的反馈信息判定当前客户对应的预设处理结果保存成功时,终端在第一页面模块中调用观察者服务对象向数组中的回调方法发送通知,进一步,当根据服务器返回的反馈信息判定当前客户对应的预设处理结果保存失败时,终端在第一页面模块中显示提交失败的反馈信息。
本实施例中,只有当预设处理结果提交成功时才调用观察者服务对象向数组中的回调方法发送通知,可以避免在电销结果提交失败时对第二页面模块中的展示数据被错误地清除。
在一些实施例中,上述方法还包括:在第二页面模块中调用观察者服务对象对预设触发事件进行观察者移除,并将对应的回调方法从预设触发事件对应的数组中移除。
本实施例中,当由于业务需求的变化使得某个已注册成为观察者的第二页面模块不再需要进行展示数据清除时,终端可以在该第二页面模块中调用观察者服务对象对预设触发事件进行观察者移除,并将对应的回调方法从预设触发事件对应的数组中移除。可以理解,当任意一个第二页面模块对应的回调方法从预设触发事件对应的数组中移除后,终端不再对该第二页面模块中的数据进行清除。
应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在一些实施例中,如图3所示,提供了一种页面展示数据清除装置300,包括观察者服务对象获取模块302、观察者注册模块304、回调指令生成模块306及数据清除模块308;其中:
观察者服务对象获取模块302,用于获取观察者服务对象,将观察者服务对象分别注入第一页面模块及第二页面模块;
观察者注册模块304,用于在第二页面模块中调用观察者服务对象对预设触发事件进行观察者注册,并将注册时对应的回调方法加入到预设触发事件对应的数组;
回调指令生成模块306,用于当在第一页面模块中成功监听到预设触发事件时,调用观察者服务对象向数组中的回调方法发送通知,以触发回调方法生成回调指令;及
数据清除模块308,用于在第二页面模块中响应回调指令,以清除与回调指令对应的页面展示数据。
在一些实施例中,回调指令生成模块还用于获取数组中各个回调方法对应的优先级,并按照优先级从高到低的顺序依次向各个回调方法发送通知,以触发各个回调方法生成回调指令。
在一些实施例中,回调指令生成模块还用于获取预设触发事件对应的当前客户标识;调用观察者服务对象向数组中的回调方法发送携带当前客户标 识的通知,以触发回调方法生成携带当前客户标识的回调指令;数据清除模块还用于在第二页面模块中响应回调指令,以清除第二页面模块中与当前客户标识对应的页面展示数据。
在一些实施例中,当存在多个预设触发事件时,回调指令生成模块还用于当在第一页面模块中监听到交互事件时,将监听到的交互事件分别与各个预设触发事件进行比对,当交互事件成功比对上目标预设触发事件时,通过目标预设触发事件对应的线程池中的多个线程分别调用观察者服务对象,以向目标预设触发事件对应的数组中的回调方法发送通知。
在一些实施例中,预设触发事件为提交当前客户对应的预设处理结果,回调指令生成模块还用于当在第一页面模块中成功监听到预设触发事件时,接收服务器返回的反馈信息,当根据反馈信息判定当前客户对应的预设处理结果提交成功时,调用观察者服务对象向数组中的回调方法发送通知。
在一些实施例中,上述装置还包括观察者移除模块,用于调用观察者服务对象对预设触发事件进行观察者移除,并将对应的回调方法从预设触发事件对应的数组中移除。
关于页面展示数据清除装置的具体限定可以参见上文中对于页面展示数据清除方法的限定,在此不再赘述。上述页面展示数据清除装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一些实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图4所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机可读指令。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算 机设备的网络接口用于与外部的终端通过网络连接通信。该计算机可读指令被处理器执行时以实现一种页面展示数据清除方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。
本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一些实施例中,提供了一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:获取观察者服务对象,将观察者服务对象分别注入第一页面模块及第二页面模块;在第二页面模块中调用观察者服务对象对预设触发事件进行观察者注册,并将注册时对应的回调方法加入到预设触发事件对应的数组;当在第一页面模块成功监听到预设触发事件时,调用观察者服务对象向数组中的回调方法发送通知,以触发回调方法生成回调指令;及在第二页面模块中响应回调指令,以清除与回调指令对应的页面展示数据。
在一些实施例中,处理器执行计算机可读指令时还实现以下步骤:获取数组中各个回调方法对应的优先级;及按照优先级从高到低的顺序依次向各个回调方法发送通知,以触发各个回调方法生成回调指令。
在一些实施例中,处理器执行计算机可读指令时还实现以下步骤:获取预设触发事件对应的当前客户标识;调用观察者服务对象向数组中的回调方法发送携带当前客户标识的通知,以触发回调方法生成携带当前客户标识的回调指令;及在第二页面模块中响应回调指令,以清除第二页面模块中与当前客户标识对应的页面展示数据。
在一些实施例中,当存在多个预设触发事件时,处理器执行计算机可读指令时还实现以下步骤:当在第一页面模块中监听到交互事件时,将监听到的交互事件分别与各个预设触发事件进行比对;及当交互事件成功比对上目标预设触发事件时,通过目标预设触发事件对应的线程池中的多个线程分别调用观察者服务对象,以向目标预设触发事件对应的数组中的回调方法发送通知。
在一些实施例中,预设触发事件为提交当前客户对应的预设处理结果,处理器执行计算机可读指令时还实现以下步骤:当在第一页面模块中成功监听到预设触发事件时,接收服务器返回的反馈信息;及当根据反馈信息判定当前客户对应的预设处理结果提交成功时,调用观察者服务对象向数组中的回调方法发送通知。
在一些实施例中,处理器执行计算机可读指令时还实现以下步骤:调用观察者服务对象对预设触发事件进行观察者移除,并将对应的回调方法从预设触发事件对应的数组中移除。
在一些实施例中,提供了一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,计算机可读指令被一个或多个处理器执行时,使得一个或多个处理器执行以下步骤:获取观察者服务对象,将观察者服务对象分别注入第一页面模块及第二页面模块;在第二页面模块中调用观察者服务对象对预设触发事件进行观察者注册,并将注册时对应的回调方法加入到预设触发事件对应的数组;当在第一页面模块成功监听到预设触发事件时,调用观察者服务对象向数组中的回调方法发送通知,以触发回调方法生成回调指令;及在第二页面模块中响应回调指令,以清除与回调指令对应的页面展示数据。
在一些实施例中,计算机可读指令被处理器执行时还实现以下步骤:获取数组中各个回调方法对应的优先级;及按照优先级从高到低的顺序依次向各个回调方法发送通知,以触发各个回调方法生成回调指令。
在一些实施例中,计算机可读指令被处理器执行时还实现以下步骤:获取预设触发事件对应的当前客户标识;调用观察者服务对象向数组中的回调方法发送携带当前客户标识的通知,以触发回调方法生成携带当前客户标识的回调指令;及在第二页面模块中响应回调指令,以清除第二页面模块中与当前客户标识对应的页面展示数据。
在一些实施例中,当存在多个预设触发事件时,计算机可读指令被处理器执行时还实现以下步骤:当在第一页面模块中监听到交互事件时,将监听到的交互事件分别与各个预设触发事件进行比对;及当交互事件成功比对上目标预设触发事件时,通过目标预设触发事件对应的线程池中的多个线程分别调用观察者服务对象,以向目标预设触发事件对应的数组中的回调方法发送通知。
在一些实施例中,预设触发事件为提交当前客户对应的预设处理结果,计算机可读指令被处理器执行时还实现以下步骤:当在第一页面模块中成功监听到预设触发事件时,接收服务器返回的反馈信息;及当根据反馈信息判定当前客户对应的预设处理结果提交成功时,调用观察者服务对象向数组中的回调方法发送通知。
在一些实施例中,计算机可读指令被处理器执行时还实现以下步骤:调用观察者服务对象对预设触发事件进行观察者移除,并将对应的回调方法从预设触发事件对应的数组中移除。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM) 或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种页面展示数据清除方法,包括:
    获取观察者服务对象,将所述观察者服务对象分别注入第一页面模块及第二页面模块;
    在所述第二页面模块中调用所述观察者服务对象对所述预设触发事件进行观察者注册,并将注册时对应的回调方法加入到所述预设触发事件对应的数组;
    当在所述第一页面模块成功监听到所述预设触发事件时,调用所述观察者服务对象向数组中的回调方法发送通知,以触发所述回调方法生成回调指令;及
    在所述第二页面模块中响应所述回调指令,以清除与所述回调指令对应的页面展示数据。
  2. 根据权利要求1所述的方法,其特征在于,所述调用所述观察者服务对象向所述数组中的回调方法发送通知,包括:
    获取数组中各个回调方法对应的优先级;及
    按照优先级从高到低的顺序依次向各个回调方法发送通知,以触发各个回调方法生成回调指令。
  3. 根据权利要求1所述的方法,其特征在于,所述调用所述观察者服务对象向数组中的回调方法发送通知,以触发所述回调方法生成回调指令,包括:
    获取所述预设触发事件对应的当前客户标识;
    调用所述观察者服务对象向数组中的回调方法发送携带所述当前客户标识的通知,以触发所述回调方法生成携带所述当前客户标识回调指令;及
    所述在所述第二页面模块中响应所述回调指令,以清除与所述回调指令对应的页面展示数据,包括:
    在所述第二页面模块中响应所述回调指令,以清除所述第二页面模块中与所述当前客户标识对应的页面展示数据。
  4. 根据权利要求1所述的方法,其特征在于,当存在多个预设触发事件时,所述当在所述第一页面模块中成功监听到所述预设触发事件时,调用所述观察者服务对象向数组中的回调方法发送通知,包括:
    当在所述第一页面模块中监听到交互事件时,将监听到的所述交互事件分别与各个预设触发事件进行比对;及
    当所述交互事件成功比对上目标预设触发事件时,通过所述目标预设触发事件对应的线程池中的多个线程分别调用所述观察者服务对象,以向所述目标预设触发事件对应的数组中的回调方法发送通知。
  5. 根据权利要求1所述的方法,其特征在于,所述预设触发事件为提交当前客户对应的预设处理结果,所述当在所述第一页面模块中成功监听到所述预设触发事件时,调用所述观察者服务对象向数组中的回调方法发送通知,包括:
    当在所述第一页面模块中成功监听到所述预设触发事件时,接收服务器返回的反馈信息;及
    当根据所述反馈信息判定所述当前客户对应的预设处理结果提交成功时,调用所述观察者服务对象向数组中的回调方法发送通知。
  6. 根据权利要求1至5任意一项所述的方法,其特征在于,还包括:
    在所述第二页面模块中调用所述观察者服务对象对预设触发事件进行观察者移除,并将对应的回调方法从所述预设触发事件对应的数组中移除。
  7. 根据权利要求1所述的方法,其特征在于,在所述当在所述第一页面模块成功监听到所述预设触发事件时,调用所述观察者服务对象向数组中的回调方法发送通知之前,所述方法还包括:
    当在所述第一页面模块中监听到交互事件时,获取所述交互事件对应的控件;
    将所述交互事件对应的控件与所述预设触发事件对应的控件进行比对;
    若比对一致,则判定为成功监听到所述预设触发事件。
  8. 一种页面展示数据清除装置,包括;
    观察者服务对象获取模块,用于获取观察者服务对象,将所述观察者服务对象分别注入第一页面模块及第二页面模块;
    观察者注册模块,用于在所述第二页面模块中调用所述观察者服务对象对所述预设触发事件进行观察者注册,并将注册时对应的回调方法加入到所述预设触发事件对应的数组;
    回调指令生成模块,用于当在所述第一页面模块中成功监听到所述预设触发事件时,调用所述观察者服务对象向所述数组中的回调方法发送通知,以触发所述回调方法生成回调指令;及
    数据清除模块,用于在所述第二页面模块中响应所述回调指令,以清除与所述回调指令对应的页面展示数据。
  9. 根据权利要求8所述的装置,其特征在于,所述回调指令生成模块还用于获取数组中各个回调方法对应的优先级,并按照优先级从高到低的顺序依次向各个回调方法发送通知,以触发各个回调方法生成回调指令。
  10. 一种计算机设备,包括存储器及一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取观察者服务对象,将所述观察者服务对象分别注入第一页面模块及第二页面模块;
    在所述第二页面模块中调用所述观察者服务对象对所述预设触发事件进行观察者注册,并将注册时对应的回调方法加入到所述预设触发事件对应的数组;
    当在所述第一页面模块成功监听到所述预设触发事件时,调用所述观察者服务对象向数组中的回调方法发送通知,以触发所述回调方法生成回调指令;及
    在所述第二页面模块中响应所述回调指令,以清除与所述回调指令对应 的页面展示数据。
  11. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    获取数组中各个回调方法对应的优先级;及
    按照优先级从高到低的顺序依次向各个回调方法发送通知,以触发各个回调方法生成回调指令。
  12. 根据权利要求10所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    获取所述预设触发事件对应的当前客户标识;
    调用所述观察者服务对象向数组中的回调方法发送携带所述当前客户标识的通知,以触发所述回调方法生成携带所述当前客户标识回调指令;及
    在所述第二页面模块中响应所述回调指令,以清除所述第二页面模块中与所述当前客户标识对应的页面展示数据。
  13. 根据权利要求10所述的计算机设备,其特征在于,当存在多个预设触发事件时,所述处理器执行所述计算机可读指令时还执行以下步骤:
    当在所述第一页面模块中监听到交互事件时,将监听到的所述交互事件分别与各个预设触发事件进行比对;及
    当所述交互事件成功比对上目标预设触发事件时,通过所述目标预设触发事件对应的线程池中的多个线程分别调用所述观察者服务对象,以向所述目标预设触发事件对应的数组中的回调方法发送通知。
  14. 根据权利要求10所述的计算机设备,其特征在于,所述预设触发事件为提交当前客户对应的预设处理结果,所述处理器执行所述计算机可读指令时还执行以下步骤:
    当在所述第一页面模块中成功监听到所述预设触发事件时,接收服务器返回的反馈信息;及
    当根据所述反馈信息判定所述当前客户对应的预设处理结果提交成功时,调用所述观察者服务对象向数组中的回调方法发送通知。
  15. 根据权利要求10至14任意一项所述的计算机设备,其特征在于,所述处理器执行所述计算机可读指令时还执行以下步骤:
    在所述第二页面模块中调用所述观察者服务对象对预设触发事件进行观察者移除,并将对应的回调方法从所述预设触发事件对应的数组中移除。
  16. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行以下步骤:
    获取观察者服务对象,将所述观察者服务对象分别注入第一页面模块及第二页面模块;
    在所述第二页面模块中调用所述观察者服务对象对所述预设触发事件进行观察者注册,并将注册时对应的回调方法加入到所述预设触发事件对应的数组;
    当在所述第一页面模块成功监听到所述预设触发事件时,调用所述观察者服务对象向数组中的回调方法发送通知,以触发所述回调方法生成回调指令;及
    在所述第二页面模块中响应所述回调指令,以清除与所述回调指令对应的页面展示数据。
  17. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    获取数组中各个回调方法对应的优先级;及
    按照优先级从高到低的顺序依次向各个回调方法发送通知,以触发各个回调方法生成回调指令。
  18. 根据权利要求16所述的存储介质,其特征在于,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    获取所述预设触发事件对应的当前客户标识;
    调用所述观察者服务对象向数组中的回调方法发送携带所述当前客户标 识的通知,以触发所述回调方法生成携带所述当前客户标识回调指令;及
    在所述第二页面模块中响应所述回调指令,以清除所述第二页面模块中与所述当前客户标识对应的页面展示数据。
  19. 根据权利要求16所述的存储介质,其特征在于,当存在多个预设触发事件时,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    当在所述第一页面模块中监听到交互事件时,将监听到的所述交互事件分别与各个预设触发事件进行比对;及
    当所述交互事件成功比对上目标预设触发事件时,通过所述目标预设触发事件对应的线程池中的多个线程分别调用所述观察者服务对象,以向所述目标预设触发事件对应的数组中的回调方法发送通知。
  20. 根据权利要求16所述的存储介质,其特征在于,所述预设触发事件为提交当前客户对应的预设处理结果,所述计算机可读指令被所述处理器执行时还执行以下步骤:
    当在所述第一页面模块中成功监听到所述预设触发事件时,接收服务器返回的反馈信息;及
    当根据所述反馈信息判定所述当前客户对应的预设处理结果提交成功时,调用所述观察者服务对象向数组中的回调方法发送通知。
PCT/CN2019/118037 2019-06-24 2019-11-13 页面展示数据清除方法、装置、计算机设备和存储介质 Ceased WO2020258663A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910549050.8A CN110377852A (zh) 2019-06-24 2019-06-24 页面展示数据清除方法、装置、计算机设备和存储介质
CN201910549050.8 2019-06-24

Publications (1)

Publication Number Publication Date
WO2020258663A1 true WO2020258663A1 (zh) 2020-12-30

Family

ID=68249170

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/118037 Ceased WO2020258663A1 (zh) 2019-06-24 2019-11-13 页面展示数据清除方法、装置、计算机设备和存储介质

Country Status (2)

Country Link
CN (1) CN110377852A (zh)
WO (1) WO2020258663A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377852A (zh) * 2019-06-24 2019-10-25 平安科技(深圳)有限公司 页面展示数据清除方法、装置、计算机设备和存储介质
CN112579237B (zh) * 2020-12-17 2024-06-11 百果园技术(新加坡)有限公司 基于mvvm模式的事件响应方法、装置、设备和介质
CN116136789A (zh) * 2021-11-17 2023-05-19 腾讯科技(深圳)有限公司 播放器回调事件处理方法、装置、计算机设备和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6782541B1 (en) * 1999-05-28 2004-08-24 Avaya Technology Corp. System and method of exchanging information between software modules
CN107729161A (zh) * 2017-09-28 2018-02-23 平安普惠企业管理有限公司 信息通知方法、系统、设备及计算机可读存储介质
CN108595989A (zh) * 2018-03-15 2018-09-28 杭州电子科技大学 一种iOS下移动APP安全防护系统及方法
CN110377852A (zh) * 2019-06-24 2019-10-25 平安科技(深圳)有限公司 页面展示数据清除方法、装置、计算机设备和存储介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100437483C (zh) * 2007-01-16 2008-11-26 华为技术有限公司 基于Web页面的事件分发方法与装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6782541B1 (en) * 1999-05-28 2004-08-24 Avaya Technology Corp. System and method of exchanging information between software modules
CN107729161A (zh) * 2017-09-28 2018-02-23 平安普惠企业管理有限公司 信息通知方法、系统、设备及计算机可读存储介质
CN108595989A (zh) * 2018-03-15 2018-09-28 杭州电子科技大学 一种iOS下移动APP安全防护系统及方法
CN110377852A (zh) * 2019-06-24 2019-10-25 平安科技(深圳)有限公司 页面展示数据清除方法、装置、计算机设备和存储介质

Also Published As

Publication number Publication date
CN110377852A (zh) 2019-10-25

Similar Documents

Publication Publication Date Title
US10917520B1 (en) Automated self-service callback for proactive and dynamic user assistance
WO2020181839A1 (zh) 页面数据测试方法、装置、计算机设备和存储介质
CN110008455B (zh) 表格编辑方法、装置、计算机设备和存储介质
WO2020253061A1 (zh) 页面生成方法、装置、计算机设备和存储介质
WO2020151333A1 (zh) 页面加载方法、装置、计算机设备和存储介质
WO2020140683A1 (zh) 任务调度方法、装置、计算机设备和存储介质
WO2021164161A1 (zh) 影像数据标注方法、装置、计算机设备和存储介质
CN109885786B (zh) 数据缓存处理方法、装置、电子设备及可读存储介质
CN110334303A (zh) 表单校验方法、装置、计算机设备和存储介质
CN108848142B (zh) 消息推送方法、装置、计算机设备和存储介质
CN112487071A (zh) 一种交易查询方法、装置、电子设备及可读存储介质
WO2020192141A1 (zh) 接口模拟方法、装置、计算机设备和存储介质
WO2020233091A1 (zh) 业务数据回退方法、装置、计算机设备和存储介质
WO2020258663A1 (zh) 页面展示数据清除方法、装置、计算机设备和存储介质
WO2020006864A1 (zh) 浏览器输入框展示方法、装置、计算机设备及存储介质
WO2022001625A1 (zh) 数据查询方法、装置、计算机设备和存储介质
CN110471884A (zh) 数据管理方法、装置、设备、系统及计算机可读存储介质
WO2021068348A1 (zh) 任务部署方法、系统和存储介质
WO2020199594A1 (zh) 业务组件加载方法、装置、计算机设备和存储介质
WO2020258650A1 (zh) 页面信息显示方法、装置、计算机设备和存储介质
CN109144487B (zh) 进件业务开发方法、装置、计算机设备和存储介质
CN114780895A (zh) 业务对象推荐方法、装置、计算机设备和存储介质
CN111459933B (zh) Gdb数据动态扩展方法、装置及存储介质
CN115982489A (zh) 页面渲染方法、装置、设备和计算机可读存储介质
CA3191232A1 (en) Data monitoring method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19934412

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19934412

Country of ref document: EP

Kind code of ref document: A1