CN115834675A - Data pushing method, electronic equipment and storage medium - Google Patents

Data pushing method, electronic equipment and storage medium Download PDF

Info

Publication number
CN115834675A
CN115834675A CN202211405818.2A CN202211405818A CN115834675A CN 115834675 A CN115834675 A CN 115834675A CN 202211405818 A CN202211405818 A CN 202211405818A CN 115834675 A CN115834675 A CN 115834675A
Authority
CN
China
Prior art keywords
client
push
data
condition
configuration 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.)
Pending
Application number
CN202211405818.2A
Other languages
Chinese (zh)
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.)
Pateo Connect Nanjing Co Ltd
Original Assignee
Pateo Connect Nanjing 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 Pateo Connect Nanjing Co Ltd filed Critical Pateo Connect Nanjing Co Ltd
Priority to CN202211405818.2A priority Critical patent/CN115834675A/en
Publication of CN115834675A publication Critical patent/CN115834675A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides a data pushing method, electronic equipment and a storage medium. The data pushing method comprises the following steps: a client initiates a first request for acquiring a configuration file to a content distribution network node, wherein the configuration file comprises configuration information corresponding to each piece of push data; the client receives the configuration file returned by the content distribution network node, and stores the configuration file to the local part of the client, wherein the configuration file is returned to the client by the content distribution network node in response to the update of the configuration file; the client analyzes the configuration file to obtain the configuration information; and the client determines whether to initiate a second request to the server according to a first preset pushing condition contained in the configuration information, wherein the second request is used for acquiring pushing data corresponding to the configuration information. According to the embodiment of the application, the resource consumption can be reduced, and the accuracy of data pushing can be improved.

Description

