CN104601527B - Data filtering method and device - Google Patents

Data filtering method and device Download PDF

Info

Publication number
CN104601527B
CN104601527B CN201310533219.3A CN201310533219A CN104601527B CN 104601527 B CN104601527 B CN 104601527B CN 201310533219 A CN201310533219 A CN 201310533219A CN 104601527 B CN104601527 B CN 104601527B
Authority
CN
China
Prior art keywords
data
terminal
dll
filtering
subscription 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
CN201310533219.3A
Other languages
Chinese (zh)
Other versions
CN104601527A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201310533219.3A priority Critical patent/CN104601527B/en
Publication of CN104601527A publication Critical patent/CN104601527A/en
Application granted granted Critical
Publication of CN104601527B publication Critical patent/CN104601527B/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
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • 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/52User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail for supporting social networking services

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a data filtering method and device, and belongs to the technical field of data processing. The method comprises the following steps: filtering the data packet according to the determined data filtering condition corresponding to each data receiving terminal to obtain a data filtering result corresponding to each data receiving terminal; and sending each data filtering result to a corresponding data receiving terminal. According to the data filtering method and the data filtering device, after the data packet is received and the data receiving terminal corresponding to the data packet is determined according to the subscription information, the data packet is filtered through the data filtering condition corresponding to each data receiving terminal, and the obtained data filtering result is sent to the corresponding data receiving terminal, so that the purpose that a user at the side of the data receiving terminal does not need to filter the data packet according to the self requirement is achieved, therefore, the data filtering mode is high in intelligence and convenience, and the user experience degree is improved.

Description

