WO2022041879A1 - 通知触发消息的处理方法和装置 - Google Patents

通知触发消息的处理方法和装置 Download PDF

Info

Publication number
WO2022041879A1
WO2022041879A1 PCT/CN2021/095752 CN2021095752W WO2022041879A1 WO 2022041879 A1 WO2022041879 A1 WO 2022041879A1 CN 2021095752 W CN2021095752 W CN 2021095752W WO 2022041879 A1 WO2022041879 A1 WO 2022041879A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
notification
identifier
current
cache
Prior art date
Application number
PCT/CN2021/095752
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 京东科技控股股份有限公司
Priority to US18/020,351 priority Critical patent/US20230269304A1/en
Publication of WO2022041879A1 publication Critical patent/WO2022041879A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5683Storage of data provided by user terminals, i.e. reverse caching

Definitions

  • the present disclosure relates to the field of computer technologies, and in particular, to a method and apparatus for processing a notification trigger message.
  • the terminal is usually provided with a notification function, and the user can know the notification in the terminal through the notification icon on the status bar at the top of the terminal.
  • the user can also open the page or application corresponding to the notification by clicking the notification content in the notification bar.
  • the inventor found that there are at least the following problems in the prior art: when the user clicks the same notification multiple times in the notification bar, the client may trigger multiple responses to the notification click event, which is not only wasteful system resources, and also reduces the user experience of using the terminal.
  • embodiments of the present disclosure provide a method and apparatus for processing a notification trigger message, which can avoid multiple responses of the client to the same notification.
  • an embodiment of the present disclosure provides a method for identifying abnormal behavior, including:
  • the notification trigger message includes: an identifier of a current push message corresponding to the notification;
  • the message cache is used to store the identifier of the push message corresponding to the notification that has been responded.
  • the message cache is used to store the historical timestamps of the push messages corresponding to the notifications that have been responded;
  • the notification trigger message also includes a current timestamp
  • the method further includes:
  • the historical timestamp of the current push message in the message cache is updated to the current timestamp.
  • the identifier of the current push message is stored in the message cache.
  • the notification trigger message also includes a current timestamp
  • the method further includes:
  • the current timestamp is stored in the message cache; wherein the identifier of the current push message corresponds to its current timestamp.
  • the method before storing the identifier of the current push message in the message cache, the method further includes:
  • the method further includes:
  • the identifier of the current push message does not exist in the message cache, determine whether the terminal where it is located satisfies the preset running condition, and if not, execute the ignoring of the notification trigger message.
  • the running conditions include: CPU usage is less than a preset first threshold, memory usage is less than a preset second threshold, disk usage is less than a preset third threshold, the current terminal interface is not running a game Any one or more of the interface and the current terminal interface other than the video playback interface.
  • an embodiment of the present disclosure provides an apparatus for processing a notification trigger message, including:
  • a message receiving module configured to receive a notification trigger message formed by a notification being triggered; wherein, the notification trigger message includes: an identifier of a current push message corresponding to the notification;
  • a message ignoring module configured to determine whether there is an identifier of the current push message in the message cache, and if so, ignore the notification trigger message; wherein the message cache is used to store the push message corresponding to the notification that has been responded to 's identification.
  • an electronic device including:
  • processors one or more processors
  • the one or more processors When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.
  • an embodiment of the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, implements the method described in any of the foregoing embodiments.
  • a notification corresponding to the push message is displayed on the terminal, and the user clicks the notification to generate a notification trigger message. Therefore, notifications have a corresponding relationship with push messages.
  • an embodiment in the above disclosure has the following advantages or beneficial effects: according to the identifier of the current push message, it is determined whether the current push message needs to be processed, and if so, the notification trigger message corresponding to the current push message is ignored. Therefore, multiple responses of the client to the same notification can be avoided, thereby saving system resources and improving the user's experience of using the terminal.
  • FIG. 1 is a flowchart of a method for processing a notification trigger message provided by an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a method for processing a notification trigger message provided by another embodiment of the present disclosure
  • FIG. 3 is a flowchart of a method for processing a notification trigger message provided by another embodiment of the present disclosure
  • FIG. 4 is a flowchart of a method for processing a notification trigger message provided by yet another embodiment of the present disclosure
  • FIG. 5 is a flowchart of a method for processing a registration push function provided by an embodiment of the present disclosure
  • FIG. 6 is a flowchart of a method for processing a notification trigger message provided by yet another embodiment of the present disclosure
  • FIG. 7 is a schematic diagram of a device for identifying abnormal behavior provided by an embodiment of the present disclosure.
  • FIG. 8 is an exemplary system architecture diagram to which embodiments of the present disclosure may be applied.
  • FIG. 9 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present disclosure.
  • An embodiment of the present disclosure provides a method for processing a notification trigger message, as shown in FIG. 1 , including:
  • Step 101 Receive a notification trigger message formed by a notification being triggered; wherein, the notification trigger message includes: an identifier of a current push message corresponding to the notification.
  • the methods of the embodiments of the present application can be applied to the client of the application.
  • the applications may include various shopping apps (applications), audio-visual apps, navigation apps, and the like.
  • the push server of the application can send a push message to the terminal on which the application is installed.
  • the push message contains the identifier of the push message corresponding to the push message.
  • the identifier of the push message is used to uniquely determine the corresponding push message in the system.
  • the notification content When the terminal receives the push message, the notification content will be displayed in the notification bar of the terminal.
  • the user can generate a notification trigger message by clicking the notification content in the notification bar. Therefore, there may be a 1:1 correspondence between push messages and notifications.
  • the same notification When the user clicks the same notification multiple times, the same notification may correspond to multiple notification trigger messages.
  • the notification and the notification trigger message may be in a 1:1 correspondence, or may be in a 1:n correspondence.
  • Step 102 Determine whether the identifier of the current push message exists in the message cache; wherein, the message cache is used to store the identifier of the push message corresponding to the notification that has been responded.
  • a message cache may be set, and the message cache stores the identifier of the push message corresponding to the notification that has been responded to. If the identifier of the current push message is not found in the message cache, the current push message has not been processed, and it is determined that the identifier of the current push message does not exist in the message cache. If the identifier of the current push message is found in the message cache, the current push message has been processed, and it is determined that the identifier of the current push message exists in the message cache.
  • the above-mentioned message buffer can be stored in hard disk, cache, memory or external storage. By looking up the identifier of the current push message or the current notification identifier in the message cache, it can be determined whether the current push message needs to be processed. In conclusion, the embodiments of the present disclosure do not impose any limitations on how to determine whether the current push message needs to be processed.
  • Step 103 Ignore the notification trigger message.
  • Ignoring the notification trigger message means not processing the notification corresponding to the notification trigger message. For example, the notification trigger message is discarded, and the operation of opening the specified page is not performed, and the specified page is the page specified by the notification corresponding to the notification trigger message.
  • Step 104 Response to the notification trigger message.
  • the embodiment of the present disclosure determines whether the current push message needs to be processed according to the identifier of the current push message, and if the identifier of the current push message exists in the message cache, the notification trigger message corresponding to the current push message is ignored. Therefore, multiple responses of the client to the same notification can be avoided, and the trouble caused to the user by multiple responses to the same notification can be alleviated.
  • the statistical analysis of the application is usually implemented by the specified callback method.
  • the callback method is deployed in the client side of the application. If the client responds to the same notification multiple times, it may make statistics related to that application inaccurate.
  • the embodiments of the present disclosure can also improve the accuracy and reliability of application-related statistical data while avoiding multiple responses of the client to the same notification.
  • the message cache is used to store historical timestamps of push messages corresponding to notifications that have been responded to;
  • the notification trigger message also includes the current timestamp
  • the method may further include:
  • the message cache in the embodiment of the present disclosure simultaneously stores the identifier of the push message and the historical timestamp of the push message.
  • the historical timestamp of the push message is used to represent the time when the push message was last called from the current moment. Through the historical time stamp of the push message, the historical call time of the push message can be specified, which facilitates the understanding of the execution of the push message.
  • the identifier of the current push message already exists in the message cache, the historical timestamp of the current push message in the message cache needs to be updated to the current timestamp of the current push message.
  • the identifier of the current push message if the identifier of the current push message does not exist in the message cache, the identifier of the current push message is stored in the message cache.
  • the current push message If the identifier of the current push message is not found in the message cache, the current push message has not been processed, and the identifier of the current push message does not exist in the message cache. Therefore, it is necessary to execute the current push message and store the identifier of the current push message in the message cache. By storing the identifier of the current push message in the message cache, the current push message can be prevented from being repeatedly called in subsequent times.
  • the notification trigger message further includes a current timestamp
  • the method may further include:
  • the current timestamp is stored in the message cache; wherein, the identifier of the current push message corresponds to its current timestamp.
  • the identifier of the current push message If the identifier of the current push message is not found in the message cache, the identifier of the current push message does not exist in the message cache. In order to prevent the current push message from being called repeatedly in the future, the identifier of the current push message needs to be stored in the message cache.
  • the message cache stores the identifier of the push message and the historical timestamp of the push message at the same time. Therefore, if the identifier of the current push message does not exist in the message cache, both the current push message identifier and its corresponding current timestamp need to be stored in the message cache.
  • the method may further include:
  • the occupied storage space in the message cache can be compared with the preset storage threshold, and if it is greater than the storage threshold, the oldest historical timestamp in the message cache and the identifier of the corresponding push message are deleted.
  • the least recently used push message can be determined according to the historical timestamp corresponding to the identifier of each push message stored in the message cache. Specifically, the push message corresponding to the earliest historical timestamp in the message cache is regarded as the least recently used push message, and the earliest historical timestamp and the identifier of the corresponding push message in the message cache are deleted.
  • a message cache is set in the system, and before the current push message information is inserted into the message cache, the space occupied by the message cache is judged to ensure that the content stored in the message cache does not exceed the storage threshold.
  • LruCache can be used to implement the methods of the embodiments of the present application.
  • LruCache is a cache that uses the LRU (Least Recently Used, least recently used algorithm) cache strategy.
  • LRU Least Recently Used, least recently used algorithm
  • LruCache can automatically use the LRU algorithm to remove the least recently used message information without requiring technicians to develop relevant removal codes. Therefore, using LruCache can facilitate the implementation of the method in the embodiments of the present application, and reduce the development workload of technical personnel.
  • the LruCache stores push message information.
  • the push message information includes an identifier of the push message and a historical timestamp of the push message. Among them, the identifier of the push message is used as the key (keyword), and the historical timestamp is used as the value (value).
  • the client parses out the identifier and current timestamp of the current push message in the notification trigger message. The client uses the identifier of the current push message as the key and the current timestamp as the value, and uses the put method to insert the current push message information into the LruCache.
  • the put method returns a non-null value, it means that the identifier of the current push message already exists in LruCache, the notification click message associated with the identifier of the current push message is a duplicate message, and the notification trigger message should be discarded. If the put method returns a null value, it means that the ID of the current push message is stored in LruCache for the first time, and the push message associated with the ID of the current push message is the message that needs to be processed, and the subsequent interface jumps and statistics of the current push message are performed.
  • the capacity and number of message caches may be set to a preset number threshold; determine whether the content stored in the message cache reaches the preset number threshold, and if so, delete the oldest message cache in the message cache.
  • the historical timestamp and the identifier of the corresponding push message may be set to a preset number threshold; determine whether the content stored in the message cache reaches the preset number threshold, and if so, delete the oldest message cache in the message cache. The historical timestamp and the identifier of the corresponding push message.
  • the message cache can hold information of up to 10 push messages.
  • the information of the push message may include the push message identification and the historical timestamp of the push message.
  • the oldest historical timestamp in the message cache and the identifier of the corresponding push message are deleted.
  • the storage threshold or the number threshold is set too small, it will increase the risk of the same push notification being responded to multiple times. If the storage threshold or the number threshold is set too large, memory will be wasted.
  • FIG. 2 is a flowchart of a method for processing a notification trigger message provided by another embodiment of the present disclosure. As shown in Figure 2, the method includes:
  • Step 201 Receive a notification trigger message formed by a notification being triggered; wherein, the notification trigger message includes: an identifier of a current push message corresponding to the notification.
  • Step 202 Determine whether the identifier of the current push message exists in the message cache.
  • step 203 If it exists, go to step 203; if not, go to step 205.
  • Step 203 Determine whether the time interval between the historical timestamp of the current push message and the current timestamp is less than a preset interval threshold.
  • the time interval between the historical timestamp of the current push message and the current timestamp may be compared with a preset interval threshold, and if the time interval between the historical timestamp of the current push message and the current timestamp is less than the predetermined interval If the interval threshold is set, it means that the user has quickly clicked the same push notification in a relatively short period of time, the push notification is a repeated notification and should not be executed again, and step 204 is executed.
  • Step 205 is performed.
  • Step 204 Ignore the notification trigger message.
  • Step 205 Response to the notification trigger message.
  • the time interval between the historical timestamp of the current push message and the current timestamp is less than a preset interval threshold.
  • the time interval between the historical time stamp of the current push message and the current time stamp can represent the time interval between the user clicking the push message before and after, and whether to execute the notification is determined according to the time interval between the historical time stamp and the current time stamp of the current push message Triggering messages can further improve the user experience.
  • FIG. 3 is a flowchart of a method for processing a notification trigger message provided by yet another embodiment of the present disclosure. As shown in Figure 3, the method includes:
  • Step 301 Receive a notification trigger message formed by a notification being triggered; wherein, the notification trigger message includes: an identifier of a current push message corresponding to the notification.
  • Step 302 Determine whether the identifier of the current push message exists in the message cache.
  • step 303 If it does not exist, go to step 303; if it exists, go to step 305.
  • Step 303 Determine whether the terminal where it is located satisfies a preset operating condition.
  • the operating conditions may include: CPU usage is less than a preset first threshold, memory usage is less than a preset second threshold, disk usage is less than a preset third threshold, the current terminal interface is not the game running interface, and the current terminal interface is not. Any one or more of the video playback interface.
  • step 304 If satisfied, go to step 304; if not, go to step 305.
  • the response to the notification trigger message may cause the system to freeze.
  • the current push message is a shopping app push message
  • the current terminal interface is a game running interface or a video playback interface, etc.
  • the user's operation of clicking the notification may be a misoperation, and responding to the notification triggering the message may cause inconvenience to the user.
  • Step 304 Response to the notification trigger message.
  • Step 305 Ignore the notification trigger message.
  • the terminal where it is located on the basis of determining that the identifier of the current push message does not exist in the message cache, it is determined whether the terminal where it is located satisfies the preset operating condition. If the terminal where it is located does not meet the preset operating conditions, responding to the notification trigger message may cause the system to freeze, or the notification trigger message is likely to be a misoperation by the user, and should not respond to the notification trigger message.
  • FIG. 4 is a flowchart of a method for processing a notification trigger message provided by another embodiment of the present disclosure. As shown in Figure 4, the method includes:
  • Step 401 Receive a notification trigger message formed by a notification being triggered; wherein, the notification trigger message includes: an identifier of a current push message corresponding to the notification.
  • Step 402 Determine whether the identifier of the current push message exists in the message cache.
  • step 403 If it exists, go to step 403; if not, go to step 404.
  • Step 403 Determine whether the time interval between the historical timestamp of the current push message and the current timestamp is less than a preset interval threshold.
  • step 405 If yes, execute step 405; if no and step 404 has not been executed, execute step 404; if no and step 404 has been executed, execute step 405.
  • Step 404 Determine whether the terminal where it is located satisfies the preset operating condition.
  • step 403 If it is satisfied and has not performed step 403, then perform step 403; if it is satisfied and has performed step 403, then perform step 405; if not, perform step 406.
  • Step 405 Response to the notification trigger message.
  • Step 406 Ignore the notification trigger message.
  • This embodiment of the present disclosure can simultaneously consider whether there is an identifier of the current push message in the message cache, whether the time interval between the historical timestamp of the current push message and the current timestamp is smaller than a preset interval threshold, and whether the terminal where it is located satisfies the preset operation.
  • Condition measure whether the notification trigger message should be ignored from different angles, which can better meet the needs of users.
  • the method of an embodiment of the present disclosure includes two steps: registering a push function and judging whether the current push message is a repeated click message.
  • FIG. 5 is a flowchart of a processing method for registering a push function provided by an embodiment of the present disclosure.
  • the App registers the push function, and the App initializes the LruCache for storing the push message identifier.
  • the client where the app is located can receive messages pushed by the push server.
  • LruCache is used to save push message information.
  • the threshold for the number of LruCaches can be set as required, such as 5 or 10.
  • the LruCache number threshold is used to represent the number of push messages corresponding to the push message information that can be stored in the LruCache. If the number threshold is too large, it may cause a waste of memory.
  • FIG. 6 is a flowchart of a method for processing a notification trigger message provided by yet another embodiment of the present disclosure.
  • the notification bar of the terminal where it is located displays the notification; after the user clicks the notification content, the terminal system processes it, and sends the click event and the content of the recommended message to the callback method in the App; according to the recommended message identifier, it is judged whether the recommended message is has been processed; if not, the recommendation message identifies that the associated notification click message is a message that needs to be processed, and subsequent operations such as interface jumping and statistical data are performed; if yes, it ends.
  • the method of the embodiment of the present disclosure can solve the loophole of the terminal system in processing the same notification of quick click, a notification message only triggers one jump processing, and only one click event is counted.
  • an embodiment of the present disclosure provides a device for identifying abnormal behavior, including:
  • the message receiving module 701 is configured to receive a notification trigger message; wherein, the notification trigger message includes: the identifier of the current push message;
  • a message ignoring module 702 configured to determine whether the identifier of the current push message exists in the message cache, and if so, ignore the notification trigger message; wherein the message cache is used to store the push corresponding to the notification that has been responded to. The ID of the message.
  • the message ignoring module 702 is configured to determine whether the identifier of the current push message exists in the message cache; wherein the message cache is used to store the identifier of the push message corresponding to the notification that has been responded.
  • the message cache is used to store the historical timestamp of the push message corresponding to the notification that has been responded; the notification trigger message also includes the current timestamp;
  • the device also includes:
  • the time update module 703 is configured to update the historical timestamp of the current push message in the message cache to the current timestamp.
  • the device further includes:
  • the information storage module 704 is configured to store the identifier of the current push message in the message cache if the identifier of the current push message does not exist in the message cache.
  • the notification trigger message further includes a current timestamp; the information storage module 704 is configured to store the current timestamp in the message cache; wherein the identifier of the current push message corresponds to its current timestamp.
  • the device further includes:
  • the information deletion module 705 is configured to determine whether the content stored in the message cache reaches a preset storage threshold, and if so, delete the oldest historical timestamp and the identifier of the corresponding push message in the message cache.
  • the message ignoring module 702 is configured to determine whether the time interval between the historical timestamp of the current push message and the current timestamp is less than a preset interval threshold, and if so, execute ignoring the notification trigger message.
  • the message ignoring module 702 is configured to determine whether the terminal where it is located satisfies the preset operating condition, and if not, execute ignoring the notification trigger message.
  • the operating conditions include: CPU usage is less than a preset first threshold, memory usage is less than a preset second threshold, disk usage is less than a preset third threshold, and the current terminal interface Any one or more of the non-game running interface and the current terminal interface non-video playback interface.
  • processors one or more processors
  • the one or more processors implement the method of any of the above embodiments.
  • FIG. 8 shows an exemplary system architecture 800 to which the abnormal behavior identification method or the abnormal behavior identification apparatus of the embodiments of the present disclosure can be applied.
  • the system architecture 800 may include terminal devices 801 , 802 , and 803 , a network 804 and a server 805 .
  • the network 804 is a medium used to provide a communication link between the terminal devices 801 , 802 , 803 and the server 805 .
  • Network 804 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
  • the user can use the terminal devices 801, 802, 803 to interact with the server 805 through the network 804 to receive or send messages and the like.
  • Various communication client applications can be installed on the terminal devices 801, 802, and 803, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, office applications, etc. (only example).
  • the terminal devices 801, 802, 803 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
  • the server 805 may be a server that provides various services, such as a background management server that provides support for shopping websites browsed by the terminal devices 801 , 802 and 803 (just an example).
  • the background management server can analyze and process the received product information query request and other data, and feed back the processing results (such as target push information, product information—just an example) to the terminal device.
  • the method for processing the notification trigger message provided by the embodiments of the present disclosure is generally performed by the terminal devices 801 , 802 and 803 , and accordingly, the processing apparatus for the notification trigger message is generally set in the terminal devices 801 , 802 and 803 .
  • terminal devices, networks and servers in FIG. 8 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
  • FIG. 9 shows a schematic structural diagram of a computer system 900 suitable for implementing a terminal device of an embodiment of the present disclosure.
  • the terminal device shown in FIG. 9 is only an example, and should not impose any limitation on the function and scope of use of the embodiments of the present disclosure.
  • a computer system 900 includes a central processing unit (CPU) 901, which can be loaded into a random access memory (RAM) 903 according to a program stored in a read only memory (ROM) 902 or a program from a storage section 908 Instead, various appropriate actions and processes are performed.
  • RAM random access memory
  • ROM read only memory
  • various programs and data required for the operation of the system 900 are also stored.
  • the CPU 901, the ROM 902, and the RAM 903 are connected to each other through a bus 904.
  • An input/output (I/O) interface 905 is also connected to bus 904 .
  • the following components are connected to the I/O interface 905: an input section 909 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc. ; and a communication section 909 including a network interface card such as a LAN card, a modem, and the like.
  • the communication section 909 performs communication processing via a network such as the Internet.
  • a drive 910 is also connected to the I/O interface 905 as needed.
  • a removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 910 as needed so that a computer program read therefrom is installed into the storage section 908 as needed.
  • the processes described above with reference to the flowcharts may be implemented as computer software programs.
  • embodiments disclosed herein include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via the communication portion 909, and/or installed from the removable medium 911.
  • CPU central processing unit
  • the computer-readable medium shown in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • the modules involved in the embodiments of the present disclosure may be implemented in software or hardware.
  • the described modules can also be provided in the processor, for example, it can be described as: a processor includes a sending module, an obtaining module, a determining module and a first processing module.
  • a processor includes a sending module, an obtaining module, a determining module and a first processing module.
  • the names of these modules do not constitute a limitation of the module itself in some cases, for example, the sending module can also be described as "a module that sends a request for image acquisition to the connected server".
  • the present disclosure also provides a computer-readable medium.
  • the computer-readable medium may be included in the device described in the above-mentioned embodiments; or may exist alone without being assembled into the device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by a device, the device includes:
  • the notification trigger message includes: the identifier of the current push message
  • the identifier of the current push message determine whether the current push message needs to be processed
  • the notification trigger message is ignored.
  • the notification trigger message corresponding to the current push message is ignored. Therefore, multiple responses of the client to the same notification can be avoided, thereby saving system resources and improving the user's experience of using the terminal.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种通知触发消息的处理方法和装置,涉及计算机技术领域。该方法的一具体实施方式包括:接收通知被触发所形成的通知触发消息;其中,所述通知触发消息中包括:与所述通知对应的当前推送消息的标识;确定消息缓存中是否存在所述当前推送消息的标识,如果是,则忽略所述通知触发消息;其中,所述消息缓存用于存储已被响应过的通知对应的推送消息的标识。该实施方式能够避免客户端对同一通知的多次响应。

