CN113360767B - Information pushing method and device, electronic equipment and storage medium - Google Patents

Information pushing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113360767B
CN113360767B CN202110728113.3A CN202110728113A CN113360767B CN 113360767 B CN113360767 B CN 113360767B CN 202110728113 A CN202110728113 A CN 202110728113A CN 113360767 B CN113360767 B CN 113360767B
Authority
CN
China
Prior art keywords
information
memory
pushed
target user
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110728113.3A
Other languages
Chinese (zh)
Other versions
CN113360767A (en
Inventor
甘炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202110728113.3A priority Critical patent/CN113360767B/en
Publication of CN113360767A publication Critical patent/CN113360767A/en
Application granted granted Critical
Publication of CN113360767B publication Critical patent/CN113360767B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention relates to the field of data processing, and discloses an information pushing method, which comprises the following steps: judging the login state of a user when the information to be pushed is acquired, and pushing the information to be pushed to a client of the user when the user is in an online state; when the user is in an offline state, calculating the activity level of the user, inquiring the response speed level corresponding to the activity level, and acquiring a memory corresponding to the response speed level according to the response speed level to obtain a target memory; storing information to be pushed by using a target memory; when the online of the user is detected, pushing the information to be pushed stored in the target storage to a client of the user, and deleting the information to be pushed from the target storage. The present invention also relates to blockchain technology, where the target memory may be one of the blockchain nodes. The invention can improve the use efficiency of different memories and the flexibility of the information pushing process.

Description

Information pushing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing, and in particular, to an information pushing method, an apparatus, an electronic device, and a computer readable storage medium.
Background
With the development of the internet and the gradual popularization of smart phones, software applications become an indispensable part of life. Each software application often pushes some messages to a user so as to achieve the purpose of attracting the user, when the user is online, the user selects direct pushing, when the user is offline, generated pushing information is stored in a memory to serve as offline information, and after the user is online, unified pushing is performed.
To prevent unlimited increase of offline information in memory, causing memory crash, the current main method is through a periodic deletion mechanism: and when the generated push information is not successfully pushed to the user within a preset time period, deleting the push information in the server, and releasing the storage space in the memory. However, as application users increase, the generated offline information also increases, and the conventional storage manner cannot meet the requirement of storing more offline information.
Disclosure of Invention
The invention provides an information pushing method, which mainly aims to improve the use efficiency of different memories so as to improve the flexibility of an information pushing process.
In order to achieve the above object, the present invention provides an information pushing method, including:
Judging the login state of a target user when information to be pushed, which is required to be sent to the target user, is obtained, and pushing the information to be pushed to a client of the target user when the target user is in an online state;
when the target user is in an offline state, calculating the activity level of the target user, inquiring the response speed level corresponding to the activity level according to a pre-built storage allocation table, and acquiring a memory corresponding to the response speed level from a pre-built memory set according to the response speed level to obtain a target memory;
storing the information to be pushed into the target memory;
when the online of the target user is detected, pushing the information to be pushed stored in the target memory to a client of the target user, and deleting the information to be pushed from the target memory.
Optionally, the storing the information to be pushed in the target memory includes:
when the target memory is a preset primary memory, storing the information to be pushed into the target memory according to a preset hot zone-cold zone cache strategy;
When the target memory is a preset secondary memory, the information to be pushed is stored in the target memory;
and when the target memory is a preset three-level memory, storing the system to be pushed into the target memory by utilizing a preset distributed algorithm.
Optionally, the calculating the activity level of the target user includes:
acquiring login information of the target user in a preset time period;
and inquiring a pre-constructed liveness judging table according to the login information to obtain the liveness grade of the target user.
Optionally, the calculating the activity level of the target user includes:
acquiring the online total time length of the target user in a preset time period, and sequencing the online total time length in a pre-constructed user online time length table to obtain a ranking value corresponding to the target user;
judging the magnitude relation between the ranking value and a preset first value and a preset second value according to the ranking value, wherein the first value is smaller than the second value;
when the ranking value is smaller than or equal to the first value, judging that the activity level of the target user is a first level;
When the ranking value is larger than the first value and smaller than or equal to the second value, judging that the activity level of the target user is a second level;
and when the ranking value is larger than the second value, judging that the activity level of the target user is a third level.
Optionally, after the storing the information to be pushed in the target memory, the method further includes:
configuring storage time and storage quantity of information to be pushed corresponding to different activity levels to obtain limiting conditions;
constructing an information storage rule containing the limiting condition and a preset storage space release strategy;
and managing each piece of information to be pushed in the target memory by utilizing the information storage rule.
Optionally, the managing each piece of information to be pushed in the target storage by using the information storage rule includes:
judging whether the information to be pushed corresponding to the target user stored in the target memory reaches the limiting condition in the information storage rule according to the preset triggering condition in the period of time when the target user is in an offline state;
and deleting or replacing the information to be pushed when the information to be pushed corresponding to the target user stored in the target memory reaches the limit condition in the information storage rule.
Optionally, before the obtaining the memory corresponding to the response speed level from the pre-built memory set and obtaining the target memory, the method further includes:
and classifying response speed grades of all memories in the preset memory set according to a preset memory classification rule to obtain the primary memory, the secondary memory and the tertiary memory.
In order to solve the above problems, the present invention also provides an information pushing apparatus, including:
the information to be pushed is obtained and used for judging the login state of the target user when the information to be pushed which is required to be sent to the target user is obtained, and pushing the information to be pushed to the client of the target user when the target user is in an on-line state;
the user-memory matching module is used for calculating the activity level of the target user when the target user is in an offline state, inquiring the response speed level corresponding to the activity level according to a pre-constructed memory allocation table, and acquiring a memory corresponding to the response speed level from a pre-constructed memory set according to the response speed level to obtain a target memory;
The information storage module is used for storing the information to be pushed into the target memory;
and the information pushing module is used for pushing the information to be pushed stored in the target memory to the client of the target user when the online of the target user is detected, and deleting the information to be pushed from the target memory.
In order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to implement the information push method described above.
In order to solve the above-mentioned problems, the present invention also provides a computer-readable storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the above-mentioned information push method.
According to the embodiment of the invention, the liveness of the user is graded according to the login information of the user to obtain the liveness grade of the target user, when the information to be pushed is stored, the response speed grade is selected according to the liveness grade, the memory corresponding to the response speed grade is obtained, and when the target user is in an on-line state, the information to be pushed stored in the memory is sent to the client of the target user, so that the information pushing operation is completed. The information to be pushed of users with different liveness levels is correspondingly stored in different memories, so that the use efficiency of each memory can be increased. Therefore, the information pushing method provided by the invention can improve the use efficiency of different memories and improve the flexibility of the information pushing process.
Drawings
Fig. 1 is a flow chart of an information pushing method according to an embodiment of the present application;
fig. 2 is a schematic block diagram of an information pushing device according to an embodiment of the present application;
fig. 3 is a schematic diagram of an internal structure of an electronic device for implementing an information pushing method according to an embodiment of the present application;
the achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The embodiment of the application provides an information pushing method. The execution main body of the information pushing method includes, but is not limited to, at least one of a server, a terminal and the like capable of being configured to execute the method provided by the embodiment of the application. In other words, the information pushing method may be performed by software or hardware installed on a client or a server device, and the software may be a blockchain platform. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Referring to fig. 1, a flow chart of an information pushing method according to an embodiment of the application is shown. In an embodiment of the present application, the information pushing method includes:
S1, judging a login state of a target user when information to be pushed, which is required to be sent to the target user, is obtained, and pushing the information to be pushed to a client of the target user when the target user is in an online state.
In the embodiment of the invention, the information to be pushed is an information packet which packages a plurality of real-time news or behavior instructions and generates links, wherein the behavior instructions can be instructions such as version guidance, activity introduction and the like.
When a preset information pushing system generates information to be pushed, when a corresponding APP in a client of a target user is started or is in a background running state, the client judges that the login state of the target user is an online state, pushes the information to be pushed to the client of the target user, and completes one pushing action.
S2, when the target user is in an offline state, calculating the activity level of the target user, inquiring the response speed level corresponding to the activity level according to a pre-built storage allocation table, and acquiring a memory corresponding to the response speed level from a pre-built memory set according to the response speed level to obtain a target memory.
In the embodiment of the invention, when the corresponding APP in the client of the target user is not started, the login state of the target user is judged to be an offline state.
In the embodiment of the invention, the activity level of the target user can be judged according to the login information (such as login times) of the target user in the last period of time. The time of the next login of the target user can be predicted through the activity level, and the higher the activity level is, the faster the target user can log in next time.
Further, the storage allocation table is a corresponding relation table of the activity of the user and the memory, which is constructed according to the service requirement.
In detail, in one embodiment of the present invention, the calculating the activity level of the target user includes:
acquiring login information of the target user in a preset time period;
and inquiring a pre-constructed liveness judging table according to the login information to obtain the liveness grade of the target user.
The login information includes login times, login duration and other data of the user in a preset time period, and in the embodiment of the present invention, the preset time may be set to "1 month".
Further, the embodiment of the invention queries a pre-constructed liveness judging table by using login information of the target user to obtain the liveness grade of the target user. The activity evaluation table is a relationship table of login days and activity, for example, when the target user logs in for more than 20 days in one month, the activity level of the target user is a first level; when the target user logs in for 10-20 days in one month, the activity level of the target user is a second level; and when the target user logs in for 10 days in one month, the activity level of the target user is C level.
Further, in another embodiment of the present invention, the calculating the activity level of the target user includes:
acquiring the online total time length of the target user in a preset time period, and sequencing the online total time length in a pre-constructed user online time length table to obtain a ranking value corresponding to the target user;
judging the magnitude relation between the ranking value and a preset first value and a preset second value according to the ranking value, wherein the first value is smaller than the second value;
when the ranking value is smaller than or equal to the first value, judging that the activity level of the target user is a first level;
when the ranking value is larger than the first value and smaller than or equal to the second value, judging that the activity level of the target user is a second level;
and when the ranking value is larger than the second value, judging that the activity level of the target user is a third level.
Specifically, the embodiment of the invention counts the total online time of each user in the preset time period to obtain the online time table of the user, arranges the time of the online time table of the user from large to small according to the first numerical value of 30% and the second numerical value of 80%, and sets the activity level of the first 30% of users as a first level, the activity level between 30% and 80% of the middle as a second level and the activity level after 80% as a third level according to the arrangement sequence.
In detail, in the embodiment of the present invention, before the memory corresponding to the response speed level is obtained from the pre-built memory set, and the target memory is obtained, the method further includes:
and classifying response speed grades of all memories in the preset memory set according to a preset memory classification rule to obtain a primary memory, a secondary memory and a tertiary memory.
Specifically, the memory classification rule is a rule for classifying according to the performance of the memory.
The embodiment of the invention distinguishes the memories with three response speed levels, and each level of the memories can be provided with a plurality of memories to form a memory set. The first-level memory has the highest response speed and smaller storage space, and the memory is selected; the second-level memory has a general response speed and a general storage space size, and the SSD disk memory is selected, while the third-level memory has a slowest response speed and a larger storage space, and a common disk memory can be utilized. According to the embodiment of the invention, because the calling frequency of the primary memory is high, the cache space of the primary memory can be divided into a hot area and a cold area according to the preset hot area-cold area cache strategy, and the information to be pushed which is not yet pushed out in the preset time in the hot area is stored in the cold area, so that the efficient operation of the primary memory is ensured; because the calling frequency of the three-stage memory is low, data cannot be frequently called, and the data storage efficiency and the safety in the three-stage memory can be enhanced through the distributed algorithm.
In the embodiment of the invention, when the target user is in an offline state, the method is as follows according to the storage allocation table: if the activity level of the target user is the first level, storing the information to be pushed into a memory with the first response speed level; if the activity level of the target user is the second level, storing the information to be pushed into a memory with the second response speed level; and if the activity level of the target user is the third level, storing the information to be pushed into the memory with the response speed level of three levels.
S3, storing the information to be pushed into the target memory.
In detail, in an embodiment of the present invention, the storing the information to be pushed in the target memory includes:
when the target memory is a preset primary memory, storing the information to be pushed into the target memory according to a preset hot zone-cold zone cache strategy;
when the target memory is a preset secondary memory, the information to be pushed is stored in the target memory;
and when the target memory is a preset three-level memory, storing the system to be pushed into the target memory by utilizing a preset distributed algorithm.
According to the embodiment of the invention, the logging frequency of the target user with the activity level of the first level is higher, so that the push task can be completed quickly, the response speed of the primary memory is very high, the data storage and retrieval operation can be completed at any time through the memory storage, the primary memory is divided into a hot area and a cold area through the hot area-cold area caching strategy, the push efficiency of the push operation is improved, and the use efficiency of the primary memory is also improved. The login frequency of the target user with the activity level of the third level is low, the push task can not be completed once quickly, and only a larger storage space is needed, so that the storage and use efficiency of the third memory are improved by using the distributed algorithm to store the information to be pushed in a distributed manner. And the second memory has low requirements on the storage efficiency and the storage space, and can be used for ordinary storage.
In detail, in an embodiment of the present invention, after the information to be pushed is stored in the target memory, the method further includes:
configuring storage time and storage quantity of information to be pushed corresponding to different activity levels to obtain limiting conditions;
Constructing an information storage rule containing the limiting condition and a preset storage space release strategy;
and managing each piece of information to be pushed in the target memory by utilizing the information storage rule.
Further, in an embodiment of the present invention, the managing each piece of information to be pushed in the target storage by using the information storage rule includes:
and deleting or replacing the information to be pushed when the information to be pushed stored in the target memory is judged to reach the limit condition in the information storage rule in the period of time when the target user is in an offline state.
In the embodiment of the invention, the information storage rule is a storage rule adopted by information to be pushed corresponding to target users with different activity levels, wherein the storage rule comprises a storage limit and a storage space release strategy. The storage limit comprises that the information to be pushed of the user with the activity level of the first level can be stored for 10 days and at most 9 pieces of information can be stored, the information to be pushed of the user with the activity level of the second level can be stored for 15 days, at most 7 pieces of information can be stored, the information to be pushed of the user with the activity level of the third level is distributed and stored through a distributed algorithm, and the storage period is 20 days but at most 5 pieces of information are stored. The storage space release strategy comprises random replacement, earliest replacement and the like.
In addition, the embodiment of the invention can change the information storage rule at any time according to the configuration condition and specific service requirements, so as to achieve reasonable utilization of memories at all levels.
And S4, pushing the information to be pushed stored in the target memory to a client of the target user when the online of the target user is detected, and deleting the information to be pushed from the target memory.
In the embodiment of the invention, when the target user is in an on-line state, all the information to be pushed stored in the target memory by the target user is sent to the client of the target user, so as to complete the pushing action, and the pushed information to be pushed is deleted from the target memory, so as to complete the cleaning action of the target memory.
Further, the embodiment of the invention realizes the detection of whether the target user is online or not through the following operations:
when the client of the target user successfully logs in the APP once, the information pushing system corresponding to the APP records the IP address of the client, and then the information pushing system can detect whether the APP in the client is online according to the IP address, and once the APP is online, the information of 'the client of the target user is opened' is notified to the information pushing system according to a preset cooperative rule, so that the information pushing system can call the information to be pushed in the memory to push.
According to the embodiment of the invention, the liveness of the user is graded according to the login information of the user to obtain the liveness grade of the target user, when the information to be pushed is stored, the response speed grade is selected according to the liveness grade, the memory corresponding to the response speed grade is obtained, and when the target user is in an on-line state, the information to be pushed stored in the memory is sent to the client of the target user, so that the information pushing operation is completed. The information to be pushed of users with different liveness levels is correspondingly stored in different memories, so that the use efficiency of each memory can be increased. Therefore, the information pushing method provided by the invention can improve the use efficiency of different memories and improve the flexibility of the information pushing process.
Fig. 2 is a functional block diagram of the information pushing device according to the present invention.
The information pushing device 100 of the present invention may be installed in an electronic apparatus. The information pushing device may include an information obtaining module 101 to be pushed, a user-memory matching module 102, an information storage module 103, and an information pushing module 104 according to the implemented functions. The module of the present invention may also be referred to as a unit, meaning a series of computer program segments capable of being executed by the processor of the electronic device and of performing fixed functions, stored in the memory of the electronic device.
In the present embodiment, the functions concerning the respective modules/units are as follows:
the information to be pushed acquisition module 101 is configured to determine a login state of a target user when information to be pushed, which needs to be sent to the target user, is acquired, and push the information to be pushed to a client of the target user when the target user is in an online state.
In the embodiment of the invention, the information to be pushed is an information packet which packages a plurality of real-time news or behavior instructions and generates links, wherein the behavior instructions can be instructions such as version guidance, activity introduction and the like.
When the preset information pushing system generates information to be pushed, when the corresponding APP in the client of the target user is started or is in a background running state, the embodiment of the invention judges that the login state of the target user is an online state, and directly pushes the information to be pushed to the client of the target user, so as to complete one pushing action.
The user-memory matching module 102 is configured to calculate an activity level of the target user when the target user is in an offline state, query a response speed level corresponding to the activity level according to a pre-constructed memory allocation table, and obtain a memory corresponding to the response speed level from a pre-constructed memory set according to the response speed level, so as to obtain a target memory.
In the embodiment of the invention, when the corresponding APP in the client of the target user is not started, the login state of the target user is judged to be an offline state.
In the embodiment of the invention, the activity level of the target user can be judged according to the login information (such as login times) of the target user in the last period of time. The time of the next login of the target user can be predicted through the activity level, and the higher the activity level is, the faster the target user can log in next time.
Further, the storage allocation table is a corresponding relation table of the activity of the user and the memory, which is constructed according to the service requirement.
In detail, in one embodiment of the present invention, the user-memory matching module 102 is specifically configured to, when calculating the activity level of the target user:
acquiring login information of the target user in a preset time period;
and inquiring a pre-constructed liveness judging table according to the login information to obtain the liveness grade of the target user.
The login information includes login times, login duration and other data of the user in a preset time period, and in the embodiment of the present invention, the preset time may be set to "1 month".
Further, the embodiment of the invention queries a pre-constructed liveness judging table by using login information of the target user to obtain the liveness grade of the target user. The activity evaluation table is a relationship table of login days and activity, for example, when the target user logs in for more than 20 days in one month, the activity level of the target user is a first level; when the target user logs in for 10-20 days in one month, the activity level of the target user is a second level; and when the target user logs in for 10 days in one month, the activity level of the target user is C level.
Further, in another embodiment of the present invention, the user-memory matching module 102 is specifically configured to, when calculating the activity level of the target user:
acquiring the online total time length of the target user in a preset time period, and sequencing the online total time length in a pre-constructed user online time length table to obtain a ranking value corresponding to the target user;
judging the magnitude relation between the ranking value and a preset first value and a preset second value according to the ranking value, wherein the first value is smaller than the second value;
When the ranking value is smaller than or equal to the first value, judging that the activity level of the target user is a first level;
when the ranking value is larger than the first value and smaller than or equal to the second value, judging that the activity level of the target user is a second level;
and when the ranking value is larger than the second value, judging that the activity level of the target user is a third level.
Specifically, the embodiment of the invention counts the total online time of each user in the preset time period to obtain the online time table of the user, arranges the time of the online time table of the user from large to small according to the first numerical value of 30% and the second numerical value of 80%, and sets the activity level of the first 30% of users as a first level, the activity level between 30% and 80% of the middle as a second level and the activity level after 80% as a third level according to the arrangement sequence.
In detail, in the embodiment of the present invention, before the user-memory matching module 102 obtains the memory corresponding to the response speed level from the pre-built memory set, the user-memory matching module is further configured to:
and classifying the response speed grades of all the memories in the preset memory set according to a preset classification rule to obtain a primary memory, a secondary memory and a tertiary memory.
Specifically, the classification rule is a rule for classifying according to the performance of the memory.
The embodiment of the invention distinguishes the memories with three response speed levels, and each level of the memories can be provided with a plurality of memories to form the memory set. The first-level memory has the highest response speed and smaller storage space, and the memory is selected; the second-level memory has a general response speed and a general storage space size, and the SSD disk memory is selected, while the third-level memory has a slowest response speed and a larger storage space, and a common disk memory can be utilized. According to the embodiment of the invention, because the calling frequency of the primary memory is high, the cache space of the primary memory can be divided into a hot area and a cold area according to the preset cache strategy, and the information which is not pushed for the preset time in the hot area is stored in the cold area, so that the efficient operation of the primary memory is ensured; because the calling frequency of the three-stage memory is low, data cannot be frequently called, and the data storage efficiency and the safety in the three-stage memory can be enhanced through the distributed algorithm.
The storage allocation table can correspondingly store the information to be pushed into memories with different response speed levels.
In the embodiment of the invention, when a target user is in an offline state, if the activity level of the target user is a first level, the information to be pushed is stored in a memory with a first response speed level; if the activity level of the target user is the second level, storing the information to be pushed into a memory with the second response speed level; and if the activity level of the target user is the third level, storing the information to be pushed into the memory with the response speed level of three levels.
The information storage module 103 is configured to store the information to be pushed into the target memory.
In detail, in the embodiment of the present invention, when the information storage module 103 stores the information to be pushed into the target memory, the information storage module is specifically configured to:
when the target memory is a preset primary memory, storing the information to be pushed into the target memory according to a preset hot zone-cold zone cache strategy;
when the target memory is a preset secondary memory, the information to be pushed is stored in the target memory;
and when the target memory is a preset three-level memory, storing the system to be pushed into the target memory by utilizing a preset distributed algorithm.
According to the embodiment of the invention, the logging frequency of the target user with the activity level of the first level is higher, so that the push task can be completed quickly, the response speed of the primary memory is very high, the data storage and retrieval operation can be completed at any time through the memory storage, the primary memory is divided into a hot area and a cold area through the hot area-cold area caching strategy, the push efficiency of the push operation is improved, and the use efficiency of the primary memory is also improved. The login frequency of the target user with the activity level of the third level is low, the push task can not be completed once quickly, and only a larger storage space is needed, so that the storage and use efficiency of the third memory are improved by using the distributed algorithm to store the information to be pushed in a distributed manner. And the second memory has low requirements on the storage efficiency and the storage space, and can be used for ordinary storage.
In detail, in the embodiment of the present invention, after storing the information to be pushed in the target memory, the information storage module 103 is further configured to:
configuring storage time and storage quantity of information to be pushed corresponding to different activity levels to obtain limiting conditions;
Constructing an information storage rule containing the limiting condition and a preset storage space release strategy;
and managing each piece of information to be pushed in the target memory by utilizing the information storage rule.
Further, in the embodiment of the present invention, when the information storage module 103 manages each piece of information to be pushed in the target memory by using the information storage rule, the information storage module is specifically configured to:
and deleting or replacing the information to be pushed when the information to be pushed stored in the target memory is judged to reach the limit condition in the information storage rule in the period of time when the target user is in an offline state.
In the embodiment of the invention, the information storage rule is a storage rule adopted by information to be pushed corresponding to target users with different activity levels, wherein the storage rule comprises a storage limit and a storage space release strategy. The storage limit comprises that the information to be pushed of the user with the activity level of the first level can be stored for 10 days and at most 9 pieces of information can be stored, the information to be pushed of the user with the activity level of the second level can be stored for 15 days, at most 7 pieces of information can be stored, the information to be pushed of the user with the activity level of the third level is distributed and stored through a distributed algorithm, and the storage period is 20 days but at most 5 pieces of information are stored. The storage space release strategy comprises random replacement, earliest replacement and the like.
In addition, the embodiment of the invention can change the information storage rule at any time according to the configuration condition and specific service requirements, so as to achieve reasonable utilization of memories at all levels.
The information pushing module 104 is configured to, when detecting that the target user is online, push the information to be pushed stored in the target memory to a client of the target user, and delete the information to be pushed from the target memory.
In the embodiment of the invention, when the target user is in an on-line state, all the information to be pushed stored in the target memory by the target user is sent to the client of the target user, so as to complete the pushing action, and the pushed information to be pushed is deleted from the target memory, so as to complete the cleaning action of the target memory.
Further, the embodiment of the invention realizes the detection of whether the target user is online or not through the following operations:
when the client of the target user successfully logs in the APP once, the information pushing system corresponding to the APP records the IP address of the client, and then the information pushing system can detect whether the APP in the client is online according to the IP address, and once the APP is online, the information of 'the client of the target user is opened' is notified to the information pushing system according to a preset cooperative rule, so that the information pushing system can call the information to be pushed in the memory to push.
Fig. 3 is a schematic structural diagram of an electronic device for implementing the information pushing method according to the present invention.
The electronic device may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program, such as an information push program, stored in the memory 11 and executable on the processor 10.
The processor 10 may be formed by an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed by a plurality of integrated circuits packaged with the same function or different functions, including one or more central processing units (Central Processing unit, CPU), a microprocessor, a digital processing chip, a graphics processor, a combination of various control chips, and so on. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, and executes various functions of the electronic device and processes data by running or executing programs or modules (e.g., executing an information push program, etc.) stored in the memory 11, and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may in other embodiments also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only for storing application software installed in an electronic device and various data, such as codes of an information push program, but also for temporarily storing data that has been output or is to be output.
The communication bus 12 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
The communication interface 13 is used for communication between the electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), or alternatively a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 is not limiting of the electronic device and may include fewer or more components than shown, or may combine certain components, or a different arrangement of components.
For example, although not shown, the electronic device may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device may further include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The information push program stored in the memory 11 in the electronic device is a combination of a plurality of computer programs, which when run in the processor 10, can implement:
judging the login state of a target user when information to be pushed, which is required to be sent to the target user, is obtained, and pushing the information to be pushed to a client of the target user when the target user is in an online state;
When the target user is in an offline state, calculating the activity level of the target user, inquiring the response speed level corresponding to the activity level according to a pre-built storage allocation table, and acquiring a memory corresponding to the response speed level from a pre-built memory set according to the response speed level to obtain a target memory;
storing the information to be pushed into the target memory;
when the online of the target user is detected, pushing the information to be pushed stored in the target memory to a client of the target user, and deleting the information to be pushed from the target memory.
In particular, the specific implementation method of the processor 10 on the computer program may refer to the description of the relevant steps in the corresponding embodiment of fig. 1, which is not repeated herein.
Further, the electronic device integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a non-volatile computer readable storage medium. The computer readable storage medium may be volatile or nonvolatile. For example, the computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The present invention also provides a computer readable storage medium storing a computer program which, when executed by a processor of an electronic device, can implement:
judging the login state of a target user when information to be pushed, which is required to be sent to the target user, is obtained, and pushing the information to be pushed to a client of the target user when the target user is in an online state;
when the target user is in an offline state, calculating the activity level of the target user, inquiring the response speed level corresponding to the activity level according to a pre-built storage allocation table, and acquiring a memory corresponding to the response speed level from a pre-built memory set according to the response speed level to obtain a target memory;
storing the information to be pushed into the target memory;
when the online of the target user is detected, pushing the information to be pushed stored in the target memory to a client of the target user, and deleting the information to be pushed from the target memory.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (7)