Data filtering method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a method and an apparatus for filtering data.
Background
With the continuous development of information technology, social networking platforms such as microblogs are favored by a large number of users. Because the number of users registered on the social networking platform is huge, the background of the social networking platform needs to forward data for the registered users in huge quantity and in various types, which undoubtedly increases the burden of the background of the social networking platform. And the data requirements of different users may be different, even for the same type of data, the required parts of each user are different. Therefore, how to filter data in order to reduce the burden of the background of the social networking platform and quickly enable each user to acquire the required data becomes a problem that people in the field pay attention to.
In the prior art, a background of a social networking platform includes a relay system, and after receiving a data packet sent by a data generation terminal, the relay system determines all receiving terminals of the data packet according to subscription information stored in the relay system; and then, forwarding the data packet to corresponding data receiving terminals. After each data receiving terminal receives the data packet, the user at each data receiving terminal side filters the data packet according to the self requirement to obtain the required data part.
In the process of implementing the invention, the inventor finds that the prior art has at least the following problems:
because one data packet needs to be forwarded by the forwarding system for multiple times, that is, the forwarding system needs to forward for multiple times for how many users subscribing to the data packet, and the total data amount of one data packet is large, the load of the forwarding system is increased; in addition, because the user at the data receiving terminal side needs to filter the data packet according to the self requirement, the intelligence and the convenience of the data filtering mode are not high, a large amount of time is consumed, and the user experience degree is low.
Disclosure of Invention
In order to solve the problems in the prior art, embodiments of the present invention provide a method and an apparatus for data filtering. The technical scheme is as follows:
in one aspect, a method of data filtering is provided, the method comprising:
receiving a data packet sent by a data generation terminal, and determining a corresponding data receiving terminal according to the stored subscription information;
filtering the data packet according to the determined data filtering condition corresponding to each data receiving terminal to obtain a data filtering result corresponding to each data receiving terminal;
and sending each data filtering result to a corresponding data receiving terminal.
In another aspect, an apparatus for data filtering is provided, the apparatus comprising:
the first receiving module is used for receiving a data packet sent by the data generation terminal;
the determining module is used for determining the corresponding data receiving terminal according to the stored subscription information;
the filtering module is used for filtering the data packet received by the first receiving module according to the data filtering condition corresponding to each data receiving terminal determined by the determining module to obtain a data filtering result corresponding to each data receiving terminal;
and the sending module is used for sending each data filtering result obtained by the filtering module to the corresponding data receiving terminal.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
after a data packet sent by a data generation terminal is received and a data receiving terminal corresponding to the data packet is determined according to stored subscription information, the data packet is filtered through the determined data filtering conditions corresponding to each data receiving terminal, and the obtained data filtering results are sent to the corresponding data receiving terminals, so that the purpose that a user at the side of the data receiving terminal does not need to filter the data packet according to the self requirement is achieved, therefore, the data filtering mode is higher in intelligence and convenience, the time of the user at the side of the data receiving terminal is saved, and the user experience is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic block diagram of an implementation environment provided by an embodiment of the invention;
FIG. 2 is a flow chart of a method for filtering data according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for filtering data according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data filtering apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic diagram of an internal structure of a filter module according to a third embodiment of the present invention;
FIG. 6 is a schematic structural diagram of another data filtering apparatus according to a third embodiment of the present invention;
fig. 7 is a schematic diagram of an internal structure of a building module according to a third embodiment of the present invention;
FIG. 8 is a schematic structural diagram of another data filtering apparatus according to a third embodiment of the present invention;
fig. 9 is a schematic structural diagram of a server according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Referring to fig. 1, a schematic structural diagram of a specific implementation environment involved in the method for filtering data according to the embodiment of the present invention is shown. The implementation environment comprises a data generation terminal, a transfer system, a secondary filtering system and a data receiving terminal. The data generating terminal is used for generating a data packet and sending the generated data packet to the transfer system; the transfer system is used for receiving the data packets sent by each data generation terminal and forwarding the received data packets to the secondary filtering system; and the secondary filtering system is used for receiving each data packet forwarded by the transfer system, determining a data receiving terminal corresponding to each data packet according to the stored subscription information, filtering each data packet according to the data filtering condition corresponding to each data receiving terminal, and sending each obtained data filtering result to the data receiving terminal corresponding to each data filtering result.
Example one
In conjunction with the implementation environment shown in fig. 1, an embodiment of the present invention provides a method for filtering data, and referring to fig. 2, a flow of the method provided by the embodiment of the present invention includes:
201: receiving a data packet sent by a data generation terminal, and determining a corresponding data receiving terminal according to the stored subscription information;
202: filtering the data packet according to the determined data filtering condition corresponding to each data receiving terminal to obtain a data filtering result corresponding to each data receiving terminal;
further, the data packet is filtered according to the determined data filtering condition corresponding to each data receiving terminal, including but not limited to:
calling a Dynamic Link Library (DLL) pre-established for each data receiving terminal, wherein the DLL at least comprises a data filtering condition function and a data filtering function; the data filtering condition function defines a data filtering condition corresponding to the data receiving terminal;
judging whether the data packet meets the data filtering condition of the corresponding DLL or not according to the data filtering condition function of the DLL corresponding to each data receiving terminal;
and if the data packet meets the data filtering condition of the corresponding DLL, calling a data filtering function of the corresponding DLL to filter the data packet.
Further, before invoking DLLs pre-established for the respective data receiving terminals, the method further includes:
establishing a DLL for a terminal corresponding to each subscription information;
invoking a DLL pre-established for each data receiving terminal, comprising:
and acquiring a DLL corresponding to each data receiving terminal from the DLLs established for the terminals corresponding to each subscription information, and calling the acquired DLLs corresponding to the data receiving terminals.
Further, a dynamic link library DLL is established for each terminal corresponding to the subscription information, including but not limited to:
receiving subscription information sent by each terminal, wherein the subscription information at least comprises a data filtering condition of each terminal;
and establishing a DLL for the terminal corresponding to each subscription information according to the subscription information of each terminal.
Further, after the DLL is established for each terminal corresponding to the subscription information, the method further includes:
receiving new subscription information sent by any terminal, wherein the new subscription information at least comprises a new data filtering condition of any data receiving terminal;
and updating the DLL corresponding to any terminal according to the new subscription information.
203: and sending each data filtering result to a corresponding data receiving terminal.
According to the method provided by the embodiment of the invention, after the data packet sent by the data generation terminal is received and the data receiving terminal corresponding to the data packet is determined according to the stored subscription information, the data packet is filtered through the determined data filtering condition corresponding to each data receiving terminal, and the obtained data filtering result is sent to the corresponding data receiving terminal, so that the purpose that a user at the side of the data receiving terminal does not need to filter the data packet according to the self requirement is achieved, therefore, the intelligence and the convenience of the data filtering mode are higher, the time of the user at the side of the data receiving terminal is saved, and the user experience degree is improved; in addition, because only the data packets filtered according to the corresponding data filtering conditions are sent to each data receiving terminal, the load of the system is greatly reduced; and the corresponding DLL can be updated in real time according to the actual requirements of the user at the data receiving terminal side, so that the flexibility of the data filtering mode is high.
Example two
With reference to the implementation environment shown in fig. 1 and the content of the first embodiment, an embodiment of the present invention provides a method for filtering data, and referring to fig. 3, a flow of the method provided by the embodiment of the present invention includes:
301: establishing a DLL for a terminal corresponding to each subscription information, wherein each DLL at least comprises a data filtering condition function and a data filtering function; the data filtering condition function defines the data filtering condition corresponding to the terminal;
for this step, in order to accurately filter the received data packets according to the actual requirements of the user at the data receiving terminal side in the following step, before filtering the received data packets, the method provided in this embodiment further includes a step of establishing a DLL for the terminal corresponding to each subscription information. Wherein, each DLL includes contents including but not limited to a data filtering condition function and a data filtering function; the data filter condition function is used for explaining data filter conditions, and the data filter function is used for filtering the data packets.
Further, the specific implementation manner of establishing the DLL for the terminal corresponding to each subscription information includes, but is not limited to, the following manners:
receiving subscription information sent by each terminal, wherein the subscription information at least comprises a data filtering condition of each terminal;
and establishing a DLL for the terminal corresponding to each subscription information according to the subscription information of each terminal.
The subscription information sent by each terminal may include other contents besides the data filtering condition. For example, the generation time of the subscription information, the IP (Internet Protocol) address of the terminal, and the like, and the content included in the subscription information is not particularly limited in this embodiment. The data filtering condition may specifically be a field containing "entertainment news" or "news-feeds". Of course, the data filtering condition may also include other contents, such as "grass root news", "child care news", and the like, and the content included in the data filtering information is also not specifically limited in this embodiment.
It should be noted that, because there are a large number of users on the terminal side, and actual demands of different users for data are different, subscription information sent by different terminals may be the same or different. In order to determine what type of subscription information each terminal sends, each terminal can carry its own IP address when sending the subscription information, so that after receiving the subscription information sent by each terminal, the secondary filtering system can determine the terminal corresponding to any subscription information according to any subscription information, and can store the corresponding relationship between each subscription information and each terminal, thereby facilitating the use in the following steps. In addition, since the subscription information carries the data filtering condition, the specific data packets meeting the data filtering condition can be filtered in the subsequent steps according to the data filtering condition, that is, each subscription information corresponds to the specific data packets meeting the data filtering condition contained therein. Taking the example that the data filtering condition included in any subscription information is "foreign entertainment news", if the currently received data packet is a data packet covering "entertainment news", it can be determined that the subscription information corresponds to the data packet, and the data packet can be filtered in the subsequent process according to the data filtering condition included in the subscription information.
Further, when a DLL is established for each terminal according to the subscription information of each terminal, a data filtering condition function and a data filtering function, such as those shown below, may be specifically established:
extern"C"
{
int InitFilter (std: string szRule); data Filter Condition function to illustrate Filter conditions +
int ProcFilter (std:: map < unknown int, const std:: string > stTLVMap); a data filtering function for performing data filtering based on the data filtering condition
}
It should be noted that, when the method provided in this embodiment is executed, the step of establishing the DLL for the terminal corresponding to each subscription information does not need to be executed each time, that is, the step may be directly skipped when the method provided in this embodiment is executed again subsequently. If and only if subscription information of a new terminal is received, this step needs to be performed again. In addition, when a user at the terminal wants to modify the subscription information, the method provided in this embodiment further includes the following steps after the DLL is established for the terminal corresponding to each subscription information: receiving new subscription information sent by any terminal, wherein the new subscription information at least comprises a new data filtering condition of any terminal; and directly updating the DLL corresponding to any terminal according to the new subscription information. Therefore, the DLL corresponding to the terminal can be updated in real time according to the actual requirements of the user at the terminal side, and the method is convenient and quick and has high flexibility.
302: receiving a data packet sent by a data generation terminal, and determining a corresponding data receiving terminal according to the stored subscription information;
for this step, specific implementation manners of receiving the data packet sent by the data generation terminal include, but are not limited to, the following manners:
and receiving a data packet which is transmitted to the transit system by the data generation terminal forwarded by the transit system.
Of course, in addition to the above-described manner of receiving the data packet transmitted by the data generation terminal, other receiving manners may be adopted, which is not particularly limited in this embodiment.
In addition, because the actual demands of the users at different terminal sides for data are different, after receiving a data packet sent by a data generation terminal, it may not be necessary to send the data packet to all terminals, and it makes sense to send the data packet to only a terminal subscribed with the type of data packet, so after receiving a data packet, it is necessary to determine a data receiving terminal corresponding to the data packet, that is, a terminal subscribed with the type of data packet. And determining a receiving terminal corresponding to any data packet according to the stored subscription information and the corresponding relationship between each subscription information and each terminal, and in the specific implementation, generating a corresponding relationship table of each subscription information and each terminal such as table 1 in advance, after receiving a data packet and determining the content covered by the data packet, determining which subscription information can filter the data packet according to the data filtering condition included by each subscription information, and determining the terminal corresponding to each subscription information which can filter the data packet as the data receiving terminal corresponding to the data packet.
TABLE 1
Subscription information Terminal device
Subscription information 1 Terminal 1, terminal 2, terminal 3
Subscription information 2 Terminal 4, terminal 5, terminal 6
Subscription information 3 Terminal 7, terminal 8
Subscription information 4 Terminal 9, terminal 10
The following description will be given, by taking table 1 as an example, of a procedure of determining a corresponding data receiving terminal from the stored subscription information by a specific example.
Taking the example that subscription information sent by 10 terminals is received, wherein subscription information 1 corresponding to terminals 1 to 3 is "news about the current affairs", subscription information 2 corresponding to terminals 4 to 6 is "weather forecast", subscription information 3 corresponding to terminals 7 and 8 is "domestic entertainment news", and subscription information 4 corresponding to terminals 9 and 10 is "foreign entertainment news", if a currently received data packet is a data packet covering "entertainment news", by querying table 1, it can be determined that data receiving terminals of the currently received data packet are 2 terminals corresponding to subscription information 3 as "domestic entertainment news" and 2 terminals corresponding to subscription information 4 as "foreign entertainment news".
303: calling a DLL (delay locked loop) pre-established for each data receiving terminal, and judging whether the data packet meets the data filtering condition of the corresponding DLL or not according to the data filtering condition function of the DLL corresponding to each data receiving terminal;
for this step, when the DLL pre-established for each data receiving terminal is called, the following calling method may be adopted:
and acquiring a DLL corresponding to each data receiving terminal from the DLLs established for the terminals corresponding to each subscription information, and calling the acquired DLLs corresponding to the data receiving terminals.
It should be noted that, after the corresponding data receiving terminal is determined according to the stored subscription information, since the DLL corresponding to each terminal is established, the DLL of the data receiving terminal can be directly obtained from the DLL established for the terminal corresponding to each subscription information; after the DLL of each data receiving terminal is obtained, the DLL corresponding to each obtained data receiving terminal can be called to carry out data filtering.
Further, in order to facilitate the subsequent call of the data filtering condition function and the data filtering function of the DLL corresponding to each data receiving terminal to filter the received data packet, before filtering the received data packet, the method provided in this embodiment further includes a step of initializing the DLL corresponding to each data receiving terminal.
Further, initializing specific implementation manners of the DLL corresponding to each data receiving terminal, including but not limited to the following manners:
and respectively assigning initial values to the data filtering condition function and the data filtering function of the DLL corresponding to any data receiving terminal, wherein the type of the initial values is unsigned integer.
Of course, in addition to the above-described method of initializing the DLL corresponding to each data receiving terminal, other initialization methods may be adopted, which is not specifically limited in this embodiment.
In addition, since the data filtering condition function of the DLL corresponding to any data receiving terminal includes the data filtering condition, after the data filtering condition function of the DLL corresponding to any data receiving terminal is initialized, the data filtering condition function can be directly called to judge whether the received data packet meets the data filtering condition of the DLL corresponding to any data receiving terminal. Taking the data filtering condition contained in the data filtering condition function of the DLL corresponding to any data receiving terminal as an example, if the content covered by the received data packet is 'news article', the received data packet can be judged not to meet the data filtering condition of the DLL corresponding to the data receiving terminal; if the content covered by the received data packet is 'entertainment news at home and abroad', the received data packet can be judged to meet the data filtering condition of the DLL corresponding to the data receiving terminal.
304: if the data packet meets the data filtering condition of the corresponding DLL, calling a data filtering function of the corresponding DLL to filter the data packet to obtain a data filtering result corresponding to each data receiving terminal;
for this step, since the data filtering function in the DLL corresponding to any data receiving terminal can filter the received data packet according to the data filtering condition in the data filtering condition function in the DLL corresponding to the data receiving terminal, after the received data packet is judged to satisfy the data filtering condition of the DLL corresponding to the data receiving terminal by the data filtering condition function of the DLL corresponding to the data receiving terminal, the received data packet can be directly filtered according to the data filtering function of the DLL corresponding to the data receiving terminal. The data filtering function can position the data segment needing to be filtered in the data packet according to the data filtering condition of the data filtering condition function, so that the data packet is filtered according to the data filtering condition. Continuing with the example in step 303, when the data filtering function of the DLL corresponding to the data receiving terminal filters the currently received data packet covering the "home and abroad entertainment news", the data part covering the "home and abroad entertainment news" will be filtered out, and the obtained data filtering result will only cover the data part of the "home entertainment news".
305: and sending each data filtering result to a corresponding data receiving terminal.
For the step, each data filtering result is obtained by filtering through each DLL, and each DLL corresponds to any fixed data receiving terminal, so that after each data filtering result is obtained, the obtained data filtering result corresponding to the DLL can be directly sent to the data receiving terminal corresponding to the DLL, and a user at the side of the data receiving terminal can conveniently read the data filtering result.
According to the method provided by the embodiment of the invention, after the data packet sent by the data generation terminal is received and the data receiving terminal corresponding to the data packet is determined according to the stored subscription information, the data packet is filtered through the determined data filtering condition corresponding to each data receiving terminal, and the obtained data filtering result is sent to the corresponding data receiving terminal, so that the purpose that a user at the side of the data receiving terminal does not need to filter the data packet according to the self requirement is achieved, therefore, the intelligence and the convenience of the data filtering mode are higher, the time of the user at the side of the data receiving terminal is saved, and the user experience degree is improved; in addition, because only the data packets filtered according to the corresponding data filtering conditions are sent to each data receiving terminal, the load of the system is greatly reduced; and the corresponding DLL can be updated in real time according to the actual requirements of the user at the data receiving terminal side, so that the flexibility of the data filtering mode is high.
EXAMPLE III
An embodiment of the present invention provides an apparatus for data filtering, configured to perform the method provided in the first embodiment or the second embodiment, and referring to fig. 4, the apparatus includes:
a first receiving module 41, configured to receive a data packet sent by a data generating terminal;
a determining module 42, configured to determine a corresponding data receiving terminal according to the stored subscription information;
a filtering module 43, configured to filter the data packet received by the first receiving module 41 according to the data filtering condition corresponding to each data receiving terminal determined by the determining module 42, so as to obtain a data filtering result corresponding to each data receiving terminal;
and the sending module 44 is configured to send each data filtering result obtained by the filtering module to the corresponding data receiving terminal.
Further, referring to fig. 5, the filtering module 43 includes:
a first calling unit 431, configured to call a DLL that is pre-established for each data receiving terminal, where the DLL at least includes a data filtering condition function and a data filtering function; the data filtering condition function defines a data filtering condition corresponding to the data receiving terminal;
a judging unit 432, configured to judge whether the data packet satisfies the data filtering condition of the corresponding DLL according to the data filtering condition function of the DLL corresponding to each data receiving terminal called by the first calling unit 431;
the second calling unit 433 is configured to, when the determining unit 432 determines that the data packet satisfies the data filtering condition of the corresponding DLL, call a data filtering function of the corresponding DLL to filter the data packet.
Further, referring to fig. 5 and 6, the apparatus further includes:
an establishing module 45, configured to establish a DLL for each terminal corresponding to the subscription information;
the first invoking unit 431 is configured to acquire a DLL corresponding to each data receiving terminal from the DLLs established for the terminals corresponding to each subscription information, and invoke the acquired DLLs corresponding to each data receiving terminal.
Further, referring to fig. 7, the establishing module 45 includes:
a receiving unit 451, configured to receive subscription information sent by each terminal, where the subscription information at least includes a data filtering condition of each terminal;
the establishing unit 452 is configured to establish a DLL for each terminal corresponding to the subscription information according to the subscription information of each terminal.
Further, referring to fig. 8, the apparatus further includes:
a second receiving module 46, configured to receive new subscription information sent by any terminal, where the new subscription information at least includes a new data filtering condition of any data receiving terminal;
and the updating module 47 is configured to update the DLL corresponding to any terminal according to the new subscription information.
To sum up, the device provided in the embodiment of the present invention, after receiving a data packet sent by a data generation terminal and determining a data reception terminal corresponding to the data packet according to stored subscription information, filters the data packet according to the determined data filtering condition corresponding to each data reception terminal, and sends each obtained data filtering result to the corresponding data reception terminal, thereby achieving the purpose that a user who does not need to receive the data terminal side filters the data packet according to the own requirement, and therefore, the data filtering method is more intelligent and convenient, saves the time of the user at the data reception terminal side, and improves the user experience; in addition, because only the data packets filtered according to the corresponding data filtering conditions are sent to each data receiving terminal, the load of the system is greatly reduced; and the corresponding DLL can be updated in real time according to the actual requirements of the user at the data receiving terminal side, so that the flexibility of the data filtering mode is high.
Example four
The present embodiment provides a server, which may be used to perform the method for filtering data provided in the above embodiments. Referring to fig. 9, the server 1900, which may vary considerably in configuration or performance, may include one or more Central Processing Units (CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) storing applications 1942 or data 1944. Memory 1932 and storage medium 1930 can be, among other things, transient or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instructions operating on a server. Still further, a central processor 1922 may be provided in communication with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input-output interfaces 1958, and/or one or more operating systems 1941, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
In particular in the present embodiment, execution of the one or more programs by one or more processors includes instructions for:
receiving a data packet sent by a data generation terminal, and determining a corresponding data receiving terminal according to the stored subscription information;
filtering the data packet according to the determined data filtering condition corresponding to each data receiving terminal to obtain a data filtering result corresponding to each data receiving terminal;
and sending each data filtering result to a corresponding data receiving terminal.
Assuming that the foregoing is the first possible implementation manner, in a second possible implementation manner provided on the basis of the first possible implementation manner, the memory of the server further includes instructions for performing the following operations:
calling a DLL (delay locked loop) pre-established for each data receiving terminal, wherein the DLL at least comprises a data filtering condition function and a data filtering function; the data filtering condition function defines a data filtering condition corresponding to the data receiving terminal;
judging whether the data packet meets the data filtering condition of the corresponding DLL or not according to the data filtering condition function of the DLL corresponding to each data receiving terminal;
and if the data packet meets the data filtering condition of the corresponding DLL, calling a data filtering function of the corresponding DLL to filter the data packet.
In a third possible implementation manner provided as the basis for the second possible implementation manner, the memory of the server further includes instructions for performing the following operations:
establishing a DLL for a terminal corresponding to each subscription information;
the invoking of the DLL pre-established for each data receiving terminal includes:
and acquiring a DLL corresponding to each data receiving terminal from the DLLs established for the terminals corresponding to each subscription information, and calling the acquired DLLs corresponding to the data receiving terminals.
In a fourth possible implementation manner provided as the basis for the third possible implementation manner, the memory of the server further includes instructions for performing the following operations:
receiving subscription information sent by each terminal, wherein the subscription information at least comprises a data filtering condition of each terminal;
and establishing a DLL for the terminal corresponding to each subscription information according to the subscription information of each terminal.
In a fifth possible implementation manner provided on the basis of the second, third, or fourth possible implementation manner, the memory of the server further includes instructions for:
receiving new subscription information sent by any terminal, wherein the new subscription information at least comprises a new data filtering condition of any data receiving terminal;
and updating the DLL corresponding to any terminal according to the new subscription information.
According to the server provided by the embodiment of the invention, after the data packet sent by the data generation terminal is received and the data receiving terminal corresponding to the data packet is determined according to the stored subscription information, the data packet is filtered through the determined data filtering condition corresponding to each data receiving terminal, and the obtained data filtering result is sent to the corresponding data receiving terminal, so that the purpose that a user at the side of the data receiving terminal does not need to filter the data packet according to the self requirement is achieved, therefore, the intelligence and the convenience of the data filtering mode are higher, the time of the user at the side of the data receiving terminal is saved, and the user experience degree is improved; in addition, because only the data packets filtered according to the corresponding data filtering conditions are sent to each data receiving terminal, the load of the system is greatly reduced; and the corresponding DLL can be updated in real time according to the actual requirements of the user at the data receiving terminal side, so that the flexibility of the data filtering mode is high.
EXAMPLE five
An embodiment of the present invention provides a computer-readable storage medium, which may be a computer-readable storage medium contained in the memory in the above-described embodiment; or it may be a computer-readable storage medium that exists separately and is not assembled into a server. The computer readable storage medium stores one or more programs for use by one or more processors in performing a method of data filtering, the method comprising:
receiving a data packet sent by a data generation terminal, and determining a corresponding data receiving terminal according to the stored subscription information;
filtering the data packet according to the determined data filtering condition corresponding to each data receiving terminal to obtain a data filtering result corresponding to each data receiving terminal;
and sending each data filtering result to a corresponding data receiving terminal.
Assuming that the foregoing is the first possible implementation manner, in a second possible implementation manner provided on the basis of the first possible implementation manner, the filtering the data packet according to the determined data filtering condition corresponding to each data receiving terminal includes:
calling a DLL (delay locked loop) pre-established for each data receiving terminal, wherein the DLL at least comprises a data filtering condition function and a data filtering function; the data filtering condition function defines a data filtering condition corresponding to the data receiving terminal;
judging whether the data packet meets the data filtering condition of the corresponding DLL or not according to the data filtering condition function of the DLL corresponding to each data receiving terminal;
and if the data packet meets the data filtering condition of the corresponding DLL, calling a data filtering function of the corresponding DLL to filter the data packet.
In a third possible implementation manner provided on the basis of the second possible implementation manner, before the invoking of the DLL that is pre-established for each data receiving terminal, the method further includes:
establishing a DLL for a terminal corresponding to each subscription information;
the invoking of the DLL pre-established for each data receiving terminal includes:
and acquiring a DLL corresponding to each data receiving terminal from the DLLs established for the terminals corresponding to each subscription information, and calling the acquired DLLs corresponding to the data receiving terminals.
In a fourth possible implementation manner provided on the basis of the third possible implementation manner, the establishing a DLL for each terminal corresponding to subscription information includes:
receiving subscription information sent by each terminal, wherein the subscription information at least comprises a data filtering condition of each terminal;
and establishing a DLL for the terminal corresponding to each subscription information according to the subscription information of each terminal.
In a fifth possible implementation manner provided on the basis of the second, third, or fourth possible implementation manner, after the DLL is established for each terminal corresponding to the subscription information, the method further includes:
receiving new subscription information sent by any terminal, wherein the new subscription information at least comprises a new data filtering condition of any data receiving terminal;
and updating the DLL corresponding to any terminal according to the new subscription information.
According to the computer-readable storage medium provided by the embodiment of the invention, after a data packet sent by a data generation terminal is received and a data receiving terminal corresponding to the data packet is determined according to stored subscription information, the data packet is filtered through the determined data filtering condition corresponding to each data receiving terminal, and the obtained data filtering result is sent to the corresponding data receiving terminal, so that the purpose that a user who does not need to receive the data from the data receiving terminal side filters the data packet according to the self requirement is achieved, therefore, the intelligence and convenience of the data filtering mode are higher, the time of the user at the data receiving terminal side is saved, and the user experience degree is improved; in addition, because only the data packets filtered according to the corresponding data filtering conditions are sent to each data receiving terminal, the load of the system is greatly reduced; and the corresponding DLL can be updated in real time according to the actual requirements of the user at the data receiving terminal side, so that the flexibility of the data filtering mode is high.
It should be noted that: in the data filtering apparatus provided in the foregoing embodiment, only the division of the functional modules is illustrated when performing data filtering, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the apparatus is divided into different functional modules to complete all or part of the functions described above. In addition, the data filtering apparatus and the data filtering method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (6)

