CN110120899B - Data stream detection method and device, electronic equipment and storage medium - Google Patents

Data stream detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110120899B
CN110120899B CN201910389663.XA CN201910389663A CN110120899B CN 110120899 B CN110120899 B CN 110120899B CN 201910389663 A CN201910389663 A CN 201910389663A CN 110120899 B CN110120899 B CN 110120899B
Authority
CN
China
Prior art keywords
data stream
hook
original data
detection
post
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
CN201910389663.XA
Other languages
Chinese (zh)
Other versions
CN110120899A (en
Inventor
陈庆龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201910389663.XA priority Critical patent/CN110120899B/en
Publication of CN110120899A publication Critical patent/CN110120899A/en
Application granted granted Critical
Publication of CN110120899B publication Critical patent/CN110120899B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a data stream detection method, a data stream detection device, electronic equipment and a storage medium. The method comprises the following steps: receiving an original data stream sent by a client device and analyzing the access type of the original data stream; if the access type of the original data stream is judged to meet the corresponding prepositive personalized detection condition, the hook scheduling center carries out prepositive detection on the original data stream; core detection is carried out on the data stream after the front detection through a predetermined core detection logic; and if the access type of the original data stream is judged to meet the corresponding post-personalized detection condition, carrying out post-detection on the data stream after core detection through the hook scheduling center. In the embodiment of the invention, the personalized detection logic and the core detection logic are mutually separated and are not mutually influenced; the detection efficiency can be effectively improved, and the detection cost is reduced.

Description

Data stream detection method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of Internet, in particular to a data stream detection method, a device, electronic equipment and a storage medium.
Background
With the increasing types of data streams, it is increasingly important to detect different data streams. In general, when a detection system involving a plurality of users is constructed, the entire detection system is designed and implemented according to the needs of each user. However, as more and more users access the system, the need for personalization will continue to emerge.
For this situation, different developers will give different treatment modes, and one of the most common treatment modes is: various personalized detection logics are added into the core detection logic to meet detection requirements of different users, but the core detection logic is more and more complex and is not easy to maintain along with continuous addition of the personalized detection logic; meanwhile, by adopting the existing detection method, the core logic is tightly coupled with the personalized detection logic, and if one personalized detection logic has a problem, the normal operation of the whole detection system can be influenced.
Disclosure of Invention
In view of this, the embodiments of the present invention provide a method, an apparatus, an electronic device, and a storage medium for detecting a data stream, where a personalized detection logic and a core detection logic are separated from each other and are not affected each other; the detection efficiency can be effectively improved, and the detection cost is reduced.
In a first aspect, an embodiment of the present invention provides a method for detecting a data stream, where the method includes:
receiving an original data stream sent by a client device and analyzing the access type of the original data stream;
if the access type of the original data stream is judged to meet the corresponding prepositive personalized detection condition, the hook scheduling center carries out prepositive detection on the original data stream;
core detection is carried out on the data stream after the front detection through a predetermined core detection logic;
and if the access type of the original data stream is judged to meet the corresponding post-personalized detection condition, carrying out post-detection on the data stream after core detection through the hook scheduling center.
In the foregoing embodiment, the determining that the access type of the original data flow meets the pre-personalized detection condition corresponding to the access type of the original data flow includes:
if the hook logic corresponding to the access type of the original data stream is registered in a hook registry, acquiring registration information of the hook logic corresponding to the access type of the original data stream in the hook registry;
if the registration information of the pre-hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the pre-hook logic corresponding to the access type of the original data stream is the same as the record information of the pre-hook logic corresponding to the access type of the original data stream pre-stored in a database, judging that the access type of the original data stream meets the pre-arranged personalized detection condition corresponding to the access type of the original data stream.
In the foregoing embodiment, the performing, by the hook scheduling center, pre-detection on the original data stream includes:
determining front hook logic corresponding to the original data stream in a hook module through the hook scheduling center;
and performing preamble detection on the original data stream through the preamble hook logic corresponding to the original data stream.
In the foregoing embodiment, the determining that the access type of the original data flow meets the post-personalized detection condition corresponding to the access type of the original data flow includes:
if the registration information of the post hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the post hook logic corresponding to the access type of the original data stream is the same as the record information of the post hook logic corresponding to the access type of the original data stream which is pre-stored in the database, judging that the access type of the original data stream meets the post personalized detection condition corresponding to the access type of the original data stream.
In the foregoing embodiment, the post-detection of the core detected data flow by the hook scheduling center includes:
Determining post-hook logic corresponding to the original data stream in a hook module through the hook scheduling center;
and performing post detection on the data stream after core detection through post hook logic corresponding to the original data stream.
In the foregoing embodiment, the determining, by the hook scheduling center, the pre-hook logic corresponding to the original data stream in the hook module includes:
sending a preamble detection request to the hook dispatching center; wherein, the preamble detection request carries the access type of the original data stream;
receiving a preamble detection response returned by the hook scheduling center in response to the preamble detection request; the preamble detection response carries identification information of preamble hook logic corresponding to the original data stream.
In the above embodiment, the determining, by the hook scheduling center, the post-hook logic corresponding to the original data stream in the hook module includes:
sending a post detection request to the hook dispatching center; wherein, the post detection request carries the access type of the original data flow;
receiving a post detection response returned by the hook scheduling center in response to the post detection request; the post detection response carries the identification information of the post hook logic corresponding to the original data stream.
In the above embodiment, before the sending of the preamble detection request to the hook scheduling center, the method further includes:
configuring pre-hook logic corresponding to the original data stream in the hook module; distributing the identification information of the pre-hook logic corresponding to the original data stream in the hook module; the pre-hook logic corresponding to the original data stream at least comprises: logic for data adaptation, data exemption, or traffic monitoring.
In the above embodiment, before the sending of the post detection request to the hook dispatch center, the method further includes:
configuring post-hook logic corresponding to the original data stream in the hook module; distributing the identification information of the post-hook logic corresponding to the original data stream in the hook module; wherein, the post hook logic corresponding to the original data stream at least comprises: logic for data subscription or data statistics.
In a second aspect, an embodiment of the present invention provides a device for detecting a data stream, where the device includes: the device comprises a receiving module, a front detection module, a core detection module and a rear detection module; wherein,
The receiving module is used for receiving an original data stream sent by the client device and analyzing the access type of the original data stream;
the front detection module is used for carrying out front detection on the original data stream through the hook scheduling center if the access type of the original data stream is judged to meet the corresponding front personalized detection condition;
the core detection module is used for carrying out core detection on the data flow after the front detection through a predetermined core detection logic;
and the post detection module is used for carrying out post detection on the data flow after core detection through the hook scheduling center if the access type of the original data flow is judged to meet the post personalized detection condition corresponding to the access type of the original data flow.
In the above embodiment, the pre-detection module is specifically configured to, if the hook logic corresponding to the access type of the original data stream is registered in a hook registry, obtain, in the hook registry, registration information of the hook logic corresponding to the access type of the original data stream; if the registration information of the pre-hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the pre-hook logic corresponding to the access type of the original data stream is the same as the record information of the pre-hook logic corresponding to the access type of the original data stream pre-stored in a database, judging that the access type of the original data stream meets the pre-arranged personalized detection condition corresponding to the access type of the original data stream.
In the above embodiment, the pre-detection module includes: a first determination sub-module and a preamble detection sub-module; wherein,
the first determining submodule is used for determining front hook logic corresponding to the original data flow in a hook module through the hook scheduling center;
the pre-detection sub-module is used for pre-detecting the original data stream through pre-hook logic corresponding to the original data stream.
In the above embodiment, the post-detection module is specifically configured to determine that the access type of the original data stream satisfies a post-personalized detection condition corresponding to the access type of the original data stream if the registration information of the post-hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the post-hook logic corresponding to the access type of the original data stream is the same as the record information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database.
In the above embodiment, the post-detection module includes: a second determination sub-module and a post detection sub-module; wherein,
The second determining submodule is used for determining post-hook logic corresponding to the original data flow in the hook module through the hook scheduling center;
and the post detection submodule is used for carrying out post detection on the data flow after core detection through post hook logic corresponding to the original data flow.
In the foregoing embodiment, the first determining submodule is specifically configured to send a preamble detection request to the hook scheduling center; wherein, the preamble detection request carries the access type of the original data stream; receiving a preamble detection response returned by the hook scheduling center in response to the preamble detection request; the preamble detection response carries identification information of preamble hook logic corresponding to the original data stream.
In the foregoing embodiment, the second determining submodule is specifically configured to send a post-detection request to the hook scheduling center; wherein, the post detection request carries the access type of the original data flow; receiving a post detection response returned by the hook scheduling center in response to the post detection request; the post detection response carries the identification information of the post hook logic corresponding to the original data stream.
In the above embodiment, the front detection module further includes: a first configuration submodule, configured to configure pre-hook logic corresponding to the original data stream in the hook module; distributing the identification information of the pre-hook logic corresponding to the original data stream in the hook module; the pre-hook logic corresponding to the original data stream at least comprises: logic for data adaptation, data exemption, or traffic monitoring.
In the above embodiment, the post-detection module further includes: the second configuration submodule is used for configuring the post-hook logic corresponding to the original data stream in the hook module; distributing the identification information of the post-hook logic corresponding to the original data stream in the hook module; wherein, the post hook logic corresponding to the original data stream at least comprises: logic for data subscription or data statistics.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for detecting a data stream according to any of the embodiments of the present invention.
In a fourth aspect, an embodiment of the present invention provides a storage medium having stored thereon a computer program, which when executed by a processor, implements the method for detecting a data stream according to any embodiment of the present invention.
The embodiment of the invention provides a data stream detection method, a data stream detection device, electronic equipment and a storage medium, wherein the method comprises the steps of firstly receiving an original data stream sent by client equipment and analyzing an access type of the original data stream; if the access type of the original data stream is judged to meet the corresponding prepositive personalized detection condition, the hook scheduling center is used for carrying out prepositive detection on the original data stream, and the hook scheduling center is used for carrying out prepositive detection on the original data stream; then core detection is carried out on the data flow after the front detection through a predetermined core detection logic; and if the access type of the original data stream is judged to meet the corresponding post-personalized detection condition, post-detection is carried out on the data stream after core detection through the hook scheduling center. That is, in the technical scheme of the invention, the front-end detection can be performed on the original data stream through the hook scheduling center; the post detection can also be performed on the data stream after the core detection through the hook scheduling center. In the existing data stream detection method, various personalized detection logics are added into the core detection logic generally and are used for meeting detection requirements of different users, but the core detection logic is more and more complex and is not easy to maintain along with continuous addition of the personalized detection logic; meanwhile, by adopting the existing detection method, the core logic is tightly coupled with the personalized detection logic, and if one personalized detection logic has a problem, the normal operation of the whole detection system can be influenced. Therefore, compared with the prior art, the data stream detection method, the device, the electronic equipment and the storage medium provided by the embodiment of the invention have the advantages that the personalized detection logic and the core detection logic are mutually separated and are not mutually influenced; the detection efficiency can be effectively improved, and the detection cost is reduced; in addition, the technical scheme of the embodiment of the invention is simple and convenient to realize, convenient to popularize and wider in application range.
Drawings
Fig. 1 is a flow chart of a method for detecting a data stream according to a first embodiment of the present invention;
fig. 2 is a flow chart of a method for detecting a data stream according to a second embodiment of the present invention;
fig. 3 is a flow chart of a method for detecting a data stream according to a third embodiment of the present invention;
fig. 4 is a flow chart of a method for detecting a data stream according to a fourth embodiment of the present invention;
fig. 5 is a first schematic structural diagram of a data stream detection device according to a fifth embodiment of the present invention;
fig. 6 is a second schematic structural diagram of a data flow detection device according to a fifth embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the matters related to the present invention are shown in the accompanying drawings.
Example 1
Fig. 1 is a flow chart of a method for detecting a data stream according to an embodiment of the present invention, where the method may be performed by a device for detecting a data stream or an electronic device, and the device or the electronic device may be implemented by software and/or hardware, and the device or the electronic device may be integrated into any intelligent device having a network communication function. As shown in fig. 1, the method for detecting a data stream may include the following steps:
S101, receiving an original data stream sent by a client device and analyzing the access type of the original data stream.
In a specific embodiment of the present invention, an electronic device may receive an original data stream sent by a client device and parse an access type of the original data stream; the access type of the original data flow at least comprises: a graphic type, an atlas type, a comment type, or a question-answer type. Specifically, the electronic device may receive the original data stream 1 sent by the client device and parse out the access type 1 of the original data stream 1; the method can also receive the original data stream 2 sent by the client device and analyze the access type 2 of the original data stream 2; …; the method can also receive the original data stream X sent by the client device and analyze the access type X of the original data stream X; wherein X is a natural number of 1 or more. For example, the electronic device may receive an original data stream of a graphics context type sent by the client device and parse out that an access type of the original data stream is the graphics context type; the method can also receive an original data stream of an atlas type sent by the client device and analyze out that the access type of the original data stream is the atlas type; the method can also receive an original data stream of comment type sent by the client device and analyze that the access type of the original data stream is the comment type; the method can also receive the original data stream of the question-answer type sent by the client device and analyze out that the access type of the original data stream is the question-answer type; and are not intended to be limiting in any way.
S102, if the access type of the original data stream is judged to meet the corresponding prepositive personalized detection condition, the hook scheduling center is used for carrying out prepositive detection on the original data stream.
In a specific embodiment of the present invention, if it is determined that the access type of the original data stream meets the pre-personalized detection condition corresponding to the access type of the original data stream, the electronic device may perform pre-detection on the original data stream through the hook scheduling center. Specifically, before the electronic device performs pre-detection on the original data stream through the hook scheduling center, the electronic device may further determine hook logic corresponding to the access type of the original data stream registered in the hook registry; if the hook logic corresponding to the access type of the original data stream is registered in the hook registry, the electronic equipment can acquire the registration information of the hook logic corresponding to the access type of the original data stream in the hook registry; then judging whether the registration information of the front hook logic corresponding to the access type of the original data flow exists in the registration information of the hook logic corresponding to the access type of the original data flow; if the registration information of the hook logic corresponding to the access type of the original data stream exists in the registration information of the front hook logic corresponding to the access type of the original data stream; the electronic equipment can further judge whether the registration information of the front hook logic corresponding to the access type of the original data stream is the same as the record information of the front hook logic corresponding to the access type of the original data stream pre-stored in the database; if the registration information of the pre-hook logic corresponding to the access type of the original data stream is the same as the record information of the pre-hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream meets the pre-personalized detection condition corresponding to the access type of the original data stream. Specifically, if the hook logic corresponding to the access type of the original data stream is not registered in the hook registry, the electronic device may directly perform core detection on the original data stream through a predetermined core detection logic; in addition, if the registration information of the hook logic corresponding to the access type of the original data stream does not exist in the registration information of the front hook logic corresponding to the access type of the original data stream, the electronic device can also directly perform core detection on the original data stream through a predetermined core detection logic; in addition, if the registration information of the pre-hook logic corresponding to the access type of the original data stream is different from the record information of the pre-hook logic corresponding to the access type of the original data stream stored in the database, the electronic device may also directly perform core detection on the original data stream through the predetermined core detection logic.
In the embodiment of the invention, if the registration information of the pre-hook logic corresponding to the access type of the original data stream is the same as the record information of the pre-hook logic corresponding to the access type of the original data stream pre-stored in the database, the pre-hook logic corresponding to the access type of the original data stream is a pre-hook logic which exists truly; if the registration information of the pre-hook logic corresponding to the access type of the original data stream is different from the record information of the pre-hook logic corresponding to the access type of the original data stream pre-stored in the database, the pre-hook logic corresponding to the access type of the original data stream is not a truly existing pre-hook logic.
S103, performing core detection on the data stream subjected to the pre-detection through a predetermined core detection logic.
In a specific embodiment of the present invention, the electronic device may perform core detection on the pre-detected data stream through a predetermined core detection logic. Specifically, the core detection logic is a logic entity independent of the pre-hook logic and the post-hook logic, and the core detection logic operates independently of the pre-hook logic and the post-hook logic; when the pre-hook logic is inserted into or pulled out from the hook dispatching center, the core detection logic can normally operate and is not influenced by the pre-hook logic; similarly, when the post-hook logic is inserted into or pulled out from the hook dispatch center, the core detection logic can also operate normally without being affected by the post-hook logic.
And S104, if the access type of the original data stream is judged to meet the corresponding post-personalized detection condition, post-detection is carried out on the data stream after core detection through the hook scheduling center.
In a specific embodiment of the present invention, if it is determined that the access type of the original data stream meets the post-personalized detection condition corresponding to the access type of the original data stream, the electronic device may perform post-detection on the data stream after core detection through the hook scheduling center. Specifically, before post detection is performed on the data stream after core detection by the hook scheduling center, the electronic device may further determine whether there is post hook logic registration information corresponding to the access type of the original data stream in the hook logic registration information corresponding to the access type of the original data stream; if the registration information of the post-hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, whether the registration information of the post-hook logic corresponding to the access type of the original data stream is the same as the record information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database can be further judged; if the registration information of the post hook logic corresponding to the access type of the original data stream is the same as the record information of the post hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream meets the post personalized detection condition corresponding to the access type of the original data stream. Specifically, if the registration information of the hook logic corresponding to the access type of the original data stream does not exist in the registration information of the post hook logic corresponding to the access type of the original data stream, the electronic device may end the detection flow of the original data stream; in addition, if the registration information of the post-hook logic corresponding to the access type of the original data stream is different from the registration information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream does not meet the post-personalized detection condition corresponding to the access type of the original data stream; at this time, the electronic device may end the detection flow of the original data stream.
In the embodiment of the invention, if the registration information of the post-hook logic corresponding to the access type of the original data stream is the same as the record information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database, the post-hook logic corresponding to the access type of the original data stream is indicated to be a truly existing post-hook logic; if the registration information of the post-hook logic corresponding to the access type of the original data stream is different from the record information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database, the post-hook logic corresponding to the access type of the original data stream is not a truly existing post-hook logic.
The method for detecting the data stream provided by the embodiment of the invention firstly receives the original data stream sent by the client device and analyzes the access type of the original data stream; if the access type of the original data stream is judged to meet the corresponding prepositive personalized detection condition, the hook scheduling center is used for carrying out prepositive detection on the original data stream, and the hook scheduling center is used for carrying out prepositive detection on the original data stream; then core detection is carried out on the data flow after the front detection through a predetermined core detection logic; and if the access type of the original data stream is judged to meet the corresponding post-personalized detection condition, post-detection is carried out on the data stream after core detection through the hook scheduling center. That is, in the technical scheme of the invention, the front-end detection can be performed on the original data stream through the hook scheduling center; the post detection can also be performed on the data stream after the core detection through the hook scheduling center. In the existing data stream detection method, various personalized detection logics are added into the core detection logic generally and are used for meeting detection requirements of different users, but the core detection logic is more and more complex and is not easy to maintain along with continuous addition of the personalized detection logic; meanwhile, by adopting the existing detection method, the core logic is tightly coupled with the personalized detection logic, and if one personalized detection logic has a problem, the normal operation of the whole detection system can be influenced. Therefore, compared with the prior art, the data stream detection method provided by the embodiment of the invention has the advantages that the personalized detection logic and the core detection logic are mutually separated and are not mutually influenced; the detection efficiency can be effectively improved, and the detection cost is reduced; in addition, the technical scheme of the embodiment of the invention is simple and convenient to realize, convenient to popularize and wider in application range.
Example two
Fig. 2 is a flow chart of a method for detecting a data stream according to a second embodiment of the present invention. As shown in fig. 2, the method for detecting a data stream may include the steps of:
s201, receiving an original data stream sent by the client device and analyzing the access type of the original data stream.
In a specific embodiment of the present invention, an electronic device may receive an original data stream sent by a client device and parse an access type of the original data stream; the access type of the original data flow at least comprises: a graphic type, an atlas type, a comment type, or a question-answer type. Specifically, the electronic device may receive the original data stream 1 sent by the client device and parse out the access type 1 of the original data stream 1; the method can also receive the original data stream 2 sent by the client device and analyze the access type 2 of the original data stream 2; …; the method can also receive the original data stream X sent by the client device and analyze the access type X of the original data stream X; wherein X is a natural number of 1 or more. For example, the electronic device may receive an original data stream of a graphics context type sent by the client device and parse out that an access type of the original data stream is the graphics context type; the method can also receive an original data stream of an atlas type sent by the client device and analyze out that the access type of the original data stream is the atlas type; the method can also receive an original data stream of comment type sent by the client device and analyze that the access type of the original data stream is the comment type; the method can also receive the original data stream of the question-answer type sent by the client device and analyze out that the access type of the original data stream is the question-answer type; and are not intended to be limiting in any way.
S202, if the hook logic corresponding to the access type of the original data stream is registered in the hook registry, acquiring registration information of the hook logic corresponding to the access type of the original data stream in the hook registry.
In a specific embodiment of the present invention, if hook logic corresponding to an access type of an original data stream is registered in a hook registry, an electronic device may obtain registration information of hook logic corresponding to the access type of the original data stream in the hook registry; the registration information of the hook logic corresponding to the access type of the original data stream may only include the registration information of the front hook logic corresponding to the access type of the original data stream; the method also can only comprise the registration information of the post hook logic corresponding to the access type of the original data stream; the method also comprises the steps of registering the front hook logic corresponding to the access type of the original data stream and registering the back hook logic corresponding to the access type of the original data stream. For example, assume that registration information of hook logic corresponding to an access type of an original data stream is a; the registration information of the front hook logic corresponding to the access type of the original data stream is A1; the registration information of the post hook logic corresponding to the access type of the original data stream is A2; wherein a may include only A1; alternatively, a may include only A2; alternatively, a may also include A1 and A2.
S203, if the registration information of the pre-hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the pre-hook logic corresponding to the access type of the original data stream is the same as the record information of the pre-hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream meets the pre-personalized detection condition corresponding to the access type of the original data stream.
In the embodiment of the invention, the electronic equipment can firstly judge the hook logic corresponding to the access type of the original data stream registered in the hook registry; if the hook logic corresponding to the access type of the original data stream is registered in the hook registry, the electronic equipment can acquire the registration information of the hook logic corresponding to the access type of the original data stream in the hook registry; then judging whether the registration information of the front hook logic corresponding to the access type of the original data flow exists in the registration information of the hook logic corresponding to the access type of the original data flow; if the registration information of the hook logic corresponding to the access type of the original data stream exists in the registration information of the front hook logic corresponding to the access type of the original data stream; the electronic equipment can further judge whether the registration information of the front hook logic corresponding to the access type of the original data stream is the same as the record information of the front hook logic corresponding to the access type of the original data stream pre-stored in the database; if the registration information of the pre-hook logic corresponding to the access type of the original data stream is the same as the record information of the pre-hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream meets the pre-personalized detection condition corresponding to the access type of the original data stream. Specifically, if the hook logic corresponding to the access type of the original data stream is not registered in the hook registration center; or if the registration information of the hook logic corresponding to the access type of the original data stream does not exist; or if the registration information of the front hook logic corresponding to the access type of the original data stream is different from the registration information of the front hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream does not meet the front personalized detection condition corresponding to the access type of the original data stream; the electronic device may then perform core detection on the original data stream directly through the predetermined core detection logic.
S204, the hook scheduling center performs front-end detection on the original data stream.
In a specific embodiment of the present invention, the electronic device may perform pre-detection on the original data stream through the hook scheduling center. Specifically, the electronic device may determine, through the hook scheduling center, a pre-hook logic corresponding to the original data stream in the hook module; and then the front-end detection is carried out on the original data stream through the front-end hook logic corresponding to the original data stream. Specifically, the electronic device may send a preamble detection request to the hook dispatch center; the front detection request carries the access type of the original data flow; then the electronic device can receive a preamble detection response returned by the hook dispatching center in response to the preamble detection request; the preamble detection response carries identification information of preamble hook logic corresponding to the original data stream. Here, the electronic device may determine whether the identification information of the pre-hook logic corresponding to the original data stream is the same as the record information of the pre-hook logic corresponding to the access type of the pre-stored original data stream; if the identification information of the pre-hook logic corresponding to the original data stream is the same as the record information of the pre-hook logic corresponding to the access type of the pre-stored original data stream, pre-detecting the original data stream through the pre-hook logic corresponding to the original data stream.
In a specific embodiment of the present invention, the electronic device may pre-configure pre-hook logic corresponding to different access types in the hook module. For example, the electronic device may pre-configure pre-hook logic corresponding to the graphics context type in the hook module; pre-hook logic corresponding to the atlas type can be pre-configured in the hook module; pre-hook logic corresponding to comment types can be pre-configured in the hook module; pre-hook logic corresponding to the question-answer type can also be preconfigured in the hook module. Therefore, in the step, the electronic device can determine the pre-hook logic corresponding to the original data stream in the hook module through the hook scheduling center; and then the front-end detection is carried out on the original data stream through the front-end hook logic corresponding to the original data stream.
In the specific embodiment of the invention, the electronic equipment can perform front-end detection on the original data stream through the hook dispatching center; the detection result may include: the preamble detection passes or the preamble detection does not pass; when the detection result of the front detection of the original data stream through the hook scheduling center is that the front detection passes, the electronic equipment can add a mark of the front detection passing on the original data stream; when the detection result of the preamble detection on the original data stream by the hook scheduling center is that the preamble detection fails, the electronic device may add a mark that the preamble detection fails on the original data stream.
In a specific embodiment of the present invention, before the electronic device sends the preamble detection request to the hook scheduling center, the electronic device may further configure a preamble hook logic corresponding to the original data stream in the hook module; distributing the identification information of the pre-hook logic corresponding to the original data stream in the hook module; the pre-hook logic corresponding to the original data stream at least comprises: logic for data adaptation, data exemption or traffic monitoring; wherein data adaptation refers to adapting the original data stream to a data format that can be processed by the core detection logic. For example, if the background format of the original data stream is not compatible with the standard data format, the background format of the original data stream may be adapted to a data format compatible with the standard data format by data adaptation. Data exemption refers to exemption from detecting a portion of data in the original data stream. For example, exemption detects header information. Flow monitoring refers to triggering an alarm when a particular type of data volume reaches an alarm threshold. For example, when the comment type data stream reaches the alarm threshold, an alarm is triggered through a short message or a telephone form.
S205, performing core detection on the data stream subjected to the preamble detection through a predetermined core detection logic.
In a specific embodiment of the present invention, the electronic device may perform core detection on the pre-detected data stream through a predetermined core detection logic. Specifically, the core detection logic is a logic entity independent of the pre-hook logic and the post-hook logic, and the core detection logic operates independently of the pre-hook logic and the post-hook logic; when the pre-hook logic is inserted into or pulled out from the hook dispatching center, the core detection logic can normally operate and is not influenced by the pre-hook logic; similarly, when the post-hook logic is inserted into or pulled out from the hook dispatch center, the core detection logic can also operate normally without being affected by the post-hook logic.
In a specific embodiment of the present invention, the electronic device may perform core detection on the pre-detected data stream through a predetermined core detection logic; the detection result may include: core detection pass or core detection fail; when the detection result of core detection on the pre-detected data stream is core detection passing through the pre-determined core detection logic, the electronic equipment can add a mark for core detection passing on the pre-detected data stream; when the detection result of the core detection on the pre-detected data stream through the predetermined core detection logic is that the core detection fails, the electronic device may add a mark that the core detection fails to the pre-detected data stream.
S206, if the registration information of the post-hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the post-hook logic corresponding to the access type of the original data stream is the same as the record information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream meets the post-personalized detection condition corresponding to the access type of the original data stream.
In a specific embodiment of the present invention, before the electronic device performs post-detection on the data stream after core detection through the hook scheduling center, it may also be determined whether there is post-hook logic registration information corresponding to the access type of the original data stream in the hook logic registration information corresponding to the access type of the original data stream; if the registration information of the post-hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, whether the registration information of the post-hook logic corresponding to the access type of the original data stream is the same as the record information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database can be further judged; if the registration information of the post hook logic corresponding to the access type of the original data stream is the same as the record information of the post hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream meets the post personalized detection condition corresponding to the access type of the original data stream. Specifically, if the registration information of the hook logic corresponding to the access type of the original data stream does not exist in the registration information of the post hook logic corresponding to the access type of the original data stream; or if the registration information of the post-hook logic corresponding to the access type of the original data stream is different from the registration information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream does not meet the post-personalized detection condition corresponding to the access type of the original data stream; at this time, the electronic device may end the detection flow of the original data stream.
S207, post detection is carried out on the data flow after core detection through a hook scheduling center.
In a specific embodiment of the present invention, the electronic device may perform post detection on the core detected data stream through the hook scheduling center. Specifically, the electronic device may determine, through the hook scheduling center, post-hook logic corresponding to the original data stream in the hook module; and then carrying out post detection on the data stream after core detection through post hook logic corresponding to the original data stream. Specifically, the electronic device may send a post detection request to the hook dispatch center; the post detection request carries the access type of the original data flow; then the electronic equipment can receive a post detection response returned by the hook dispatching center in response to the post detection request; the post detection response carries the identification information of post hook logic corresponding to the original data stream. Here, the electronic device may determine whether the identification information of the post-hook logic corresponding to the original data stream is the same as the record information of the post-hook logic corresponding to the access type of the pre-stored original data stream; and if the identification information of the post-hook logic corresponding to the original data stream is the same as the record information of the post-hook logic corresponding to the access type of the pre-stored original data stream, carrying out post-detection on the original data stream through the post-hook logic corresponding to the original data stream.
In a specific embodiment of the present invention, the electronic device may pre-configure post-hook logic corresponding to different access types in the hook module. For example, the electronic device may pre-configure post-hook logic corresponding to the graphics context type in the hook module; the post-hook logic corresponding to the atlas type can be pre-configured in the hook module; post-hook logic corresponding to comment types can be pre-configured in the hook module; post-hook logic corresponding to the question-answer type can also be pre-stored in the hook module. Therefore, in the step, the electronic device can determine the post-hook logic corresponding to the original data stream in the hook module through the hook scheduling center; and then carrying out post detection on the data stream after core detection through post hook logic corresponding to the original data stream.
In a specific embodiment of the present invention, before sending a post-detection request to the hook scheduling center, the electronic device may further configure post-hook logic corresponding to the original data stream in the hook module; distributing the identification information of the post-hook logic corresponding to the original data stream in the hook module; the post hook logic corresponding to the original data stream at least comprises: logic for data subscription or data statistics; wherein, data subscription refers to subscribing to a particular type of data. For example, when subscribing for teletext type data, the teletext type data is pushed to a designated message queue by the logic of the data subscription. Data statistics refer to counting the number of data streams of a particular type that are identified as passing or not passing by day or month.
In the specific embodiment of the invention, the electronic equipment can carry out post detection on the data flow after core detection through the hook dispatching center; the detection result may include: the post detection passes or the post detection does not pass; when the detection result of post detection on the data stream after core detection through the hook scheduling center is that the post detection passes, the electronic equipment can add a mark for the post detection passing on the data stream after core detection; when the detection result of the post detection on the data stream after the core detection through the hook scheduling center is that the post detection fails, the electronic device can add a mark that the post detection fails on the data stream after the core detection.
In a specific embodiment of the present invention, the hook registry is used to store the hook logic of each access type, which may be stored by a database or by a file, and the following is an example of storing the hook logic of the atlas type:
dispatch center logic example:
/>
the method for detecting the data stream provided by the embodiment of the invention firstly receives the original data stream sent by the client device and analyzes the access type of the original data stream; if the access type of the original data stream is judged to meet the corresponding prepositive personalized detection condition, the hook scheduling center is used for carrying out prepositive detection on the original data stream, and the hook scheduling center is used for carrying out prepositive detection on the original data stream; then core detection is carried out on the data flow after the front detection through a predetermined core detection logic; and if the access type of the original data stream is judged to meet the corresponding post-personalized detection condition, post-detection is carried out on the data stream after core detection through the hook scheduling center. That is, in the technical scheme of the invention, the front-end detection can be performed on the original data stream through the hook scheduling center; the post detection can also be performed on the data stream after the core detection through the hook scheduling center. In the existing data stream detection method, various personalized detection logics are added into the core detection logic generally and are used for meeting detection requirements of different users, but the core detection logic is more and more complex and is not easy to maintain along with continuous addition of the personalized detection logic; meanwhile, by adopting the existing detection method, the core logic is tightly coupled with the personalized detection logic, and if one personalized detection logic has a problem, the normal operation of the whole detection system can be influenced. Therefore, compared with the prior art, the data stream detection method provided by the embodiment of the invention has the advantages that the personalized detection logic and the core detection logic are mutually separated and are not mutually influenced; the detection efficiency can be effectively improved, and the detection cost is reduced; in addition, the technical scheme of the embodiment of the invention is simple and convenient to realize, convenient to popularize and wider in application range.
Example III
Fig. 3 is a flow chart of a method for detecting a data stream according to a third embodiment of the present invention. As shown in fig. 3, the method for detecting a data stream may include the steps of:
s301, receiving an original data stream sent by the client device and analyzing the access type of the original data stream.
In a specific embodiment of the present invention, an electronic device may receive an original data stream sent by a client device and parse an access type of the original data stream; the access type of the original data flow at least comprises: a graphic type, an atlas type, a comment type, or a question-answer type. Specifically, the electronic device may receive the original data stream 1 sent by the client device and parse out the access type 1 of the original data stream 1; the method can also receive the original data stream 2 sent by the client device and analyze the access type 2 of the original data stream 2; …; the method can also receive the original data stream X sent by the client device and analyze the access type X of the original data stream X; wherein X is a natural number of 1 or more. For example, the electronic device may receive an original data stream of a graphics context type sent by the client device and parse out that an access type of the original data stream is the graphics context type; the method can also receive an original data stream of an atlas type sent by the client device and analyze out that the access type of the original data stream is the atlas type; the method can also receive an original data stream of comment type sent by the client device and analyze that the access type of the original data stream is the comment type; the method can also receive the original data stream of the question-answer type sent by the client device and analyze out that the access type of the original data stream is the question-answer type; and are not intended to be limiting in any way.
S302, if the hook logic corresponding to the access type of the original data stream is registered in the hook registry, acquiring registration information of the hook logic corresponding to the access type of the original data stream in the hook registry.
In a specific embodiment of the present invention, if hook logic corresponding to an access type of an original data stream is registered in a hook registry, an electronic device may obtain registration information of hook logic corresponding to the access type of the original data stream in the hook registry; the registration information of the hook logic corresponding to the access type of the original data stream may only include the registration information of the front hook logic corresponding to the access type of the original data stream; the method also can only comprise the registration information of the post hook logic corresponding to the access type of the original data stream; the method also comprises the steps of registering the front hook logic corresponding to the access type of the original data stream and registering the back hook logic corresponding to the access type of the original data stream. For example, assume that registration information of hook logic corresponding to an access type of an original data stream is a; the registration information of the front hook logic corresponding to the access type of the original data stream is A1; the registration information of the post hook logic corresponding to the access type of the original data stream is A2; wherein a may include only A1; alternatively, a may include only A2; alternatively, a may also include A1 and A2.
S303, if the registration information of the front hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the front hook logic corresponding to the access type of the original data stream is the same as the record information of the front hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream meets the corresponding front personalized detection condition.
In the embodiment of the invention, the electronic equipment can firstly judge the hook logic corresponding to the access type of the original data stream registered in the hook registry; if the hook logic corresponding to the access type of the original data stream is registered in the hook registry, the electronic equipment can acquire the registration information of the hook logic corresponding to the access type of the original data stream in the hook registry; then judging whether the registration information of the front hook logic corresponding to the access type of the original data flow exists in the registration information of the hook logic corresponding to the access type of the original data flow; if the registration information of the hook logic corresponding to the access type of the original data stream exists in the registration information of the front hook logic corresponding to the access type of the original data stream; the electronic equipment can further judge whether the registration information of the front hook logic corresponding to the access type of the original data stream is the same as the record information of the front hook logic corresponding to the access type of the original data stream pre-stored in the database; if the registration information of the pre-hook logic corresponding to the access type of the original data stream is the same as the record information of the pre-hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream meets the pre-personalized detection condition corresponding to the access type of the original data stream. Specifically, if the hook logic corresponding to the access type of the original data stream is not registered in the hook registration center; or if the registration information of the hook logic corresponding to the access type of the original data stream does not exist; or if the registration information of the front hook logic corresponding to the access type of the original data stream is different from the registration information of the front hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream does not meet the front personalized detection condition corresponding to the access type of the original data stream; the electronic device may then perform core detection on the original data stream directly through the predetermined core detection logic.
S304, determining a front hook logic corresponding to the original data stream in a hook module through a hook scheduling center; and pre-detecting the original data stream through pre-hook logic corresponding to the original data stream.
In the specific embodiment of the invention, the electronic equipment can determine the front hook logic corresponding to the original data stream in the hook module through the hook scheduling center; and then the front-end detection is carried out on the original data stream through the front-end hook logic corresponding to the original data stream. Specifically, the electronic device may first send a preamble detection request to the hook dispatch center; the front detection request carries the access type of the original data flow; then receiving a preamble detection response returned by the hook dispatching center in response to the preamble detection request; the preamble detection response carries identification information of preamble hook logic corresponding to the original data stream. For example, the electronic device may first send a pre-invoke message to the hook dispatch center; the prepositive invoke message carries the access type of the original data stream; then receiving a preposed return message returned by the hook dispatching center in response to the preposed invoke message; the pre-return message carries identification information of pre-hook logic corresponding to the original data stream.
In a specific embodiment of the present invention, the electronic device may perform preamble detection on the original data stream through a preamble hook logic corresponding to the original data stream; the detection result may include: the preamble detection passes or the preamble detection does not pass; when the detection result of the preamble detection on the original data stream through the preamble hook logic is that the preamble detection passes, the electronic device can add a mark that the preamble detection passes on the original data stream; when the detection result of the preamble detection on the original data stream through the preamble hook logic is that the preamble detection fails, the electronic device may add a mark that the preamble detection fails to pass on the original data stream.
And S305, performing core detection on the data stream subjected to the preamble detection through a predetermined core detection logic.
In a specific embodiment of the present invention, the electronic device may perform core detection on the pre-detected data stream through a predetermined core detection logic. Specifically, the core detection logic is a logic entity independent of the pre-hook logic and the post-hook logic, and the core detection logic operates independently of the pre-hook logic and the post-hook logic; when the pre-hook logic is inserted into or pulled out from the hook dispatching center, the core detection logic can normally operate and is not influenced by the pre-hook logic; similarly, when the post-hook logic is inserted into or pulled out from the hook dispatch center, the core detection logic can also operate normally without being affected by the post-hook logic.
In a specific embodiment of the present invention, the electronic device may perform core detection on the pre-detected data stream through a predetermined core detection logic; the detection result may include: core detection pass or core detection fail; when the detection result of core detection on the pre-detected data stream is core detection passing through the pre-determined core detection logic, the electronic equipment can add a mark for core detection passing on the pre-detected data stream; when the detection result of the core detection on the pre-detected data stream through the predetermined core detection logic is that the core detection fails, the electronic device may add a mark that the core detection fails to the pre-detected data stream.
S306, if the registration information of the post-hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the post-hook logic corresponding to the access type of the original data stream is the same as the record information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream meets the post-personalized detection condition corresponding to the access type of the original data stream.
In a specific embodiment of the present invention, before the electronic device performs post-detection on the data stream after core detection through the hook scheduling center, it may also be determined whether there is post-hook logic registration information corresponding to the access type of the original data stream in the hook logic registration information corresponding to the access type of the original data stream; if the registration information of the post-hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, whether the registration information of the post-hook logic corresponding to the access type of the original data stream is the same as the record information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database can be further judged; if the registration information of the post hook logic corresponding to the access type of the original data stream is the same as the record information of the post hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream meets the post personalized detection condition corresponding to the access type of the original data stream. Specifically, if the registration information of the hook logic corresponding to the access type of the original data stream does not exist in the registration information of the post hook logic corresponding to the access type of the original data stream; or if the registration information of the post-hook logic corresponding to the access type of the original data stream is different from the registration information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream does not meet the post-personalized detection condition corresponding to the access type of the original data stream; at this time, the electronic device may end the detection flow of the original data stream.
S307, determining a post-hook logic corresponding to the original data stream in a hook module through a hook scheduling center; and performing post detection on the data stream after core detection through post hook logic corresponding to the original data stream.
In the specific embodiment of the invention, the electronic equipment can determine the post-hook logic corresponding to the original data stream in the hook module through the hook scheduling center; and then carrying out post detection on the data stream after core detection through post hook logic corresponding to the original data stream. Specifically, the electronic device may first send a post-detection request to the hook dispatch center; the post detection request carries the access type of the original data flow; then receiving a post detection response returned by the hook dispatching center in response to the post detection request; the post detection response carries the identification of post hook logic corresponding to the original data stream. For example, the electronic device may first send a post invoke message to the hook dispatch center; the post invoke message carries the access type of the original data stream; then receiving a post return message returned by the hook dispatching center in response to the post invoke message; the post return message carries the identification of the post hook logic corresponding to the original data stream.
In the embodiment of the invention, the electronic equipment can perform post detection on the data stream after core detection through post hook logic corresponding to the original data stream; the detection result may include: the post detection passes or the post detection does not pass; when the detection result of the post detection on the data stream after the core detection is that the post detection passes through the post hook logic, the electronic equipment can add a mark for the post detection passing through on the data stream after the core detection; when the detection result of the post detection on the data stream after the core detection through the post hook logic is that the post detection fails, the electronic device may add a mark that the post detection fails to the data stream after the core detection.
In a specific embodiment of the present invention, pre-detection refers to pre-personalized detection of a data stream by pre-hook logic before the data stream is detected by core detection logic. For different types of data streams, the user can define the pre-hook logic in the hook module by himself. For example, for a data stream of a graphic type, a user may define pre-hook logic corresponding to the graphic type in the hook module; for the data flow of the atlas type, a user can define the pre-hook logic corresponding to the atlas type in the hook module by himself; for the comment type data stream, a user can define pre-hook logic corresponding to the comment type in the hook module; for the data flow of the question-answer type, a user can define the pre-hook logic corresponding to the question-answer type in the hook module. For example, the pre-hook logic may include at least: logic for data adaptation, data exemption or traffic monitoring; wherein data adaptation refers to adapting the original data stream to a data format that can be processed by the core detection logic. For example, if the background format of the original data stream is not compatible with the standard data format, the background format of the original data stream may be adapted to a data format compatible with the standard data format by data adaptation. Data exemption refers to exemption from detecting a portion of data in the original data stream. For example, exemption detects header information. Flow monitoring refers to triggering an alarm when a particular type of data volume reaches an alarm threshold. For example, when the comment type data stream reaches the alarm threshold, an alarm is triggered through a short message or a telephone form. In addition, post detection refers to post personalized detection of the data stream through post hook logic after the data stream is detected through core detection logic. For different types of data streams, the user can define the post-hook logic in the hook module. For example, for a data stream of a graphic type, a user may define post-hook logic corresponding to the graphic type in the hook module; for the data flow of the atlas type, a user can define the post-hook logic corresponding to the atlas type in the hook module by himself; for the comment type data stream, a user can define the post-hook logic corresponding to the comment type in the hook module; for the data flow of the question-answer type, a user can define the post-hook logic corresponding to the question-answer type in the hook module. For example, the electronic device may be configured in post-hook logic to: logic for data subscription and data statistics; wherein, data subscription refers to subscribing to a particular type of data. For example, when subscribing for teletext type data, the teletext type data is pushed to a designated message queue by the logic of the data subscription. Data statistics refer to counting the number of data streams of a particular type that are identified as passing or not passing by day or month.
In a specific embodiment of the present invention, if the electronic device wishes to acquire the duration of time that a certain access type of data stream is detected by the core detection logic, the electronic device may record, through the pre-hook logic, the end time that the data stream is detected by the pre-hook logic; and recording the start time of the data stream detected by the post-hook logic through the post-hook logic, and calculating the duration of the data stream detected by the core logic according to the end time of the data stream detected by the pre-hook logic and the start time of the data stream detected by the post-hook logic. For example, assume that the end time for a data stream of the teletext type detected by the pre-hook logic is 0:00; the start time of the data stream of the graphic type detected by the post hook logic is 0:05, and then the duration of the data stream of the graphic type detected by the core detection logic is 5 seconds.
In addition, in the embodiment of the invention, if the user wants to subscribe to the data after the data flow of a certain access type is detected by the core detection logic, the electronic device can send the data detected by the core detection logic to the message queue through the post hook logic, so that the requirement can be conveniently met on the premise of not influencing the core detection logic.
The method for detecting the data stream provided by the embodiment of the invention firstly receives the original data stream sent by the client device and analyzes the access type of the original data stream; if the access type of the original data stream is judged to meet the corresponding prepositive personalized detection condition, the hook scheduling center is used for carrying out prepositive detection on the original data stream, and the hook scheduling center is used for carrying out prepositive detection on the original data stream; then core detection is carried out on the data flow after the front detection through a predetermined core detection logic; and if the access type of the original data stream is judged to meet the corresponding post-personalized detection condition, post-detection is carried out on the data stream after core detection through the hook scheduling center. That is, in the technical scheme of the invention, the front-end detection can be performed on the original data stream through the hook scheduling center; the post detection can also be performed on the data stream after the core detection through the hook scheduling center. In the existing data stream detection method, various personalized detection logics are added into the core detection logic generally and are used for meeting detection requirements of different users, but the core detection logic is more and more complex and is not easy to maintain along with continuous addition of the personalized detection logic; meanwhile, by adopting the existing detection method, the core logic is tightly coupled with the personalized detection logic, and if one personalized detection logic has a problem, the normal operation of the whole detection system can be influenced. Therefore, compared with the prior art, the data stream detection method provided by the embodiment of the invention has the advantages that the personalized detection logic and the core detection logic are mutually separated and are not mutually influenced; the detection efficiency can be effectively improved, and the detection cost is reduced; in addition, the technical scheme of the embodiment of the invention is simple and convenient to realize, convenient to popularize and wider in application range.
Example IV
Fig. 4 is a flow chart of a method for detecting a data stream according to a fourth embodiment of the present invention. As shown in fig. 4, the method for detecting a data stream may include the steps of:
s1, receiving an original data stream sent by a client device and analyzing the access type of the original data stream.
In a specific embodiment of the present invention, an electronic device may receive an original data stream sent by a client device and parse an access type of the original data stream; wherein, the types of the original data stream at least can include: the graph is of a type, an atlas type, a comment type, or a question-answer type.
S2, judging whether the original data flow is registered in a hook registration center or not according to hook logic corresponding to the access type of the original data; if yes, executing S3; otherwise, S4 is performed.
In a specific embodiment of the present invention, if the original data stream has registered the hook logic corresponding to the access type of the original data in the hook registry, the electronic device may continuously determine whether a pre-detection flag corresponding to the access type of the original data stream exists in the predetermined database; if the original data stream is not registered in the hook registration center, the hook logic corresponding to the access type of the original data is provided; the electronic device may perform core detection on the original data stream through core detection logic.
S3, judging whether the access type of the original data stream meets the prepositive personalized detection condition corresponding to the access type of the original data stream; if yes, executing S5; otherwise, S4 is performed.
In the embodiment of the invention, if the hook logic corresponding to the access type of the original data stream is registered in the hook registry, acquiring the registration information of the hook logic corresponding to the access type of the original data stream in the hook registry; if the registration information of the front hook logic corresponding to the access type of the original data stream exists in the registration information of the front hook logic corresponding to the access type of the original data stream, and the registration information of the front hook logic corresponding to the access type of the original data stream is the same as the record information of the front hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream meets the front personalized detection condition corresponding to the access type of the original data stream; s5, executing; if the hook logic corresponding to the access type of the original data stream is not registered in the hook registry; or, the registration information of the front hook logic corresponding to the access type of the original data stream does not exist in the registration information of the hook logic corresponding to the access type of the original data stream; or if the registration information of the front hook logic corresponding to the access type of the original data stream is different from the registration information of the front hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream does not meet the front personalized detection condition corresponding to the access type of the original data stream; s4 is performed.
S4, core detection is carried out on the original data stream through core detection logic.
In a specific embodiment of the present invention, the electronic device may perform core detection on the original data stream through a predetermined core detection logic; the pre-detected data stream may also be core detected by a predetermined core detection logic. In this step, if it is determined that the access type of the original data stream does not satisfy the pre-personalized detection condition corresponding to the access type of the original data stream, the electronic device performs core detection on the original data stream through the core detection logic. Specifically, the core detection logic is a logic entity independent of the pre-hook logic and the post-hook logic, and the core detection logic operates independently of the pre-hook logic and the post-hook logic; when the pre-hook logic is inserted into or pulled out from the hook dispatching center, the core detection logic can normally operate and is not influenced by the pre-hook logic; similarly, when the post-hook logic is inserted into or pulled out from the hook dispatch center, the core detection logic can also operate normally without being affected by the post-hook logic.
S5, performing front-end detection on the original data stream through a hook scheduling center.
In particular embodiments of the present invention, a hook module may be used to store various types of pre-hook logic, for example, a hook module may store: pre-hook logic PreHook corresponding to the graphic type; pre-hook logic PreHook corresponding to the atlas type; pre-hook logic PreHook corresponding to comment type; front hook logic PreHook corresponding to question-answer type; the X type refers to any type including but not limited to the above.
S6, acquiring the data flow after the front detection through a hook scheduling center; and sending the pre-detected data stream to core detection logic for detection.
S7, judging whether the access type of the original data stream meets the corresponding post personalized detection condition; if yes, executing S8; otherwise, S10 is performed.
In a specific embodiment of the present invention, if registration information of post-hook logic corresponding to an access type of an original data stream exists in registration information of hook logic corresponding to the access type of the original data stream, and the registration information of post-hook logic corresponding to the access type of the original data stream is the same as the record information of post-hook logic corresponding to the access type of the original data stream pre-stored in a database, then it is determined that the access type of the original data stream meets a post-personalized detection condition corresponding to the access type of the original data stream; s8, executing; if the registration information of the hook logic corresponding to the access type of the original data stream does not exist, the registration information of the post hook logic corresponding to the access type of the original data stream; or, if the registration information of the post-hook logic corresponding to the access type of the original data stream is different from the record information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database, judging that the access type of the original data stream does not meet the post-personalized detection condition corresponding to the access type of the original data stream; s10 is performed.
S8, post-detection is carried out on the data flow after core detection through the hook scheduling center.
In particular embodiments of the present invention, a hook module may be used to store various types of post-hook logic, for example, a hook module may store: post hook logic PostHook corresponding to the graphic type; post hook logic PostHook corresponding to the atlas type; post hook logic PostHook corresponding to comment type; post hook logic PostHook corresponding to question-answer type; the X type refers to any type including but not limited to the above.
S9, acquiring the post-detected data stream through a hook dispatching center.
S10, ending the detection flow of the data stream.
The method for detecting the data stream provided by the embodiment of the invention firstly receives the original data stream sent by the client device and analyzes the access type of the original data stream; if the access type of the original data stream is judged to meet the corresponding prepositive personalized detection condition, the hook scheduling center is used for carrying out prepositive detection on the original data stream, and the hook scheduling center is used for carrying out prepositive detection on the original data stream; then core detection is carried out on the data flow after the front detection through a predetermined core detection logic; and if the access type of the original data stream is judged to meet the corresponding post-personalized detection condition, post-detection is carried out on the data stream after core detection through the hook scheduling center. That is, in the technical scheme of the invention, the front-end detection can be performed on the original data stream through the hook scheduling center; the post detection can also be performed on the data stream after the core detection through the hook scheduling center. In the existing data stream detection method, various personalized detection logics are added into the core detection logic generally and are used for meeting detection requirements of different users, but the core detection logic is more and more complex and is not easy to maintain along with continuous addition of the personalized detection logic; meanwhile, by adopting the existing detection method, the core logic is tightly coupled with the personalized detection logic, and if one personalized detection logic has a problem, the normal operation of the whole detection system can be influenced. Therefore, compared with the prior art, the data stream detection method provided by the embodiment of the invention has the advantages that the personalized detection logic and the core detection logic are mutually separated and are not mutually influenced; the detection efficiency can be effectively improved, and the detection cost is reduced; in addition, the technical scheme of the embodiment of the invention is simple and convenient to realize, convenient to popularize and wider in application range.
Example five
Fig. 5 is a first schematic structural diagram of a data flow detection device according to a fifth embodiment of the present invention. As shown in fig. 5, a device for detecting a data stream according to an embodiment of the present invention may include: a receiving module 501, a front detection module 502, a core detection module 503 and a rear detection module 504; wherein,
the receiving module 501 is configured to receive an original data stream sent by a client device and analyze an access type of the original data stream;
the pre-detection module 502 is configured to perform pre-detection on the original data stream through a hook scheduling center if it is determined that the access type of the original data stream meets a pre-personalized detection condition corresponding to the access type of the original data stream;
the core detection module 503 is configured to perform core detection on the pre-detected data stream through predetermined core detection logic;
the post-detection module 504 is configured to perform post-detection on the data flow after core detection by using the hook scheduling center if it is determined that the access type of the original data flow meets a post-personalized detection condition corresponding to the access type of the original data flow.
Further, the pre-detection module 502 is specifically configured to, if the hook logic corresponding to the access type of the original data stream is registered in a hook registry, obtain, in the hook registry, registration information of the hook logic corresponding to the access type of the original data stream; if the registration information of the pre-hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the pre-hook logic corresponding to the access type of the original data stream is the same as the record information of the pre-hook logic corresponding to the access type of the original data stream pre-stored in a database, judging that the access type of the original data stream meets the pre-arranged personalized detection condition corresponding to the access type of the original data stream.
Fig. 6 is a second schematic structural diagram of a data flow detection device according to a fifth embodiment of the present invention. As shown in fig. 6, the pre-detection module 502 includes: a first determination submodule 5021 and a pre-detection submodule 5022; wherein,
the first determining submodule 5021 is configured to determine, by using the hook scheduling center, a front hook logic corresponding to the original data stream in a hook module;
the preamble detection submodule 5022 is configured to perform preamble detection on the original data stream through preamble hook logic corresponding to the original data stream.
Further, the post-detection module 504 is specifically configured to determine that the access type of the original data stream satisfies a post-personalized detection condition corresponding to the access type of the original data stream if the registration information of the post-hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the post-hook logic corresponding to the access type of the original data stream is the same as the record information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database.
Further, the post detection module 504 includes: a second determination submodule 5041 and a post-detection submodule 5042; wherein,
The second determining submodule 5041 is configured to determine, by using the hook scheduling center, post-hook logic corresponding to the original data stream in a hook module;
the post-detection submodule 5042 is configured to post-detect the core detected data stream through post-hook logic corresponding to the original data stream.
Further, the first determining submodule 5021 is specifically configured to send a preamble detection request to the hook scheduling center; wherein, the preamble detection request carries the access type of the original data stream; receiving a preamble detection response returned by the hook scheduling center in response to the preamble detection request; the preamble detection response carries identification information of preamble hook logic corresponding to the original data stream.
Further, the second determining submodule 5041 is specifically configured to send a post detection request to the hook scheduling center; wherein, the post detection request carries the access type of the original data flow; receiving a post detection response returned by the hook scheduling center in response to the post detection request; the post detection response carries the identification information of the post hook logic corresponding to the original data stream.
Further, the pre-detection module 502 further includes: a first configuration submodule (not shown in the figure) configured to configure pre-hook logic corresponding to the original data stream in the hook module; distributing the identification information of the pre-hook logic corresponding to the original data stream in the hook module; the pre-hook logic corresponding to the original data stream at least comprises: logic for data adaptation, data exemption, or traffic monitoring.
Further, the post-detection module 504 further includes: a second configuration sub-module (not shown in the figure) configured to configure post-hook logic corresponding to the original data stream in the hook module; distributing the identification information of the post-hook logic corresponding to the original data stream in the hook module; wherein, the post hook logic corresponding to the original data stream at least comprises: logic for data subscription or data statistics.
The data stream detection device can execute the method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. Technical details not described in detail in this embodiment may refer to the method for detecting a data stream provided in any embodiment of the present invention.
Example six
Fig. 7 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention. Fig. 7 shows a block diagram of an exemplary electronic device suitable for use in implementing embodiments of the invention. The electronic device 12 shown in fig. 7 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 7, the electronic device 12 is in the form of a general purpose computing device. Components of the electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 7, commonly referred to as a "hard disk drive"). Although not shown in fig. 7, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through a network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 over the bus 18. It should be appreciated that although not shown in fig. 7, other hardware and/or software modules may be used in connection with electronic device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing the data stream detection method provided by the embodiment of the present invention.
Example seven
The seventh embodiment of the invention provides a computer storage medium.
The computer-readable storage media of embodiments of the present invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (18)

