CN113364670B - Data pushing method and device and electronic equipment - Google Patents

Data pushing method and device and electronic equipment Download PDF

Info

Publication number
CN113364670B
CN113364670B CN202110668749.3A CN202110668749A CN113364670B CN 113364670 B CN113364670 B CN 113364670B CN 202110668749 A CN202110668749 A CN 202110668749A CN 113364670 B CN113364670 B CN 113364670B
Authority
CN
China
Prior art keywords
subscription
message
data
token
identification information
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
CN202110668749.3A
Other languages
Chinese (zh)
Other versions
CN113364670A (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.)
Beijing Easy Yikang Information Technology Co ltd
Original Assignee
Beijing Qingsongchou Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qingsongchou Information Technology Co ltd filed Critical Beijing Qingsongchou Information Technology Co ltd
Priority to CN202110668749.3A priority Critical patent/CN113364670B/en
Publication of CN113364670A publication Critical patent/CN113364670A/en
Application granted granted Critical
Publication of CN113364670B publication Critical patent/CN113364670B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/04Real-time or near real-time messaging, e.g. instant messaging [IM]
    • 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/214Monitoring or handling of messages using selective forwarding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0807Network architectures or network communication protocols for network security for authentication of entities using tickets, e.g. Kerberos

Abstract

The invention provides a data pushing method, a device and an electronic device, under the condition that the current time meets the preset message pushing rule, a message subscription operation data set and user identification information stored by a WeChat server are obtained, message subscription accumulated data of a preset applet are obtained by analysis according to the message subscription operation data set, and the message subscription accumulated data and the user identification information are sent to the data pushing device, so that the data pushing device obtains subscription messages which correspond to the types of the subscription messages and have the same quantity as the message subscription accumulated times and carries out the subscription message pushing operation, namely, in the invention, when the messages subscribed by users are pushed, the subscription messages with the same quantity as the message subscription accumulated times can be pushed, namely, the corresponding quantity of the subscription messages can be pushed according to the message subscription operation times executed by the users, and the multi-click message operation of the users can be responded effectively in time, the user experience is improved.

Description

