WO2019033935A1 - 界面消息显示及处理方法、装置及电子设备 - Google Patents

界面消息显示及处理方法、装置及电子设备 Download PDF

Info

Publication number
WO2019033935A1
WO2019033935A1 PCT/CN2018/098458 CN2018098458W WO2019033935A1 WO 2019033935 A1 WO2019033935 A1 WO 2019033935A1 CN 2018098458 W CN2018098458 W CN 2018098458W WO 2019033935 A1 WO2019033935 A1 WO 2019033935A1
Authority
WO
WIPO (PCT)
Prior art keywords
message list
data
message
synchronization
interface
Prior art date
Application number
PCT/CN2018/098458
Other languages
English (en)
French (fr)
Inventor
阮升升
Original Assignee
阿里巴巴集团控股有限公司
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 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2019033935A1 publication Critical patent/WO2019033935A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication

Definitions

  • the present application relates to the field of communications technologies, and in particular, to an interface message display and processing method, apparatus, and electronic device.
  • the instant messaging application APP (Application, hereinafter referred to as APP) maintains a list of messages containing all current chat context content, the message list involves multiple services (such as single chat messages, group chat messages, system messages) Wait).
  • each service receives a new message, and submits a refresh request for the message list to refresh the message list, so that the APP displays the interface message according to the refreshed message list data.
  • the user interface User Interface, UI for short
  • the APP the main thread
  • the user interface (User Interface, UI for short) corresponding to the APP (the main thread) is triggered to process the data in the message list for display on the interface, so when a short time
  • the data in the inner message list is frequently refreshed (for example, refreshing dozens or even hundreds of times per second), which increases the processing pressure of the UI thread, and may cause UI thread blocking, etc., so that some message list refresh requests cannot be It is processed in time, which causes the related interface to display problems such as stuck and no response.
  • the first method is to rewrite the frequency of the service-initiated message list refresh request by rewriting the code to reduce the number of times the data in the message list is refreshed in a short time.
  • the second way is to control the frequency of performing refresh operations on the UI thread to reduce the number of times the message list data is refreshed in a short time.
  • the above-mentioned first method has greater constraints and reliance on developers, which increases the pressure and workload of the developer; the second method seriously affects the real-time performance of the message display, which leads to obvious problems in displaying the content display delay of some interfaces.
  • neither of the above two methods can conveniently and effectively cope with the situation in which a certain service initiates a large number of message list refresh requests in a short period of time.
  • the invention provides an interface message display and processing method and device, and an electronic device, which can dynamically control the frequency at which an interface message is refreshed, so as to prevent a certain service from initiating a large number of message list refresh requests in a short time, a display card appears on the interface. Don't respond, etc.
  • an interface message display method including:
  • the data in the second message list is displayed on an application interface.
  • an interface message display apparatus including:
  • the first request receiving module is configured to receive a message list refresh request initiated by the at least one service in the application, and update the refresh data specified in the message list refresh request to the first message list;
  • a first data synchronization module configured to synchronize data in the first message list to a second message list according to a preset synchronization rule
  • a data display module configured to display data in the second message list on an application interface.
  • an electronic device comprising:
  • a processor coupled to the memory for executing the program for:
  • the data in the second message list is displayed on an application interface.
  • the fourth aspect provides an interface message processing method, including:
  • a fifth aspect provides an interface message processing apparatus, including:
  • a second request receiving module configured to receive a message list refresh request initiated by at least one service in the application, and update the refresh data specified in the message list refresh request to the first message list;
  • the second data synchronization module is configured to synchronize the data in the first message list to the second message list according to a preset synchronization rule for the user interface UI main thread to invoke.
  • an electronic device including:
  • a processor coupled to the memory for executing the program for:
  • the interface message display and processing method, device and electronic device provided by the present invention refresh the data in the first message list according to the message list refresh request initiated by each service in the application, and pre-predict the data in the first message list.
  • the synchronization rule is synchronized to the second message list, and the data in the second message list is displayed on the interface, that is, the first message list is used as a buffer area of the refreshed data to ensure timely processing of the message list refresh request,
  • the data in the first message list is synchronized to the second message list at dynamically adjusted time intervals, and the second message list is used as the data providing area of the interface display, which reduces the frequency of the interface message being refreshed, thereby reducing the processing of the UI thread.
  • the pressure avoids the problem that some services display a large number of message list refresh requests in a short time, and the interface appears to be stuck and unresponsive.
  • FIG. 1 is a schematic diagram of an application scenario of an interface message display method provided by the present invention.
  • FIG. 2 is a schematic diagram showing the working principle of an interface message display method provided by the present invention.
  • FIG. 3 is a schematic flowchart of an embodiment of an interface message display method according to the present invention.
  • FIG. 4 is a schematic flowchart diagram of still another embodiment of an interface message display method according to the present invention.
  • FIG. 5 is a schematic structural diagram of an embodiment of an interface message display apparatus according to the present invention.
  • FIG. 6 is a schematic flowchart diagram of an embodiment of an interface message processing method according to the present invention.
  • FIG. 7 is a schematic structural diagram of an embodiment of an interface message processing apparatus according to the present invention.
  • FIG. 8 is a schematic structural diagram of an embodiment of an electronic device according to the present invention.
  • a list of messages such as an instant messaging application, maintains a list of messages containing all current chat context content, the list of messages involving multiple services (eg, single chat messages, group chat messages, system messages, etc.).
  • the message list refresh request is applied.
  • each service receives a new message, and initiates a message list refresh request for requesting to update the refresh data specified in the message list refresh request to the message list.
  • the UI thread (the main thread) is immediately notified to refresh the data in the message list and displayed on the interface.
  • the message list refresh request initiated by each service in the application does not immediately invoke the UI thread (the main thread) to refresh the data in the message list, but first caches the data as the refreshed data.
  • the first message list of the area is refreshed, and the data in the first message list is synchronized to the second message list of the data providing area displayed as the interface according to the preset synchronization rule, that is, the data in the first message list is dynamically adjusted.
  • the time interval is synchronized to the second message list as the data providing area displayed by the interface, and the UI thread (main thread) is notified to display the data in the second message list on the application interface.
  • the triggering process of the partial refresh request is merged, the frequency of the interface message is refreshed is reduced, thereby reducing the processing pressure of the UI thread, and avoiding the case that some services initiate a large number of message list refresh requests in a short time, the interface Problems such as showing up, no response, etc. appear.
  • FIG. 1 is a schematic diagram of an application scenario of an interface message display method provided by the present invention.
  • the instant messaging application APP installed on the terminal device 1 receives text, voice, and the like input by the user 1 (sender), and transmits the content to the instant messaging application server in the form of a message.
  • the instant messaging application server forwards the message to the terminal device 2 used by the user 2 (recipient).
  • the instant messaging application APP set on the terminal device 2 executes the interface message display method shown in FIG. 2, and the instant messaging application APP receives the service-initiated message list refresh request corresponding to the message, and lists the message.
  • the data is displayed on the application interface of the instant messaging application APP provided on the terminal device 2, and presented to the user 2 (receiver).
  • FIG. 3 is a schematic flowchart diagram of an embodiment of an interface message display method according to the present invention.
  • the interface message display method of the embodiment of the present invention can be applied to various terminal devices (such as a mobile phone, a computer, a PAD, etc.), that is, the execution body of the interface message display method in the embodiment of the present invention may be various terminal devices.
  • the interface message display method in the embodiment of the present invention may specifically include:
  • At least one service such as a single chat message, a group chat message, a system message, and the like
  • an application for example, an instant messaging application
  • the message list refresh request includes the specified Refresh the data.
  • a message list refresh request is initiated each time a new message is received. Receiving the message list refresh request, and updating the refresh data specified in the message list refresh request to the first message list.
  • the data in the first message list is synchronized into the second message list, so that the synchronization time is two times.
  • Multiple message list refresh requests within the interval are merged, that is, multiple message list refresh requests within two synchronization time intervals, corresponding only to one update of the data in the second message list.
  • the data in the first message list and the data in the second message list may be determined in real time. If they are different, it is determined to perform this step. If they are the same, the step is not performed, that is, the synchronization request is ignored, and the equivalent is The secondary data synchronization operations are merged into one.
  • the UI thread (main thread) can be notified to display the data in the second message list on the application interface, that is, the data in the message list currently displayed on the application interface is updated to the data in the second message list.
  • An update of the data in the second message list corresponding to the UI thread (main thread) refreshing the data in the message list currently displayed on the application interface, so multiple message list refresh requests within the two synchronization time intervals, only Corresponding to the UI thread (main thread) refreshing the data in the message list currently displayed on the application interface, reducing the frequency of the interface message being refreshed, thereby reducing the processing pressure of the UI thread and avoiding certain services being initiated in a short time.
  • the interface appears to be stuck, unresponsive, and the like.
  • the interface message display method provided by the embodiment of the present invention refreshes the data in the first message list according to the message list refresh request initiated by each service in the application, and synchronizes the data in the first message list to the preset synchronization rule.
  • the data in the second message list is displayed on the interface, that is, the first message list is used as a buffer area of the refreshed data to ensure timely processing of the message list refresh request, and the first message list is The data is synchronized to the second message list at dynamically adjusted time intervals, and the second message list is used as the data providing area of the interface display, which reduces the frequency of the interface message being refreshed, thereby reducing the processing pressure of the UI thread and avoiding certain When some services initiate a large number of message list refresh requests in a short period of time, the interface displays problems such as stuck and no response.
  • FIG. 4 is a schematic flowchart diagram of still another embodiment of an interface message display method according to the present invention.
  • the interface message display method of the embodiment of the present invention can be applied to various terminal devices (such as a mobile phone, a computer, a PAD, etc.), that is, the execution body of the interface message display method in the embodiment of the present invention may be various terminal devices.
  • the interface message display method in the embodiment of the present invention is a specific implementation manner of the interface message display method in the embodiment shown in FIG. 3. As shown in FIG. 4, the interface message display method in the embodiment of the present invention may specifically include:
  • step S410 is the same as step S310 in the embodiment shown in FIG. 3, and details are not described herein again.
  • Step S320 in the embodiment shown in FIG. 3 may specifically include the following steps S420 and S430.
  • each service-initiated message list refresh request the higher the frequency of each service-initiated message list refresh request is, the longer the synchronization time interval is, so as to reduce the frequency of synchronization, and implement more message list refresh requests to avoid excessive calling of the UI thread.
  • the lower the frequency of each service-initiated message list refresh request the shorter the synchronization time interval is, so as to increase the frequency of synchronization and ensure the timeliness of interface data refresh.
  • the synchronization time of the current data synchronization is calculated according to the synchronization time of the last data synchronization and the synchronization time interval of the previous data synchronization determined in step S420, and arrives at the synchronization time of the current data synchronization. Synchronize the data in the first message list to the second message list.
  • step S420 “determining the synchronization time interval of the previous data synchronization distance of the current data synchronization” may be specifically implemented by:
  • the data interval is preset as a preset fixed time interval.
  • the synchronization time interval, the first preset frequency is less than the second preset frequency.
  • the frequency of initiating the message list refresh request is lower than the first preset frequency
  • the time interval after the duration of the corresponding ratio is reduced on a fixed time interval, as the synchronization of the current data synchronization. time interval.
  • the frequency of initiating the message list refresh request is higher than the second preset frequency
  • the time interval after the duration of the corresponding proportion is increased on the basis of the fixed time interval, as the synchronization of the current data synchronization. time interval.
  • the at least one service-initiated message list refresh request may specifically include: at least one refresh request for adding, deleting, and modifying data in the first message list. That is, after receiving the message list refresh request, the data in the first message list may be added, deleted, and/or modified to implement updating of the data in the first message list.
  • step S330 in the embodiment shown in FIG. 3 may specifically include the following step S440.
  • the interface message display method provided by the embodiment of the present invention refreshes the data in the first message list according to the message list refresh request initiated by each service in the application, and synchronizes the data in the first message list to the preset synchronization rule.
  • the data in the second message list is displayed on the interface, that is, the first message list is used as a buffer area of the refreshed data to ensure timely processing of the message list refresh request, and the first message list is The data is synchronized to the second message list at dynamically adjusted time intervals, and the second message list is used as the data providing area of the interface display, which reduces the frequency of the interface message being refreshed, thereby reducing the processing pressure of the UI thread and avoiding certain When some services initiate a large number of message list refresh requests in a short period of time, the interface displays problems such as stuck and no response.
  • FIG. 5 is a schematic structural diagram of an embodiment of an interface message display apparatus according to the present invention.
  • the interface message display device of the embodiment of the present invention can be configured in various terminal devices (such as a mobile phone, a computer, a PAD, etc.) for performing the interface message display method of the first embodiment and the second embodiment.
  • the interface message display apparatus of the embodiment of the present invention may specifically include a first request receiving module 510, a first data synchronization module 520, and a data display module 530.
  • the first request receiving module 510 is configured to receive a message list refresh request initiated by at least one service in the application, and update the refresh data specified in the message list refresh request to the first message list.
  • the first data synchronization module 520 is configured to synchronize data in the first message list to the second message list according to a preset synchronization rule.
  • the data display module 530 is configured to display data in the second message list on the application interface.
  • the first data synchronization module 520 is specifically configured to: synchronize the data in the first message list to the second message list according to the data synchronization time specified in the preset synchronization rule.
  • the interface message display apparatus of the embodiment of the present invention may further include: a synchronization determining module, configured to monitor in real time whether the data in the first message list is the same as the data in the second message list; if not, determine to execute The data in a message list is synchronized to the operation in the second message list according to the data synchronization time specified in the preset synchronization rule.
  • a synchronization determining module configured to monitor in real time whether the data in the first message list is the same as the data in the second message list; if not, determine to execute The data in a message list is synchronized to the operation in the second message list according to the data synchronization time specified in the preset synchronization rule.
  • the first data synchronization module 520 is specifically configured to: determine a synchronization time interval of the previous data synchronization distance of the current data synchronization, and the synchronization time interval is related to the frequency of the latest service initiation message list refresh request; according to the last data synchronization The synchronization time and the synchronization time interval synchronize the data in the first message list to the second message list when the data synchronization time arrives.
  • the higher the frequency of initiating the message list refresh request the longer the synchronization time interval.
  • the first data synchronization module 520 is specifically configured to: if the frequency of initiating the message list refresh request is equal to or higher than the first preset frequency, and is equal to or lower than the second preset frequency, at a preset fixed time interval As the synchronization time interval of the current data synchronization, the first preset frequency is smaller than the second preset frequency; if the frequency of initiating the message list refresh request is lower than the first preset frequency, the corresponding ratio is reduced on a fixed time interval.
  • the time interval after the duration is used as the synchronization time interval of the current data synchronization; if the frequency of initiating the message list refresh request is higher than the second preset frequency, the time after the corresponding proportion of time is added on the basis of the fixed time interval Interval, as the synchronization interval of this data synchronization.
  • the at least one service initiated message list refresh request includes at least one refresh request for adding, deleting, and modifying data in the first message list.
  • the data display module 530 is specifically configured to: after each data synchronization is completed, notify all observers who listen to the data in the second message list, and call the corresponding user interface UI thread to update the display content of the corresponding service interface.
  • the interface message display device refreshes the data in the first message list according to the message list refresh request initiated by each service in the application, and synchronizes the data in the first message list to the preset synchronization rule.
  • the data in the second message list is displayed on the interface, that is, the first message list is used as a buffer area of the refreshed data to ensure timely processing of the message list refresh request, and the first message list is The data is synchronized to the second message list at dynamically adjusted time intervals, and the second message list is used as the data providing area of the interface display, which reduces the frequency of the interface message being refreshed, thereby reducing the processing pressure of the UI thread and avoiding certain When some services initiate a large number of message list refresh requests in a short period of time, the interface displays problems such as stuck and no response.
  • FIG. 6 is a schematic flowchart diagram of an embodiment of an interface message processing method according to the present invention.
  • the interface message processing method in the embodiment of the present invention can be applied to various terminal devices (such as a mobile phone, a computer, a PAD, etc.), that is, the execution body of the interface message processing method in the embodiment of the present invention may be various terminal devices.
  • the interface message processing method in the embodiment of the present invention may specifically include:
  • S610 Receive a message list refresh request initiated by at least one service in the application, and update the refresh data specified in the message list refresh request to the first message list.
  • S620 Synchronize data in the first message list to the second message list according to a preset synchronization rule, so that the user interface UI main thread invokes.
  • steps S610 and S620 can be referred to the related descriptions in steps S310 and S320 in the embodiment shown in FIG. 3, and details are not described herein again.
  • the user interface UI main thread can call the data in the second message list and display it on the application interface.
  • the interface message processing method provided by the embodiment of the present invention refreshes the data in the first message list according to the message list refresh request initiated by each service in the application, and synchronizes the data in the first message list to the preset synchronization rule.
  • the first message list is used as a buffer area of the refreshed data to ensure timely processing of the message list refresh request, and the data in the first message list is synchronized to the second message at dynamically adjusted time intervals.
  • the frequency of refreshing the interface message is reduced, thereby reducing the processing pressure of the UI thread, and avoiding the situation that a certain service initiates a large number of message list refresh requests in a short time.
  • the interface appears to show problems such as stuck, no response.
  • FIG. 7 is a schematic structural diagram of an embodiment of an interface message processing apparatus according to the present invention.
  • the interface message processing apparatus of the embodiment of the present invention may be configured in various terminal devices (such as a mobile phone, a computer, a PAD, etc.) for performing the interface message processing method of the fourth embodiment.
  • the interface message processing apparatus of the embodiment of the present invention may specifically include a second request receiving module 710 and a second data synchronization module 720.
  • the second request receiving module 710 is configured to receive a message list refresh request initiated by at least one service in the application, and update the refresh data specified in the message list refresh request to the first message list.
  • the second data synchronization module 720 is configured to synchronize the data in the first message list to the second message list according to a preset synchronization rule for the user interface UI main thread to invoke.
  • the interface message processing apparatus refreshes the data in the first message list according to the message list refresh request initiated by each service in the application, and synchronizes the data in the first message list to the preset synchronization rule.
  • the first message list is used as a buffer area of the refreshed data to ensure timely processing of the message list refresh request, and the data in the first message list is synchronized to the second message at dynamically adjusted time intervals.
  • the frequency of refreshing the interface message is reduced, thereby reducing the processing pressure of the UI thread, and avoiding the situation that a certain service initiates a large number of message list refresh requests in a short time.
  • the interface appears to show problems such as stuck, no response.
  • FIG. 8 it is a schematic structural diagram of an electronic device according to an embodiment of the present invention, which includes: And processor 82.
  • the memory 81 is used to store a program.
  • the memory 81 can also be configured to store other various data to support operation on the electronic device. Examples of such data include instructions for any application or method operating on an electronic device, contact data, phone book data, messages, pictures, videos, and the like.
  • the memory 81 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Disk Disk or Optical Disk.
  • a processor 82 coupled to the memory 81, is operative to execute the programs in the memory 81.
  • processor 82 can be used to:
  • the data in the second message list is displayed on the application interface.
  • processor 82 can be used to:
  • the electronic device may further include: a communication component 83, a power component 84, an audio component 85, a display 86, and the like. Only some of the components are schematically illustrated in FIG. 8, and it is not meant that the electronic device includes only the components shown in FIG.
  • Communication component 83 is configured to facilitate wired or wireless communication between the electronic device and other devices.
  • the electronic device can access a wireless network based on a communication standard such as WiFi, 2G or 3G, or a combination thereof.
  • communication component 83 receives broadcast signals or broadcast associated information from an external broadcast management system via a broadcast channel.
  • communication component 83 also includes a near field communication (NFC) module to facilitate short range communication.
  • NFC near field communication
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • a power component 84 provides power to various components of the electronic device.
  • Power component 84 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the electronic device.
  • the audio component 85 is configured to output and/or input an audio signal.
  • the audio component 85 includes a microphone (MIC) that is configured to receive an external audio signal when the electronic device is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
  • the received audio signal may be further stored in memory 81 or transmitted via communication component 83.
  • audio component 85 also includes a speaker for outputting an audio signal.
  • the display 86 includes a screen whose screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor can sense not only the boundaries of the touch or sliding action, but also the duration and pressure associated with the touch or slide operation.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Telephone Function (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明实施例提供一种界面消息显示及处理方法、装置及电子设备,其中,界面消息显示方法包括:接收应用中至少一个业务发起的消息列表刷新请求,并将所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中;将所述第二消息列表中的数据在应用界面进行显示。本发明实施例的方案,能够动态控制界面消息被刷新的频率,从而避免某些业务短时间内发起大量消息列表刷新请求的情况下,界面出现显示卡顿、无响应等问题。

Description

界面消息显示及处理方法、装置及电子设备
本申请要求2017年08月14日递交的申请号为201710693363.1、发明名称为“界面消息显示及处理方法、装置及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种界面消息显示及处理方法、装置及电子设备。
背景技术
在安卓Android系统框架下,即时通信应用APP(Application,以下简称APP)会维护一个包含当前所有聊天上下文内容的消息列表,该消息列表涉及多项业务(如单聊消息、群聊消息、系统消息等)。APP在运行过程中,各业务每接收到一条新的消息,则提交一次针对上述消息列表的刷新请求对消息列表进行数据刷新,以使APP根据刷新后的消息列表数据进行界面消息的显示。由于每次执行一次消息列表的数据刷新后,都会触发APP对应的用户界面(User Interface,简称UI)线程(主线程)去处理消息列表中的数据以在界面上进行显示,因此,当短时间内消息列表中的数据被频繁刷新(比如,每秒刷新数十次甚至上百次),加大了UI线程的处理压力,有可能出现UI线程阻塞等现象,以致某些消息列表刷新请求不能被及时处理,进而造成相关界面显示卡顿、无响应等问题。
现有技术中,针对上述问题存在以下两种解决方式,第一种方式是通过改写代码来约束某些业务发起消息列表刷新请求的频率,以减少短时间内对消息列表中数据进行刷新的次数;第二种方式是通过对UI线程执行刷新操作的频率进行控制,以减少短时间内对消息列表数据进行刷新的次数。
现有技术存在如下缺陷:
上述第一种方式对开发人员的约束及依赖较大,增加了开发人员的压力及工作量;第二种方式则严重影响消息显示的实时性,导致一些界面显示内容显示延迟的问题明显。
总之,上述两种方式都无法方便有效的应对在突发情况下,某些业务短时间内发起大量消息列表刷新请求的情况。
发明内容
本发明提供了一种界面消息显示及处理方法、装置及电子设备,能够动态控制界面消息被刷新的频率,从而避免某些业务短时间内发起大量消息列表刷新请求的情况下,界面出现显示卡顿、无响应等问题。
为达到上述目的,本发明的实施例采用如下技术方案:
第一方面,提供了一种界面消息显示方法,包括:
接收应用中至少一个业务发起的消息列表刷新请求,并将所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中;
将所述第二消息列表中的数据在应用界面进行显示。
第二方面,提供了一种界面消息显示装置,包括:
第一请求接收模块,用于接收应用中至少一个业务发起的消息列表刷新请求,并将所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
第一数据同步模块,用于将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中;
数据显示模块,用于将所述第二消息列表中的数据在应用界面进行显示。
第三方面,提供了一种电子设备,包括:
存储器,用于存储程序;
处理器,耦合至所述存储器,用于执行所述程序,以用于:
接收应用中至少一个业务发起的消息列表刷新请求,并将所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中;
将所述第二消息列表中的数据在应用界面进行显示。
第四方面,提供了一种界面消息处理方法,包括:
接收应用中至少一个业务发起的消息列表刷新请求,并将所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中,以供用户界面UI主线程调用。
第五方面,提供了一种界面消息处理装置,包括:
第二请求接收模块,用于接收应用中至少一个业务发起的消息列表刷新请求,并将所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
第二数据同步模块,用于将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中,以供用户界面UI主线程调用。
第六方面,提供了一种电子设备,包括:
存储器,用于存储程序;
处理器,耦合至所述存储器,用于执行所述程序,以用于:
接收应用中至少一个业务发起的消息列表刷新请求,并将所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中,以供用户界面UI主线程调用。
本发明提供的界面消息显示及处理方法、装置及电子设备,根据应用中各业务发起的消息列表刷新请求,对第一消息列表中的数据进行刷新,并将第一消息列表中的数据按预置同步规则同步到第二消息列表中,将第二消息列表中的数据在界面进行显示,即将第一消息列表作为刷新后的数据的缓存区,以保证对消息列表刷新请求的及时处理,将第一消息列表中的数据以动态调整的时间间隔同步到第二消息列表中,且第二消息列表作为界面显示的数据提供区,降低了界面消息被刷新的频率,从而降低了UI线程的处理压力,避免了某些业务短时间内发起大量消息列表刷新请求的情况下,界面出现显示卡顿、无响应等问题。
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,而可依照说明书的内容予以实施,并且为了让本申请的上述和其它目的、特征和优点能够更明显易懂,以下特举本申请的具体实施方式。
附图说明
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本申请的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:
图1为本发明提供的界面消息显示方法的应用场景示意图;
图2为本发明提供的界面消息显示方法的工作原理示意图;
图3为本发明提供的界面消息显示方法一个实施例的流程示意图;
图4为本发明提供的界面消息显示方法又一个实施例的流程示意图;
图5为本发明提供的界面消息显示装置一个实施例的结构示意图;
图6为本发明提供的界面消息处理方法一个实施例的流程示意图;
图7为本发明提供的界面消息处理装置一个实施例的结构示意图;
图8为本发明提供的电子设备一个实施例的结构示意图。
具体实施方式
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。
相关术语说明:
消息列表,例如即时通信应用,会维护一个包含当前所有聊天上下文内容的消息列表,该消息列表涉及多项业务(如单聊消息、群聊消息、系统消息等)。
消息列表刷新请求,应用在运行过程中,各业务每接收到一条新的消息,都会发起一个消息列表刷新请求,用于请求将消息列表刷新请求中所指定的刷新数据,更新到消息列表中。
下面对本发明的技术原理进行说明:
相关技术中,对于应用中各业务发起的消息列表刷新请求,每次都立即通知UI线程(主线程)对消息列表中的数据进行刷新处理,并在界面上进行显示。
在本发明实施例中,对于应用中各业务发起的消息列表刷新请求,并不立即调用UI线程(主线程)对消息列表中的数据进行刷新处理,而是先对作为刷新后的数据的缓存区的第一消息列表进行刷新,并将第一消息列表中的数据按预置同步规则同步到作为界面显示的数据提供区的第二消息列表中,即将第一消息列表中的数据以动态调整的时间间隔同步到作为界面显示的数据提供区的第二消息列表中,并通知UI线程(主线程)将第二消息列表中的数据在应用界面进行显示。通过上述方式,会合并部分刷新请求的触发过程,降低了界面消息被刷新的频率,从而降低了UI线程的处理压力,避免了某些业务短时间内发起大量消息列表刷新请求的情况下,界面出现显示卡顿、无响应等问题。
图1为本发明提供的界面消息显示方法的应用场景示意图。如图1所示,设置于终端设备1上的即时通信应用APP,接收用户1(发送者)输入的文字、语音等内容,并 将该内容以消息的形式发送至即时通信应用服务器。即时通信应用服务器将该消息转发至用户2(接收者)使用的终端设备2。设置于终端设备2上的即时通信应用APP接收到该消息后,执行图2所示的界面消息显示方法,即时通信应用APP接收与该消息对应的业务发起的消息列表刷新请求,并将消息列表刷新请求中所指定的与该消息对应的刷新数据,更新到第一消息列表中,并将第一消息列表中的数据按预置同步规则同步到第二消息列表中,将第二消息列表中的数据在设置于终端设备2上的即时通信应用APP的应用界面进行显示,并展示给用户2(接收者)。本领域技术人员应该理解,上述过程以用户1作为消息的发送者、用户2作为消息的接收者为例进行了说明,同样的,用户1也可以作为消息的接收者、用户2也可以作为消息的发送者。
下面通过多个实施例来进一步说明本申请的技术方案。
实施例一
图3为本发明提供的界面消息显示方法一个实施例的流程示意图。本发明实施例的界面消息显示方法可应用于各种终端设备(例如手机、电脑、PAD等)中,即本发明实施例的界面消息显示方法的执行主体可以为各种终端设备。如图3所示,本发明实施例的界面消息显示方法,具体可包括:
S310,接收应用中至少一个业务发起的消息列表刷新请求,并将消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中。
具体的,应用(例如即时通信应用)中的至少一个业务(如单聊消息、群聊消息、系统消息等),接收到新消息后,发起消息列表刷新请求,消息列表刷新请求中包括指定的刷新数据。每接收到一个新消息,发起一次消息列表刷新请求。接收该消息列表刷新请求,并将消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中。
S320,将第一消息列表中的数据按预置同步规则同步到第二消息列表中。
具体的,按预置同步规则,例如按照预置同步规则中指定的数据同步时间或以动态调整的时间间隔,将第一消息列表中的数据同步到第二消息列表中,使得两次同步时间间隔内的多个消息列表刷新请求被合并,即两次同步时间间隔内的多个消息列表刷新请求,仅对应第二消息列表中的数据的一次更新。可以实时判断第一消息列表中的数据与第二消息列表中的数据是否相同,如果不同,则确定执行本步骤,如果相同,则不执行本步骤,即忽略本次同步请求,相当于和下次数据同步操作合并成一次。
S330,将第二消息列表中的数据在应用界面进行显示。
具体的,可以通知UI线程(主线程)将第二消息列表中的数据在应用界面进行显示, 即将应用界面上当前显示的消息列表中的数据更新为第二消息列表中的数据。第二消息列表中的数据的一次更新,对应UI线程(主线程)对应用界面上当前显示的消息列表中的数据的一次刷新,因此两次同步时间间隔内的多个消息列表刷新请求,仅对应UI线程(主线程)对应用界面上当前显示的消息列表中的数据的一次刷新,降低了界面消息被刷新的频率,从而降低了UI线程的处理压力,避免了某些业务短时间内发起大量消息列表刷新请求的情况下,界面出现显示卡顿、无响应等问题。
本发明实施例提供的界面消息显示方法,根据应用中各业务发起的消息列表刷新请求,对第一消息列表中的数据进行刷新,并将第一消息列表中的数据按预置同步规则同步到第二消息列表中,将第二消息列表中的数据在界面进行显示,即将第一消息列表作为刷新后的数据的缓存区,以保证对消息列表刷新请求的及时处理,将第一消息列表中的数据以动态调整的时间间隔同步到第二消息列表中,且第二消息列表作为界面显示的数据提供区,降低了界面消息被刷新的频率,从而降低了UI线程的处理压力,避免了某些业务短时间内发起大量消息列表刷新请求的情况下,界面出现显示卡顿、无响应等问题。
实施例二
图4为本发明提供的界面消息显示方法又一个实施例的流程示意图。本发明实施例的界面消息显示方法可应用于各种终端设备(例如手机、电脑、PAD等)中,即本发明实施例的界面消息显示方法的执行主体可以为各种终端设备。本发明实施例的界面消息显示方法为图3所示实施例的界面消息显示方法的一种具体实现方式,如图4所示,本发明实施例的界面消息显示方法具体可包括:
S410,接收应用中至少一个业务发起的消息列表刷新请求,并将消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中。
具体的,步骤S410与图3所示实施例中的步骤S310相同,此处不再赘述。
图3所示实施例中的步骤S320具体可包括以下步骤S420和S430。
S420,确定本次数据同步距离上一次数据同步的同步时间间隔,该同步时间间隔与最近各业务发起消息列表刷新请求的频率相关。
具体的,最近各业务发起消息列表刷新请求的频率越高,则同步时间间隔越长,以降低同步的频率,实现合并更多的消息列表刷新请求,避免过多的调用UI线程。最近各业务发起消息列表刷新请求的频率越低,则同步时间间隔越短,以提高同步的频率,保 证界面数据刷新的及时性。
S430,根据上一次数据同步的同步时间以及同步时间间隔,在本次数据同步时间到达时,将第一消息列表中的数据同步到第二消息列表中。
具体的,根据上一次数据同步的同步时间和步骤S420中确定的本次数据同步距离上一次数据同步的同步时间间隔,计算本次数据同步的同步时间,并在本次数据同步的同步时间到达时,将第一消息列表中的数据同步到第二消息列表中。
进一步的,步骤S420中“确定本次数据同步距离上一次数据同步的同步时间间隔”,具体可通过以下方式实现:
作为第一种可行实施方式,如果发起消息列表刷新请求的频率等于或者高于第一预置频率,且等于或者低于第二预置频率,则以预置的固定时间间隔作为本次数据同步的同步时间间隔,第一预置频率小于第二预置频率。
作为第二种可行实施方式,如果发起消息列表刷新请求的频率低于第一预置频率,则将在固定时间间隔的基础上降低相应比例的时长后的时间间隔,作为本次数据同步的同步时间间隔。
作为第三种可行实施方式,如果发起消息列表刷新请求的频率高于第二预置频率,则将在固定时间间隔的基础上增加相应比例的时长后的时间间隔,作为本次数据同步的同步时间间隔。
进一步的,步骤S410中,至少一个业务发起的消息列表刷新请求具体可包括:对第一消息列表中的数据进行增加、删除和修改的至少一种刷新请求。即接收到消息列表刷新请求后,可以对第一消息列表中的数据进行增加、删除和/或修改操作,以实现对第一消息列表中的数据的更新。
进一步的,图3所示实施例中的步骤S330具体可包括以下步骤S440。
S440,在每次数据同步完成后,通知监听第二消息列表中的数据的所有观察者,调用相应的用户界面UI线程更新对应业务界面的显示内容。
具体的,在每次数据同步完成后,通知监听第二消息列表中的数据的所有观察者,即各业务方,调用相应的用户界面UI线程,将对应业务界面的显示内容更新为第二消息列表中的数据。
本发明实施例提供的界面消息显示方法,根据应用中各业务发起的消息列表刷新请求,对第一消息列表中的数据进行刷新,并将第一消息列表中的数据按预置同步规则同步到第二消息列表中,将第二消息列表中的数据在界面进行显示,即将第一消息列表作 为刷新后的数据的缓存区,以保证对消息列表刷新请求的及时处理,将第一消息列表中的数据以动态调整的时间间隔同步到第二消息列表中,且第二消息列表作为界面显示的数据提供区,降低了界面消息被刷新的频率,从而降低了UI线程的处理压力,避免了某些业务短时间内发起大量消息列表刷新请求的情况下,界面出现显示卡顿、无响应等问题。
实施例三
图5为本发明提供的界面消息显示装置一个实施例的结构示意图。本发明实施例的界面消息显示装置可设置于各种终端设备(例如手机、电脑、PAD等)中,用于执行实施例一、二的界面消息显示方法。如图5所示,本发明实施例的界面消息显示装置具体可包括第一请求接收模块510、第一数据同步模块520和数据显示模块530。
第一请求接收模块510,用于接收应用中至少一个业务发起的消息列表刷新请求,并将消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中。
第一数据同步模块520,用于将第一消息列表中的数据按预置同步规则同步到第二消息列表中。
数据显示模块530,用于将第二消息列表中的数据在应用界面进行显示。
进一步的,第一数据同步模块520具体用于:将第一消息列表中的数据按预置同步规则中指定的数据同步时间同步到第二消息列表中。
进一步的,本发明实施例的界面消息显示装置还可以包括:同步判断模块,用于实时监测第一消息列表中的数据与第二消息列表中的数据是否相同;如果不同,则确定执行将第一消息列表中的数据按预置同步规则中指定的数据同步时间同步到第二消息列表中的操作。
进一步的,第一数据同步模块520具体用于:确定本次数据同步距离上一次数据同步的同步时间间隔,同步时间间隔与最近各业务发起消息列表刷新请求的频率相关;根据上一次数据同步的同步时间以及同步时间间隔,在本次数据同步时间到达时,将第一消息列表中的数据同步到第二消息列表中。
进一步的,发起消息列表刷新请求的频率越高,同步时间间隔越长。
进一步的,第一数据同步模块520具体用于:如果发起消息列表刷新请求的频率等于或者高于第一预置频率,且等于或者低于第二预置频率,则以预置的固定时间间隔作为本次数据同步的同步时间间隔,第一预置频率小于第二预置频率;如果发起消息列表 刷新请求的频率低于第一预置频率,则将在固定时间间隔的基础上降低相应比例的时长后的时间间隔,作为本次数据同步的同步时间间隔;如果发起消息列表刷新请求的频率高于第二预置频率,则将在固定时间间隔的基础上增加相应比例的时长后的时间间隔,作为本次数据同步的同步时间间隔。
进一步的,至少一个业务发起的消息列表刷新请求包括:对第一消息列表中的数据进行增加、删除和修改的至少一种刷新请求。
进一步的,数据显示模块530具体用于:在每次数据同步完成后,通知监听第二消息列表中的数据的所有观察者,调用相应的用户界面UI线程更新对应业务界面的显示内容。
具体的,本发明实施例中的各模块实现其功能的具体过程可参见实施例一、二中的相关描述,此处不再赘述。
本发明实施例提供的界面消息显示装置,根据应用中各业务发起的消息列表刷新请求,对第一消息列表中的数据进行刷新,并将第一消息列表中的数据按预置同步规则同步到第二消息列表中,将第二消息列表中的数据在界面进行显示,即将第一消息列表作为刷新后的数据的缓存区,以保证对消息列表刷新请求的及时处理,将第一消息列表中的数据以动态调整的时间间隔同步到第二消息列表中,且第二消息列表作为界面显示的数据提供区,降低了界面消息被刷新的频率,从而降低了UI线程的处理压力,避免了某些业务短时间内发起大量消息列表刷新请求的情况下,界面出现显示卡顿、无响应等问题。
实施例四
图6为本发明提供的界面消息处理方法一个实施例的流程示意图。本发明实施例的界面消息处理方法可应用于各种终端设备(例如手机、电脑、PAD等)中,即本发明实施例的界面消息处理方法的执行主体可以为各种终端设备。如图6所示,本发明实施例的界面消息处理方法具体可包括:
S610,接收应用中至少一个业务发起的消息列表刷新请求,并将消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中。
S620,将第一消息列表中的数据按预置同步规则同步到第二消息列表中,以供用户界面UI主线程调用。
具体的,步骤S610、S620的具体过程可参见图3所示实施例中的步骤S310、S320 中的相关描述,此处不再赘述。将第一消息列表中的数据按预置同步规则同步到第二消息列表中后,用户界面UI主线程可以调用第二消息列表中的数据,并在应用界面上进行显示。
本发明实施例提供的界面消息处理方法,根据应用中各业务发起的消息列表刷新请求,对第一消息列表中的数据进行刷新,并将第一消息列表中的数据按预置同步规则同步到第二消息列表中,即将第一消息列表作为刷新后的数据的缓存区,以保证对消息列表刷新请求的及时处理,将第一消息列表中的数据以动态调整的时间间隔同步到第二消息列表中,且第二消息列表作为界面显示的数据提供区,降低了界面消息被刷新的频率,从而降低了UI线程的处理压力,避免了某些业务短时间内发起大量消息列表刷新请求的情况下,界面出现显示卡顿、无响应等问题。
实施例五
图7为本发明提供的界面消息处理装置一个实施例的结构示意图。本发明实施例的界面消息处理装置可设置于各种终端设备(例如手机、电脑、PAD等)中,用于执行实施例四的界面消息处理方法。如图7所示,本发明实施例的界面消息处理装置具体可包括第二请求接收模块710和第二数据同步模块720。
第二请求接收模块710,用于接收应用中至少一个业务发起的消息列表刷新请求,并将消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中。
第二数据同步模块720,用于将第一消息列表中的数据按预置同步规则同步到第二消息列表中,以供用户界面UI主线程调用。
具体的,本发明实施例中的各模块实现其功能的具体过程可参见实施例四中的相关描述,此处不再赘述。
本发明实施例提供的界面消息处理装置,根据应用中各业务发起的消息列表刷新请求,对第一消息列表中的数据进行刷新,并将第一消息列表中的数据按预置同步规则同步到第二消息列表中,即将第一消息列表作为刷新后的数据的缓存区,以保证对消息列表刷新请求的及时处理,将第一消息列表中的数据以动态调整的时间间隔同步到第二消息列表中,且第二消息列表作为界面显示的数据提供区,降低了界面消息被刷新的频率,从而降低了UI线程的处理压力,避免了某些业务短时间内发起大量消息列表刷新请求的情况下,界面出现显示卡顿、无响应等问题。
实施例六
前面描述了界面消息显示及处理装置的整体架构,该装置的功能可借助一种电子设备实现完成,如图8所示,其为本发明实施例的电子设备的结构示意图,具体包括:存储器81和处理器82。
存储器81,用于存储程序。
除上述程序之外,存储器81还可被配置为存储其它各种数据以支持在电子设备上的操作。这些数据的示例包括用于在电子设备上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。
存储器81可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
处理器82,耦合至存储器81,用于执行存储器81中的程序。
在本发明一个实施例中,处理器82可用于:
接收应用中至少一个业务发起的消息列表刷新请求,并将消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
将第一消息列表中的数据按预置同步规则同步到第二消息列表中;
将第二消息列表中的数据在应用界面进行显示。
在本发明另一个实施例中,处理器82可用于:
接收应用中至少一个业务发起的消息列表刷新请求,并将消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
将第一消息列表中的数据按预置同步规则同步到第二消息列表中,以供用户界面UI主线程调用。
上述的具体处理操作已经在前面实施例中进行了详细说明,在此不再赘述。
进一步,如图8所示,电子设备还可以包括:通信组件83、电源组件84、音频组件85、显示器86等其它组件。图8中仅示意性给出部分组件,并不意味着电子设备只包括图8所示组件。
通信组件83被配置为便于电子设备和其他设备之间有线或无线方式的通信。电子设备可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件83经由广播信道接收来自外部广播管理系统的广播信号或广播相 关信息。在一个示例性实施例中,通信组件83还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
电源组件84,为电子设备的各种组件提供电力。电源组件84可以包括电源管理系统,一个或多个电源,及其他与为电子设备生成、管理和分配电力相关联的组件。
音频组件85被配置为输出和/或输入音频信号。例如,音频组件85包括一个麦克风(MIC),当电子设备处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器81或经由通信组件83发送。在一些实施例中,音频组件85还包括一个扬声器,用于输出音频信号。
显示器86包括屏幕,其屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与触摸或滑动操作相关的持续时间和压力。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (13)

  1. 一种界面消息显示方法,其特征在于,包括:
    接收应用中至少一个业务发起的消息列表刷新请求,并将所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
    将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中;
    将所述第二消息列表中的数据在应用界面进行显示。
  2. 根据权利要求1所述的方法,其特征在于,所述将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中,包括:
    将所述第一消息列表中的数据按所述预置同步规则中指定的数据同步时间同步到所述第二消息列表中。
  3. 根据权利要求2所述的方法,其特征在于,所述将所述第一消息列表中的数据按所述预置同步规则中指定的数据同步时间同步到所述第二消息列表中,包括:
    确定本次数据同步距离上一次数据同步的同步时间间隔,所述同步时间间隔与最近各业务发起所述消息列表刷新请求的频率相关;
    根据所述上一次数据同步的同步时间以及所述同步时间间隔,在本次数据同步时间到达时,将所述第一消息列表中的数据同步到所述第二消息列表中。
  4. 根据权利要求3所述的方法,其特征在于,所述发起所述消息列表刷新请求的频率越高,所述同步时间间隔越长。
  5. 根据权利要求3所述的方法,其特征在于,所述确定本次数据同步距离上一次数据同步的同步时间间隔,包括:
    如果所述发起所述消息列表刷新请求的频率等于或者高于第一预置频率,且等于或者低于第二预置频率,则以预置的固定时间间隔作为所述本次数据同步的同步时间间隔,所述第一预置频率小于所述第二预置频率;
    如果所述发起所述消息列表刷新请求的频率低于所述第一预置频率,则将在所述固定时间间隔的基础上降低相应比例的时长后的时间间隔作为所述本次数据同步的同步时间间隔;
    如果所述发起所述消息列表刷新请求的频率高于所述第二预置频率,则将在所述固定时间间隔的基础上增加相应比例的时长后的时间间隔作为所述本次数据同步的同步时间间隔。
  6. 根据权利要求1所述的方法,其特征在于,所述至少一个业务发起的消息列表 刷新请求包括:对所述第一消息列表中的数据进行增加、删除和修改的至少一种刷新请求。
  7. 根据权利要求1所述的方法,其特征在于,所述将所述第二消息列表中的数据在应用界面进行显示,包括:
    在每次数据同步完成后,通知监听所述第二消息列表中的数据的所有观察者,调用相应的用户界面UI线程更新对应业务界面的显示内容。
  8. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    实时监测所述第一消息列表中的数据与所述第二消息列表中的数据是否相同;
    如果不同,则确定执行所述将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中的操作。
  9. 一种界面消息显示装置,其特征在于,包括:
    第一请求接收模块,用于接收应用中至少一个业务发起的消息列表刷新请求,并将所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
    第一数据同步模块,用于将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中;
    数据显示模块,用于将所述第二消息列表中的数据在应用界面进行显示。
  10. 一种电子设备,其特征在于,包括:
    存储器,用于存储程序;
    处理器,耦合至所述存储器,用于执行所述程序,以用于:
    接收应用中至少一个业务发起的消息列表刷新请求,并将所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
    将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中;
    将所述第二消息列表中的数据在应用界面进行显示。
  11. 一种界面消息处理方法,其特征在于,包括:
    接收应用中至少一个业务发起的消息列表刷新请求,并将所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
    将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中,以供用户界面UI主线程调用。
  12. 一种界面消息处理装置,其特征在于,包括:
    第二请求接收模块,用于接收应用中至少一个业务发起的消息列表刷新请求,并将 所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
    第二数据同步模块,用于将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中,以供用户界面UI主线程调用。
  13. 一种电子设备,其特征在于,包括:
    存储器,用于存储程序;
    处理器,耦合至所述存储器,用于执行所述程序,以用于:
    接收应用中至少一个业务发起的消息列表刷新请求,并将所述消息列表刷新请求中所指定的刷新数据,更新到第一消息列表中;
    将所述第一消息列表中的数据按预置同步规则同步到第二消息列表中,以供用户界面UI主线程调用。
PCT/CN2018/098458 2017-08-14 2018-08-03 界面消息显示及处理方法、装置及电子设备 WO2019033935A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710693363.1 2017-08-14
CN201710693363.1A CN109408159A (zh) 2017-08-14 2017-08-14 界面消息显示及处理方法、装置及电子设备

Publications (1)

Publication Number Publication Date
WO2019033935A1 true WO2019033935A1 (zh) 2019-02-21

Family

ID=65361915

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/098458 WO2019033935A1 (zh) 2017-08-14 2018-08-03 界面消息显示及处理方法、装置及电子设备

Country Status (3)

Country Link
CN (1) CN109408159A (zh)
TW (1) TW201911021A (zh)
WO (1) WO2019033935A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109992087B (zh) * 2019-04-09 2023-10-17 努比亚技术有限公司 可穿戴设备数据显示的优化方法、可穿戴设备及存储介质
CN111585774B (zh) * 2020-03-24 2022-02-01 福建天泉教育科技有限公司 会话更新的方法、存储介质
CN113064681A (zh) * 2021-03-09 2021-07-02 青岛海尔科技有限公司 用于刷新用户界面的系统及装置、方法、设备
CN114040254B (zh) * 2021-11-08 2023-07-18 聚好看科技股份有限公司 一种显示设备及高并发消息显示方法
CN114327707A (zh) * 2021-12-20 2022-04-12 凌云光技术股份有限公司 一种用户界面的刷新方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6385658B2 (en) * 1997-06-27 2002-05-07 Compaq Information Technologies Group, L.P. Method and apparatus for synchronized message passing using shared resources
CN105320707A (zh) * 2014-08-05 2016-02-10 腾讯科技(深圳)有限公司 基于即时通信的热词提示方法及装置
CN106411698A (zh) * 2016-09-12 2017-02-15 广东欧珀移动通信有限公司 即时通信应用的实时消息显示控制方法及移动终端

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102447647B (zh) * 2010-10-13 2014-06-18 腾讯科技(深圳)有限公司 一种基于新消息的通知方法、装置及系统
US9124546B2 (en) * 2013-12-31 2015-09-01 Google Inc. Systems and methods for throttling display of electronic messages
CN104202651B (zh) * 2014-08-27 2017-11-07 深圳市九洲电器有限公司 一种epg更新方法及系统

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6385658B2 (en) * 1997-06-27 2002-05-07 Compaq Information Technologies Group, L.P. Method and apparatus for synchronized message passing using shared resources
CN105320707A (zh) * 2014-08-05 2016-02-10 腾讯科技(深圳)有限公司 基于即时通信的热词提示方法及装置
CN106411698A (zh) * 2016-09-12 2017-02-15 广东欧珀移动通信有限公司 即时通信应用的实时消息显示控制方法及移动终端

Also Published As

Publication number Publication date
CN109408159A (zh) 2019-03-01
TW201911021A (zh) 2019-03-16

Similar Documents

Publication Publication Date Title
US11805198B2 (en) Unread-message reminding method, terminal device and storage medium
WO2019033935A1 (zh) 界面消息显示及处理方法、装置及电子设备
US11137876B2 (en) Information display method, device and terminal for displaying progress on application icon
US11659098B2 (en) Information reminding method and apparatus, and electronic terminal
US20210409538A1 (en) Favorite-Object Display Method and Terminal
US20150350406A1 (en) Method and device for calendar reminding
US20170091714A1 (en) Methods, devices and systems for managing calendar data
US20170031640A1 (en) Method, device and system for starting target function
JP2017530564A (ja) 接続状態プロンプティング方法および装置
WO2016197590A1 (zh) 用于在终端设备上提供截屏服务的方法、装置、存储介质及设备
US20180365200A1 (en) Method, device, electric device and computer-readable storage medium for updating page
CN106658064B (zh) 虚拟礼物展示方法及装置
US11963086B2 (en) Method and apparatus for access control barring
EP3382527A1 (en) Method and apparatus for managing a shared storage system
JP2016534452A (ja) ライトアプリのオフライン更新方法、装置、端末、プログラム及び記録媒体
US11327736B2 (en) Update method, system, end node and electronic device
US20180007420A1 (en) Method, device and system for recording television program
JP2017174202A (ja) 端末装置の制御方法、端末装置およびプログラム
US11797218B2 (en) Method and device for detecting slow node and computer-readable storage medium
CN110071959B (zh) 定时同步第三方国标资源的方法及装置
CN109491655B (zh) 一种输入事件处理方法及装置
US11805475B2 (en) Access control barring method and apparatus
US10572308B2 (en) Method and apparatus for monitoring virtual document object model
US20170185366A1 (en) Method and device for inputting information
US10938978B2 (en) Call control method and apparatus

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: 18847072

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: 18847072

Country of ref document: EP

Kind code of ref document: A1