1. A method of detecting a data stream, the method comprising:
receiving an original data stream sent by a client device and analyzing the access type of the original data stream;
if the hook logic corresponding to the access type of the original data stream is registered in a hook registry, acquiring registration information of the hook logic corresponding to the access type of the original data stream in the hook registry;
if the registration information of the front hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the front hook logic corresponding to the access type of the original data stream is the same as the record information of the front hook logic corresponding to the access type of the original data stream pre-stored in a database, judging that the access type of the original data stream meets the corresponding front personalized detection condition, and performing front detection on the original data stream through a hook scheduling center;
Core detection is carried out on the data stream after the front detection through a predetermined core detection logic;
and if the access type of the original data stream is judged to meet the corresponding post-personalized detection condition, carrying out post-detection on the data stream after core detection through the hook scheduling center.
2. The method of claim 1, wherein the pre-detection of the original data stream by a hook scheduling center comprises:
determining front hook logic corresponding to the original data stream in a hook module through the hook scheduling center;
and performing preamble detection on the original data stream through the preamble hook logic corresponding to the original data stream.
3. The method according to claim 1, wherein said determining that the access type of the original data stream satisfies a post-personalized detection condition corresponding thereto comprises:
if the registration information of the post hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the post hook logic corresponding to the access type of the original data stream is the same as the record information of the post hook logic corresponding to the access type of the original data stream which is pre-stored in the database, judging that the access type of the original data stream meets the post personalized detection condition corresponding to the access type of the original data stream.
4. The method of claim 3, wherein the post-detection of the core detected data stream by the hook scheduling center comprises:
determining post-hook logic corresponding to the original data stream in a hook module through the hook scheduling center;
and performing post detection on the data stream after core detection through post hook logic corresponding to the original data stream.
5. The method according to claim 2, wherein the determining, by the hook scheduling center, the pre-hook logic corresponding to the original data stream in the hook module includes:
sending a preamble detection request to the hook dispatching center; wherein, the preamble detection request carries the access type of the original data stream;
receiving a preamble detection response returned by the hook scheduling center in response to the preamble detection request; the preamble detection response carries identification information of preamble hook logic corresponding to the original data stream.
6. The method of claim 4, wherein the determining, by the hook dispatch center, the post-hook logic corresponding to the original data stream in the hook module comprises:
Sending a post detection request to the hook dispatching center; wherein, the post detection request carries the access type of the original data flow;
receiving a post detection response returned by the hook scheduling center in response to the post detection request; the post detection response carries the identification information of the post hook logic corresponding to the original data stream.
7. The method of claim 5, wherein prior to said sending a preamble detection request to the hook dispatch center, the method further comprises:
configuring pre-hook logic corresponding to the original data stream in the hook module; distributing the identification information of the pre-hook logic corresponding to the original data stream in the hook module; the pre-hook logic corresponding to the original data stream at least comprises: logic for data adaptation, data exemption, or traffic monitoring.
8. The method of claim 6, wherein prior to said sending a post-detection request to the hook dispatch center, the method further comprises:
configuring post-hook logic corresponding to the original data stream in the hook module; distributing the identification information of the post-hook logic corresponding to the original data stream in the hook module; wherein, the post hook logic corresponding to the original data stream at least comprises: logic for data subscription or data statistics.
9. A device for detecting a data stream, the device comprising: the device comprises a receiving module, a front detection module, a core detection module and a rear detection module; wherein,
the receiving module is used for receiving an original data stream sent by the client device and analyzing the access type of the original data stream;
the front detection module is specifically configured to, if hook logic corresponding to the access type of the original data stream is registered in a hook registry, obtain registration information of the hook logic corresponding to the access type of the original data stream in the hook registry; if the registration information of the front hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the front hook logic corresponding to the access type of the original data stream is the same as the record information of the front hook logic corresponding to the access type of the original data stream pre-stored in a database, judging that the access type of the original data stream meets the corresponding front personalized detection condition, and performing front detection on the original data stream through a hook scheduling center;
The core detection module is used for carrying out core detection on the data flow after the front detection through a predetermined core detection logic;
and the post detection module is used for carrying out post detection on the data flow after core detection through the hook scheduling center if the access type of the original data flow is judged to meet the post personalized detection condition corresponding to the access type of the original data flow.
10. The apparatus of claim 9, wherein the preamble detection module comprises: a first determination sub-module and a preamble detection sub-module; wherein,
the first determining submodule is used for determining front hook logic corresponding to the original data flow in a hook module through the hook scheduling center;
the pre-detection sub-module is used for pre-detecting the original data stream through pre-hook logic corresponding to the original data stream.
11. The apparatus according to claim 9, wherein:
the post detection module is specifically configured to determine that the access type of the original data stream satisfies a post-personalized detection condition corresponding to the access type of the original data stream if the registration information of the post-hook logic corresponding to the access type of the original data stream exists in the registration information of the hook logic corresponding to the access type of the original data stream, and the registration information of the post-hook logic corresponding to the access type of the original data stream is the same as the record information of the post-hook logic corresponding to the access type of the original data stream pre-stored in the database.
12. The apparatus of claim 11, wherein the post detection module comprises: a second determination sub-module and a post detection sub-module; wherein,
the second determining submodule is used for determining post-hook logic corresponding to the original data flow in the hook module through the hook scheduling center;
and the post detection submodule is used for carrying out post detection on the data flow after core detection through post hook logic corresponding to the original data flow.
13. The apparatus according to claim 10, wherein:
the first determining submodule is specifically used for sending a front detection request to the hook dispatching center; wherein, the preamble detection request carries the access type of the original data stream; receiving a preamble detection response returned by the hook scheduling center in response to the preamble detection request; the preamble detection response carries identification information of preamble hook logic corresponding to the original data stream.
14. The apparatus according to claim 12, wherein:
the second determining submodule is specifically configured to send a post detection request to the hook scheduling center; wherein, the post detection request carries the access type of the original data flow; receiving a post detection response returned by the hook scheduling center in response to the post detection request; the post detection response carries the identification information of the post hook logic corresponding to the original data stream.
15. The apparatus of claim 13, wherein the preamble detection module further comprises: a first configuration submodule, configured to configure pre-hook logic corresponding to the original data stream in the hook module; distributing the identification information of the pre-hook logic corresponding to the original data stream in the hook module; the pre-hook logic corresponding to the original data stream at least comprises: logic for data adaptation, data exemption, or traffic monitoring.
16. The apparatus of claim 14, wherein the post detection module further comprises: the second configuration submodule is used for configuring the post-hook logic corresponding to the original data stream in the hook module; distributing the identification information of the post-hook logic corresponding to the original data stream in the hook module; wherein, the post hook logic corresponding to the original data stream at least comprises: logic for data subscription or data statistics.
17. An electronic device, comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of detecting a data stream as claimed in any one of claims 1 to 8.
18. A storage medium having stored thereon a computer program, which when executed by a processor implements a method of detecting a data stream according to any of claims 1 to 8.
CN201910389663.XA 2019-05-10 2019-05-10 Data stream detection method and device, electronic equipment and storage medium Active CN110120899B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910389663.XA CN110120899B (en) 2019-05-10 2019-05-10 Data stream detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910389663.XA CN110120899B (en) 2019-05-10 2019-05-10 Data stream detection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110120899A CN110120899A (en) 2019-08-13
CN110120899B true CN110120899B (en) 2024-03-01