Data pushing method and device and electronic equipment
Technical Field
The present invention relates to the field of communications, and in particular, to a data pushing method and apparatus, and an electronic device.
Background
The small program on the WeChat has a message subscription function, and a user can realize the subscription of the message by clicking a message subscription button.
When subscribing the message, the user can normally receive the subscribed message by clicking the message subscription button. Before message pushing is carried out, if a user clicks a message subscription button for multiple times, but when the message is actually pushed, the message is pushed for the user only once, so that most of clicking operations when the user clicks the message subscription button for multiple times are not correctly responded, and the user experience is reduced.
Disclosure of Invention
In view of this, the present invention provides a data pushing method, an apparatus and an electronic device, so as to solve the problem that if a user clicks a message subscription button for multiple times, but when pushing a message, the user is only pushed once, and the multiple message clicking operation of the user cannot be correctly responded, thereby reducing the user experience.
In order to solve the technical problems, the invention adopts the following technical scheme:
a data pushing method is applied to data management equipment and comprises the following steps:
under the condition that the current time meets a preset message pushing rule, a message subscription operation data set and user identification information stored by a WeChat server are obtained; the message subscription operation data set comprises at least one message subscription operation data sent by the user terminal corresponding to the user identification information before the current moment; the message subscription operation data comprises a subscription message type of a preset small program and message subscription operation information;
analyzing and obtaining message subscription accumulated data of the preset small program according to the message subscription operation data set, wherein the message subscription accumulated data comprises a subscription message type and message subscription accumulated times corresponding to the subscription message type;
sending the message subscription accumulated data and the user identification information to data pushing equipment so that the data pushing equipment acquires a subscription message set corresponding to the message subscription accumulated data, and sending a plurality of subscription messages in the subscription message set to a user terminal corresponding to the user identification information according to a Token acquired from the data management equipment;
the subscription message set comprises subscription messages which correspond to the subscription message types and are the same as the accumulated times of the message subscription.
Optionally, the analyzing the message subscription accumulated data of the preset applet according to the message subscription operation data set includes:
screening out message subscription operation information corresponding to the same subscription message type according to the message subscription operation data in the message subscription operation data set;
counting the number of allowed subscription operation information in the message subscription operation information corresponding to the same subscription message type, and taking the number as the cumulative number of message subscriptions corresponding to the subscription message type;
and determining the subscription message type and the message subscription accumulated times corresponding to the subscription message type as the message subscription accumulated data of the preset applet.
Optionally, after the sending the message subscription accumulated data to the data pushing device, the method further includes:
receiving a Token acquisition request sent by data pushing equipment, wherein the Token acquisition request comprises identification information of the preset small program;
and querying a Token corresponding to the identification information of the preset applet, and returning the Token to the data push equipment, so that the data push equipment sends a plurality of subscription messages in the subscription message set to the user terminal according to the Token.
Optionally, the generating process of the Token corresponding to the identification information of the preset applet includes:
receiving a Token generation request sent by the data pushing equipment; the Token generation request comprises identification information and key information of a preset small program;
calling a Token generation interface to send the Token generation request to a WeChat server;
receiving Token information fed back by the WeChat server; the Token information comprises a Token corresponding to the identification information of the preset small program.
Optionally, the Token information further includes Token valid time of the Token;
after receiving the Token information fed back by the WeChat Server, the method further comprises:
and calculating the expiration time of the Token according to the current time and the effective time of the Token.
Optionally, the querying a Token corresponding to the identification information of the preset applet, and returning the Token to the data pushing device includes:
inquiring the Token corresponding to the identification information of the preset small program, and determining whether the Token is expired or not according to the expiration time;
and returning the Token to the data pushing equipment under the condition that the Token is determined not to be expired.
Optionally, in a case that it is determined that the Token is expired, the method further includes:
sending a Token updating request to the WeChat server;
receiving updated Token and updated Token effective time fed back by the WeChat server;
and sending the updated Token to a data pushing device.
A data pushing device is applied to data management equipment, and comprises:
the information acquisition module is used for acquiring a message subscription operation data set and user identification information stored by the WeChat server under the condition that the current moment meets a preset message pushing rule; the message subscription operation data set comprises at least one message subscription operation data sent by the user terminal corresponding to the user identification information before the current moment; the message subscription operation data comprises a subscription message type of a preset applet and message subscription operation information;
the data analysis module is used for analyzing and obtaining the message subscription accumulated data of the preset small program according to the message subscription operation data set, wherein the message subscription accumulated data comprises a subscription message type and the message subscription accumulated times corresponding to the subscription message type;
the message pushing module is used for sending the message subscription accumulated data and the user identification information to data pushing equipment so that the data pushing equipment acquires a subscription message set corresponding to the message subscription accumulated data and sends a plurality of subscription messages in the subscription message set to user terminals corresponding to the user identification information according to tokens acquired from the data management equipment;
the subscription message set comprises subscription messages which correspond to the subscription message types and are the same as the accumulated times of the message subscription.
Optionally, the data analysis module comprises:
the information screening submodule is used for screening out the message subscription operation information corresponding to the same subscription message type according to the message subscription operation data in the message subscription operation data set;
the number determining submodule is used for counting the number of the allowed subscription operation information in the message subscription operation information corresponding to the same subscription message type, and taking the number as the cumulative number of the message subscriptions corresponding to the subscription message type;
and the data determining submodule is used for determining the subscription message type and the message subscription accumulated times corresponding to the subscription message type as the message subscription accumulated data of the preset applet.
An electronic device, comprising: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls a program and is used to:
under the condition that the current moment meets a preset message pushing rule, a message subscription operation data set and user identification information stored by a WeChat server are obtained; the message subscription operation data set comprises at least one message subscription operation data sent by the user terminal corresponding to the user identification information before the current moment; the message subscription operation data comprises a subscription message type of a preset small program and message subscription operation information;
analyzing and obtaining message subscription accumulated data of the preset applet according to the message subscription operation data set, wherein the message subscription accumulated data comprises a subscription message type and message subscription accumulated times corresponding to the subscription message type;
sending the message subscription accumulated data and the user identification information to data pushing equipment so that the data pushing equipment acquires a subscription message set corresponding to the message subscription accumulated data, and sending a plurality of subscription messages in the subscription message set to user terminals corresponding to the user identification information according to Token acquired from the data management equipment;
the subscription message set comprises subscription messages which correspond to the subscription message types and are the same as the accumulated times of the message subscription.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a data pushing method, a device and electronic equipment, under the condition that the current time meets the preset message pushing rule, acquiring a message subscription operation data set and user identification information stored by the WeChat server, analyzing and obtaining the message subscription accumulated data of the preset applet according to the message subscription operation data set, sending the message subscription accumulated data and the user identification information to data pushing equipment, so that the data pushing device acquires the subscription message set corresponding to the message subscription accumulated data, and according to the previously obtained Token, sending a plurality of subscription messages in the subscription message set to the user terminal corresponding to the user identification information, the subscription message set comprises subscription messages which correspond to the subscription message types and are the same as the accumulated times of the message subscription. In other words, in the invention, when the message subscribed by the user is pushed, the number of the subscribed messages is the same as the accumulated number of the message subscriptions, that is, the corresponding number of the subscribed messages can be pushed according to the number of the message subscription operations executed by the user, each click operation when the user clicks the message subscription button for multiple times is correctly responded, the multiple click message operation of the user can be timely and effectively responded, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic view of a scene of a message subscription interface according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for pushing data according to an embodiment of the present invention;
fig. 3 is a flowchart of a method of another data pushing method according to an embodiment of the present invention;
fig. 4 is a schematic view of a Token generation scenario provided in an embodiment of the present invention;
fig. 5 is a schematic view of a scene for updating Token according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a data pushing apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
When subscribing for a message, a user can normally receive the subscribed message only by clicking a message subscription button. Before message pushing, if a user clicks a message subscription button for multiple times, for example, a certain shopping applet, after the user purchases and pays for the shopping applet, a message subscription interface pops up, and the interface as shown in fig. 1 is displayed on the interface, where the interface in fig. 1 is used only schematically, and specifically which message is subscribed may be set according to the specific applet.
If the user clicks the check-up before the specific message type and then clicks the permission button, the message of the click check-up is subscribed. If the user does not want to subscribe to the message, the cancel button can be clicked, and the messages of all message types are not subscribed at the moment.
Or selecting only the check before the message to be subscribed without selecting the check before the message type, and then clicking the permission operation to subscribe the message type of the selected check.
If the user purchases every time, the interface of fig. 1 appears, and the user clicks the permission operation every time, the user subscribes to a plurality of messages, for example, subscribes to a "donation step reminder" message for 5 times. However, in practical application, when the message is pushed, the "donation step reminding" message is pushed only once, and the rest four "donation step reminding" messages are not pushed, so that most of clicking operations when the user clicks the message subscription button for many times are not correctly responded, and the user experience is reduced.
Therefore, the operation of subscribing the message by the user can be accumulated, the subscription message with the number matched with the operation times of subscribing the message is pushed when the message is pushed, the click operation of each user is responded, the response is timely and effective, and the user experience is improved.
Specifically, under the condition that a preset message pushing rule is met at the current moment, a message subscription operation data set and user identification information stored by a WeChat server are obtained, message subscription accumulated data of a preset applet are obtained through analysis according to the message subscription operation data set, the message subscription accumulated data and the user identification information are sent to data pushing equipment, so that the data pushing equipment obtains a subscription message set corresponding to the message subscription accumulated data, and sends a plurality of subscription messages in the subscription message set to user terminals corresponding to the user identification information according to a pre-obtained Token, wherein the subscription message set comprises subscription messages corresponding to the types of the subscription messages and the number of the subscription messages is the same as the number of the message subscription accumulated times. In other words, in the invention, when the messages subscribed by the user are pushed, the number of the subscribed messages is the same as the accumulated number of the message subscriptions, that is, the number of the subscribed messages corresponding to the number of the message subscription operations executed by the user can be pushed according to the number of the message subscription operations executed by the user, each click operation when the user clicks the message subscription button for multiple times is correctly responded, and the user experience is improved.
On the basis of the above, an embodiment of the present invention provides a data pushing method, which is applied to a data management device, where the data management device in this embodiment may be a device for Token management, such as a platform, such as a server and a processor. Referring to fig. 2, the data push method may include:
and S11, under the condition that the current time meets the preset message pushing rule, acquiring a message subscription operation data set and user identification information stored by the WeChat server.
The message subscription operation data set comprises at least one message subscription operation data sent by the user terminal corresponding to the user identification information before the current moment.
Specifically, the preset message pushing rule is set by a technician according to an actual application scenario, and may be, for example, a specific time, such as 18: 00 carries out message pushing. Or when a specific condition is met, such as when shopping, message pushing when logistics information exists, and the like.
In practical applications, a user may click a cancel or allow button as shown in fig. 1 multiple times, and for each click operation, the wechat server may receive message subscription operation data, where the message subscription operation data includes a subscription message type of a preset applet and message subscription operation information.
The preset applet may be an applet such as a shopping applet, and the subscription message type may be "donation step reminder", "monthly donation due close reminder" in fig. 1, or the like. The message subscription operation information may be cancel or allow, wherein cancel means not subscribing to the message and allow means subscribing to the message.
After the user clicks a cancel or allow button each time, the user terminal sends a piece of message subscription operation data to the wechat server, and the wechat server stores the message subscription operation data.
It should be noted that, for the same user, the user identification information is used for representing in this embodiment, and the message subscription operation data is stored in a classified manner according to the user identification information, that is, the message subscription operation data corresponding to the same user identification information is stored together.
In practical application, a user may log in with WeChat on different user terminals, such as a mobile phone and a notebook, but the same user identification information is used regardless of which user terminal is used for logging in, so in this embodiment, the statistical result is the message subscription operation data sent by the user terminal corresponding to the user identification information.
In addition, the statistical message subscription operation data is the message subscription operation data sent by the user terminal corresponding to the user identification information in the time period before the current time and after the last message pushing.
In this time period, the user may send the message subscription operation data multiple times, or may send the message subscription operation data only once, which is not limited in this embodiment. The message subscription operation data is stored in the form of a message subscription operation data set in the WeChat server. The set of message subscription operational data includes at least one message subscription operational data.
Under the condition that the current time meets the preset message pushing rule, the data management device in this embodiment sends a data acquisition request to the wechat server, and the wechat server returns the stored message subscription operation data set and the user identification information to the data management device.
And S12, analyzing and obtaining the message subscription accumulated data of the preset small program according to the message subscription operation data set.
Specifically, after receiving the message subscription operation data set, the data management device performs statistical analysis on the message subscription operation data in the message subscription operation data set to obtain message subscription accumulated data of the preset applet.
The message subscription accumulated data comprises a subscription message type and the message subscription accumulated times corresponding to the subscription message type.
Specifically, step S12 may include:
1) according to the message subscription operation data in the message subscription operation data set, screening out message subscription operation information corresponding to the same subscription message type;
2) counting the number of allowed subscription operation information in the message subscription operation information corresponding to the same subscription message type, and taking the number as the cumulative number of message subscriptions corresponding to the subscription message type;
3) and determining the subscription message type and the message subscription accumulated times corresponding to the subscription message type as the message subscription accumulated data of the preset applet.
In practical application, when performing statistical analysis, the data management device may count the cumulative number of message subscriptions corresponding to each subscription message type.
When performing statistical analysis, for different types of subscription message types, the statistical analysis needs to be separately performed, that is, the cumulative number of message subscriptions corresponding to each type of subscription message type is separately counted.
And if the message subscription operation information of the subscription message type is allowable, namely the subscription operation information is allowable, adding one to the cumulative number of message subscriptions of the subscription message type. If the message subscription operation information of the subscription message type is cancellation, that is, the message subscription cancellation operation information, the cumulative number of message subscriptions of the subscription message type is not adjusted.
After statistical analysis is performed on each message subscription operation data in the message subscription operation data set, the subscription message type and the message subscription cumulative number corresponding to the subscription message type can be obtained. And determining the subscription message type and the message subscription accumulated times corresponding to the subscription message type as message subscription accumulated data.
S13, sending the message subscription accumulated data and the user identification information to a data pushing device, so that the data pushing device obtains a subscription message set corresponding to the message subscription accumulated data, and sends a plurality of subscription messages in the subscription message set to a user terminal corresponding to the user identification information according to the Token obtained from the data management device.
And the subscription message set comprises subscription messages which correspond to the types of the subscription messages and are the same as the accumulated times of the message subscription.
The data pushing device in the present embodiment may be another server or processor different from the data management device.
The data push device stores a plurality of subscription messages corresponding to different subscription message types, and the subscription message can be input by a user, and if a user subscribes to a joke type message, the user can input a plurality of jokes to perform data push. In addition, the subscribed message can be generated according to the change of the actual data. If the subscribed information is the logistics information, if the purchased goods have logistics changes, the subscribed information is generated. If the logistics is from the A place to the B place, a piece of logistics information is generated, and if the logistics is from the B place to the C place, a piece of logistics information is also generated.
The data pushing equipment receives message subscription accumulated data, wherein the message subscription accumulated data comprises a subscription message type and message subscription accumulated times corresponding to the subscription message type. At this time, the data pushing device will query the subscription message corresponding to the subscription message type, and the number of the subscription messages is the same as the cumulative number of message subscriptions corresponding to the subscription message type.
In this embodiment, the subscription messages corresponding to the subscription message types and having the same number as the cumulative number of the message subscriptions constitute a subscription message set.
After acquiring the subscription message set corresponding to the message subscription accumulated data, the data pushing device sends a plurality of subscription messages in the subscription message set to the user terminal corresponding to the user identification information according to Token acquired from the data management device. The user can see the subscription message on an applet on the WeChat of the user terminal.
Token in this embodiment is also acquired by the data pushing device from the data management device. Specifically, after the sending the message subscription accumulated data to the data pushing device, the method further includes:
1) and receiving a Token acquisition request sent by the data pushing equipment, wherein the Token acquisition request comprises the identification information of the preset applet.
In this embodiment, after the data management device sends the message subscription accumulated data to the data push device, the data push device needs to query a subscription message and push the subscription message to the user terminal. When the message is pushed, a corresponding Token is needed, and after the Token is acquired, the data pushing device has the authority to push the message. Therefore, in this embodiment, after the data management device sends the message subscription accumulated data to the data pushing device, before the data pushing device sends the subscription message to the user terminal, the data pushing device needs to request Token from the data management device.
At this time, the data pushing device may send a Token obtaining request to the data management device, where the Token obtaining request includes the identification information of the preset applet.
2) And inquiring the Token corresponding to the identification information of the preset applet, and returning the Token to the data pushing equipment, so that the data pushing equipment sends a plurality of subscription messages in the subscription message set to the user terminal according to the Token.
The data management device, after receiving a Token acquisition request sent by a data push device, may query a locally stored correspondence between an applet and a Token to obtain a Token corresponding to the identification information of the preset applet, and return the Token to the data push device, so that the data push device sends a plurality of subscription messages in the subscription message set to the user terminal according to the Token.
It should be noted that, in the above embodiments, the data pushing device may be another server or processor different from the data management device. In addition, the data management device and the data push device may be integrated into the same server or processor, and at this time, the data management device is not required to send the message subscription accumulated data and the user identification information to the data push device, but the data management device directly obtains a subscription message set corresponding to the message subscription accumulated data, and sends a plurality of subscription messages in the subscription message set to the user terminal corresponding to the user identification information according to the Token obtained from the data management device.
In this embodiment, under the condition that a current time meets a preset message push rule, a message subscription operation data set and user identification information stored by a WeChat server are obtained, message subscription accumulated data of the preset applet are obtained through analysis according to the message subscription operation data set, the message subscription accumulated data and the user identification information are sent to data push equipment, so that the data push equipment obtains a subscription message set corresponding to the message subscription accumulated data, and a plurality of subscription messages in the subscription message set are sent to a user terminal corresponding to the user identification information according to a pre-obtained Token, wherein the subscription message set includes subscription messages corresponding to the types of the subscription messages and having the same number as the number of the message subscription accumulated times. In other words, in the invention, when the messages subscribed by the user are pushed, the number of the subscribed messages is the same as the accumulated number of the message subscriptions, that is, the number of the subscribed messages corresponding to the number of the message subscription operations executed by the user can be pushed according to the number of the message subscription operations executed by the user, each click operation when the user clicks the message subscription button for multiple times is correctly responded, and the user experience is improved.
It should be noted that, in the above embodiment, under the condition that a preset message pushing rule is satisfied at the current time, statistical analysis is performed to obtain message subscription accumulated data of the preset applet, and the message subscription accumulated data and the user identification information are sent to a data pushing device, so that the data pushing device obtains a subscription message set corresponding to the message subscription accumulated data, and sends a plurality of subscription messages in the subscription message set to a user terminal corresponding to the user identification information according to Token obtained from the data management device.
In addition, in order to avoid delay of message pushing, statistical analysis may be performed in advance to obtain the message subscription accumulated data of the preset applet, and the message subscription accumulated data and the user identification information are sent to a data pushing device, so that the data pushing device obtains a subscription message set corresponding to the message subscription accumulated data, caches the subscription message set in a cache of the data pushing device, such as redis, and stores the subscription message set in a database. The effective time of the data in the cache is set, the data in the cache is effective within the effective time, and the data in the cache is invalid outside the effective time.
When the current moment meets a preset message pushing rule, a data pushing instruction is directly sent to data pushing equipment, the instruction carries user identification information, the data pushing equipment inquires a cache whether a subscription message set corresponding to the user identification information exists or not, if yes, pushing is carried out, if no or cache data fails (the valid time is exceeded), at the moment, a database is required to be searched whether the data can be pushed or not, if yes, the valid time is reset, pushing is carried out, and if not, the data pushing is forbidden.
In the foregoing embodiment, the data pushing device sends a plurality of subscription messages in the subscription message set to the user terminal according to the Token, and in another implementation manner of the present invention, a process of generating a Token corresponding to the identification information of the preset applet is provided, with reference to fig. 3, the process specifically includes:
s21, receiving a Token generation request sent by the data pushing equipment.
The Token generation request includes identification information and key information of the preset applet.
In practical applications, in this embodiment, a data management device is used to uniformly manage public numbers and tokens (unique credentials allowing access by WeChat) of applets.
Referring to fig. 4, the user may send a Token generation request to the data management device by sending an email on the data push device. The Token generation request includes identification information of the preset applet, i.e., APPID of the applet, and key information (secret). The APPID and secret are automatically allocated to the applet when the applet is registered, are equivalent to the identity of the applet, and can be obtained by registering the applet and logging in the WeChat background to obtain the APPID and secret (key) in the setting.
And S22, calling a Token generation interface to send the Token generation request to the WeChat server.
S23, receiving Token information fed back by the WeChat server; the Token information comprises a Token corresponding to the identification information of the preset small program.
Specifically, the data management device requests, through an APPID and a secret of a preset applet, a Token generation interface (for example, a getAccessToken () interface), which accesses the WeChat server, so that the WeChat server queries whether an unexpired Access _ Token (an interface Access credential, called Token for short) exists in the database, and if so, returns a credential, and if not, requests the interface getAccessToken (), so that the WeChat server generates and returns a new Access _ Token (called Token for short) through the interface, and the Access _ Token (called Token for short) can be used as a specific content of Token information.
Besides generating the Access _ Token (Token for short), the wechat server may also determine a Token valid time of the Access _ Token (Token for short), that is, an expire _ in (credential valid duration).
After receiving the Token information fed back by the wechat server, the data management device may further calculate, according to the current time and the Token valid time, the expiration time of the Token, that is, the current time + expire _ in (certificate valid time), and store the expiration time and Access _ Token (Token for short), that is, the Token information in this embodiment may include, in addition to the Token corresponding to the identification information of the preset applet, the Token valid time of the Token.
After the Token information including the Token corresponding to the identification information of the preset applet and the Token information including the Token valid time of the Token are obtained, the Token information is returned to the data pushing device in an email mode, and the preset applet with the APPID can use the Token to push information.
In the above embodiment, since the Token valid time, that is, the expiry _ in (the credential valid time) is set for the Access _ Token (Token for short), the Token in this embodiment may have an expired condition, and when the Token is found to be expired, the Token needs to be updated. Referring to fig. 5, in this embodiment, the Token valid time is taken as 5 minutes for example.
The data management device sets a timing task, performs Token refreshing at a timing of 5 minutes, starts the timing task when the time is up, sends a Token updating request to the WeChat server, and the WeChat server returns an updated Access _ Token (called Token for short) and a corresponding Token valid time, namely, an expire _ in (certificate valid duration), and stores the data management device. And subsequently, if the data pushing device needs to use Token, sending a Token acquisition request to the data management device, where the Token acquisition request includes the identification information APPID of the preset applet, and the data management device queries and returns an available Access _ Token (referred to as Token for short).
In this embodiment, the data management platform interacts with the wechat server to obtain a Token corresponding to a preset applet, such as the wechat applet, and updates the Token at regular intervals, so that the Token management platform can receive a Token obtaining request including identification information of the wechat applet to be obtained, and then query and output the Token corresponding to the identification information of the wechat applet. According to the method and the system, the Token required by the WeChat applet is provided through the data management platform, and the Token is updated through interaction with the WeChat server at fixed time intervals, so that the operation burden of the WeChat server is reduced, and the probability of the situation that other services on the WeChat server cannot be handled in time due to the fact that the Token acquisition task amount is large is reduced.
In the above embodiment, the data management device is a timing update Token, and in order to avoid that Token has expired when it is returned to the data push device, it may be checked whether Token has expired when it is returned to the data push device, and when it is not expired, it may be returned to the data push device. If yes, a Token updating request is sent to the WeChat server, updated tokens fed back by the WeChat server and updated Token valid time are received, and the updated tokens are sent to the data pushing equipment. And (4) carrying out a specific updating process, see the corresponding contents above.
That is to say, querying a Token corresponding to the identification information of the preset applet, and returning the Token to the data pushing device includes:
and inquiring the Token corresponding to the identification information of the preset small program, determining whether the Token is overdue or not according to the expiration time, and returning the Token to the data pushing equipment under the condition of determining that the Token is not overdue.
And under the condition that the Token is determined to be out of date, sending a Token updating request to the WeChat server, receiving the updated Token fed back by the WeChat server and the updated Token valid time, and sending the updated Token to the data pushing equipment.
In this embodiment, before the Token is sent to the data pushing device, whether the Token is expired is determined, so that the condition that the data pushing device cannot correctly push data is avoided.
Optionally, on the basis of the above embodiment of the data pushing method applied to the data management device, another embodiment of the present invention provides a data pushing apparatus applied to the data management device, and with reference to fig. 6, the data pushing apparatus includes:
the information acquisition module 11 is configured to acquire a message subscription operation data set and user identification information stored by the WeChat server when a current time meets a preset message pushing rule; the message subscription operation data set comprises at least one message subscription operation data sent by the user terminal corresponding to the user identification information before the current moment; the message subscription operation data comprises a subscription message type of a preset small program and message subscription operation information;
the data analysis module 12 is configured to analyze, according to the message subscription operation data set, message subscription accumulated data of the preset applet, where the message subscription accumulated data includes a subscription message type and a message subscription accumulated number corresponding to the subscription message type;
the message pushing module 13 is configured to send the message subscription accumulated data and the user identification information to a data pushing device, so that the data pushing device obtains a subscription message set corresponding to the message subscription accumulated data, and sends a plurality of subscription messages in the subscription message set to a user terminal corresponding to the user identification information according to a Token obtained from the data management device;
the subscription message set comprises subscription messages which correspond to the subscription message types and are the same as the accumulated times of the message subscription.
Further, the data analysis module 12 includes:
the information screening submodule is used for screening out the message subscription operation information corresponding to the same subscription message type according to the message subscription operation data in the message subscription operation data set;
the number determining submodule is used for counting the number of the allowed subscription operation information in the message subscription operation information corresponding to the same subscription message type, and taking the number as the cumulative number of the message subscriptions corresponding to the subscription message type;
and the data determining submodule is used for determining the subscription message type and the message subscription accumulated times corresponding to the subscription message type as the message subscription accumulated data of the preset applet.
Further, the method also comprises the following steps:
the request receiving module is used for receiving a Token acquisition request sent by data pushing equipment, wherein the Token acquisition request comprises the identification information of the preset small program;
and the Token sending module is used for inquiring a Token corresponding to the identification information of the preset small program and returning the Token to the data pushing equipment so that the data pushing equipment sends a plurality of subscription messages in the subscription message set to the user terminal according to the Token.
Further, the system further comprises a Token generation module for generating a Token corresponding to the identification information of the preset applet.
The Token generation module comprises:
the request receiving submodule is used for receiving a Token generation request sent by the data pushing equipment; the Token generation request comprises identification information and key information of a preset small program;
the request sending submodule is used for calling a Token generation interface so as to send the Token generation request to the WeChat server;
the Token receiving submodule is used for receiving Token information fed back by the WeChat server; the Token information comprises a Token corresponding to the identification information of the preset small program.
Further, the Token information further includes Token valid time of the Token;
the data pushing device further comprises:
and the time calculation submodule is used for calculating and obtaining the expiration time of the Token according to the current time and the Token effective time after receiving the Token information fed back by the WeChat server.
Further, the Token sending module is specifically configured to:
and inquiring the Token corresponding to the identification information of the preset small program, determining whether the Token is overdue or not according to the expiration time, and returning the Token to the data pushing equipment under the condition of determining that the Token is not overdue.
Further, a Token updating sub-module is also included;
and the Token updating submodule is used for sending a Token updating request to the WeChat server under the condition that the Token is determined to be overdue, receiving the updated Token fed back by the WeChat server and the updated Token valid time, and sending the updated Token to the data pushing equipment.
In this embodiment, under the condition that a current time meets a preset message pushing rule, a message subscription operation data set and user identification information stored by a WeChat server are obtained, message subscription accumulated data of a preset applet are obtained through analysis according to the message subscription operation data set, the message subscription accumulated data and the user identification information are sent to a data pushing device, so that the data pushing device obtains a subscription message set corresponding to the message subscription accumulated data, and sends a plurality of subscription messages in the subscription message set to user terminals corresponding to the user identification information according to a pre-obtained Token, where the subscription message set includes subscription messages corresponding to the types of the subscription messages and having the same number as the number of the message subscription accumulated times. In other words, when the messages subscribed by the user are pushed, the subscription messages with the number equal to the accumulated number of the message subscriptions can be pushed, that is, the subscription messages with the corresponding number can be pushed according to the number of the message subscription operations executed by the user, each click operation when the user clicks the message subscription button for multiple times is correctly responded, the multiple click message operations of the user can be timely and effectively responded, and the user experience is improved.
It should be noted that, for the working processes of each module and sub-module in this embodiment, please refer to the corresponding description in the above embodiments, which is not described herein again.
Optionally, on the basis of the above embodiment of the data pushing method and apparatus applied to the data management device, another embodiment of the present invention provides an electronic device, where the electronic device in this embodiment may be the data management device, and the electronic device includes: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls a program and is used to:
under the condition that the current moment meets a preset message pushing rule, a message subscription operation data set and user identification information stored by a WeChat server are obtained; the message subscription operation data set comprises at least one message subscription operation data sent by the user terminal corresponding to the user identification information before the current moment; the message subscription operation data comprises a subscription message type of a preset applet and message subscription operation information;
analyzing and obtaining message subscription accumulated data of the preset small program according to the message subscription operation data set, wherein the message subscription accumulated data comprises a subscription message type and message subscription accumulated times corresponding to the subscription message type;
sending the message subscription accumulated data and the user identification information to data pushing equipment so that the data pushing equipment acquires a subscription message set corresponding to the message subscription accumulated data, and sending a plurality of subscription messages in the subscription message set to user terminals corresponding to the user identification information according to Token acquired from the data management equipment;
the subscription message set comprises subscription messages which correspond to the subscription message types and are the same as the accumulated times of the message subscription.
Further, the analyzing the message subscription accumulated data of the preset applet according to the message subscription operation data set includes:
according to the message subscription operation data in the message subscription operation data set, screening out message subscription operation information corresponding to the same subscription message type;
counting the number of allowed subscription operation information in the message subscription operation information corresponding to the same subscription message type, and taking the number as the cumulative number of message subscriptions corresponding to the subscription message type;
and determining the subscription message type and the message subscription accumulated times corresponding to the subscription message type as the message subscription accumulated data of the preset applet.
Further, after the sending the message subscription accumulated data to a data pushing device, the method further includes:
receiving a Token acquisition request sent by data pushing equipment, wherein the Token acquisition request comprises identification information of the preset small program;
and querying a Token corresponding to the identification information of the preset applet, and returning the Token to the data push equipment, so that the data push equipment sends a plurality of subscription messages in the subscription message set to the user terminal according to the Token.
Further, the generation process of Token corresponding to the identification information of the preset applet includes:
receiving a Token generation request sent by the data pushing equipment; the Token generation request comprises identification information and key information of a preset applet;
calling a Token generation interface to send the Token generation request to a WeChat server;
receiving Token information fed back by the WeChat server; the Token information comprises a Token corresponding to the identification information of the preset small program.
Further, the Token information further includes Token valid time of the Token;
after receiving the Token information fed back by the WeChat Server, the method further comprises the following steps:
and calculating the expiration time of the Token according to the current time and the effective time of the Token.
Further, the querying a Token corresponding to the identification information of the preset applet and returning the Token to the data pushing device includes:
inquiring the Token corresponding to the identification information of the preset small program, and determining whether the Token is expired according to the expiration time;
and returning the Token to the data pushing equipment under the condition that the Token is determined not to be expired.
Further, in the case that it is determined that Token is expired, the method further includes:
sending a Token updating request to the WeChat server;
receiving updated Token and updated Token valid time fed back by the WeChat server;
and sending the updated Token to a data pushing device.
In this embodiment, under the condition that a current time meets a preset message pushing rule, a message subscription operation data set and user identification information stored by a WeChat server are obtained, message subscription accumulated data of a preset applet are obtained through analysis according to the message subscription operation data set, the message subscription accumulated data and the user identification information are sent to a data pushing device, so that the data pushing device obtains a subscription message set corresponding to the message subscription accumulated data, and sends a plurality of subscription messages in the subscription message set to user terminals corresponding to the user identification information according to a pre-obtained Token, where the subscription message set includes subscription messages corresponding to the types of the subscription messages and having the same number as the number of the message subscription accumulated times. In other words, when the messages subscribed by the user are pushed, the subscription messages with the number equal to the accumulated number of the message subscriptions can be pushed, that is, the subscription messages with the corresponding number can be pushed according to the number of the message subscription operations executed by the user, each click operation when the user clicks the message subscription button for multiple times is correctly responded, the multiple click message operations of the user can be timely and effectively responded, and the user experience is improved.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data pushing method is applied to a data management device, and comprises the following steps:
under the condition that the current time meets a preset message pushing rule, a message subscription operation data set and user identification information stored by a WeChat server are obtained; the message subscription operation data set comprises at least one message subscription operation data sent by the user terminal corresponding to the user identification information before the current moment; the message subscription operation data comprises a subscription message type of a preset applet and message subscription operation information;
analyzing and obtaining message subscription accumulated data of the preset applet according to the message subscription operation data set, wherein the message subscription accumulated data comprises a subscription message type and message subscription accumulated times corresponding to the subscription message type;
sending the message subscription accumulated data and the user identification information to data pushing equipment so that the data pushing equipment acquires a subscription message set corresponding to the message subscription accumulated data, and sending a plurality of subscription messages in the subscription message set to a user terminal corresponding to the user identification information according to a Token acquired from the data management equipment;
the subscription message set comprises subscription messages which correspond to the subscription message types and are the same as the accumulated times of the message subscription.
2. The data pushing method according to claim 1, wherein the analyzing the message subscription accumulated data of the preset applet according to the message subscription operation data set includes:
screening out message subscription operation information corresponding to the same subscription message type according to the message subscription operation data in the message subscription operation data set;
counting the number of allowed subscription operation information in the message subscription operation information corresponding to the same subscription message type, and taking the number as the cumulative number of message subscriptions corresponding to the subscription message type;
and determining the subscription message type and the message subscription accumulated times corresponding to the subscription message type as the message subscription accumulated data of the preset applet.
3. The data pushing method according to claim 1, further comprising, after the sending the message subscription cumulative data to a data pushing device:
receiving a Token acquisition request sent by data pushing equipment, wherein the Token acquisition request comprises identification information of the preset small program;
and inquiring the Token corresponding to the identification information of the preset applet, and returning the Token to the data pushing equipment, so that the data pushing equipment sends a plurality of subscription messages in the subscription message set to the user terminal according to the Token.
4. The data pushing method according to claim 3, wherein the generating process of the Token corresponding to the identification information of the preset applet comprises:
receiving a Token generation request sent by the data pushing equipment; the Token generation request comprises identification information and key information of a preset applet;
calling a Token generation interface to send the Token generation request to a WeChat server;
receiving Token information fed back by the WeChat server; the Token information comprises a Token corresponding to the identification information of the preset small program.
5. The data pushing method according to claim 4, wherein the Token information further includes Token valid time of the Token;
after receiving the Token information fed back by the WeChat Server, the method further comprises the following steps:
and calculating the expiration time of the Token according to the current time and the effective time of the Token.
6. The data pushing method according to claim 5, wherein the querying for the Token corresponding to the identification information of the preset applet and returning the Token to the data pushing device includes:
inquiring the Token corresponding to the identification information of the preset small program, and determining whether the Token is expired or not according to the expiration time;
and returning the Token to the data pushing equipment under the condition that the Token is determined not to be expired.
7. The data pushing method according to claim 6, further comprising, in case that it is determined that the Token is expired:
sending a Token updating request to the WeChat server;
receiving updated Token and updated Token valid time fed back by the WeChat server;
and sending the updated Token to a data pushing device.
8. A data pushing device is applied to a data management device, and is characterized by comprising:
the information acquisition module is used for acquiring a message subscription operation data set and user identification information stored by the WeChat server under the condition that the current time meets a preset message pushing rule; the message subscription operation data set comprises at least one message subscription operation data sent by the user terminal corresponding to the user identification information before the current moment; the message subscription operation data comprises a subscription message type of a preset applet and message subscription operation information;
the data analysis module is used for analyzing and obtaining the message subscription accumulated data of the preset applet according to the message subscription operation data set, wherein the message subscription accumulated data comprises a subscription message type and the message subscription accumulated times corresponding to the subscription message type;
the message pushing module is used for sending the message subscription accumulated data and the user identification information to data pushing equipment so that the data pushing equipment acquires a subscription message set corresponding to the message subscription accumulated data and sends a plurality of subscription messages in the subscription message set to user terminals corresponding to the user identification information according to tokens acquired from the data management equipment;
the subscription message set comprises subscription messages which correspond to the subscription message types and are the same as the accumulated times of the message subscription.
9. The data pushing apparatus of claim 8, wherein the data analysis module comprises:
the information screening submodule is used for screening out the message subscription operation information corresponding to the same subscription message type according to the message subscription operation data in the message subscription operation data set;
the number determining submodule is used for counting the number of the allowed subscription operation information in the message subscription operation information corresponding to the same subscription message type, and taking the number as the cumulative number of the message subscriptions corresponding to the subscription message type;
and the data determining submodule is used for determining the subscription message type and the message subscription accumulated times corresponding to the subscription message type as the message subscription accumulated data of the preset applet.
10. An electronic device, comprising: a memory and a processor;
wherein the memory is used for storing programs;
the processor calls a program and is used to:
under the condition that the current time meets a preset message pushing rule, a message subscription operation data set and user identification information stored by a WeChat server are obtained; the message subscription operation data set comprises at least one message subscription operation data sent by the user terminal corresponding to the user identification information before the current moment; the message subscription operation data comprises a subscription message type of a preset small program and message subscription operation information;
analyzing and obtaining message subscription accumulated data of the preset applet according to the message subscription operation data set, wherein the message subscription accumulated data comprises a subscription message type and message subscription accumulated times corresponding to the subscription message type;
sending the message subscription accumulated data and the user identification information to data pushing equipment so that the data pushing equipment acquires a subscription message set corresponding to the message subscription accumulated data, and sending a plurality of subscription messages in the subscription message set to user terminals corresponding to the user identification information according to Token acquired from the data management equipment;
the subscription message set comprises subscription messages which correspond to the subscription message types and are the same as the accumulated times of the message subscription.
CN202110668749.3A 2021-06-16 2021-06-16 Data pushing method and device and electronic equipment Active CN113364670B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110668749.3A CN113364670B (en) 2021-06-16 2021-06-16 Data pushing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110668749.3A CN113364670B (en) 2021-06-16 2021-06-16 Data pushing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN113364670A CN113364670A (en) 2021-09-07
CN113364670B true CN113364670B (en) 2022-07-26