Data pushing method, electronic equipment and storage medium
Technical Field
The present application relates to the field of network technologies, and in particular, to a data pushing method, an electronic device, and a storage medium.
Background
With the rapid development of network technology, various data can be acquired from a server through a client, and the acquired data is displayed at the client for a client user to view.
At present, a common data acquisition method is to push data from a server to a client. In the prior art, a long link is generally established between a client and a server, and in the long link process, the server can push data to the client at any time through the long link.
However, in the method of establishing long-chain connection for data push, the server and the client need to maintain a long-time data link, so that resource consumption is high, and the server blindly pushes data to the client, which may also result in invalid data push.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present application provide a data pushing method, an electronic device, and a storage medium, which can reduce resource consumption and improve accuracy of data pushing.
According to an aspect of an embodiment of the present application, there is provided a data pushing method applied to a client, the method including: initiating a first request for acquiring a configuration file to a content distribution network node, wherein the configuration file comprises configuration information corresponding to each piece of push data; receiving the configuration file returned by the content distribution network node, and saving the configuration file to the local part of the client, wherein the configuration file is returned to the client by the content distribution network node in response to the update of the configuration file; analyzing the configuration file to obtain the configuration information; and determining whether to initiate a second request to the server according to a first preset pushing condition contained in the configuration information, wherein the second request is used for acquiring pushing data corresponding to the configuration information.
Optionally, the determining whether to initiate a second request to the server according to a first preset push condition included in the configuration information includes: determining the validity of the configuration information according to the first preset pushing condition; determining to initiate the second request to the server in response to the configuration information being valid.
Optionally, the first preset push condition includes a first push deadline condition and/or a first push limitation condition; the determining the validity of the configuration information according to the first preset push condition includes: under the condition that the first preset pushing condition comprises the first pushing deadline condition, acquiring current time, and determining that the configuration information is valid in response to the fact that the current time meets the first pushing deadline condition; and under the condition that the first preset pushing condition comprises the first pushing limiting condition, acquiring client information, and determining that the configuration information is valid in response to the fact that the client information meets the first pushing limiting condition.
Optionally, the obtaining client information, in response to that the client information satisfies the first push limitation condition, determining that the configuration information is valid includes: acquiring a client user level, and determining that the configuration information is valid in response to the client user level meeting the client user level limiting condition; the client user level limiting condition is used for limiting different push data configured for different client user levels so as to realize accurate push of the push data.
Optionally, the obtaining client information, in response to that the client information satisfies the first push limitation condition, determining that the configuration information is valid includes: acquiring a client user type, and determining that the configuration information is valid in response to the client user type meeting the client user type limiting condition; the client user type limiting condition is used for limiting the configuration of push data for the client user type with the authority so as to realize the safe push of the push data.
Optionally, the determining, by the obtaining client information, that the configuration information is valid in response to that the client information satisfies the first push limitation condition includes: acquiring the position of a client user, and determining that the configuration information is valid in response to the position of the client user meeting the position limiting condition of the client user; the client user position limiting condition is used for limiting different push data configured for different client user positions so as to realize the sub-area push of the push data.
Optionally, the method further comprises: in response to determining to initiate the second request to the server, calculating an initiation time of the second request; and initiating the second request to the server according to the initiation time.
Optionally, the calculating the initiation time of the second request includes: calculating a random time in a target time interval, and taking the random time as the initiation time of the second request; wherein the target time interval represents a time interval from a current time to a target time, and the target time represents a time that is a preset time period away from the current time.
According to another aspect of the embodiments of the present application, there is provided a data pushing method applied to a content distribution network node, the method including: in response to receiving a first request for acquiring a configuration file initiated by a client, determining whether the configuration file has an update; responding to the update of the configuration file, and returning the configuration file to the client, wherein the configuration file comprises configuration information corresponding to each piece of push data; the client receives the configuration file, stores the configuration file to the local client, analyzes the configuration file to obtain the configuration information, and determines whether to initiate a second request to a server according to a first preset pushing condition contained in the configuration information, wherein the second request is used for obtaining pushing data corresponding to the configuration information.
Optionally, the determining whether the configuration file has an update includes: determining whether the configuration file has an update of at least one of: adding configuration information of the push data, deleting the configuration information of the push data, and modifying the configuration information of the push data.
According to another aspect of the embodiments of the present application, there is provided a data pushing method applied to a server, the method including: generating a configuration file, and sending the configuration file to a content distribution network node, wherein the configuration file comprises configuration information corresponding to each piece of push data; so that the client initiates a first request for obtaining the configuration file to the content distribution network node; receiving the configuration file returned by the content distribution network node, and saving the configuration file to the local part of the client, wherein the configuration file is returned to the client by the content distribution network node in response to the update of the configuration file; analyzing the configuration file to obtain the configuration information; determining whether to initiate a second request to the server according to a first preset pushing condition contained in the configuration information, wherein the second request is used for acquiring pushing data corresponding to the configuration information; and pushing the push data corresponding to the configuration information to the client in response to receiving the second request initiated by the client.
Optionally, the pushing the pushed data corresponding to the configuration information to the client includes: acquiring a second preset pushing condition corresponding to the pushing data, and determining whether to push the pushing data to the client according to the second preset pushing condition; and responding to the fact that the pushing data are pushed to the client side, and pushing the pushing data to the client side.
Optionally, the second preset push condition includes a second push deadline condition and/or a second push limitation condition; the determining whether to push the push data to the client according to the second preset push condition includes: acquiring current time under the condition that the second preset pushing condition comprises the second pushing deadline condition, and determining to push the pushing data to the client in response to the fact that the current time meets the second pushing deadline condition; and under the condition that the second preset pushing condition comprises the second pushing limiting condition, acquiring client information contained in the second request, and determining to push the pushing data to the client in response to that the client information meets the second pushing limiting condition.
According to another aspect of embodiments of the present application, there is provided an electronic device including: one or more processors; and one or more computer-readable storage media having instructions stored thereon; the instructions, when executed by the one or more processors, cause the processors to perform the data push method as any one of above performed by a client, or the data push method as any one of above performed by a content distribution network node, or the data push method as any one of above performed by a server.
According to another aspect of embodiments of the present application, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, causes the processor to perform the data push method as any one of the above is performed by a client, or the data push method as any one of the above is performed by a content distribution network node, or the data push method as any one of the above is performed by a server.
In the embodiment of the application, the configuration information is established for the push data, the configuration information is integrated into the configuration file and is stored in the content distribution network node, the client acquires the configuration file from the content distribution network node and stores the configuration file to the local part of the client, so that the client can analyze the configuration information of the push data locally to determine whether to acquire the push data corresponding to the configuration information from the server. Therefore, on one hand, a long link does not need to be established between the client and the server, and only the client determines to establish a data link with the server after acquiring the push data from the server, so that the resource consumption can be reduced; on the other hand, the server does not push data to the client blindly, but the client analyzes the configuration information corresponding to the push data to obtain the push data really needed by the client from the server, so that the accuracy of data push can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are only some drawings of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a system configuration diagram according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating steps of a data pushing method according to an embodiment of the present application.
Fig. 3 is a flowchart illustrating steps of another data pushing method according to an embodiment of the present application.
Fig. 4 is a flowchart illustrating steps of another data pushing method according to an embodiment of the present application.
Fig. 5 is a flowchart illustrating a data pushing method according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments of the present application. 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 application.
It should be noted that all actions of acquiring signals, information or data in the present application are performed under the premise of complying with the corresponding data protection regulation policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
Referring to fig. 1, a system architecture diagram of an embodiment of the present application is shown. As shown in fig. 1, the system architecture includes a client, a Content Delivery Network (CDN) node, and a server. Wherein, a server can carry out two-way communication with a plurality of content distribution network nodes, and a content distribution network node can carry out two-way communication with a plurality of clients.
The server is used for managing the push data needing to be pushed to the client, analyzing the push data, establishing configuration information corresponding to each push data and generating a configuration file containing the configuration information corresponding to each push data. The server communicates with the content distribution network nodes and sends the configuration file to each content distribution network node.
The content distribution network node is used for managing the configuration file sent by the server. The content distribution network node communicates with the client and returns the latest configuration file to the client initiating the request when the client requests to acquire the configuration file. By storing the configuration file in the content distribution network node, the client acquires the configuration file from the content distribution network node, thereby reducing the access pressure of the server.
The client is used for acquiring the configuration file from the content distribution network node, storing the configuration file in the local of the client, and analyzing the configuration file in the local of the client, so as to determine whether to initiate a request for acquiring push data corresponding to the relevant configuration information to the server.
In the embodiment of the application, the configuration information is established for the push data, the configuration information is integrated into the configuration file and is stored in the content distribution network node, the client acquires the configuration file from the content distribution network node and stores the configuration file to the local part of the client, so that the client can analyze the configuration information of the push data locally to determine whether to acquire the push data corresponding to the configuration information from the server. Therefore, on one hand, a long link does not need to be established between the client and the server, and only the client determines to establish a data link with the server after acquiring the push data from the server, so that the resource consumption can be reduced; on the other hand, the server does not push data to the client blindly, but the client analyzes the configuration information corresponding to the push data to obtain the push data really needed by the client from the server, so that the accuracy of data push can be improved.
Hereinafter, a data push method of the embodiment of the present application will be described in detail.
Referring to fig. 2, a flowchart illustrating steps of a data pushing method according to an embodiment of the present application is shown. The data pushing method shown in fig. 2 is applied to the client.
As shown in fig. 2, the data pushing method may include the following steps:
step 201, a client initiates a first request for obtaining a configuration file to a content distribution network node, where the configuration file includes configuration information corresponding to each piece of push data.
The server is used for managing the push data needing to be pushed to each client.
In the embodiment of the application, the server may establish configuration information corresponding to each piece of push data for each piece of push data, and generate a configuration file including the configuration information corresponding to each piece of push data.
Illustratively, the configuration information corresponding to the push data may include, but is not limited to, at least one of: an Identification (ID) of the push data, a first preset push condition of the push data, etc. The first preset push condition of the push data indicates a condition which needs to be met when the client side obtains the push data. Details will be described later.
And after generating the configuration file, the server sends the configuration file to each content distribution network node connected with the server.
Illustratively, a long link may be established between the server and the content distribution network node, through which the server sends the configuration file to the content distribution network node; the server may also establish a data link with the content distribution network node when data needs to be sent to the content distribution network node, and send the configuration file to the content distribution network node through the data link, which is not limited in this embodiment of the present application.
After receiving the configuration file sent by the server, the content distribution network node locally stores the configuration file so that a subsequent client can acquire the configuration file from the content distribution network node.
The client may obtain the configuration file from the content delivery network node according to a preset rule. The preset rule may be obtained at a fixed time (for example, obtaining the configuration file every 15 minutes, and the like), or may be obtained in a preset time period (for example, obtaining the configuration file in a time period when the client is idle), and the like, which is not limited in this embodiment of the application.
When the client side obtains the configuration file, a first request is sent to the content distribution network node.
Illustratively, a long link may be established between the client and the content distribution network node, and the client initiates a first request to the content distribution network node through the long link; the client may also establish a data link with the content distribution network node when the first request needs to be initiated to the content distribution network node, and initiate the first request to the content distribution network node through the data link, which is not limited in the embodiment of the present application.
Wherein the first request is used for obtaining the configuration file. Illustratively, the following information may be included in the first request, but is not limited to: an identification of the client, first indication information for indicating to obtain the configuration file, and so on.
Step 202, the client receives the configuration file returned by the content distribution network node, and stores the configuration file to the local of the client.
After receiving a first request sent by a client, a content distribution network node analyzes the first request to obtain an identifier of the client, first indication information used for indicating to acquire a configuration file, and the like.
The content distribution network node determines whether the configuration file has an update according to the first indication information, and a specific update judgment process will be described in detail in the following embodiments. When the content distribution network node responds to the update of the configuration file, the configuration file is returned to the client according to the identification of the client; when the configuration file is not updated, the client acquires the current configuration file when the first request is initiated before and stores the current configuration file locally, so that the content distribution network node does not need to return the configuration file to the client.
After receiving the configuration file returned by the content distribution network node, the client can store the configuration file to the local part of the client.
It can be understood that, if the client currently stores a configuration file, it indicates that the configuration file received this time is updated with respect to the configuration file currently stored by the client, and therefore the client may replace the configuration file currently stored by using the configuration file received this time.
Step 203, the client analyzes the configuration file to obtain the configuration information.
After the client stores the received configuration file to the local client, the client locally analyzes the configuration file to obtain configuration information corresponding to each piece of push data contained in the configuration file.
Step 204, the client determines whether to initiate a second request to the server according to a first preset push condition included in the configuration information.
The client determines whether to initiate a second request to the server according to a first preset pushing condition contained in configuration information aiming at the configuration information corresponding to each piece of pushing data. And the second request is used for acquiring push data corresponding to the configuration information.
Illustratively, the following information may be included in the second request, but is not limited to: the client side identifier, the pushed data identifier corresponding to the configuration information, the second indication information for indicating acquisition of the pushed data corresponding to the configuration information, and the like.
In an optional implementation manner, the determining whether to initiate the second request to the server according to the first preset push condition included in the configuration information may include: determining the validity of the configuration information according to the first preset pushing condition; determining to initiate the second request to the server in response to the configuration information being valid. By the method, when the configuration information is valid, the client side meets the condition of acquiring the push data corresponding to the configuration information, namely the push data corresponding to the configuration information is valid data for the client side, so that the client side can be ensured to acquire the push data really required by the client side.
Illustratively, the first preset push condition may include, but is not limited to, at least one of: a first push deadline condition, a first push limit condition, etc.
The first push deadline condition is used for limiting the validity deadline of the client for acquiring the push data.
The determining, according to the first preset push condition, validity of the configuration information when the first preset push condition includes the first push deadline condition may include: and acquiring the current time, and determining that the configuration information is valid in response to the current time meeting the first push deadline condition.
Illustratively, the first push deadline restriction condition may be in the form of a time interval or the like. After obtaining the current time, the client may determine whether the current time is within a time interval of the first push deadline restriction condition, and determine that the configuration information is valid when the current time is within the time interval. For example, for push data related to dueleven activities, the first push deadline condition corresponding to the push data may be a time interval from 11 month 1 day to 11 month 11 day, and the like, which indicates that the push data is valid in the time interval from 11 month 1 day to 11 month 11 day. And if the current time is in the time interval from 11 months 1 to 11 months 11 days, determining that the configuration information is valid.
The first push limitation condition is used for limiting the effective condition of the client for acquiring the push data.
The process of determining the validity of the configuration information according to the first preset push condition when the first preset push condition includes the first push limiting condition may include: and acquiring client information, and determining that the configuration information is valid in response to the client information meeting the first push limiting condition.
Illustratively, the first push restriction condition may include, but is not limited to, at least one of: client user level restrictions, client user type restrictions, client user location restrictions, client user attribute restrictions, client terminal type restrictions, and the like.
And the client user level limiting condition is used for limiting different push data configured for different client user levels so as to enable the push data to be more targeted, thereby realizing accurate push of the push data.
In a case that the first push limiting condition includes a client user level limiting condition, obtaining client information, and determining that the configuration information is valid in response to that the client information satisfies the first push limiting condition may include: and acquiring a client user level, and determining that the configuration information is valid in response to the client user level meeting the client user level limiting condition.
Illustratively, the client user is divided into levels in advance, such as a high level, a medium level, a low level, and the like, and the embodiment is not limited to the specific level division. And configuring the client user level adapted to the push data in the configuration information corresponding to the push data as a client user level limiting condition. After the client acquires the client user level of the client, the client judges whether the acquired client user level belongs to the client user level which is configured in the configuration information and is adapted to the pushed data, if so, the acquired client user level meets the client user level limiting condition, and therefore, the configuration information can be determined to be effective.
And the client user type limiting condition is used for limiting the configuration of the push data for the client user type with the authority so as to push the corresponding push data to the client user type with the authority, thereby realizing the safe push of the push data.
In a case that the first push limiting condition includes a client user type limiting condition, obtaining client information, and determining that the configuration information is valid in response to that the client information satisfies the first push limiting condition may include: and acquiring the client user type, and determining that the configuration information is valid in response to the client user type meeting the client user type limiting condition.
Illustratively, the types are divided for the client user in advance, such as dividing into types of members, non-members, and the like, and the embodiment is not limited to the specific type division. And configuring the client user type adapted to the push data in the configuration information corresponding to the push data as a client user type limiting condition. After the client acquires the client user type of the client, the client judges whether the acquired client user type belongs to the client user type which is configured in the configuration information and is adaptive to the push data, if the acquired client user type belongs to the client user type, the acquired client user type meets the client user type limiting condition, and therefore the configuration information can be determined to be effective.
The client user position limiting condition is used for limiting different push data configured for different client user positions so as to realize the sub-region push of the push data.
A process of obtaining client information when the first push restriction condition includes a client user location restriction condition, and determining that the configuration information is valid in response to the client information satisfying the first push restriction condition may include: and acquiring the position of the client user, and determining that the configuration information is valid in response to the condition that the position of the client user meets the position limit condition of the client user.
For example, the location is divided in advance for the client user, for example, the location may be divided by taking province, city, district, county, and the like as dimensions, and the embodiment is not limited to the specific location division. And configuring the client user position (the position is in an area form) adapted to the push data in the configuration information corresponding to the push data as a client user position limiting condition. After the client acquires the client user position of the client, the client judges whether the acquired client user position belongs to the client user position which is configured in the configuration information and is adaptive to the push data, if the acquired client user position belongs to the client user position, the acquired client user position meets the client user position limiting condition, and therefore the configuration information can be determined to be effective.
And the client user attribute limiting condition is used for limiting different push data configured according to different client user attributes so as to enable the push data to be more targeted, thereby realizing accurate push of the push data.
In a case that the first push limiting condition includes a client user-level attribute condition, obtaining client information, and determining that the configuration information is valid in response to that the client information satisfies the first push limiting condition, the determining may include: and acquiring a client user attribute, and determining that the configuration information is valid in response to the client user attribute meeting the client user attribute limiting condition.
Illustratively, attributes are divided in advance for the client user, such as attributes of male, female, teenager, middle year, etc., and the embodiment is not limited to the specific attribute division. And configuring the client user attribute adapted to the push data in the configuration information corresponding to the push data as a client user attribute limiting condition. After the client acquires the client user attribute of the client, the client judges whether the acquired client user attribute belongs to the client user attribute which is configured in the configuration information and is adaptive to the push data, if the acquired client user attribute belongs to the client user attribute, the acquired client user attribute meets the client user attribute limiting condition, and therefore the configuration information can be determined to be effective.
The terminal type limiting conditions of the client are used for limiting different push data configured for different terminal types of the client, so that the push data is more targeted, and accurate push of the push data is achieved.
In a case that the first push limiting condition includes a terminal type limiting condition to which a client belongs, obtaining client information, and determining that the configuration information is valid in response to that the client information satisfies the first push limiting condition, the determining may include: and acquiring the type of the terminal to which the client belongs, and determining that the configuration information is valid in response to that the type of the terminal to which the client belongs meets the limitation condition of the type of the terminal to which the client belongs.
For example, the type of the terminal to which the client belongs is divided in advance, for example, the type division may be performed by using the terminal model as a dimension, and the specific level division is not limited in this embodiment. The terminal may be a mobile terminal, a car terminal, or the like. And configuring the terminal type of the client adapted to the push data in the configuration information corresponding to the push data as a limitation condition of the terminal type of the client. After the client acquires the terminal type to which the client of the client belongs, the client judges whether the acquired terminal type to which the client belongs to the terminal type to which the client adapted by the push data configured in the configuration information belongs, and if the acquired terminal type to which the client belongs meets the limitation condition of the terminal type to which the client belongs, the client can be determined to be valid.
After determining that the second request is initiated to the server, the client can establish a data link with the server, and initiate the second request to the server through the data link. After determining that the second request is not initiated to the server, the client does not need to establish a data link with the server.
In an optional implementation mode, considering that the number of the clients is large, if a large number of clients initiate the second request to the server at the same time, network congestion is easily caused, so that the clients are set to initiate the second request to the server in a wrong mode, the initiation time of the second request is dispersed, the concurrency of the server is reduced, and the pressure of the server is reduced.
Therefore, in response to determining that the second request is initiated to the server, the client may calculate initiation time of the second request, and initiate the second request to the server according to the calculated initiation time. In this way, each client can initiate the second request to the server according to the initiation time calculated by the client, so that the initiation time of each client is dispersed.
Illustratively, in order to ensure the dispersion of the initiation times, the client may calculate the initiation time of the second request by the following way: and calculating a random time in the target time interval, and taking the random time as the initiation time of the second request. Wherein the target time interval represents a time interval from a current time to a target time, and the target time represents a time that is a preset time period away from the current time. For the specific value of the preset time period, the embodiment of the present application is not limited, for example, the preset time period may be 10 minutes, and the like.
For example, in the embodiment of the present application, a random time may be calculated in the target time interval based on the shuffling algorithm. The shuffling algorithm is to scatter the original array to make a certain number of the original array appear at equal probability at each position in the scattered array, thereby solving the problem of randomly taking out unrepeated m numbers from n different numbers. In implementation, the calculation can be performed by using a Shuffle Algorithm such as Fisher-Yates Shuffle Algorithm, knuth-Durstenfeld Shuffle Algorithm, inde-Out Algorithm Algorithm, and the like. For the specific processing, the present embodiment will not be discussed in detail here.
And after receiving a second request initiated by the client, the server analyzes the second request to obtain the identifier and the second indication information of the client. And the server acquires the push data corresponding to the configuration information according to the second indication information and pushes the push data to the client according to the identification of the client.
And after receiving the push data returned by the server, the client can display the push data so that a user of the client can check the push data.
Referring to fig. 3, a flowchart illustrating steps of another data pushing method according to an embodiment of the present application is shown. The data push method shown in fig. 3 is applied to a content distribution network node.
As shown in fig. 3, the data pushing method may include the following steps:
in step 301, a content delivery network node determines whether a configuration file has an update in response to receiving a first request for acquiring the configuration file initiated by a client.
After the server generates the configuration file, the configuration file may be updated, and after the configuration file is updated, the server sends the updated configuration file to the content distribution network node.
The content distribution network node firstly determines whether the configuration file has updating or not in response to receiving a first request for acquiring the configuration file initiated by a client.
Illustratively, the content distribution network node may determine whether the profile is updated by at least one of: adding configuration information of the push data, deleting the configuration information of the push data, and modifying the configuration information of the push data.
The newly added configuration information of the push data means that the push data which does not exist is newly added, and then the configuration information corresponding to the push data is newly added. Deleting the configuration information of the push data means deleting the existing push data and further deleting the configuration information corresponding to the push data. Modifying the configuration information of the push data refers to modifying the configuration information corresponding to the existing push data, such as modifying the first push deadline condition, modifying the first push limitation condition, and so on.
Step 302, the content distribution network node returns the configuration file to the client in response to the configuration file having an update.
Referring to fig. 4, a flowchart illustrating steps of another data pushing method according to an embodiment of the present application is shown. The data push method shown in fig. 4 is applied to a server.
As shown in fig. 4, the data pushing method may include the following steps:
step 401, the server generates a configuration file and sends the configuration file to a content distribution network node.
Step 402, the server pushes the push data corresponding to the configuration information to the client in response to receiving the second request initiated by the client.
In an alternative embodiment, it is considered that the configuration file may have a configuration error, such as a first push deadline condition configuration error, a first push limit condition configuration error, and the like. Therefore, the server may also locally store target configuration information corresponding to each piece of push data in the server, where the target configuration information represents accurate configuration information corresponding to the push data, and after receiving the second request, the server may determine whether to push the push data corresponding to the configuration information to the client according to the accurate configuration information corresponding to the push data. It can be understood that, in the case that the configuration file is configured correctly, the configuration information corresponding to each piece of push data included in the configuration file is the same as the target configuration information corresponding to each piece of push data stored locally by the server.
Similar to the configuration information corresponding to the push data contained in the configuration file, the target configuration information corresponding to the push data may include, but is not limited to, at least one of the following: an Identification (ID) of the push data, a second preset push condition of the push data, etc. And under the condition that the configuration of the configuration file is correct, the first preset condition corresponding to the push data is the same as the second preset condition.
For example, the process of pushing, by the server, the push data corresponding to the configuration information to the client may include: acquiring a second preset pushing condition corresponding to the pushing data, and determining whether to push the pushing data to the client according to the second preset pushing condition; and responding to the fact that the pushing data are pushed to the client side, and pushing the pushing data to the client side. The server may further return a notification to the client to prohibit obtaining the push data in response to determining not to push the push data to the client.
Illustratively, similar to the first preset push condition described above, the second preset push condition may include, but is not limited to, at least one of: a second push deadline condition, a second push limit condition, and so on.
Determining whether to push the push data to the client according to the second preset push condition under the condition that the second preset push condition includes the second push deadline condition, wherein the determining includes: and acquiring the current time, and determining to push the push data to the client in response to the current time meeting the second push deadline condition.
Determining whether to push the push data to the client according to the second preset push condition under the condition that the second preset push condition includes the second push limiting condition, wherein the process includes: and acquiring client information contained in the second request, and determining to push the push data to the client in response to the client information meeting the second push limiting condition. In this case, the second request from the client to the server may include the client information for authentication by the server.
Illustratively, the second push restriction condition may include, but is not limited to, at least one of: client user level restrictions, client user type restrictions, client user location restrictions, client user attribute restrictions, restrictions on the type of terminal to which the client belongs, and so on. The specific processing procedure can refer to the related description of the above embodiments, and the embodiments are not discussed in detail here.
Next, a data push method is introduced based on the overall interactive process of the client, the content distribution network node, and the server.
Referring to fig. 5, a flowchart of a data pushing method according to an embodiment of the present application is shown.
As shown in fig. 5, the data pushing method includes the following processes:
1. the server sends the configuration file to the content distribution network node.
2. The client initiates a first request for obtaining the configuration file to the content distribution network node.
3. The content delivery network node returns the configuration file to the client in response to the configuration file having an update.
4. And the client receives the configuration file and stores the configuration file to the local part of the client.
5. The client analyzes the configuration file to obtain the configuration information, and determines whether to initiate a second request for acquiring push data corresponding to the configuration information to the server according to the configuration information.
6. The client, in response to determining to initiate the second request to the server, calculates an initiation time of the second request.
7. And the client initiates a second request to the server according to the initiation time of the second request.
8. The server determines whether to return the push data to the client.
9. And the server responds to the determination that the push data is returned to the client, and pushes the push data to the client.
10. And the client receives the push data and displays the push data.
In the embodiment of the application, the configuration information is established for the push data, the configuration information is integrated into the configuration file and is stored in the content distribution network node, the client side obtains the configuration file from the content distribution network node and stores the configuration file to the local part of the client side, and therefore the client side can analyze the configuration information of the push data locally so as to determine whether to obtain the push data corresponding to the configuration information from the server or not. Therefore, on one hand, a long link does not need to be established between the client and the server, and only the client determines to establish a data link with the server after acquiring the push data from the server, so that the resource consumption can be reduced; on the other hand, the server does not push data to the client blindly, but the client analyzes the configuration information corresponding to the push data to obtain the push data really needed by the client from the server, so that the accuracy of data push can be improved.
In an embodiment of the application, an electronic device is also provided. The electronic device may include one or more processors and one or more computer-readable storage media having instructions, such as an application program, stored thereon. The instructions, when executed by the one or more processors, cause the processors to perform the data push method as any one of above performed by a client, or the data push method as any one of above performed by a content distribution network node, or the data push method as any one of above performed by a server.
Fig. 6 shows a schematic structural diagram of an electronic device 600 according to an embodiment of the present application. As shown in fig. 6, electronic device 600 includes a Central Processing Unit (CPU) 601 that can perform various appropriate actions and processes according to computer program instructions stored in a Read Only Memory (ROM) 602 or loaded from a storage Unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 can also be stored. The CPU601, ROM 602, and RAM 603 are connected to each other via a bus 604. An Input/Output (I/O) interface 605 is also connected to bus 604.
Various components in the electronic device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, a microphone, and the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The various processes and processes described above may be performed by processing unit 601. For example, the data pushing method of any of the above embodiments may be implemented as a computer software program tangibly embodied in a computer-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into RAM 603 and executed by CPU601, one or more acts of the data push methods described above may be performed.
In an embodiment of the application, there is also provided a computer readable storage medium, on which a computer program is stored, the program being executable by a processor of an electronic device, the computer program, when executed by the processor, causing the processor to perform the data push method as described above as being performed by a client, or the data push method as described above as being performed by a content distribution network node, or the data push method as described above as being performed by a server.
The aforementioned processors may include, but are not limited to: a CPU, a Network Processor (NP), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, a discrete hardware component, and so on.
The above-mentioned computer-readable storage media may include, but are not limited to: ROM, RAM, compact Disc Read Only Memory (CD-ROM), electrically Erasable Programmable Read Only Memory (EEPROM), hard disks, floppy disks, flash Memory, and the like.
The embodiments in the present specification are all described in a progressive manner, and each embodiment focuses on differences from other embodiments, and portions that are the same and similar between the embodiments may be referred to each other.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrases "comprising one of \ 8230; \8230;" does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM, RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed in the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. In view of the above, the description should not be taken as limiting the application.