1. An information pushing method, characterized in that the method comprises:
judging the login state of a target user when information to be pushed, which is required to be sent to the target user, is obtained, and pushing the information to be pushed to a client of the target user when the target user is in an online state;
when the target user is in an offline state, calculating the activity level of the target user, inquiring the response speed level corresponding to the activity level according to a pre-built storage allocation table, and acquiring a memory corresponding to the response speed level from a pre-built memory set according to the response speed level to obtain a target memory;
storing the information to be pushed into the target memory;
when the online of the target user is detected, pushing the information to be pushed stored in the target memory to a client of the target user, and deleting the information to be pushed from the target memory;
the storing the information to be pushed in the target memory includes: when the target memory is a preset primary memory, storing the information to be pushed into the target memory according to a preset hot zone-cold zone cache strategy; when the target memory is a preset secondary memory, the information to be pushed is stored in the target memory; when the target memory is a preset three-level memory, storing the information to be pushed into the target memory by using a preset distributed algorithm;
The calculating the activity level of the target user comprises the following steps: acquiring login information of the target user in a preset time period; inquiring a pre-constructed liveness judging table according to the login information to obtain the liveness grade of the target user; or alternatively
The calculating the activity level of the target user comprises the following steps: acquiring the online total time length of the target user in a preset time period, and sequencing the online total time length in a pre-constructed user online time length table to obtain a ranking value corresponding to the target user; judging the magnitude relation between the ranking value and a preset first value and a preset second value according to the ranking value, wherein the first value is smaller than the second value; when the ranking value is smaller than or equal to the first value, judging that the activity level of the target user is a first level; when the ranking value is larger than the first value and smaller than or equal to the second value, judging that the activity level of the target user is a second level; and when the ranking value is larger than the second value, judging that the activity level of the target user is a third level.
2. The information pushing method according to claim 1, wherein after the information to be pushed is stored in the target memory, the method further comprises:
Configuring storage time and storage quantity of information to be pushed corresponding to different activity levels to obtain limiting conditions;
constructing an information storage rule containing the limiting condition and a preset storage space release strategy;
and managing each piece of information to be pushed in the target memory by utilizing the information storage rule.
3. The information pushing method as claimed in claim 2, wherein the managing each piece of information to be pushed in the target storage using the information storage rule includes:
judging whether the information to be pushed corresponding to the target user stored in the target memory reaches the limiting condition in the information storage rule according to the preset triggering condition in the period of time when the target user is in an offline state;
and deleting or replacing the information to be pushed when the information to be pushed corresponding to the target user stored in the target memory reaches the limit condition in the information storage rule.
4. The information pushing method as claimed in claim 1, wherein before the obtaining the memory corresponding to the response speed level from the pre-constructed memory set and obtaining the target memory, the method further comprises:
And classifying response speed grades of all memories in the preset memory set according to a preset memory classification rule to obtain the primary memory, the secondary memory and the tertiary memory.
5. An information pushing apparatus for implementing the information pushing method according to any one of claims 1 to 4, characterized in that the apparatus comprises:
the information to be pushed is obtained and used for judging the login state of the target user when the information to be pushed which is required to be sent to the target user is obtained, and pushing the information to be pushed to the client of the target user when the target user is in an on-line state;
the user-memory matching module is used for calculating the activity level of the target user when the target user is in an offline state, inquiring the response speed level corresponding to the activity level according to a pre-constructed memory allocation table, and acquiring a memory corresponding to the response speed level from a pre-constructed memory set according to the response speed level to obtain a target memory;
the information storage module is used for storing the information to be pushed into the target memory;
And the information pushing module is used for pushing the information to be pushed stored in the target memory to the client of the target user when the online of the target user is detected, and deleting the information to be pushed from the target memory.
6. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the information pushing method according to any one of claims 1 to 4.
7. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the information push method according to any one of claims 1 to 4.
CN202110728113.3A 2021-06-29 2021-06-29 Information pushing method and device, electronic equipment and storage medium Active CN113360767B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110728113.3A CN113360767B (en) 2021-06-29 2021-06-29 Information pushing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110728113.3A CN113360767B (en) 2021-06-29 2021-06-29 Information pushing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113360767A CN113360767A (en) 2021-09-07
CN113360767B true CN113360767B (en) 2023-11-10