Family

ID=77534490

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110668749.3A Active CN113364670B (en) 2021-06-16 2021-06-16 Data pushing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN113364670B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116737405B (en) * 2022-10-24 2024-03-05 荣耀终端有限公司 Method for data communication of quick application card and related equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109977321A (en) * 2019-02-19 2019-07-05 平安科技(深圳)有限公司 Message center message content recommended method, device and computer readable storage medium
CN110100426A (en) * 2017-09-18 2019-08-06 深圳市云中飞网络科技有限公司 Subscribe to method and device, computer equipment, the computer storage medium of message

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9325648B2 (en) * 2012-08-09 2016-04-26 International Business Machines Corporation Message subscription based on message aggregate characteristics

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110100426A (en) * 2017-09-18 2019-08-06 深圳市云中飞网络科技有限公司 Subscribe to method and device, computer equipment, the computer storage medium of message
CN109977321A (en) * 2019-02-19 2019-07-05 平安科技(深圳)有限公司 Message center message content recommended method, device and computer readable storage medium

Also Published As

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

Similar Documents

Publication Publication Date Title
CN110166632B (en) Intelligent outbound call processing method and device, computer equipment and storage medium
US11159649B2 (en) Systems and methods of rate limiting for a representational state transfer (REST) application programming interface (API)
US7796742B1 (en) Systems and methods for simplified provisioning
CN107450903B (en) Information processing method and device
CN113364670B (en) Data pushing method and device and electronic equipment
CN111209060A (en) Capability development platform processing method and device
US8737960B2 (en) Interface system of subscriber information management, billing, prepaid system for mobile network system, and prepaid method using the interface system
CN112328760B (en) Service providing method, device and system
EP3410634A1 (en) Charging methods, access device and charging device
JP2002324194A (en) Method for managing access authority
CN107918617A (en) Data query method and apparatus
CN115914408A (en) Data analysis method and management method of short link information, and electronic device
CN107770234B (en) Message pushing method and device
WO2008110421A1 (en) A method, apparatus and computer program for capturing information on changes to a datastore
EP2490467A1 (en) Method and arrangement for registering a user
CN108694648B (en) Article interaction method, article identification registration method, system, device and storage medium
CN110727554A (en) Data monitoring method, device and system
US20220078289A1 (en) Method and device for handling subscription to a service in a communications network
CN101044779B (en) Interface architecture of subscriber information management, billing, prepaid system for mobile network system, and prepaid method using the interface architecture
CN110417919A (en) A kind of flow abduction method and device
CN110390535B (en) Customer complaint object determining method and device, electronic equipment and readable storage medium
CN113836402B (en) Order screening method based on data processing
CN114222002B (en) Service request processing method and device, storage medium and electronic equipment
EP4270240A1 (en) Cloud translation calling method, apparatus and system
CN114398582A (en) Method, computing device, and medium for acquiring access data

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 716, 7 / F, building 2, 28 Andingmen East Street, Dongcheng District, Beijing

Patentee after: Beijing Easy Yikang Information Technology Co.,Ltd.

Address before: Room 716, 7 / F, building 2, 28 Andingmen East Street, Dongcheng District, Beijing

Patentee before: BEIJING QINGSONGCHOU INFORMATION TECHNOLOGY Co.,Ltd.