1. A method for data filtering, which is applied to a secondary filtering system, the method comprises:
the secondary filtering system receives subscription information sent by each terminal, wherein the subscription information at least comprises data filtering conditions of each terminal;
the secondary filtering system establishes a Dynamic Link Library (DLL) for each terminal corresponding to the subscription information according to the subscription information of each terminal;
the secondary filtering system receives a data packet which is transmitted to the transfer system by the data generating terminal and forwarded by the transfer system, and determines the IP address of the corresponding data receiving terminal according to the stored subscription information;
the secondary filtering system calls a DLL (dynamic link library) pre-established for each data receiving terminal, wherein the DLL at least comprises a data filtering condition function and a data filtering function, and the data filtering condition function limits the data filtering condition corresponding to the data receiving terminal;
the secondary filtering system judges whether the data packet meets the data filtering condition of the corresponding DLL or not according to the data filtering condition function of the DLL corresponding to each data receiving terminal;
if the data packet meets the data filtering condition of the corresponding DLL, the secondary filtering system calls a data filtering function of the corresponding DLL to filter the data packet to obtain data filtering results corresponding to the data receiving terminals, wherein the data filtering function is used for positioning data segments needing to be filtered in the data packet according to the data filtering condition of the data filtering condition function;
the secondary filtering system sends each data filtering result to a corresponding data receiving terminal;
after the secondary filtering system establishes a Dynamic Link Library (DLL) for the terminal corresponding to each subscription information according to the subscription information of each terminal, the method further comprises the following steps:
the secondary filtering system receives new subscription information sent by any terminal, wherein the new subscription information at least comprises new data filtering conditions of any data receiving terminal;
and the secondary filtering system updates the DLL corresponding to any terminal according to the new subscription information.
2. The method of claim 1,
the secondary filtering system calls a DLL (delay locked loop) pre-established for each data receiving terminal, and the DLL comprises the following steps:
the secondary filtering system acquires the DLL corresponding to each data receiving terminal from the DLLs established for the terminals corresponding to each subscription information, and calls the acquired DLL corresponding to each data receiving terminal.
3. An apparatus for data filtering, applied to a secondary filtering system, the apparatus comprising:
the first receiving module is used for receiving a data packet which is transmitted to the transit system by the data generating terminal and forwarded by the transit system;
the determining module is used for determining the IP address of the corresponding data receiving terminal according to the stored subscription information;
a filtering module, which comprises a first calling unit, a judging unit and a second calling unit,
the first calling unit is used for calling a Dynamic Link Library (DLL) which is pre-established for each data receiving terminal, and the DLL at least comprises a data filtering condition function and a data filtering function; the data filtering condition function defines a data filtering condition corresponding to the data receiving terminal;
the judging unit is used for judging whether the data packet meets the data filtering condition of the corresponding DLL or not according to the data filtering condition function of the DLL corresponding to each data receiving terminal called by the first calling unit;
the second calling unit is configured to call a data filtering function of the corresponding DLL to filter the data packet when the judging unit judges that the data packet meets the data filtering condition of the corresponding DLL, so as to obtain a data filtering result corresponding to each data receiving terminal;
the sending module is used for sending each data filtering result obtained by the filtering module to a corresponding data receiving terminal;
the device further comprises:
the establishing module is used for establishing a DLL for each terminal corresponding to the subscription information;
the establishing module comprises:
a receiving unit, configured to receive subscription information sent by each terminal, where the subscription information at least includes a data filtering condition of each terminal;
the establishing unit is used for establishing a DLL for the terminal corresponding to each subscription information according to the subscription information of each terminal received by the receiving unit;
the device further comprises:
a second receiving module, configured to receive new subscription information sent by any terminal, where the new subscription information at least includes a new data filtering condition of any data receiving terminal;
and the updating module is used for updating the DLL corresponding to any terminal according to the new subscription information received by the second receiving module.
4. The apparatus of claim 3, further comprising:
the first calling unit is used for acquiring the DLL corresponding to each data receiving terminal from the DLLs established for the terminals corresponding to each subscription information, and calling the acquired DLL corresponding to each data receiving terminal.
5. A server, characterized in that it comprises one or more central processors and a storage medium in which at least one program is stored, said at least one program being used by said one or more central processors to perform the data filtering method according to any one of claims 1 to 2.
6. A computer-readable storage medium comprising one or more programs for use by one or more processors in performing the data filtering method of any of claims 1-2.
CN201310533219.3A 2013-10-31 2013-10-31 Data filtering method and device Active CN104601527B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310533219.3A CN104601527B (en) 2013-10-31 2013-10-31 Data filtering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310533219.3A CN104601527B (en) 2013-10-31 2013-10-31 Data filtering method and device