Family

ID=77537120

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110728113.3A Active CN113360767B (en) 2021-06-29 2021-06-29 Information pushing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113360767B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105530278A (en) * 2014-09-30 2016-04-27 博雅网络游戏开发(深圳)有限公司 Message pushing method and device
CN108737535A (en) * 2018-05-14 2018-11-02 平安科技(深圳)有限公司 A kind of information push method, storage medium and server
CN109033408A (en) * 2018-08-03 2018-12-18 腾讯科技(深圳)有限公司 Information-pushing method and device, computer readable storage medium, electronic equipment
CN110688581A (en) * 2019-10-30 2020-01-14 南京领行科技股份有限公司 Information real-time pushing method and device, computing equipment and medium
CN112749330A (en) * 2020-06-05 2021-05-04 腾讯科技(深圳)有限公司 Information pushing method and device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105530278A (en) * 2014-09-30 2016-04-27 博雅网络游戏开发(深圳)有限公司 Message pushing method and device
CN108737535A (en) * 2018-05-14 2018-11-02 平安科技(深圳)有限公司 A kind of information push method, storage medium and server
WO2019218431A1 (en) * 2018-05-14 2019-11-21 平安科技(深圳)有限公司 Message pushing method, storage medium, server and apparatus
CN109033408A (en) * 2018-08-03 2018-12-18 腾讯科技(深圳)有限公司 Information-pushing method and device, computer readable storage medium, electronic equipment
CN110688581A (en) * 2019-10-30 2020-01-14 南京领行科技股份有限公司 Information real-time pushing method and device, computing equipment and medium
CN112749330A (en) * 2020-06-05 2021-05-04 腾讯科技(深圳)有限公司 Information pushing method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113360767A (en) 2021-09-07