Claims (15)

1. A data pushing method is applied to a client, and comprises the following steps:
initiating a first request for acquiring a configuration file to a content distribution network node, wherein the configuration file comprises configuration information corresponding to each piece of push data;
receiving the configuration file returned by the content distribution network node, and saving the configuration file to the local part of the client, wherein the configuration file is returned to the client by the content distribution network node in response to the update of the configuration file;
analyzing the configuration file to obtain the configuration information;
and determining whether to initiate a second request to the server according to a first preset pushing condition contained in the configuration information, wherein the second request is used for acquiring pushing data corresponding to the configuration information.
2. The method of claim 1, wherein the determining whether to initiate the second request to the server according to the first preset push condition included in the configuration information comprises:
determining validity of the configuration information according to the first preset push condition;
determining to initiate the second request to the server in response to the configuration information being valid.
3. The method according to claim 2, wherein the first preset push condition comprises a first push deadline condition and/or a first push limitation condition; the determining the validity of the configuration information according to the first preset push condition includes:
under the condition that the first preset pushing condition comprises the first pushing deadline condition, acquiring current time, and determining that the configuration information is valid in response to the fact that the current time meets the first pushing deadline condition;
and under the condition that the first preset pushing condition comprises the first pushing limiting condition, acquiring client information, and determining that the configuration information is valid in response to the fact that the client information meets the first pushing limiting condition.
4. The method of claim 3, the first push constraint comprising a client user level constraint, the obtaining client information, responsive to the client information satisfying the first push constraint, determining that the configuration information is valid, comprising:
acquiring a client user level, and determining that the configuration information is valid in response to the client user level meeting the client user level limiting condition;
the client user level limiting condition is used for limiting different push data configured for different client user levels so as to realize accurate push of the push data.
5. The method of claim 3, the first push constraint comprising a client user type constraint, the obtaining client information, responsive to the client information satisfying the first push constraint, determining that the configuration information is valid, comprising:
acquiring a client user type, and determining that the configuration information is valid in response to the client user type meeting the client user type limiting condition;
the client user type limiting condition is used for limiting the configuration of push data for the client user type with the authority so as to realize the safe push of the push data.
6. The method of claim 3, the first push constraints comprising client user location constraints, the obtaining client information, in response to the client information satisfying the first push constraints, determining that the configuration information is valid, comprising:
acquiring the position of a client user, and determining that the configuration information is valid in response to the position of the client user meeting the position limiting condition of the client user;
the client user position limiting condition is used for limiting different push data configured for different client user positions so as to realize the sub-area push of the push data.
7. The method of claim 1, further comprising:
in response to determining to initiate the second request to the server, calculating an initiation time of the second request;
and initiating the second request to the server according to the initiation time.
8. The method of claim 7, the calculating an initiation time of the second request, comprising:
calculating a random time in a target time interval, and taking the random time as the initiation time of the second request;
wherein the target time interval represents a time interval from a current time to a target time, and the target time represents a time that is a preset time period away from the current time.
9. A data pushing method applied to a content distribution network node, the method comprising:
in response to receiving a first request for acquiring a configuration file initiated by a client, determining whether the configuration file has an update;
responding to the update of the configuration file, and returning the configuration file to the client, wherein the configuration file comprises configuration information corresponding to each piece of push data; the client receives the configuration file, stores the configuration file to the local client, analyzes the configuration file to obtain the configuration information, and determines whether to initiate a second request to a server according to a first preset pushing condition contained in the configuration information, wherein the second request is used for obtaining pushing data corresponding to the configuration information.
10. The method of claim 9, the determining whether there is an update to the profile, comprising:
determining whether the configuration file has an update of at least one of: adding configuration information of the push data, deleting the configuration information of the push data, and modifying the configuration information of the push data.
11. A data pushing method is applied to a server, and the method comprises the following steps:
generating a configuration file, and sending the configuration file to a content distribution network node, wherein the configuration file comprises configuration information corresponding to each piece of push data; so that the client initiates a first request for obtaining the configuration file to the content distribution network node; receiving the configuration file returned by the content distribution network node, and saving the configuration file to the local part of the client, wherein the configuration file is returned to the client by the content distribution network node in response to the update of the configuration file; analyzing the configuration file to obtain the configuration information; determining whether to initiate a second request to the server according to a first preset pushing condition contained in the configuration information, wherein the second request is used for acquiring pushing data corresponding to the configuration information;
and pushing the push data corresponding to the configuration information to the client in response to receiving the second request initiated by the client.
12. The method of claim 11, wherein the pushing the push data corresponding to the configuration information to the client includes:
acquiring a second preset pushing condition corresponding to the pushing data, and determining whether to push the pushing data to the client according to the second preset pushing condition;
and responding to the fact that the pushed data are pushed to the client side, and pushing the pushed data to the client side.
13. The method according to claim 12, wherein the second preset push condition comprises a second push deadline condition and/or a second push limitation condition; the determining whether to push the push data to the client according to the second preset push condition includes:
acquiring current time under the condition that the second preset pushing condition comprises the second pushing deadline condition, and determining to push the pushing data to the client in response to the fact that the current time meets the second pushing deadline condition;
and under the condition that the second preset pushing condition comprises the second pushing limiting condition, acquiring client information contained in the second request, and determining to push the pushing data to the client in response to that the client information meets the second pushing limiting condition.
14. An electronic device, comprising:
one or more processors; and
one or more computer-readable storage media having instructions stored thereon;
the instructions, when executed by the one or more processors, cause the processors to perform a data push method as claimed in any one of claims 1 to 8, or perform a data push method as claimed in any one of claims 9 to 10, or perform a data push method as claimed in any one of claims 11 to 13.
15. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor, causes the processor to execute a data push method according to any one of claims 1 to 8, or to execute a data push method according to any one of claims 9 to 10, or to execute a data push method according to any one of claims 11 to 13.
CN202211405818.2A 2022-11-10 2022-11-10 Data pushing method, electronic equipment and storage medium Pending CN115834675A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211405818.2A CN115834675A (en) 2022-11-10 2022-11-10 Data pushing method, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211405818.2A CN115834675A (en) 2022-11-10 2022-11-10 Data pushing method, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115834675A true CN115834675A (en) 2023-03-21