Publications (2)

Publication Number Publication Date
CN104601527A CN104601527A (en) 2015-05-06
CN104601527B true CN104601527B (en) 2020-04-21

Family

ID=53127037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310533219.3A Active CN104601527B (en) 2013-10-31 2013-10-31 Data filtering method and device

Country Status (1)

Country Link
CN (1) CN104601527B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105245601A (en) * 2015-10-15 2016-01-13 桂林电子科技大学 Data filtering method and data filtering system
CN105335486A (en) * 2015-10-15 2016-02-17 桂林电子科技大学 Data filter method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1863211A (en) * 2006-03-23 2006-11-15 华为技术有限公司 Content filtering system and method thereof
WO2011140709A1 (en) * 2010-05-12 2011-11-17 阿尔卡特朗讯 Method and device for presence information subscriber to filter its subscribed presence information

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008025008A2 (en) * 2006-08-24 2008-02-28 Neustar, Inc. System and method for filtering offensive information content in communication systems

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1863211A (en) * 2006-03-23 2006-11-15 华为技术有限公司 Content filtering system and method thereof
WO2011140709A1 (en) * 2010-05-12 2011-11-17 阿尔卡特朗讯 Method and device for presence information subscriber to filter its subscribed presence information

Also Published As

Publication number Publication date
CN104601527A (en) 2015-05-06