Family

ID=67522152

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910389663.XA Active CN110120899B (en) 2019-05-10 2019-05-10 Data stream detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110120899B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111552566B (en) * 2020-04-26 2024-04-23 北京奇艺世纪科技有限公司 Data processing system, method, electronic equipment and storage medium
CN115865853A (en) * 2022-11-24 2023-03-28 金蝶软件(中国)有限公司 Message real-time receiving method, device, storage medium and system

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1920877A (en) * 2006-09-19 2007-02-28 北京邮电大学 Statistic supervision and structure supervision based hidden messages analysis system
CN102253820A (en) * 2011-06-16 2011-11-23 华中科技大学 Stream type repetitive data detection method
CN103413003A (en) * 2013-08-21 2013-11-27 浪潮(北京)电子信息产业有限公司 Sequence transmitting device, sequence receiving device, sequence transmitting method and sequence receiving method
CN105281945A (en) * 2014-09-19 2016-01-27 中国人民解放军第二炮兵工程大学 Data flow-based deterministic network integrity fault detection method
CN105447385A (en) * 2014-12-08 2016-03-30 哈尔滨安天科技股份有限公司 Multilayer detection based application type database honey pot realization system and method
CN107148009A (en) * 2017-07-01 2017-09-08 浙江省计量科学研究院 Multi-standard mobile communications network internet surfing data traffic measurement apparatus and its method
CN107295001A (en) * 2017-07-12 2017-10-24 中国石油大学(华东) A kind of cloud computing environment intruding detection system framework and its method
CN107612938A (en) * 2017-10-27 2018-01-19 朱秋华 A kind of network user's anomaly detection method, device, equipment and storage medium
CN107801215A (en) * 2017-11-22 2018-03-13 重庆邮电大学 The balanced system and method for the up TCP traffic streams of AP are realized in WLAN
US10033747B1 (en) * 2015-09-29 2018-07-24 Fireeye, Inc. System and method for detecting interpreter-based exploit attacks
CN109474568A (en) * 2017-12-25 2019-03-15 北京安天网络安全技术有限公司 For the detection method and system for realizing malicious attack using the preposition technology in domain

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130289902A1 (en) * 2012-04-30 2013-10-31 Knowm Tech, Llc Anomaly detection utilizing energy flow networks
US20100251355A1 (en) * 2009-03-31 2010-09-30 Inventec Corporation Method for obtaining data for intrusion detection
DE102010016541A1 (en) * 2010-04-20 2011-10-20 Sabrina Duda Computer-assisted method for generating a software-based analysis module
US9703676B2 (en) * 2014-12-31 2017-07-11 International Business Machines Corporation Testing application internal modules with instrumentation
US9942122B2 (en) * 2016-02-29 2018-04-10 Airmagnet, Inc. Fast packet retrieval based on flow ID and metadata

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1920877A (en) * 2006-09-19 2007-02-28 北京邮电大学 Statistic supervision and structure supervision based hidden messages analysis system
CN102253820A (en) * 2011-06-16 2011-11-23 华中科技大学 Stream type repetitive data detection method
CN103413003A (en) * 2013-08-21 2013-11-27 浪潮(北京)电子信息产业有限公司 Sequence transmitting device, sequence receiving device, sequence transmitting method and sequence receiving method
CN105281945A (en) * 2014-09-19 2016-01-27 中国人民解放军第二炮兵工程大学 Data flow-based deterministic network integrity fault detection method
CN105447385A (en) * 2014-12-08 2016-03-30 哈尔滨安天科技股份有限公司 Multilayer detection based application type database honey pot realization system and method
US10033747B1 (en) * 2015-09-29 2018-07-24 Fireeye, Inc. System and method for detecting interpreter-based exploit attacks
CN107148009A (en) * 2017-07-01 2017-09-08 浙江省计量科学研究院 Multi-standard mobile communications network internet surfing data traffic measurement apparatus and its method
CN107295001A (en) * 2017-07-12 2017-10-24 中国石油大学(华东) A kind of cloud computing environment intruding detection system framework and its method
CN107612938A (en) * 2017-10-27 2018-01-19 朱秋华 A kind of network user's anomaly detection method, device, equipment and storage medium
CN107801215A (en) * 2017-11-22 2018-03-13 重庆邮电大学 The balanced system and method for the up TCP traffic streams of AP are realized in WLAN
CN109474568A (en) * 2017-12-25 2019-03-15 北京安天网络安全技术有限公司 For the detection method and system for realizing malicious attack using the preposition technology in domain

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Weihan Wang等.Potential-driven load distribution for distributed data stream processing.《SSPS '08: Proceedings of the 2nd international workshop on Scalable stream processing system》.2008,全文. *
基于linux环境的网络安全防火墙和入侵检测系统的研究;杨玉新;;德宏师范高等专科学校学报(04);全文 *
基于前置层和消息总线的数据传输;王东阳;杨春生;江源;杨晴雅;化晨冰;陈璐;;计算机系统应用(01);全文 *
高速网络超点检测的并行数据流方法;周爱平;程光;郭晓军;梁一鑫;;软件学报(07);全文 *