Family

ID=85527572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211405818.2A Pending CN115834675A (en) 2022-11-10 2022-11-10 Data pushing method, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115834675A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116389593A (en) * 2023-04-17 2023-07-04 阿里巴巴(中国)有限公司 Resource configuration method, system and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116389593A (en) * 2023-04-17 2023-07-04 阿里巴巴(中国)有限公司 Resource configuration method, system and electronic equipment
CN116389593B (en) * 2023-04-17 2024-01-23 阿里巴巴(中国)有限公司 Resource configuration method, system and electronic equipment

Similar Documents

Publication Publication Date Title
US20180121322A1 (en) Methods and Systems for Testing Versions of Applications
CN110049087B (en) Credibility verification method, system, device and equipment of alliance chain
US11303642B2 (en) Dynamic management of consent and permissioning between executed applications and programmatic interfaces
US10299191B2 (en) Method and device for establishing wireless connection
CN109671205B (en) Voting method, device and equipment based on block chain and computer storage medium
CN108769230B (en) Transaction data storage method, device, server and storage medium
CN109766349B (en) Task duplicate prevention method, device, computer equipment and storage medium
US20200257749A1 (en) Method and a device for friend recommendation
EP3817333B1 (en) Method and system for processing requests in a consortium blockchain
CN107547548B (en) Data processing method and system
CN112818014B (en) Block chain data analysis method and device and electronic equipment
CN113645310A (en) Data current limiting method and device, electronic equipment and readable storage medium
CN115834675A (en) Data pushing method, electronic equipment and storage medium
CN110689218A (en) Risk user identification method and device, computer equipment and storage medium
CN111447069A (en) Low-frequency access data processing method based on block chain
JP2012146083A (en) Session management system, session management apparatus, server device and session management method
CN110781153B (en) Cross-application information sharing method and system based on block chain
CN107809363A (en) A kind of spreading network information control method and device
CN114827168A (en) Alarm aggregation reporting method and device, computer equipment and storage medium
CN110941672A (en) Household registration management method, device, equipment and storage medium
JP2023509827A (en) Prevent data manipulation and protect user privacy when determining accurate location event measurements
CN116701787A (en) Cloud-based destination recommendation method, device and storage medium
WO2015096791A1 (en) Method and system for releasing media content
CN106339376B (en) Method and device for identifying hot microblog
CN113849802A (en) Equipment authentication method and device, 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