Description

通知触发消息的处理方法和装置
本申请要求于2020年8月31日提交的中国申请号202010896000.X、发明名称为“通知触发消息的处理方法和装置”的申请的优先权,其全部内容通过引用的方式并入本文中。
技术领域
本公开涉及计算机技术领域,尤其涉及一种通知触发消息的处理方法和装置。
背景技术
终端中通常设置有通知功能,用户可通过终端顶部的状态栏上的通知图标,知晓终端中的通知。用户还可通过点击通知栏中的通知内容,打开通知对应的页面或应用。
在实现本公开过程中,发明人发现现有技术中至少存在如下问题:当用户在通知栏中多次点击同一条通知时,可能触发客户端对该通知点击事件的多次响应,不仅浪费了系统资源,还降低了用户对终端的使用体验。
发明内容
有鉴于此,本公开实施例提供一种通知触发消息的处理方法和装置,能够避免客户端对同一通知的多次响应。
根据本公开的一个方面,本公开的实施例提供了一种异常行为识别方法,包括:
接收通知被触发所形成的通知触发消息;其中,所述通知触发消息包括:与所述通知对应的当前推送消息的标识;
确定消息缓存中是否存在所述当前推送消息的标识,如果是,则忽略所述通知触发消息;其中,所述消息缓存用于存储已被响应过的通知对应的推送消息的标识。可选地,
所述消息缓存用于存储已被响应过的通知对应的推送消息的历史时间戳;
所述通知触发消息还包括当前时间戳;
如果所述消息缓存中存在所述当前推送消息的标识,该方法进一步包括:
将所述消息缓存中所述当前推送消息的历史时间戳更新为所述当前时间戳。
可选地,进一步包括:
如果所述消息缓存中不存在所述当前推送消息的标识,则将所述当前推送消息的标识存储至所述消息缓存中。
可选地,所述通知触发消息中还包括当前时间戳;
如果所述消息缓存中不存在所述当前推送消息的标识,该方法进一步包括:
将所述当前时间戳存储至所述消息缓存中;其中,所述当前推送消息的标识与其当前时间戳相对应。
可选地,在所述将所述当前推送消息的标识存储至所述消息缓存中之前,还包括:
确定所述消息缓存中存储的内容是否达到预设的存储阈值,如果是,则删除所述消息缓存中最早的历史时间戳及其对应的推送消息的标识。
可选地,如果所述消息缓存中存在所述当前推送消息的标识,该方法进一步包括:
确定所述当前推送消息的历史时间戳与所述当前时间戳的时间间隔是否小于预设的间隔阈值,如果是,则执行所述忽略所述通知触发消息。
可选地,进一步包括:
如果所述消息缓存中不存在所述当前推送消息的标识,则确定所在的终端是否满足预设的运行条件,如果不满足,则执行所述忽略所述通知触发消息。
可选地,所述运行条件,包括:CPU使用率小于预设的第一阈值、 内存使用量小于预设的第二阈值、磁盘使用量小于预设的第三阈值、当前终端界面非游戏运行界面、当前终端界面非视频播放界面中任意一种或多种。
根据本公开的一个方面,本公开的实施例提供了一种通知触发消息的处理装置,包括:
消息接收模块,配置为接收通知被触发所形成的通知触发消息;其中,所述通知触发消息中包括:与所述通知对应的当前推送消息的标识;
消息忽略模块,配置为确定消息缓存中是否存在所述当前推送消息的标识,如果是,则忽略所述通知触发消息;其中,所述消息缓存用于存储已被响应过的通知对应的推送消息的标识。
根据本公开的一个方面,本公开的实施例提供了一种电子设备,包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现上述任一实施例所述的方法。
根据本公开的一个方面,本公开的实施例提供了一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现上述任一实施例所述的方法。
终端接收到推送服务器下发的推送消息,会在终端上展示出与推送消息对应的通知,用户通过点击通知,生成通知触发消息。因此,通知与推送消息具有对应关系。通过判断消息缓存中是否存在当前推送消息的标识,可判断当前推送消息对应通知是否已被响应过。因此,上述公开中的一个实施例具有如下优点或有益效果:根据当前推送消息的标识,确定当前推送消息是否需要被处理,如果是,则忽略当前推送消息对应的通知触发消息。因此,可以避免客户端对同一通知的多次响应,进而节省了系统资源,提升了用户对终端的使用体验。
上述的非惯用的可选方式所具有的进一步效果将在下文中结合具体实施方式加以说明。
附图说明
附图用于更好地理解本公开,不构成对本公开的不当限定。其中:
图1是本公开的一个实施例提供的一种通知触发消息的处理方法的流程图;
图2是本公开的另一个实施例提供的一种通知触发消息的处理方法的流程图;
图3是本公开的又一个实施例提供的一种通知触发消息的处理方法的流程图;
图4是本公开的再一个实施例提供的一种通知触发消息的处理方法的流程图;
图5是本公开的一个实施例提供的一种注册推送功能的处理方法的流程图;
图6是本公开的再一个实施例提供的一种通知触发消息的处理方法的流程图;
图7是本公开的一个实施例提供的一种异常行为识别装置的示意图;
图8是本公开实施例可以应用于其中的示例性系统架构图;
图9是适于用来实现本公开实施例的终端设备或服务器的计算机系统的结构示意图。
具体实施方式
以下结合附图对本公开的示范性实施例做出说明,其中包括本公开实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本公开的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。
本公开实施例提供了一种通知触发消息的处理方法,如图1所示,包括:
步骤101:接收通知被触发所形成的通知触发消息;其中,通知触 发消息包括:与通知对应的当前推送消息的标识。
本申请实施例的方法可应用于应用程序的客户端。应用程序可包括各种购物类App(application,应用程序)、影音类App、导航类App等。应用程序的推送服务器可向安装有应用程序的终端发送推送消息。推送消息中包含有该推送消息对应的推送消息的标识。推送消息的标识用于在系统中唯一确定对应的推送消息。
终端接收到推送消息,会在终端的通知栏中展示出通知内容。用户可通过点击通知栏中的通知内容,可生成通知触发消息。因此,推送消息与通知可为1:1对应关系。在用户多次点击同一通知的情况下,同一通知可对应多个通知触发消息。通知与通知触发消息可以为1:1对应关系,也可以为1:n对应关系。
步骤102:确定消息缓存中是否存在当前推送消息的标识;其中,消息缓存用于存储已被响应过的通知对应的推送消息的标识。可设置一消息缓存,该消息缓存中存储有已被响应过的通知对应的推送消息的标识。如果在消息缓存中未查找到当前推送消息的标识,则当前推送消息没有被处理过,确定消息缓存中不存在所述当前推送消息的标识。如果在消息缓存中查找到当前推送消息的标识,则当前推送消息被处理过,确定消息缓存中存在所述当前推送消息的标识。上述的消息缓存可存储在硬盘、缓存、内存或外部存储器中。通过在消息缓存中,查找当前推送消息的标识或当前通知标识,即可确定当前推送消息是否需要被处理。总之,本公开的实施例对于如何确定当前推送消息是否需要被处理的方式不做任何限制。
步骤103:忽略通知触发消息。忽略通知触发消息可为不对该通知触发消息对应的通知进行处理。如,丢弃该通知触发消息,不执行打开指定页面的操作,该指定页面为该通知触发消息对应的通知所指定的页面等。
步骤104:响应通知触发消息。
本公开的实施例根据当前推送消息的标识,确定当前推送消息是否需要被处理,如果消息缓存中存在所述当前推送消息的标识,则忽略当前推送消息对应的通知触发消息。因此,可以避免客户端对同一 通知的多次响应,减轻由于对同一通知的多次响应给用户造成的困扰。
此外,由于应用程序的统计分析通常由指定的回调方法实现。回调方法部署在应用程序的客户端中。如果客户端对同一通知响应了多次,可能会使该应用程序相关的统计数据不准确。本公开的实施例在避免客户端对同一通知的多次响应的同时,还可以使应用程序相关的统计数据的准确性和可靠性更高。
在本公开的一个实施例中,消息缓存用于存储已被响应过的通知对应的推送消息的历史时间戳;
通知触发消息还包括当前时间戳;
如果消息缓存中存在所述当前推送消息的标识,该方法还可以包括:
将消息缓存中当前推送消息的历史时间戳更新为当前时间戳。
本公开实施例中的消息缓存中同时保存有推送消息的标识及该推送消息的历史时间戳。推送消息的历史时间戳用于表征该推送消息距离当前时刻最近一次被调用的时间。通过推送消息的历史时间戳,可明确该推送消息的历史调用时间,方便对推送消息的执行情况的了解。在当前推送消息的标识已存在于消息缓存中时,需要将消息缓存中当前推送消息的历史时间戳更新为当前推送消息的当前时间戳。
在本公开的一个实施例中,如果消息缓存中不存在所述当前推送消息的标识,则将当前推送消息的标识存储至消息缓存中。
如果在消息缓存中未查找到当前推送消息的标识,则当前推送消息没有被处理过,消息缓存中不存在所述当前推送消息的标识。因此,需要执行当前推送消息,并将当前推送消息的标识存储至消息缓存中。通过将当前推送消息的标识存储至消息缓存中,可避免当前推送消息在后续时间被重复调用。
在本公开的一个实施例中,通知触发消息还包括当前时间戳;
如果消息缓存中不存在所述当前推送消息的标识,该方法还可以 包括:
将当前时间戳存储至消息缓存中;其中,当前推送消息的标识与其当前时间戳相对应。
如果在消息缓存中未查找到当前推送消息的标识,则消息缓存中不存在所述当前推送消息的标识。为了避免当前推送消息在后续被重复调用,需要将当前推送消息的标识存储至消息缓存中。
为了获取推送消息的执行情况,消息缓存中同时保存有推送消息的标识及该推送消息的历史时间戳。因此,如果消息缓存中不存在所述当前推送消息的标识,需要将当前推送消息标识和与其对应的其当前时间戳都存储至消息缓存中。
在本公开的一个实施例中,在将当前推送消息的标识存储至消息缓存中之前,该方法还可以包括:
确定消息缓存中存储的内容是否达到预设的存储阈值,如果是,则删除消息缓存中最早的历史时间戳及其对应的推送消息的标识。
可以将消息缓存中已占用的存储空间与预设的存储阈值进行对比,如果大于存储阈值,则删除消息缓存中最早的历史时间戳及其对应的推送消息的标识。
在需要删除消息缓存中的推送消息信息时,可根据消息缓存中存储的各推送消息的标识所对应的历史时间戳,确定最近最少使用的推送消息。具体地,将消息缓存中最早的历史时间戳对应的推送消息作为最近最少使用的推送消息,并删除消息缓存中最早的历史时间戳及其对应的推送消息的标识。
一般地,在系统中设置消息缓存,并在将当前推送消息信息插入消息缓存中之前,对消息缓存所占用的空间进行判断,以保证消息缓存中存储的内容不超过存储阈值。
进一步地,可以利用LruCache实现本申请实施例的方法。LruCache为使用LRU(Least Recently Used,最近最少使用算法)的缓存策略的缓存。当LruCache中存储的内容是否达到预设的存储阈值,LruCache可自动采用LRU算法将近期最少用到的消息信息移除,而无需技术人 员再开发相关的移除代码。因此,采用LruCache可方便本申请实施例方法的实施,减少技术人员的开发工作量。
具体地,LruCache中存储有推送消息信息。推送消息信息包括推送消息的标识及推送消息的历史时间戳。其中,推送消息的标识作为key(关键字),历史时间戳作为value(值)。客户端接收到通知触发消息后,解析出通知触发消息中的当前推送消息的标识及当前时间戳。客户端将当前推送消息的标识作为key,当前时间戳作为value,利用put方法将当前推送消息信息插入至LruCache中。若put方法返回非null值,说明当前推送消息的标识已经存在于LruCache中,当前推送消息的标识关联的通知点击消息为重复消息,应将通知触发消息丢弃。若put方法返回null值,说明当前推送消息的标识首次存入LruCache,当前推送消息的标识关联的推送消息是需要处理的消息,执行当前推送消息后续的界面跳转、统计数据等操作。
在本公开的一个实施例中,可以将消息缓存的容量个数设置为预设个数阈值;确定消息缓存中存储的内容是否达到预设的个数阈值,如果是,则删除消息缓存中最早的历史时间戳及其对应的推送消息的标识。
举例来说,如果个数阈值为10,则消息缓存中最多可容纳10个推送消息的信息。推送消息的信息可包括推送消息标识和推送消息的历史时间戳。在消息缓存中存储的推送信息个数达到10个时,删除消息缓存中最早的历史时间戳及其对应的推送消息的标识。
需要说明的是,存储阈值或个数阈值如果设置的过小,将会增加同一推送通知多次被响应的风险。而存储阈值或个数阈值如果设置的过大,将会造成内存的浪费。
图2是本公开的另一个实施例提供的一种通知触发消息的处理方法的流程图。如图2所示,该方法包括:
步骤201:接收通知被触发所形成的通知触发消息;其中,通知触发消息中包括:与通知对应的当前推送消息的标识。
步骤202:确定消息缓存中是否存在当前推送消息的标识。
如果存在,则执行步骤203;如果不存在,则执行步骤205。
步骤203:确定当前推送消息的历史时间戳与当前时间戳的时间间隔是否小于预设的间隔阈值。
在本公开的实施例中,可以将当前推送消息的历史时间戳与当前时间戳的时间间隔与预设的间隔阈值进行比较,如果当前推送消息的历史时间戳与当前时间戳的时间间隔小于预设的间隔阈值,则说明用户在较短时间内快速地点击了同一推送通知,该推送通知为重复通知,不应再被执行,执行步骤204。
如果当前推送消息的历史时间戳与当前时间戳的时间间隔不小于预设的间隔阈值,则说明用户在间隔较长的时间内点击了同一推送通知,用户可能对该通知的内容比较感兴趣,执行步骤205。
步骤204:忽略通知触发消息。
步骤205:响应通知触发消息。
本公开实施例中,在确定消息缓存中存在当前推送消息的标识的基础上,确定当前推送消息的历史时间戳与当前时间戳的时间间隔是否小于预设的间隔阈值。当前推送消息的历史时间戳与当前时间戳之间的时间间隔可表征用户前后点击推送消息的时间间隔,根据当前推送消息的历史时间戳与当前时间戳之间的时间间隔来确定是否执行该通知触发消息,可进一步提升用户体验。
图3是本公开的又一个实施例提供的一种通知触发消息的处理方法的流程图。如图3所示,该方法包括:
步骤301:接收通知被触发所形成的通知触发消息;其中,通知触发消息中包括:与通知对应的当前推送消息的标识。
步骤302:确定消息缓存中是否存在当前推送消息的标识。
如果不存在,则执行步骤303;如果存在,则执行步骤305。
步骤303:确定所在的终端是否满足预设的运行条件。
运行条件可包括:CPU使用率小于预设的第一阈值、内存使用量小于预设的第二阈值、磁盘使用量小于预设的第三阈值、当前终端界 面非游戏运行界面、当前终端界面非视频播放界面中任意一种或多种。
如果满足,则执行步骤304;如果不满足,则执行步骤305。
如果所在的终端不满足预设的运行条件,如所在终端的CPU使用率、内存使用量或磁盘使用量较大,响应通知触发消息可能会使系统发生卡顿等现象。又如当前推送消息为购物类App推送消息,且当前终端界面为游戏运行界面或视频播放界面等,用户点击通知的操作可能为误操作,响应通知触发消息可能会给用户带来不便。
步骤304:响应通知触发消息。
步骤305:忽略通知触发消息。
本公开实施例中,在确定消息缓存中不存在当前推送消息的标识的基础上,确定所在的终端是否满足预设的运行条件。如果所在的终端不满足预设的运行条件,响应通知触发消息可能会造成系统卡顿,或该通知触发消息有较大可能为用户的误操作,不应响应该通知触发消息。
图4是本公开的另一个实施例提供的一种通知触发消息的处理方法的流程图。如图4所示,该方法包括:
步骤401:接收通知被触发所形成的通知触发消息;其中,通知触发消息中包括:与通知对应的当前推送消息的标识。
步骤402:确定消息缓存中是否存在当前推送消息的标识。
如果存在,则执行步骤403;如果不存在,则执行步骤404。
步骤403:确定当前推送消息的历史时间戳与当前时间戳的时间间隔是否小于预设的间隔阈值。
如果是,则执行步骤405;如果否且未执行过步骤404,则执行步骤404;如果否且已执行过步骤404,则执行步骤405。
步骤404:确定所在的终端是否满足预设的运行条件。
如果满足且未执行过步骤403,则执行步骤403;如果满足且已执行过步骤403,则执行步骤405;如果不满足,则执行步骤406。
步骤405:响应通知触发消息。
步骤406:忽略通知触发消息。
本公开实施例能够同时考虑消息缓存中是否存在当前推送消息的标识、当前推送消息的历史时间戳与当前时间戳的时间间隔是否小于预设的间隔阈值、以及所在的终端是否满足预设的运行条件,从不同角度衡量是否应忽略该通知触发消息,可以更好地满足用户的需求。
本公开的一个实施例的方法中包括两个步骤:注册推送功能和判断当前推送消息是否为重复点击消息。
图5是本公开的一个实施例提供的一种注册推送功能的处理方法的流程图。如图5所示,App启动后,App注册推送功能,App初始化用于保存推送消息标识的LruCache。注册推送功能后,App所在的客户端才能接收推送服务端推送的消息。LruCache用于保存推送消息信息。LruCache个数阈值可根据需求进行设定,如可设为5、10等。LruCache个数阈值用于表征LruCache可存储的推送消息信息对应的推送消息的个数。如果个数阈值过大,可能会造成内存的浪费。
图6是本公开的再一个实施例提供的一种通知触发消息的处理方法的流程图。如图6所示,所在终端的通知栏展示通知;用户点击通知内容后,终端系统进行处理,并将点击事件及推荐消息内容发送至App中的回调方法;根据推荐消息标识,判断推荐消息是否被处理过;如果否,该推荐消息标识关联的通知点击消息是需要处理的消息,执行后续的界面跳转、统计数据等操作;如果是,则结束。
本公开的实施例的方法可解决终端机系统对快速点击同一通知处理的漏洞,一条通知消息只触发一次跳转处理,只统计一次点击事件。
如图7所示,本公开的实施例提供了一种异常行为识别装置,包括:
消息接收模块701,配置为接收通知触发消息;其中,通知触发消息中包括:当前推送消息的标识;
消息忽略模块702,配置为确定消息缓存中是否存在所述当前推送消息的标识,如果是,则忽略所述通知触发消息;其中,所述消息缓存用于存储已被响应过的通知对应的推送消息的标识。
在本公开的一个实施例中,消息忽略模块702,配置为确定消息缓存中是否存在当前推送消息的标识;其中,消息缓存用于存储已被响应过的通知对应的推送消息的标识。
在本公开的一个实施例中,消息缓存用于存储已被响应过的通知对应的推送消息的历史时间戳;通知触发消息中还包括当前时间戳;
该装置还包括:
时间更新模块703,配置为将消息缓存中当前推送消息的历史时间戳更新为当前时间戳。
在本公开的一个实施例中,该装置还包括:
信息存储模块704,配置为如果消息缓存中不存在所述当前推送消息的标识,则将当前推送消息的标识存储至消息缓存中。
在本公开的一个实施例中,通知触发消息中还包括当前时间戳;信息存储模块704,配置为将当前时间戳存储至消息缓存中;其中,当前推送消息的标识与其当前时间戳相对应。
在本公开的一个实施例中,该装置还包括:
信息删除模块705,配置为确定消息缓存中存储的内容是否达到预设的存储阈值,如果是,则删除消息缓存中最早的历史时间戳及其对应的推送消息的标识。
在本公开的一个实施例中,消息忽略模块702,配置为确定当前推送消息的历史时间戳与当前时间戳的时间间隔是否小于预设的间隔阈值,如果是,则执行忽略通知触发消息。
在本公开的一个实施例中,消息忽略模块702,配置为确定所在的终端是否满足预设的运行条件,如果不满足,则执行忽略通知触发消息。
在本公开的一个实施例中,运行条件,包括:CPU使用率小于预设的第一阈值、内存使用量小于预设的第二阈值、磁盘使用量小于预设的第三阈值、当前终端界面非游戏运行界面、当前终端界面非视频播放界面中任意一种或多种。
本公开的实施例提供了一种电子设备,包括:
一个或多个处理器;
存储装置,用于存储一个或多个程序,
当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现上述任一实施例的方法。
图8示出了可以应用本公开实施例的异常行为识别方法或异常行为识别装置的示例性系统架构800。
如图8所示,系统架构800可以包括终端设备801、802、803,网络804和服务器805。网络804用以在终端设备801、802、803和服务器805之间提供通信链路的介质。网络804可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
用户可以使用终端设备801、802、803通过网络804与服务器805交互,以接收或发送消息等。终端设备801、802、803上可以安装有各种通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件、办公应用等(仅为示例)。
终端设备801、802、803可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。
服务器805可以是提供各种服务的服务器,例如对用户利用终端设备801、802、803所浏览的购物类网站提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的产品信息查询请求等数据进行分析等处理,并将处理结果(例如目标推送信息、产品信息--仅为示例)反馈给终端设备。
需要说明的是,本公开实施例所提供的通知触发消息的处理方法一般由终端设备801、802、803执行,相应地,通知触发消息的处理装置一般设置于终端设备801、802、803中。
应该理解,图8中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。
下面参考图9,其示出了适于用来实现本公开的实施例的终端设备的计算机系统900的结构示意图。图9示出的终端设备仅仅是一个示 例,不应对本公开的实施例的功能和使用范围带来任何限制。
如图9所示,计算机系统900包括中央处理单元(CPU)901,其可以根据存储在只读存储器(ROM)902中的程序或者从存储部分908加载到随机访问存储器(RAM)903中的程序而执行各种适当的动作和处理。在RAM 903中,还存储有系统900操作所需的各种程序和数据。CPU 901、ROM 902以及RAM 903通过总线904彼此相连。输入/输出(I/O)接口905也连接至总线904。
以下部件连接至I/O接口905:包括键盘、鼠标等的输入部分909;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分907;包括硬盘等的存储部分908;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分909。通信部分909经由诸如因特网的网络执行通信处理。驱动器910也根据需要连接至I/O接口905。可拆卸介质911,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器910上,以便于从其上读出的计算机程序根据需要被安装入存储部分908。
特别地,根据本申请的公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本申请公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分909从网络上被下载和安装,和/或从可拆卸介质911被安装。在该计算机程序被中央处理单元(CPU)901执行时,执行本公开的系统中限定的上述功能。
需要说明的是,本公开所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存 储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开的实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的模块也可以设置在处理器中,例如,可以描述为:一种处理器包括发送模块、获取模块、确定模块和第一处理模块。其中,这些模块的名称在某种情况下并不构成对该模块本身的限定,例如,发送模块还可以被描述为“向所连接的服务端发送图片获取请求的模块”。
作为另一方面,本公开还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备中所包含的;也可以是单独 存在,而未装配入该设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该设备包括:
接收通知触发消息;其中,所述通知触发消息中包括:当前推送消息的标识;
根据所述当前推送消息的标识,确定所述当前推送消息是否需要被处理;
如果所述消息缓存中存在所述当前推送消息的标识,则忽略所述通知触发消息。
根据本公开的实施例的技术方案,基于当前推送消息的标识,确定当前推送消息是否需要被处理,如果消息缓存中存在所述当前推送消息的标识,则忽略当前推送消息对应的通知触发消息。因此,可以避免客户端对同一通知的多次响应,进而节省了系统资源,提升了用户对终端的使用体验。
上述具体实施方式,并不构成对本公开保护范围的限制。本领域技术人员应该明白的是,取决于设计要求和其他因素,可以发生各种各样的修改、组合、子组合和替代。任何在本公开的精神和原则之内所作的修改、等同替换和改进等,均应包含在本公开保护范围之内。