Similar Documents

Publication Publication Date Title
WO2020224437A1 (en) Communication method and apparatus, entity and computer readable storage medium
CN110633442A (en) Pushing method and device and electronic equipment
CN112769897A (en) Synchronization method and device for edge calculation message, electronic equipment and storage medium
CN110933170A (en) Multi-device linkage control method and device of ZigBee gateway and storage medium
CN110808857A (en) Network intercommunication method, device, equipment and storage medium for realizing Kubernetes cluster
CN104601527B (en) Data filtering method and device
CN113572833B (en) Cloud mobile phone maintenance method and device, electronic equipment and storage medium
CN108595574B (en) Database cluster connection method, device, equipment and storage medium
CN112714146B (en) Resource scheduling method, device, equipment and computer readable storage medium
CN104427118A (en) Method for recommending contents and mobile terminal
CN110995856B (en) Method, device and equipment for server expansion and storage medium
CN110417875B (en) Method, system, equipment and storage medium for docking between cloud servers
US20150237650A1 (en) Management of the Use of a Gateway by a Plurality of Terminals
CN111245878B (en) Method for computing and unloading communication network based on hybrid cloud computing and fog computing
CN113630339B (en) Traffic forwarding method and device, electronic equipment and storage medium
CN111193805B (en) Resource discovery method and device
CN115567602A (en) CDN node back-to-source method, device and computer readable storage medium
CN117479113A (en) Interaction method, device, equipment and storage medium
CN111030925B (en) Multi-gateway communication method and system based on remote procedure call
CN106161152B (en) A kind of control method and equipment of smart home
CN106034344B (en) Data transmission method and device
CN114828096B (en) Signaling processing method and signaling processing device, computer equipment and storage medium
CN115086300B (en) Video file scheduling method and device
CN117221127A (en) Method and device for using artificial intelligence service at communication network end side
CN108429694A (en) A kind of wireless router and the APP operation methods based on wireless router and system

Legal Events

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