Also Published As

Publication number Publication date
CN110120899A (en) 2019-08-13

Similar Documents

Publication Publication Date Title
EP3486901B1 (en) Voice wakeup method, cloud server and computer-readable medium
CN109002510B (en) Dialogue processing method, device, equipment and medium
US9772990B2 (en) Personal assistant context building
CN110865888B (en) Resource loading method and device, server and storage medium
CN107273531B (en) Telephone number classification identification method, device, equipment and storage medium
CN110309005B (en) Function calling method and device, terminal equipment and storage medium
CN111737022B (en) Micro-service-based interface calling method, system, equipment and medium
CN114528044B (en) Interface calling method, device, equipment and medium
CN109243425A (en) Speech recognition test method, device, system, computer equipment and storage medium
CN110120899B (en) Data stream detection method and device, electronic equipment and storage medium
CN107784205B (en) User product auditing method, device, server and storage medium
CN109495549B (en) Method, equipment and computer storage medium for application pull alive
CN109933269A (en) Method, equipment and the computer storage medium that small routine is recommended
CN113254969B (en) Business data processing method and device, electronic equipment and storage medium
CN109960554A (en) Show method, equipment and the computer storage medium of reading content
EP4124025A1 (en) Interaction information processing method and apparatus, electronic device and storage medium
CN111736825B (en) Information display method, device, equipment and storage medium
CN108399128A (en) A kind of generation method of user data, device, server and storage medium
CN110443062B (en) Operation method and device of multi-tenant database and computer equipment
CN111045926A (en) Application program jamming detection method, device, medium and electronic equipment
CN111124627A (en) Method, device, terminal and storage medium for determining application program caller
CN115237716A (en) Event recording and statistical method and device for operating system
CN113467656B (en) Screen touch event notification method and vehicle machine
CN113032650B (en) Library book management method, library book management device, library book management server and library book management storage medium
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium

Legal Events

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