Claims (10)

  1. 一种通知触发消息的处理方法,包括:
    接收通知被触发所形成的通知触发消息;其中,所述通知触发消息包括:与所述通知对应的当前推送消息的标识;
    确定消息缓存中是否存在所述当前推送消息的标识,如果是,则忽略所述通知触发消息;其中,所述消息缓存用于存储已被响应过的通知对应的推送消息的标识。
  2. 根据权利要求1所述的方法,其中,
    所述消息缓存用于存储已被响应过的通知对应的推送消息的历史时间戳;
    所述通知触发消息还包括当前时间戳;
    如果所述消息缓存中存在所述当前推送消息的标识,该方法进一步包括:
    将所述消息缓存中所述当前推送消息的历史时间戳更新为所述当前时间戳。
  3. 根据权利要求1所述的方法,进一步包括:
    如果所述消息缓存中不存在所述当前推送消息的标识,则将所述当前推送消息的标识存储至所述消息缓存中。
  4. 根据权利要求3所述的方法,其中,
    所述通知触发消息还包括当前时间戳;
    如果所述消息缓存中不存在所述当前推送消息的标识,该方法进一步包括:
    将所述当前时间戳存储至所述消息缓存中;其中,所述当前推送消息的标识与其当前时间戳相对应。
  5. 根据权利要求4所述的方法,其中,
    在所述将所述当前推送消息的标识存储至所述消息缓存中之前,还包括:
    确定所述消息缓存中存储的内容是否达到预设的存储阈值,如果是,则删除所述消息缓存中最早的历史时间戳及其对应的推送消息的标识。
  6. 根据权利要求2所述的方法,其中,
    如果所述消息缓存中存在所述当前推送消息的标识,该方法进一步包括:
    确定所述当前推送消息的历史时间戳与所述当前时间戳的时间间隔是否小于预设的间隔阈值,如果是,则执行所述忽略所述通知触发消息。
  7. 根据权利要求1所述的方法,进一步包括:
    如果所述消息缓存中不存在所述当前推送消息的标识,则确定所在的终端是否满足预设的运行条件,如果不满足,则执行所述忽略所述通知触发消息。
  8. 根据权利要求7所述的方法,其中,
    所述运行条件,包括:CPU使用率小于预设的第一阈值、内存使用量小于预设的第二阈值、磁盘使用量小于预设的第三阈值、当前终端界面非游戏运行界面、当前终端界面非视频播放界面中任意一种或多种。
  9. 一种通知触发消息的处理装置,包括:
    至少一个处理器,所述至少一个处理器被配置为:
    接收通知被触发所形成的通知触发消息;其中,所述通知触发消息包括:与所述通知对应的当前推送消息的标识;
    确定消息缓存中是否存在所述当前推送消息的标识,如果是,则 忽略所述通知触发消息;其中,所述消息缓存用于存储已被响应过的通知对应的推送消息的标识。
  10. 一种计算机可读介质,其上存储有计算机程序,所述程序被处理器执行时实现如权利要求1-8中任一所述的方法。
PCT/CN2021/095752 2020-08-31 2021-05-25 通知触发消息的处理方法和装置 WO2022041879A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/020,351 US20230269304A1 (en) 2020-08-31 2021-05-25 Method and apparatus for processing notification trigger message

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010896000.XA CN112118352B (zh) 2020-08-31 2020-08-31 通知触发消息的处理方法、装置、电子设备以及计算机可读介质
CN202010896000.X 2020-08-31

Publications (1)

Publication Number Publication Date
WO2022041879A1 true WO2022041879A1 (zh) 2022-03-03

Family

ID=73805624

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/095752 WO2022041879A1 (zh) 2020-08-31 2021-05-25 通知触发消息的处理方法和装置

Country Status (3)

Country Link
US (1) US20230269304A1 (zh)
CN (1) CN112118352B (zh)
WO (1) WO2022041879A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112118352B (zh) * 2020-08-31 2021-05-25 京东数字科技控股股份有限公司 通知触发消息的处理方法、装置、电子设备以及计算机可读介质
CN112861730A (zh) * 2021-02-09 2021-05-28 北京文香信息技术有限公司 一种课堂行为的反馈方法、装置、电子设备及存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346202A (zh) * 2014-09-30 2015-02-11 北京金山安全软件有限公司 终端应用程序的设置方法、装置及终端
CN105045468A (zh) * 2015-07-23 2015-11-11 深圳市万普拉斯科技有限公司 移动终端中悬浮通知的处理方法及装置
US9479387B2 (en) * 2012-06-22 2016-10-25 Salesforce.Com, Inc. Methods and systems for priority-based notifications for mobile devices
CN106657299A (zh) * 2016-12-08 2017-05-10 武汉斗鱼网络科技有限公司 关注主播上线提醒方法及系统
CN107483728A (zh) * 2017-08-07 2017-12-15 北京京东尚科信息技术有限公司 应用消息通知装置和方法
CN107707774A (zh) * 2017-11-28 2018-02-16 维沃移动通信有限公司 消息显示方法及移动终端
CN108459758A (zh) * 2018-01-23 2018-08-28 深圳天珑无线科技有限公司 防止通知误点击的方法、装置及移动终端
CN112118352A (zh) * 2020-08-31 2020-12-22 京东数字科技控股股份有限公司 通知触发消息的处理方法和装置

Family Cites Families (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040122735A1 (en) * 2002-10-09 2004-06-24 Bang Technologies, Llc System, method and apparatus for an integrated marketing vehicle platform
JP4389854B2 (ja) * 2005-09-01 2009-12-24 株式会社カシオ日立モバイルコミュニケーションズ 電子機器、データ処理方法及びデータ処理プログラム
US20090282256A1 (en) * 2008-05-12 2009-11-12 Sony Ericsson Mobile Communications Ab Secure push messages
KR101845086B1 (ko) * 2011-03-30 2018-04-03 삼성전자주식회사 푸시 알림 메시지를 전송하기 위한 장치 및 방법
US9723459B2 (en) * 2011-05-18 2017-08-01 Microsoft Technology Licensing, Llc Delayed and time-space bound notifications
JP2013257696A (ja) * 2012-06-12 2013-12-26 Sony Corp 情報処理装置、情報処理方法、及び、プログラム
KR101488268B1 (ko) * 2012-08-30 2015-01-30 삼성전자주식회사 푸시 메시지 서비스 방법 및 시스템
US20140304238A1 (en) * 2013-04-05 2014-10-09 Nokia Corporation Method and apparatus for detecting duplicate messages
US9667734B2 (en) * 2013-12-09 2017-05-30 Electronics And Telecommunications Research Institute Push notification-based remote control method and apparatus for the same
CN105099989B (zh) * 2014-04-24 2019-11-22 阿里巴巴集团控股有限公司 用于处理业务请求及获取业务处理结果的方法、装置和系统
CN104580409B (zh) * 2014-12-24 2017-12-22 广州酷狗计算机科技有限公司 业务请求处理方法、服务器及终端
CN105471714A (zh) * 2015-12-09 2016-04-06 百度在线网络技术(北京)有限公司 一种消息处理的方法和装置
US20170220283A1 (en) * 2016-01-29 2017-08-03 Microsoft Technology Licensing, Llc Reducing memory usage by a decoder during a format change
CN105843599A (zh) * 2016-02-01 2016-08-10 乐视移动智能信息技术(北京)有限公司 一种降低用户高频操作影响的方法、装置及一种用户终端
CN108228605A (zh) * 2016-12-14 2018-06-29 阿里巴巴集团控股有限公司 一种数据处理方法、装置及电子设备
US20180189343A1 (en) * 2016-12-30 2018-07-05 Dropbox, Inc. Notifications system for content collaborations
US11074554B2 (en) * 2016-12-30 2021-07-27 Verizon Patent And Licensing Inc. Cloud-based event calendar synching and notification
CN108985092A (zh) * 2017-06-05 2018-12-11 北京京东尚科信息技术有限公司 提交请求的过滤方法、装置、电子设备和存储介质
CN107967108A (zh) * 2017-11-22 2018-04-27 出门问问信息科技有限公司 防手势操作的误触控方法及装置
US11431662B2 (en) * 2017-12-28 2022-08-30 Meta Platforms, Inc. Techniques for message deduplication
CN110647502A (zh) * 2018-06-26 2020-01-03 中兴通讯股份有限公司 一种文件加载方法、设备、装置和计算机存储介质
US20200074541A1 (en) * 2018-09-05 2020-03-05 Consumerinfo.Com, Inc. Generation of data structures based on categories of matched data items
CN109783333A (zh) * 2018-12-13 2019-05-21 平安普惠企业管理有限公司 重复点击过滤方法、装置、计算机设备及存储介质
US11082514B2 (en) * 2019-05-24 2021-08-03 International Business Machines Corporation Push notification management
US20210112130A1 (en) * 2019-10-15 2021-04-15 UiPath, Inc. Mobile push notification for robotic process automation (rpa)
US10834219B1 (en) * 2020-01-10 2020-11-10 International Business Machines Corporation Intelligent distribution of push notifications

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9479387B2 (en) * 2012-06-22 2016-10-25 Salesforce.Com, Inc. Methods and systems for priority-based notifications for mobile devices
CN104346202A (zh) * 2014-09-30 2015-02-11 北京金山安全软件有限公司 终端应用程序的设置方法、装置及终端
CN105045468A (zh) * 2015-07-23 2015-11-11 深圳市万普拉斯科技有限公司 移动终端中悬浮通知的处理方法及装置
CN106657299A (zh) * 2016-12-08 2017-05-10 武汉斗鱼网络科技有限公司 关注主播上线提醒方法及系统
CN107483728A (zh) * 2017-08-07 2017-12-15 北京京东尚科信息技术有限公司 应用消息通知装置和方法
CN107707774A (zh) * 2017-11-28 2018-02-16 维沃移动通信有限公司 消息显示方法及移动终端
CN108459758A (zh) * 2018-01-23 2018-08-28 深圳天珑无线科技有限公司 防止通知误点击的方法、装置及移动终端
CN112118352A (zh) * 2020-08-31 2020-12-22 京东数字科技控股股份有限公司 通知触发消息的处理方法和装置

Also Published As

Publication number Publication date
US20230269304A1 (en) 2023-08-24
CN112118352A (zh) 2020-12-22
CN112118352B (zh) 2021-05-25

Similar Documents

Publication Publication Date Title
CN111124819B (zh) 全链路监控的方法和装置
US20200201837A1 (en) Live record invalidation
WO2022041879A1 (zh) 通知触发消息的处理方法和装置
CN111277847A (zh) 直播中聊天消息的展示方法、装置、服务器及系统
CN114091704B (zh) 一种告警压制方法和装置
CN113760982B (zh) 一种数据处理方法和装置
CN113783913A (zh) 一种消息推送管理方法和装置
WO2022151835A1 (zh) 一种样例报文处理方法及装置
CN113360348B (zh) 异常请求处理方法、装置、电子设备和存储介质
US10097613B2 (en) Systems and methods for enhancing performance of resource state polling
CN112749204B (zh) 一种读取数据的方法和装置
CN113138943B (zh) 一种处理请求的方法和装置
CN113761433A (zh) 业务处理方法和装置
CN114048059A (zh) 接口的超时时间调整方法、装置、计算机设备及存储介质
CN113449230A (zh) 一种确定曝光元素的方法和系统以及客户端和服务端
CN113722193A (zh) 检测页面异常的方法和装置
CN113114611A (zh) 黑名单管理的方法和装置
CN112699116A (zh) 一种数据处理方法和系统
CN112152915A (zh) 消息转发网关系统和消息转发方法
CN114841648B (zh) 物料分发方法、装置、电子设备和介质
CN112994968B (zh) 一种网络信息采集方法、服务器、终端和系统
CN118175060A (zh) 监控业务指标的方法、装置、设备和计算机可读介质
CN115550226A (zh) 一种分布式系统的流量监控方法及装置
CN118381977A (zh) 一种ai边缘算法接入系统及设备
CN112887114A (zh) 日志信息处理方法及装置

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

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

Country of ref document: EP

Kind code of ref document: A1