Similar Documents

Publication Publication Date Title
US9612807B2 (en) Code placement using a dynamic call graph
CN112445854B (en) Multi-source service data real-time processing method, device, terminal and storage medium
US20110320415A1 (en) Piecemeal list prefetch
WO2022142020A1 (en) Information pushing method and apparatus, electronic device, and computer-readable storage medium
US11902102B2 (en) Techniques and architectures for efficient allocation of under-utilized resources
CN111651453A (en) User historical behavior query method and device, electronic equipment and storage medium
CN114185895A (en) Data import and export method and device, electronic equipment and storage medium
CN112631731A (en) Data query method and device, electronic equipment and storage medium
CN113259446A (en) APP message sending method, device, equipment and medium based on user loyalty
CN111694843A (en) Missing number detection method and device, electronic equipment and storage medium
CN113590632B (en) Database index creation method, device, equipment and medium
CN114640707A (en) Message asynchronous processing method and device, electronic equipment and storage medium
CN111858604B (en) Data storage method and device, electronic equipment and storage medium
CN113360767B (en) Information pushing method and device, electronic equipment and storage medium
CN110427394B (en) Data operation method and device
CN112256472A (en) Distributed data calling method and device, electronic equipment and storage medium
CN113849520B (en) Intelligent recognition method and device for abnormal SQL, electronic equipment and storage medium
CN113486238A (en) Information pushing method, device and equipment based on user portrait and storage medium
CN112069387A (en) Internet event propagation outbreak prediction method and device, electronic equipment and medium
CN114185622B (en) Page loading method, device, equipment and storage medium
CN104951449B (en) Data processing method and device
CN115001945B (en) Log collection monitoring method, device, equipment and computer readable medium
CN114598624B (en) Cluster monitoring method and device, electronic equipment and readable storage medium
CN110716939B (en) Data management method, electronic device, system and medium
CN112328960B (en) Optimization method and device for data operation, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant