A message pushing method, device, apparatus and storage medium
By adjusting the message push speed based on the terminal's historical push speed and expected resource utilization, the problem of idle and wasted hardware resources was solved, and efficient utilization of hardware resources was achieved.
Patent Information
- Application Number
- CN202110558273.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-21
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2041-05-21
AI Technical Summary
In existing technologies, hardware resources are often idle and wasted when processing massive amounts of message transactions, and the utilization rate of hardware resources is not fully utilized.
By acquiring the number of messages to be pushed, historical push speed, and expected resource utilization, the message push speed is adjusted to push messages to the terminal at the current push speed, thereby achieving stable resource utilization to meet expectations and avoiding waste of hardware resources.
Based on existing hardware resources, we should make full use of hardware resources, avoid resource waste, and improve the resource utilization rate of terminals.
Smart Images

Figure CN113296980B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of Internet, and in particular, to a message pushing method and device, equipment and storage medium. BACKGROUND
[0002] With the popularity of mobile terminal devices, the message pushing function as an important tool for activation becomes an important function for providing stable services to users and improving the overall activity of application programs.
[0003] In the field of message pushing, an upstream message is usually accepted by a pushing system and distributed to each pushing server, and the pushing server pushes the message to the terminal device of the user. Massive information pushing transactions bring great pressure to the hardware resources of the pushing system.
[0004] In order to meet the demand for processing massive message transactions, the commonly used method is to expand the software and hardware in order to solve the availability and stability of the system when it encounters massive peak transactions. Software expansion has a bottleneck, which is in the hardware resource configuration of the software service. Therefore, software expansion and hardware expansion are usually combined to solve the demand for massive transactions. However, this also brings a problem: in order to cope with the less frequent massive message transactions, if more hardware resources are configured, a large number of system hardware resources will be in an idle state for a long time, and the hardware resource utilization rate is not fully utilized, resulting in waste of hardware resources. Therefore, how to fully utilize the hardware resources on the basis of existing hardware resources is an important problem. SUMMARY
[0005] Embodiments of the present application provide a message pushing method, device, equipment and storage medium to realize the adjustment of the message pushing speed according to the historical pushing speed of the terminal and the expected resource utilization rate, so that the resource utilization rate of the terminal reaches the expectation, thereby fully utilizing the hardware resources on the basis of existing hardware resources and avoiding waste of hardware resources.
[0006] In a first aspect, embodiments of the present application provide a message pushing method, comprising:
[0007] obtaining the number of messages to be pushed, the historical pushing speed and the expected resource utilization rate;
[0008] if the number of messages to be pushed is greater than a threshold, determining a current pushing speed according to the expected resource utilization rate and the historical pushing speed;
[0009] pushing the messages to be pushed to the terminal at the current pushing speed.
[0010] Further, the current push speed is determined according to the expected resource utilization and the historical push speed, comprising:
[0011] The terminal is sent the to-be-pushed message at the historical push speed, and an actual resource utilization of the terminal is obtained;
[0012] The current push speed is determined according to the historical push speed, the actual resource utilization and the expected resource utilization.
[0013] Further, the current push speed is determined according to the historical push speed, the actual resource utilization and the expected resource utilization, comprising:
[0014] The current push speed is calculated by using the following formula:
[0015]
[0016] Wherein, V is the historical push speed, V' is the current push speed, Rap is the expected resource utilization, and Rac is the actual resource utilization.
[0017] Further, the actual resource utilization of the terminal is obtained, comprising:
[0018] The resource utilization state information of the terminal is subscribed;
[0019] A subscription success signal sent by the terminal is received, so as to obtain the actual resource utilization of the terminal.
[0020] Further, the method further comprises:
[0021] A preset push speed is obtained;
[0022] The terminal is sent the to-be-pushed message at the preset push speed, and a first actual resource utilization of the terminal is obtained;
[0023] If the first actual resource utilization is not zero, the preset push speed is determined as an initial push speed.
[0024] Further, the expected resource utilization is obtained, comprising:
[0025] An expected resource utilization list and a current message push period are obtained;
[0026] The expected resource utilization list is queried according to the current message push period, so as to determine the expected resource utilization.
[0027] Further, if the message push period is greater than or equal to a preset period threshold, the expected resource utilization in the expected resource utilization list is always a preset maximum expected resource utilization.
[0028] Further, if the message pushing period is less than a preset period threshold, the expected resource utilization in the expected resource utilization list is proportional to the message pushing period.
[0029] Further, the resource utilization includes at least one of a central processing unit utilization, a memory utilization, a hard disk input utilization and a hard disk output utilization of the terminal.
[0030] In a second aspect, an embodiment of the present application further provides a message pushing device, which comprises:
[0031] A first obtaining module, configured to obtain a number of to-be-pushed messages, a historical pushing speed and an expected resource utilization;
[0032] A first determining module, configured to determine a current pushing speed according to the expected resource utilization and the historical pushing speed if the number of to-be-pushed messages is greater than a threshold value;
[0033] A pushing module, configured to push the to-be-pushed messages to a terminal at the current pushing speed.
[0034] Further, the first determining module comprises:
[0035] An obtaining unit, configured to send the to-be-pushed messages to a terminal at a historical pushing speed, and obtain an actual resource utilization of the terminal;
[0036] A determining unit, configured to determine a current pushing speed according to the historical pushing speed, the actual resource utilization and the expected resource utilization.
[0037] Further, the determining unit is specifically configured to:
[0038] The current pushing speed is calculated by using the following formula:
[0039]
[0040] Wherein, V is the historical pushing speed, V' is the current pushing speed, Rap is the expected resource utilization, and Rac is the actual resource utilization.
[0041] Further, the obtaining unit is specifically configured to:
[0042] Subscribe to resource utilization state information of the terminal;
[0043] Receive a subscription success signal sent by the terminal to obtain the actual resource utilization of the terminal.
[0044] Further, the device further comprises:
[0045] A second obtaining module, configured to obtain a preset pushing speed;
[0046] a third obtaining module, configured to send the to-be-pushed message to the terminal at a preset pushing speed, and obtain a first actual resource utilization rate of the terminal;
[0047] a second determining module, configured to determine the preset pushing speed as an initial pushing speed if the first actual resource utilization rate is not zero.
[0048] Further, the first obtaining module is specifically configured to:
[0049] obtain an expected resource utilization rate list and a current message pushing period;
[0050] query the expected resource utilization rate list according to the current message pushing period to determine an expected resource utilization rate.
[0051] Further, if the message pushing period is greater than or equal to a preset period threshold, the expected resource utilization rate in the expected resource utilization rate list is always a preset maximum expected resource utilization rate.
[0052] Further, if the message pushing period is less than the preset period threshold, the expected resource utilization rate in the expected resource utilization rate list is proportional to the message pushing period.
[0053] Further, the resource utilization rate includes at least one of a central processing unit utilization rate, a memory utilization rate, a hard disk input utilization rate and a hard disk output utilization rate of the terminal.
[0054] In a third aspect, an embodiment of the present application further provides a computer device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, and the processor implements the message pushing method according to any of the embodiments of the present application when executing the program.
[0055] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the message pushing method according to any of the embodiments of the present application.
[0056] The embodiment of the present application obtains the quantity of to-be-pushed messages, historical pushing speed and expected resource utilization rate; if the quantity of to-be-pushed messages is greater than a threshold, the current pushing speed is determined according to the expected resource utilization rate and the historical pushing speed; and the to-be-pushed messages are pushed to the terminal at the current pushing speed, thereby solving the problem that a large number of hardware resources are idle for a long time due to the configuration of more hardware resources for less massive message transactions, and the hardware resource utilization rate is not fully utilized, and the message pushing speed is adjusted according to the historical pushing speed of the terminal and the expected resource utilization rate, so that the resource utilization rate of the terminal reaches the expectation, thereby fully utilizing the hardware resource utilization rate on the basis of the existing hardware resources, and avoiding the waste of hardware resources. BRIEF DESCRIPTION OF DRAWINGS
[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0058] Figure 1 is a flow chart of a message pushing method in the first embodiment of the present application;
[0059] Figure 1a is a schematic diagram of a message pushing system in the first embodiment of the present application;
[0060] Figure 2 is a flow chart of a message pushing method in the second embodiment of the present application;
[0061] Figure 3 is a flow chart of a message pushing method in the third embodiment of the present application;
[0062] Figure 3a is a timing diagram of a message pushing method in the third embodiment of the present application;
[0063] Figure 4 is a structural schematic diagram of a message pushing device in the fourth embodiment of the present application;
[0064] Figure 5 is a structural schematic diagram of a computer device in the fifth embodiment of the present application. DETAILED DESCRIPTION
[0065] The application will be described in further detail below with reference to the drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not to be used to limit the scope of the application. In addition, it should also be pointed out that, for the sake of description, only the parts related to the application are shown in the drawings and not all the structures.
[0066] It should be noted that similar reference numerals and letters refer to like items in the following drawings, and therefore, once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings. Meanwhile, in the description of the application, the terms "first", "second", and the like are merely used to distinguish description and cannot be understood as indicating or implying relative importance.
[0067] Embodiment One
[0068] Figure 1 A flowchart of a message pushing method provided for the embodiment one of the application, the embodiment can be applicable to the case of pushing a large number of messages to a terminal when the messages are entered into a background server, and the method can be executed by a message pushing device in the embodiment of the application, which can be realized in the form of software and / or hardware.
[0069] As shown in Figure 1a , the message pushing system includes a producer, a distributor, a consumer, and a cache. The producer is configured to generate messages and store the messages in the cache, for example, an application program; the distributor is configured to acquire the messages from the cache and deliver the messages to the consumer, for example, a background server; and the consumer is configured to receive and process the messages, for example, a terminal. The distributor and the consumer can be one-to-one, one-to-many, or many-to-many.
[0070] As shown in Figure 1 , the method specifically includes the following steps:
[0071] S110, acquiring the number of messages to be pushed, the historical pushing speed, and the expected resource utilization rate.
[0072] The messages to be pushed refer to the messages stored in the cache, and the number of messages to be pushed refers to the number of messages stored in the cache. The historical pushing speed refers to the speed of pushing messages to a terminal in the last period of time, and the period of time refers to the period of time for the background server to distribute the messages to be pushed, which can be set according to actual needs.
[0073] The resource utilization rate refers to the utilization rate of the hardware resources configured on the terminal, for example, at least one of the central processor utilization rate, the memory utilization rate, the hard disk input utilization rate, and the hard disk output utilization rate of the terminal.
[0074] The expected resource utilization represents the utilization of the hardware resources of the terminal. The expected resource utilization can be set according to the actual demand of the user, can be a fixed resource utilization determined according to the performance of the hardware resources of the terminal, such as the maximum resource utilization, or can be different expected resource utilizations determined according to the push period, such as continuously increasing the expected resource utilization as the push period increases. In order to avoid the utilization of the hardware resources being too high and causing abnormal performance of the terminal, the expected resource utilization does not exceed the maximum utilization of the hardware resources of the terminal.
[0075] For example, the number of the to-be-pushed messages can be acquired by sending an acquisition request instruction of the number of the to-be-pushed messages to a background server that distributes the messages, or the background server can send the number of the to-be-pushed messages to the terminal at a regular time, which is not limited in the embodiments of the present application.
[0076] For example, the historical push speed can be acquired by determining the push speed of the last period as the historical push speed of the current period, or can be acquired by determining the push speed of the first period according to the initial push speed, determining the push speed of the second period according to the push speed of the first period, and so on, and determining the push speed of the last period as the historical push speed of the current period.
[0077] Optionally, the method further comprises:
[0078] acquiring a preset push speed;
[0079] sending the to-be-pushed messages to the terminal at the preset push speed to acquire the first actual resource utilization of the terminal;
[0080] if the first actual resource utilization is not zero, determining the preset push speed as the initial push speed.
[0081] The preset push speed can be set according to the actual demand, and the preset push speed is used to preliminarily determine the processing capacity of the hardware resources of the terminal. The number of the preset push speed is at least one.
[0082] The actual resource utilization corresponding to the initial push speed is greater than zero.
[0083] For example, the initial push speed can be the preset push speed, and the actual resource utilization corresponding to the preset push speed is greater than zero, or the initial push speed can be the minimum push speed corresponding to the actual resource utilization greater than zero when the to-be-pushed messages are sent to the terminal at the preset push speed.
[0084] Exemplarily, the first preset push speed is used to send the to-be-pushed message to the terminal, the first actual resource utilization of the terminal is obtained, and if the first actual resource utilization is zero, it indicates that the terminal hardly occupies resources in processing the to-be-pushed message. Then, the second preset push speed is continuously obtained, and if the second actual resource utilization is not zero, the second preset push speed is determined as the initial push speed. The purpose of such setting is to make the initial actual resource utilization of the terminal greater than zero when the to-be-pushed message is sent to the terminal at the initial push speed. The second preset push speed can be determined according to the first preset speed, for example, the second preset speed can be a preset multiple of the first preset speed, or the second preset speed can be the first preset speed plus a certain value; or the second preset push speed can also be a speed value greater than the first preset speed.
[0085] In S120, if the number of the to-be-pushed messages is greater than the threshold value, the current push speed is determined according to the expected resource utilization and the historical push speed.
[0086] The current push speed refers to the message push speed of the current push period, and the threshold value can be set according to actual needs or can be determined according to the performance of the hardware resources of the terminal.
[0087] In the prior art, when the accidental transaction volume of a system producer suddenly increases, the messages distributed to the terminal also increase in a large amount, so that the messages to be processed by the terminal suddenly increase in a burst mode, thereby causing abnormal hardware resource utilization. In order to solve the above problem, the current push speed is determined according to the expected resource utilization and the historical push speed.
[0088] Exemplarily, if the number of the to-be-pushed messages is greater than the threshold value, that is, the background server obtains a large number of to-be-pushed messages in the cache, the current push speed is determined according to the expected resource utilization of the current period and the push speed of the last period, so that the current push speed gradually stabilizes to the maximum resource utilization of the terminal.
[0089] In S130, the to-be-pushed message is pushed to the terminal at the current push speed.
[0090] Exemplarily, the to-be-pushed message is pushed to the terminal at the current push speed determined according to the expected resource utilization, so that the resource utilization of the terminal fluctuates around the expected resource utilization, thereby making the hardware resources of the terminal fully utilized.
[0091] The technical scheme of the embodiment acquires the quantity of the to-be-pushed messages, the historical pushing speed and the expected resource utilization rate; if the quantity of the to-be-pushed messages is greater than a threshold value, the current pushing speed is determined according to the expected resource utilization rate and the historical pushing speed; and the to-be-pushed messages are pushed to the terminal at the current pushing speed, which can realize adjusting the message pushing speed according to the historical pushing speed and the expected resource utilization rate of the terminal, and make the resource utilization rate of the terminal reach the expectation, thereby fully utilizing the hardware resources on the basis of the existing hardware resources and avoiding wasting the hardware resources.
[0092] Embodiment two
[0093] Figure 2 For a flowchart of a message pushing method in the embodiment two of the application, the embodiment is optimized based on the above-mentioned embodiment. In the embodiment, determining the current pushing speed according to the expected resource utilization rate and the historical pushing speed comprises: sending the to-be-pushed messages to the terminal at the historical pushing speed, and acquiring the actual resource utilization rate of the terminal; and determining the current pushing speed according to the historical pushing speed, the actual resource utilization rate and the expected resource utilization rate.
[0094] As shown in Figure 2 , the method of the embodiment specifically comprises the following steps:
[0095] S210, acquiring the quantity of the to-be-pushed messages, the historical pushing speed and the expected resource utilization rate.
[0096] S220, if the quantity of the to-be-pushed messages is greater than a threshold value, sending the to-be-pushed messages to the terminal at the historical pushing speed, and acquiring the actual resource utilization rate of the terminal.
[0097] For example, if the quantity of the to-be-pushed messages is greater than a threshold value, the background server sends the to-be-pushed messages to the terminal at the historical pushing speed, and acquires the hardware resource utilization rate of the terminal after processing the to-be-pushed messages as the actual resource utilization rate.
[0098] Optionally, acquiring the actual resource utilization rate of the terminal comprises:
[0099] Subscribing to the resource utilization rate state information of the terminal;
[0100] Receiving a subscription success signal sent by the terminal to acquire the actual resource utilization rate of the terminal.
[0101] For example, the background server subscribes to the utilization rate state information of the terminal. After receiving the subscription information, the server background sends a subscription success signal to the background server. The terminal acquires the actual resource utilization rate in real time and broadcasts it to the background server.
[0102] S230, determine the current push speed based on the historical push speed, the actual resource utilization rate, and the expected resource utilization rate.
[0103] For example, the terminal's message processing capability is determined based on the historical push speed and the actual resource utilization, and the push speed that enables the terminal's resource utilization to reach the expected resource utilization rate is determined as the current push speed based on the terminal's message processing capability.
[0104] Optionally, determining the current push speed based on the historical push speed, the actual resource utilization rate, and the expected resource utilization rate includes:
[0105] The current push speed is calculated using the following formula:
[0106]
[0107] Where V is the historical push speed, V′ is the current push speed, Rap is the expected resource utilization rate, and Rac is the actual resource utilization rate.
[0108] S240, push the message to be pushed to the terminal at the current push speed.
[0109] The technical solution of this embodiment obtains the number of messages to be pushed, the historical push speed, and the expected resource utilization rate; if the number of messages to be pushed is greater than a threshold, the messages to be pushed are sent to the terminal at the historical push speed to obtain the actual resource utilization rate of the terminal; the current push speed is determined based on the historical push speed, the actual resource utilization rate, and the expected resource utilization rate, and the messages to be pushed are pushed to the terminal at the current push speed. This enables the message push speed to be adjusted according to the terminal's historical push speed and expected resource utilization rate, so that the terminal's resource utilization rate can be stably achieved as expected. Thus, based on the existing hardware resources, the utilization rate of hardware resources is fully utilized, and the waste of hardware resources is avoided.
[0110] Example 3
[0111] Figure 3 This is a flowchart of a message push method according to Embodiment 3 of the present invention. This embodiment is based on the above embodiment and optimized. In this embodiment, obtaining the expected resource utilization rate includes: obtaining an expected resource utilization rate list and the current message push period; and querying the expected resource utilization rate list according to the current message push period to determine the expected resource utilization rate.
[0112] like Figure 3 As shown, the method in this embodiment specifically includes the following steps:
[0113] S310, acquire the number of messages to be pushed, a historical pushing speed, a list of expected resource utilizations, and a current message pushing period.
[0114] The list of expected resource utilizations is used to store a mapping relationship between a message pushing period and an expected resource utilization, and can be a database table, a mapping table, or a configuration table, which is not limited by the embodiments of the present application.
[0115] S320, determine an expected resource utilization according to the list of expected resource utilizations and the current message pushing period.
[0116] For example, the expected resource utilization corresponding to the current message pushing period is determined according to the list of expected resource utilizations and the current message pushing period.
[0117] Optionally, if the message pushing period is less than a preset period threshold, the expected resource utilization in the list of expected resource utilizations is proportional to the message pushing period. If the message pushing period is greater than or equal to the preset period threshold, the expected resource utilization in the list of expected resource utilizations is always a preset maximum expected resource utilization.
[0118] The preset maximum expected resource utilization is less than a maximum actual resource utilization of the terminal, for example, the preset maximum expected resource utilization is 80%, and the preset maximum expected resource utilization cannot reach 100% in general.
[0119] For example, as shown in Table 1, the expected resource utilization gradually increases with the increase of the current period time until the expected resource utilization is the preset maximum expected resource utilization within the preset period threshold. If the current period is greater than the preset period threshold, the expected resource utilization always remains the maximum expected resource utilization.
[0120] Table 1
[0121]
[0122] The advantage of such a setting is that the speed of the background server in issuing the messages to be pushed to the terminal can be adjusted according to the gradually increasing expected resource utilization, so that the terminal gradually reaches the maximum resource utilization of the terminal, and the hardware resource is prevented from being abnormally increased due to the sudden increase of the message quantity and the sudden increase of the resource utilization of the terminal.
[0123] S330, if the number of messages to be pushed is greater than a threshold, determine a current pushing speed according to the expected resource utilization and the historical pushing speed.
[0124] For example, as shown in Table 2, the current push speed is determined based on the expected resource utilization rate and the historical push speed. The actual resource utilization rate corresponding to the current push speed steadily rises to the maximum resource utilization rate and fluctuates around the maximum resource utilization rate.
[0125] Table 2
[0126]
[0127] S340, push the message to be pushed to the terminal at the current push speed.
[0128] The message push system in this embodiment of the invention includes a producer, a distributor, a consumer, and a cache. The producer, for example, is used to generate messages and store them in the cache; the distributor, for example, is used to retrieve messages from the cache and distribute them to the consumer; the consumer, for example, is used to receive and process messages.
[0129] like Figure 3a As shown, the specific steps of this embodiment of the invention are as follows: the distributor subscribes to actual resource utilization status information from the consumer. If the subscription is successful, the consumer returns a subscription success message to the distributor. The consumer periodically obtains its own actual resource utilization and broadcasts it to the distributor. After receiving the consumer's actual resource utilization, the distributor adjusts the current push speed according to the actual resource utilization and the expected resource utilization, and pushes messages to the consumer at the current push speed. After receiving the push message, the consumer sends a successful reception signal to the distributor and processes the push message.
[0130] The technical solution of this embodiment obtains the number of messages to be pushed, historical push speed, expected resource utilization list, and current message push cycle; determines the expected resource utilization rate by querying the expected resource utilization list according to the current message push cycle; if the number of messages to be pushed is greater than a threshold, the messages to be pushed are sent to the terminal at the historical push speed to obtain the actual resource utilization rate of the terminal; determines the current push speed according to the historical push speed, the actual resource utilization rate, and the expected resource utilization rate, and pushes the messages to be pushed to the terminal at the current push speed. This enables the message push speed to be adjusted according to the terminal's historical push speed and expected resource utilization rate, so that the terminal's resource utilization rate can be stably reached as expected. Thus, based on the existing hardware resources, the utilization rate of hardware resources is fully utilized, and the waste of hardware resources is avoided.
[0131] Example 4
[0132] Figure 4This is a schematic diagram of a message push device according to Embodiment 4 of the present invention. This embodiment is applicable to situations where a large number of messages to be pushed are being sent to a background server and then pushed to a terminal. The device can be implemented using software and / or hardware, and can be integrated into any device that provides message push functionality, such as… Figure 4 As shown, the message push device specifically includes: a first acquisition module 410, a first determination module 420, and a push module 430.
[0133] The first acquisition module 410 is used to acquire the number of messages to be pushed, the historical push speed, and the expected resource utilization rate.
[0134] The first determining module 420 is used to determine the current push speed based on the expected resource utilization rate and the historical push speed if the number of messages to be pushed is greater than a threshold.
[0135] The push module 430 is used to push the message to be pushed to the terminal at the current push speed.
[0136] Optionally, the first determining module includes:
[0137] The acquisition unit is used to send the message to be pushed to the terminal at the historical push speed and acquire the actual resource utilization rate of the terminal.
[0138] The determining unit is used to determine the current push speed based on the historical push speed, the actual resource utilization rate, and the expected resource utilization rate.
[0139] Optionally, the determining unit is specifically used for:
[0140] The current push speed is calculated using the following formula:
[0141]
[0142] Where V is the historical push speed, V′ is the current push speed, Rap is the expected resource utilization rate, and Rac is the actual resource utilization rate.
[0143] Optionally, the acquisition unit is specifically used for:
[0144] Resource utilization status information of the subscription terminal;
[0145] Receive the subscription success signal sent by the terminal to obtain the actual resource utilization rate of the terminal.
[0146] Optional, also includes:
[0147] The second acquisition module is used to acquire the preset push speed;
[0148] The third acquisition module is used to send the message to be pushed to the terminal at a preset push speed and acquire the first actual resource utilization rate of the terminal.
[0149] The second determining module is used to determine the preset push speed as the initial push speed if the first actual resource utilization rate is not zero.
[0150] Optionally, the first acquisition module is specifically used for:
[0151] Get the list of expected resource utilization rates and the current message push cycle;
[0152] The expected resource utilization rate is determined by querying the expected resource utilization rate list based on the current message push cycle.
[0153] Optionally, if the message push period is greater than or equal to a preset period threshold, the expected resource utilization rate in the expected resource utilization rate list will always be the preset maximum expected resource utilization rate.
[0154] Optionally, if the message push period is less than a preset period threshold, the expected resource utilization rate in the expected resource utilization rate list is proportional to the message push period.
[0155] Optionally, the resource utilization rate includes at least one of the terminal's central processing unit utilization rate, memory utilization rate, hard disk input utilization rate, and hard disk output utilization rate.
[0156] The aforementioned message push device can execute the method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method.
[0157] Example 5
[0158] Figure 5 This is a schematic diagram of the structure of a computer device according to Embodiment 5 of the present invention. Figure 5 A block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present invention is shown. Figure 5 The computer device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0159] like Figure 5 As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processor 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processor 16).
[0160] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration bus, a processor or local bus using any of a variety of bus architectures. By way of example, these architectures include Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA (EISA) bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0161] Computer device 12 typically includes a variety of computer system readable media. Such media can be any available media that is located either internally or externally to computer device 12, including both volatile and nonvolatile media, removable and non-removable media.
[0162] System memory 28 can include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 can further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 can be provided for reading from and writing to a non-removable, non-volatile magnetic media (e.g., a "hard drive"). Figure 5 not shown in FIG. 1, a magnetic hard disk drive for reading from and writing to non-removable, non-volatile magnetic media (e.g., a "hard drive"). Figure 5 not shown in FIG. 1, a magnetic hard disk drive for reading from and writing to non-removable, non-volatile magnetic media (e.g., a "hard drive").
[0163] Program / utility 40 having a set (at least one) of program modules 42 can be stored in, for example, memory 28 by way of example, such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination thereof, which can include implementation of a network environment. Program modules 42 generally carry out the functions and / or methodologies of embodiments of the present application as described herein.
[0164] Computer device 12 can also communicate with one or more external devices 14 such as a keyboard, a pointing device, a display 24, etc.; one or more devices that enable a user to interact with computer device 12; and / or any devices (e.g., network card, modem, etc.) that enable computer device 12 to communicate with one or more other computing devices. Such communication can occur via Input / Output (I / O) interface(s) 22. Still yet, computer device 12 in embodiments can not be present as a standalone individual device, but rather can be embedded in a mirror, such that the display surface of display 24 is visually integrated with the mirror surface when the display surface of display 24 is not displaying. Also, computer device 12 can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or the Internet) via network adapter 20. As shown, network adapter 20 communicates with the other components of computer device 12 via bus 18. It should be understood that although not shown, other hardware and / or software modules could be used in conjunction with computer device 12. Examples, include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc. Figure 5
[0165] Processor 16 executes the program(s) stored in system memory 28, in order to perform various functionality applications and data processing, such as implementing the message pushing method provided by embodiments of the present application: obtaining a number of messages to be pushed, a historical pushing speed and an expected resource utilization; if the number of messages to be pushed is greater than a threshold, determining a current pushing speed according to the expected resource utilization and the historical pushing speed; and pushing the messages to be pushed to a terminal at the current pushing speed.
[0166] Embodiment six
[0167] Embodiment six of the present application provides a computer readable storage medium, having stored thereon a computer program, which when executed by a processor, implements the message pushing method provided by all embodiments of the present application: obtaining a number of messages to be pushed, a historical pushing speed and an expected resource utilization; if the number of messages to be pushed is greater than a threshold, determining a current pushing speed according to the expected resource utilization and the historical pushing speed; and pushing the messages to be pushed to a terminal at the current pushing speed.
[0168] Any combination of one or more computer readable medium can be utilized. The computer readable medium can be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium include an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium can be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
[0169] A computer readable signal medium can include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal can take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium can be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
[0170] Program code embodied on a computer readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0171] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In an embodiment, the present application is directed to computer program products comprising machine-readable media for carrying or having machine-executable instructions or programs
[0172] Note that the above merely describes preferred embodiments of the present application and the principles of the technology applied. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, modifications and substitutions can be made without departing from the scope of the present application. Therefore, although the present application has been described in detail through the above embodiments, the present application is not limited to the above embodiments, and can include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A message pushing method, characterized by, The method comprises the following steps: acquiring the number of messages to be pushed, historical pushing speed and expected resource utilization rate; if the number of messages to be pushed is greater than a threshold, determining a current pushing speed according to the expected resource utilization rate and the historical pushing speed; pushing the messages to be pushed to a terminal at the current pushing speed; determining the current pushing speed according to the expected resource utilization rate and the historical pushing speed comprises: sending the messages to be pushed to the terminal at the historical pushing speed to acquire an actual resource utilization rate of the terminal; determining the current pushing speed according to the historical pushing speed, the actual resource utilization rate and the expected resource utilization rate; the step of determining the current pushing speed according to the historical pushing speed, the actual resource utilization rate and the expected resource utilization rate comprises: calculating the current pushing speed by using the following formula: wherein, V is the historical pushing speed, V' is the current pushing speed, Rap is the expected resource utilization rate and Rac is the actual resource utilization rate.
2. The method of claim 1, wherein, acquiring the actual resource utilization rate of the terminal comprises: subscribing to resource utilization rate state information of the terminal; receiving a subscription success signal sent by the terminal to acquire the actual resource utilization rate of the terminal.
3. The method of claim 1, wherein, The method further comprises the following steps: acquiring a preset pushing speed; sending the messages to be pushed to the terminal at the preset pushing speed to acquire a first actual resource utilization rate of the terminal; if the first actual resource utilization rate is not zero, determining the preset pushing speed as an initial pushing speed.
4. The method of claim 1, wherein, acquiring the expected resource utilization rate comprises: acquiring an expected resource utilization rate list and a current message pushing period; inquiring the expected resource utilization rate list according to the current message pushing period to determine the expected resource utilization rate.
5. The method of claim 4, wherein, if the message pushing period is greater than or equal to a preset period threshold, the expected resource utilization rate in the expected resource utilization rate list is always a preset maximum expected resource utilization rate.
6. The method of claim 5, wherein, if the message pushing period is less than the preset period threshold, the expected resource utilization rate in the expected resource utilization rate list is proportional to the message pushing period.
7. The method according to any one of claims 1 to 6, characterized in that, The resource utilization rate comprises at least one of a central processing unit utilization rate, a memory utilization rate, a hard disk input utilization rate and a hard disk output utilization rate of the terminal.
8. A message pushing apparatus characterized by comprising: The method comprises the following steps: a first acquiring module, configured to acquire the number of messages to be pushed, historical pushing speed and expected resource utilization rate; a first determining module, configured to, if the number of messages to be pushed is greater than a threshold, determine a current pushing speed according to the expected resource utilization rate and the historical pushing speed; a pushing module, configured to push the messages to be pushed to a terminal at the current pushing speed; the first determining module comprises: an acquiring unit, configured to send the messages to be pushed to the terminal at the historical pushing speed to acquire an actual resource utilization rate of the terminal; a determining unit, configured to determine the current pushing speed according to the historical pushing speed, the actual resource utilization rate and the expected resource utilization rate; the determining unit is specifically configured to: calculate the current pushing speed by using the following formula: wherein, V is the historical pushing speed, V' is the current pushing speed, Rap is the expected resource utilization rate and Rac is the actual resource utilization rate.
9. The apparatus of claim 8, wherein, The method further comprises the following steps: a second acquiring module, configured to acquire a preset pushing speed; A third obtaining module, configured to send the to-be-pushed message to the terminal at a preset pushing speed, and obtain a first actual resource utilization rate of the terminal; A second determining module, configured to determine the preset pushing speed as an initial pushing speed if the first actual resource utilization rate is not zero.
10. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the message pushing method in any one of claims 1-7.
11. A computer readable storage medium having stored thereon a computer program, characterized in that The program is executed by the processor to implement the message pushing method in any one of claims 1-7. The program is executed by the processor to implement the message pushing method in any one of claims 1-7.
Citation Information
Patent Citations
Message pushing methods and apparatuses, terminal and server
CN106101249A
Message pushing method and device
CN106453382A