CN110866037A - Message filtering method and device - Google Patents

Message filtering method and device Download PDF

Info

Publication number
CN110866037A
CN110866037A CN201911136099.7A CN201911136099A CN110866037A CN 110866037 A CN110866037 A CN 110866037A CN 201911136099 A CN201911136099 A CN 201911136099A CN 110866037 A CN110866037 A CN 110866037A
Authority
CN
China
Prior art keywords
message
filtering
message filtering
value
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911136099.7A
Other languages
Chinese (zh)
Other versions
CN110866037B (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.)
China Travelsky Technology Co Ltd
Original Assignee
China Travelsky 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 China Travelsky Technology Co Ltd filed Critical China Travelsky Technology Co Ltd
Priority to CN201911136099.7A priority Critical patent/CN110866037B/en
Publication of CN110866037A publication Critical patent/CN110866037A/en
Application granted granted Critical
Publication of CN110866037B publication Critical patent/CN110866037B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • G06F16/24564Applying rules; Deductive queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G5/00Traffic control systems for aircraft, e.g. air-traffic control [ATC]
    • G08G5/003Flight plan management
    • G08G5/0039Modification of a flight plan

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides a message filtering method and device, wherein each message filtering rule is matched with a message, and if the message filtering rule is successfully matched with the message, the message is used as a filtering message. The message filtering rules are obtained according to a plurality of message filtering elements, the message filtering elements are obtained according to prestored historical messages, and the message filtering elements are strongly related to the messages, so that the message filtering rules obtained according to the message filtering elements are also related to the messages, and the message filtering rules related to the messages are adopted to filter and filter the messages, so that the accuracy of filtering and filtering the messages can be improved. Meanwhile, each message filtering rule is matched with the message in sequence aiming at each message, and because the number of the message filtering rules is set to be a plurality, and any two message filtering rules are different rules, the messages can be filtered and screened from a plurality of different angles, so that the accuracy of screening and filtering the messages can be further improved.

Description

Message filtering method and device
Technical Field
The present application relates to the field of information processing, and in particular, to a method and an apparatus for filtering a packet.
Background
In the management of an airline company, the airline company adjusts a flight plan every day according to factors such as weather conditions, airplane scheduling, unit arrangement and the like, and after the flight plan is adjusted, a transportation capacity system of the airline company sends a corresponding flight adjustment message. But in these messages, many are meaningless for flight sales.
For example, a flight is initially scheduled to perform a flight mission using an airplane with airplane registration number B1111 and then tuned to perform a flight mission for an airplane with airplane registration number B2222. In such a case, the capacity system of the airline would send a flight adjustment message, but in practice, the passenger only cares about the model, time, catering, etc. of the flight, and does not care which aircraft the flight is specifically performing the flight mission, so the message is meaningless for the flight sales.
Currently, for these messages which are meaningless for flight sales, the airline companies usually manually screen out and use them as filtering messages, and for the filtering messages, no change of flight schedule is required. Due to artificial subjective factors, the problem of high error rate generally exists in message screening, so how to improve the accuracy rate of screening and filtering messages becomes a problem which needs to be solved urgently at present.
Disclosure of Invention
The application provides a message filtering method and device, and aims to solve the problem of improving the positive accuracy of message screening and filtering.
In order to achieve the above object, the present application provides the following technical solutions:
a message filtering method comprises the following steps:
acquiring a plurality of messages;
optionally, the method obtains a plurality of preset message filtering rules; the preset message filtering rule is obtained according to a plurality of message filtering elements, and the message filtering elements are obtained according to pre-stored historical messages;
for each message, sequentially matching each message filtering rule with the message;
if the message filtering rule is successfully matched with the message, taking the message as a filtering message;
and if all the message filtering rules are failed to be matched with the messages, taking the messages as non-filtering messages.
Optionally, the method includes, in accordance with the history packet, obtaining the packet filtering element, including:
acquiring the value of a preset attribute item in the history message;
generating a data matrix according to the values of the attribute items; the values of the attribute items correspond to the data in the data matrix one by one;
performing dimensionality reduction processing on the data matrix to obtain a target matrix;
and aiming at each target data in the target matrix, taking the attribute item corresponding to the target data as the message filtering element.
Optionally, the method includes a process of obtaining a plurality of message filtering rules according to the plurality of message filtering elements, where the process includes:
acquiring a plurality of preset message filtering element sets; the message filtering element set at least comprises one message filtering element;
and aiming at each preset message filtering element set, generating a message filtering rule corresponding to the message filtering element set according to a preset message filtering rule generating algorithm, wherein the message filtering rule comprises the message filtering elements and the values of the message filtering elements, and the values of the message filtering elements are determined by the message filtering rule generating algorithm.
Optionally, in the method, after determining that the packet is a filtered packet, the method further includes:
and setting a filtering identifier for the filtering message, wherein the filtering identifier is used for indicating that the message is the filtering message.
Optionally, the method for obtaining a plurality of preset message filtering rules includes:
displaying all preset message filtering rules;
and obtaining the plurality of message filtering rules based on the message filtering rules selected by the user from the displayed message filtering rules.
The above method, optionally, may be a process of determining whether a message filtering rule is successfully matched with the message, including:
determining message filtering elements in the message filtering rules and values of the message filtering elements;
obtaining a target value corresponding to the message filtering element from a target object; the target object comprises the message and/or a target message corresponding to the message in a preset database; determining a target message corresponding to the message according to the attribute item of the message;
judging whether the target value or a first target value meets the value of the message filtering element, wherein the first target value is a difference value between a plurality of target values; the value of the target value meeting the message filtering element is as follows: the difference value between the target value and the value of the message filtering element meets the condition of a preset threshold value; the first target value is the value of the message filtering element: the difference value between the first target value and the value of the message filtering element meets the condition of a preset threshold value;
if the target value or the first target value meets the value of the filtering item, determining that the message is successfully matched with the message filtering rule;
and if the target value or the first target value does not accord with the value of the filtering item, determining that the matching of the message and the message filtering rule fails.
In the foregoing method, optionally, the value of the message filtering element and the threshold are values set by a user based on a front-end interface.
A message filtering apparatus, comprising:
a first obtaining unit, configured to obtain a plurality of messages;
the second obtaining unit is used for obtaining a plurality of preset message filtering rules; the message filtering rule is obtained according to a plurality of message filtering elements, and the message filtering elements are obtained according to pre-stored historical messages;
the matching unit is used for matching each message filtering rule with the message in sequence aiming at each message;
the first determining unit is used for taking the message as a filtering message if the message filtering rule is successfully matched with the message;
and the second determining unit is used for taking the message as a non-filtering message if all the message filtering rules are failed to be matched with the message.
An electronic device, comprising: a processor and a memory for storing a program; the processor is used for running the program to realize the message filtering method.
A computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the above-mentioned message filtering method.
According to the method and the device, because the message filtering elements are obtained according to the historical messages and have strong correlation with the messages, the message filtering rules obtained according to the message filtering elements also have correlation with the messages, and the message filtering rules with correlation with the messages are adopted to filter and filter the messages, so that the accuracy of filtering and filtering the messages can be improved. Meanwhile, each message filtering rule is matched with the message in sequence aiming at each message, if the message filtering rule is successfully matched with the message, the message is used as the filtering message, and because the number of the message filtering rules is set to be a plurality, and any two message filtering rules are different rules, the messages can be filtered and screened from a plurality of different angles, so that the accuracy of screening and filtering the messages can be further improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a message filtering method disclosed in an embodiment of the present application;
fig. 2 is a flowchart of a method for obtaining a plurality of message filtering elements according to a history message according to an embodiment of the present application;
fig. 3 is a flowchart of a method for determining whether a message filtering rule is successfully matched with a message according to the embodiment of the present application;
fig. 4 is a schematic structural diagram of a flight plan message filtering system disclosed in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a message filtering apparatus disclosed in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device disclosed in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The execution main body of the embodiment of the application is a background server of a message filtering system, and the message filtering system comprises a front-end user interaction interface and the background server.
Fig. 1 is a method for filtering a packet disclosed in the embodiment of the present application, which may include the following steps:
s101, at least one message is obtained.
The file containing the message information imported by the user through the user interaction interface can be analyzed, so that one or more messages can be obtained. Of course, if the user directly imports a plurality of messages, the user can directly obtain the user imported messages without parsing. The prior art can be referred to in the process of analyzing the file to obtain at least one message.
S102, obtaining a plurality of preset message filtering rules.
In this embodiment, the background server stores a plurality of message filtering rules in advance. One way to obtain the plurality of preset message filtering rules may be to display all pre-stored message filtering rules on the user interaction interface, and obtain the plurality of message filtering rules based on the message filtering rules selected by the user from the displayed message filtering rules. That is, the obtained message filtering rule is the message filtering rule selected by the user in the user interaction interface. Another way to obtain multiple preset message filtering rules may be to store all the message filtering rules in advance as the message filtering rules for filtering the message.
The message filtering rules are obtained according to message filtering elements, and the message filtering elements are obtained according to pre-stored historical messages. The message filtering element is a basis for filtering a message, and is an element representing key information of the message, for example, for a message of an airline plan, the message filtering element may be a flight number, an airplane service type, a model, a flight sales layout, and the like.
Specifically, the process of obtaining the message filtering rule according to the message filtering element may include step a 1-step a 2:
and A1, acquiring a plurality of message filtering element sets.
The message filtering element set is a set composed of message filtering elements, and the message filtering element set at least comprises one message filtering element. One way to obtain multiple message filter element sets may be to obtain multiple message filter element sets by a method in which the number of elements in a message filter element set is increased one by one. For example, if the number of elements in the message filter element set is one, each message filter element is used as a single message filter element set, and if the number of elements in the message filter element set is two, any two different message filter elements are used as a message filter element set, and so on, until the number of message filter elements in the message filter element set is the preset maximum value. The maximum value may be set by itself in combination with the requirement, for example, the maximum value may be set as the total number of all message filtering elements.
Step A2, aiming at each message filtering element set, generating a message filtering rule corresponding to the message filtering element set according to a message filtering rule generating algorithm.
In this embodiment, the message filtering rule generating algorithm is preset in a server, and for each message filtering element set, a message filtering rule corresponding to the message filtering element set may be generated through the message filtering rule generating algorithm. Specifically, the message filtering rule is composed of a message filtering element and a value of the message filtering element, wherein the value of the message filtering element is determined by a message filtering rule generating algorithm. For example, when the message filtering element is "message flight number", the preset message filtering rule generating algorithm determines the corresponding value of "flight number" as: "specified flight number", then the generated message filtering rule may be: the message flight number is within the specified range of flight numbers.
Specifically, the process of obtaining a plurality of message filtering elements according to the history message may refer to the flow illustrated in fig. 2.
S103, aiming at each message, matching each message filtering rule with the message in sequence.
In this embodiment, each message filtering rule may be sequentially matched with a message according to a preset matching sequence of the message filtering rules.
And S104, if the message filtering rule is successfully matched with the message, taking the message as a filtering message.
The process of determining whether the message filtering rule and the message are successfully matched may refer to the flow illustrated in fig. 3. And after the message filtering rule is successfully matched with the message, determining the message as a filtering message. The filtering message is a message that does not need to be executed, for example, if the message of the airline plan is the filtering message, the message does not need to execute the flight change plan.
And S105, if all the message filtering rules are failed to be matched with the messages, taking the messages as non-filtering messages.
If all the message filtering rules are failed to match the message, that is, the message is failed to match any one of the message filtering rules, the message is taken as a non-filtering message, and the non-filtering message is a message to be executed, for example, if the message of the aviation plan is a non-filtering message, the message needs to execute a flight change plan.
In the method provided by this embodiment, because the message filtering element is obtained according to the history message, and the message filtering element has strong correlation with the message, the message filtering rule obtained according to the message filtering element also has correlation with the message, and the message filtering rule having correlation with the message is adopted to filter and filter the message, so that the accuracy of filtering and filtering the message can be improved. Meanwhile, each message filtering rule is matched with the message in sequence aiming at each message, if the message filtering rule is successfully matched with the message, the message is used as the filtering message, and because the number of the message filtering rules is set to be a plurality, and any two message filtering rules are different rules, the messages can be filtered and screened from a plurality of different angles, so that the accuracy of screening and filtering the messages can be further improved.
Fig. 2 is a process of obtaining a plurality of message filtering elements according to a history message in the above embodiment, which may include the following steps:
s201, obtaining values of preset attribute items in the history message.
The history messages are messages stored in the system history, and include history filtering messages and history non-filtering messages. And setting a filtering identifier in the history filtering message for indicating that the history message is a filtering message, and setting an analysis identifier in the history non-filtering message for indicating that the history message is a non-filtering message.
The attribute items in the history message are key information items of the message, for example, for the message of the airline plan, the attribute items may be flight key information such as flight number, flight date, market model, sales layout, departure time, arrival time, and the like. The value of the attribute item is a specific description of the attribute item, e.g., the value of the flight number is a specific flight number.
And S202, generating a data matrix according to the values of the attribute items.
The values of the attribute items can be divided into values of digital attribute items and values of non-digital attribute items, and for the values of the non-digital attribute items, the values of the attribute items are converted into digital attribute items according to a preset numerical value conversion algorithm. For example, for flight number MU1235, flight number MU1235 may be converted to 1.
And finally, taking the values of the attribute items of all the numerical types as data in a data matrix, wherein the values are as follows: the same row of data of the data matrix is the values of all attribute items of the same historical message, and the attribute items corresponding to the same row of data of the data matrix are the same. The column number of the data matrix is the total number of the values of the attribute items of the history message with the most values of the attribute items, the row number of the data matrix is the total number of the history message, and in the data matrix, for example, the history message 1 has the attribute item A, but the history message 2 does not have the attribute item A, the value of the attribute item A of the history message 2 can be assigned to be 0, so that the values of the data in the finally obtained data matrix and the attribute items of the history message are in one-to-one correspondence;
and S203, performing dimension reduction processing on the data matrix to obtain a target matrix.
Because the data volume of the historical message is large, the corresponding data volume of the obtained data matrix is also large, the incidence relation between data can be analyzed by adopting a principal component analysis algorithm, and the data matrix is subjected to dimensionality reduction treatment, so that the dimensionality-reduced target matrix is obtained. The number of rows and columns of the target matrix is greatly reduced compared with the original data matrix, the data in the target matrix are mutually independent data, and the data in the target matrix obtained through calculation can reflect the characteristics of the filtered messages. Specifically, the prior art can be referred to for the process and principle of performing the dimension reduction processing on the data matrix by adopting the principal component analysis algorithm.
And S204, aiming at each target data in the target matrix, taking the attribute item corresponding to the target data as a message filtering element.
After the target matrix is obtained, for each target data in the target matrix, determining an attribute item corresponding to the target data according to the numerical conversion algorithm, and using each attribute item as a message filtering element.
According to the method provided by the embodiment, the data matrix is obtained through the values of the attribute items of the historical messages, and the data matrix is subjected to dimensionality reduction, so that the obtained data of the target matrix can comprehensively reflect the characteristics of the filtered messages, and finally obtained message filtering elements can be used as the basis for identifying the filtered messages.
Fig. 3 is a process of determining whether the matching between the message filtering rule and the message is successful in the above embodiment, which may include the following steps:
s301, determining message filtering elements in the message filtering rules and values of the message filtering elements.
The message filtering rule at least comprises one message filtering element, when the number of the message filtering elements in the message filtering rule is one, the value of the message filtering element is the value corresponding to a single message filtering element, and when the message filtering elements in the message filtering rule are a plurality of elements of the same type, the value of the message filtering element is the difference value between the plurality of message filtering elements. For example, for an aviation planning message, the first message filtering rule is: if the message flight number is in the range of 115-119, the message filtering element in the current message filtering rule is determined to be the message flight number, and the value of the message filtering element is 115-119. The second message filtering rule is as follows: the difference value between the takeoff time of the message and the target takeoff time of the target message corresponding to the message is smaller than the threshold value. Determining the message filtering element in the current message filtering rule as: the message takeoff time and the target takeoff time of the target message corresponding to the message are the same type of message filtering elements, and the value of the message filtering element is the difference value between the takeoff time and the target takeoff time.
It should be noted that the value of the message filtering element may be a value set by the user based on the front-end interface. For example, a user may set the values of the message filtering elements in the message filtering rules at the front-end user interaction interface. The value set by the user based on the front-end interface is used as the value of the message filtering element, so that the message filtering rule can be flexibly adjusted. Of course, in the case that the user does not set the value of the message filtering element, the value of the message filtering element may be a value preset by the system, and the value preset by the system is obtained according to the history filtering message, for example, the value of the same attribute item in a plurality of history filtering messages is used as the value of the message filtering element.
S302, obtaining a target value corresponding to the message filtering element from the target object.
The target object comprises a message and/or a target message corresponding to the message in a preset database, and the target message corresponding to the message is determined according to the attribute item of the message. For example, for a message of an airline plan, according to a flight number and a flight date of the message, a message that is the same as the flight number and the flight date of the message is searched in a database, and the message is used as a corresponding target message of the message.
The target value corresponding to the message filtering element is obtained from the target object, and may be, for example, if the message filtering element is a flight number, the specific flight number in the message is used as the target value corresponding to the message filtering element. Similarly, if the message filtering elements are the message takeoff time and the target takeoff time, the specific takeoff time in the message is used as the target value corresponding to the message takeoff time, and the takeoff time of the target message corresponding to the message in the data is used as the target value corresponding to the target takeoff time.
S303, judging whether the target value or the first target value accords with the value of the message filtering element.
The first target value is a difference between the plurality of target values.
In the case that there is only one target value, it can be directly determined whether the target value meets the value of the message filtering element. The value of the target value conforming to the message filtering element is: the difference between the target value and the value of the filter term meets the condition of a preset threshold value. For example, if the target value obtained from the message is flight number a116 and the value of the message filter element is flight number a119, the difference between the target value and the value of the filter is 3, and the condition of the threshold is less than 5, it is determined that the target value matches the value of the message filter element.
In the case where the target value is plural, a difference between the plural target values is calculated. The first target value corresponds to the value of the message filtering element as follows: a threshold condition satisfied by a difference between the first target value and the value of the message filter element. For example, the target value corresponding to the message takeoff time is PM 1: 30, the target value corresponding to the target takeoff time is PM 1: and 10, if the difference between the target values is equal to 20 minutes and the threshold value is less than 30 minutes, determining that the first target value meets the value of the message filtering element.
It should be noted that the threshold may be a value set by the user based on the front-end interface, or may be obtained by the system according to a threshold corresponding to a historical message filtering element. Wherein, the threshold corresponding to the historical message filtering element is pre-stored in the database.
S304, if the target value or the first target value meets the value of the filtering item, the successful matching between the message and the current message filtering rule is determined.
S305, if the target value or the first target value does not accord with the value of the filtering item, determining that the matching between the message and the current message filtering rule fails.
By the method provided by the embodiment, whether the current message filtering rule is successfully matched with the message can be determined, and the value and the threshold value of the message filtering element in the message filtering rule can be set by a user, so that the message filtering rule can be flexibly and conveniently adjusted.
The filtering method for the packet provided in the above embodiment may include, but is not limited to, being applied to the field of civil aviation, and the technical solution of the present application will be described below by taking the field of civil aviation as an example.
Fig. 4 is a schematic structural diagram of a flight plan message filtering system provided in this embodiment, which includes a front-end user interaction interface and a background server, where the user interaction interface includes a message filtering rule setting module, a file importing module, and a filtered message processing module, and the background server includes a report library, a message parsing module, a message filtering element generating module, a message filtering rule generating module, an acquired message filtering rule module, a message filtering module, a message storage module, and a flight plan adjusting module.
And the file importing module is used for importing the flight schedule change file selected by the user or automatically importing the flight schedule change file.
And the message analysis module is used for analyzing the flight schedule change file imported by the file import module into one or more flight schedule change messages.
And the message filtering element generating module is used for generating message filtering elements according to the historical messages stored in the message library.
And the message filtering rule generating module is used for generating a message filtering rule according to the message filtering elements.
The message filtering rule setting module is used for displaying the message filtering rules generated by the message filtering rule generating module, so that a user can select the message filtering rules meeting the self requirements from the displayed message filtering rules, and the values and the threshold values of the message filtering elements in the selected message filtering rules are set.
And the message filtering rule obtaining module is used for obtaining the message filtering rule submitted by the user.
And the message filtering module is used for matching the message filtering rules obtained by the message filtering rule obtaining module with the messages, marking filtering marks for the messages if the messages are successfully matched with one of the message filtering rules, and marking analysis marks for the messages if the messages are failed to be matched with all the message filtering rules. And marking, analyzing and identifying that flight schedule change is required when the message is a message.
And the filtering message processing module is used as a window for a user to query the filtering message with the filtering identifier, removes the filtering identifier of the filtering message selected from the query result by the user, and marks the analysis identifier for the filtering message.
And the flight plan adjusting module is used for obtaining the message with the analysis identifier according to the message filtering module, obtaining the message with the analysis identifier by the filtered message processing module, and adjusting the flight plan.
The message storage module is used for storing the message with the analysis identifier obtained by the message filtering module, the message with the analysis identifier obtained by the message filtering processing module, and the message with the filtering identifier in the message filtering processing module into a message library.
In this embodiment, specific functional implementation of each module may refer to the specific method flows disclosed in the corresponding embodiments.
In this embodiment, the message filtering rule is:
a1, the flight number of the message is in the set flight number range.
A2, the airplane service type of the message is in the set service type range.
A3, the difference value between the message takeoff time and the takeoff time of the target message corresponding to the message is smaller than a first threshold value.
A4, the difference value between the import time of the message and the takeoff time of the target message corresponding to the message is smaller than a second threshold value.
A5, the model of the message is the same as the model of the target message corresponding to the message.
A6, the flight sales layout of the message obtained by simulation calculation is the same as the flight sales layout of the target message corresponding to the message.
The process of filtering the message by the message filtering module is explained by combining the 6 message filtering rules. For each message, the process of filtering the message by the message filtering module may include the following steps:
s501, obtaining the flight number of the message, judging whether the flight number of the message is in the set flight number range, and if so, executing S508; if not, S502 is performed.
S502, acquiring the service type of the message, judging whether the service type of the message is in a set service type range, and if so, executing S508; if not, S503 is executed.
S503, acquiring the takeoff time of the message, finding the takeoff time of the target message which is the same as the flight number and the flight date in the local database according to the flight number and the flight date in the message, then comparing the difference value between the takeoff time in the message and the takeoff time of the target message, judging whether the difference value is smaller than a first threshold value, and if so, executing S508; if not, S504 is performed.
S504, obtaining the import time of the message, finding the takeoff time of the target message which is the same as the flight number and the flight date in the local database according to the flight number and the flight date in the message, then comparing the difference value between the import time and the takeoff time of the target message in the message, judging whether the difference value is smaller than a second threshold value, and if so, executing S508; if not, S505 is executed.
And S505, obtaining the model of the message, and finding out the model of the target message which is the same as the flight number and the flight date in the local database according to the flight number and the flight date in the message. Judging whether the model of the message is consistent with that of the target message, if so, executing S508; if not, S506 is performed.
S506, performing simulation calculation to obtain the flight sales layout of the message, and finding the flight sales layout of the target message which is the same as the flight number and the flight date in the local database according to the flight number and the flight date in the message. Judging whether the flight sales layout of the message is consistent with the flight sales layout of the target message, if so, executing S508; if not, S507 is executed.
And S507, analyzing the identifier for the message identifier.
S508, filtering the mark for the message mark.
The algorithm provided by the embodiment automatically filters the message according to each module of the flight plan message filtering system, greatly improves the efficiency of aviation on message and the accuracy of filtering, and enables a user to flexibly adjust the message filtering rule through a user interaction interface at the front end of the system.
Corresponding to the above method for filtering a message disclosed in the embodiment of the present invention, referring to fig. 5, a schematic structural diagram of a device 500 for filtering a message disclosed in the embodiment of the present invention is shown, including:
a first obtaining unit 501, configured to obtain multiple messages.
A second obtaining unit 502, which obtains a plurality of preset message filtering rules; the preset message filtering rule is obtained according to a plurality of message filtering elements, and the message filtering elements are obtained according to the pre-stored historical messages.
A matching unit 503, configured to match, for each packet, each packet filtering rule with the packet in sequence.
The first determining unit 504 is configured to take the message as a filtered message if the message filtering rule is successfully matched with the message.
A second determining unit 505, configured to, if all the message filtering rules are unsuccessfully matched with the message, take the message as a non-filtered message.
The apparatus for filtering a message further includes a setting unit 506, configured to set a filtering identifier for the filtered message, where the filtering identifier is used to indicate that the message is a filtered message.
The second obtaining unit 502 is further configured to obtain a plurality of message filtering elements according to the history packet, and a specific implementation manner of obtaining the plurality of message filtering elements according to the history packet is as follows: acquiring the value of a preset attribute item in the history message; generating a data matrix according to the values of the attribute items; the values of the attribute items correspond to the data in the data matrix one by one; performing dimensionality reduction processing on the data matrix to obtain a target matrix; and aiming at each data in the target matrix, taking the attribute item corresponding to the data as a message filtering element.
The second obtaining unit 502 is further configured to obtain a plurality of message filtering rules according to the plurality of message filtering elements, where a specific implementation manner of obtaining the plurality of message filtering rules according to the plurality of message filtering elements is as follows: acquiring a plurality of message filtering element sets; the message filtering element set at least comprises one message filtering element; and aiming at each message filtering element set, generating a message filtering rule corresponding to the message filtering element set according to a message filtering rule generating algorithm.
The second obtaining unit 502 is configured to obtain a plurality of preset message filtering rules, and the specific implementation process of the obtaining unit is as follows: displaying all preset message filtering rules; and obtaining a plurality of message filtering rules based on the message filtering rules selected by the user from the displayed message filtering rules.
The matching unit 503 is further configured to determine whether the current packet filtering rule is successfully matched with the packet, and a specific implementation process of determining whether the current packet filtering rule is successfully matched with the packet is as follows:
determining message filtering elements in the current message filtering rule and the values of the message filtering elements;
obtaining a target value corresponding to the message filtering element from a target object; the target object comprises a message and/or a target message corresponding to the message in a preset database; and determining the target message corresponding to the message according to the attribute item of the message.
Judging whether the target value or the first target value meets the value of the message filtering element, wherein the first target value is a difference value between a plurality of target values; the target value meets the filter term by: the difference value between the target value and the value of the message filtering element meets the condition of a preset threshold value; the first target value corresponds to the value of the message filtering element as follows: the difference value between the first target value and the value of the message filtering element meets the condition of a preset threshold value; if the target value or the first target value accords with the value of the filtering item, the successful matching of the message and the current message filtering rule is determined; and if the target value or the first target value does not accord with the value of the filtering item, determining that the matching of the message and the current message filtering rule fails. And the value and the threshold value of the message filtering element are set by a user based on a front-end interface.
According to the device, the message filtering elements are obtained according to the historical messages, so that the message filtering elements are strongly related to the messages, the message filtering rules obtained according to the message filtering elements are also related to the messages, the messages are filtered according to the message filtering rules related to the messages, and the accuracy of filtering the messages can be improved. Meanwhile, each message filtering rule is matched with the message in sequence aiming at each message, if the current message filtering rule is successfully matched with the message, the message is used as the filtering message, and because the number of the message filtering rules is set to be a plurality, and any two message filtering rules are different rules, the messages can be filtered and screened from a plurality of different angles, so that the accuracy of screening and filtering the messages can be further improved.
An embodiment of the present invention further provides an electronic device, a schematic structural diagram of which is shown in fig. 6, and the electronic device specifically includes: the system comprises a processor 601 and a memory 602, wherein the processor 601 and the memory 602 are connected by a bus, and the memory 602 is used for storing programs; the processor 601 is configured to run a program to implement the message filtering method in the embodiment of the present application.
The embodiment of the present invention further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are run on a computer, the computer is enabled to execute the method for filtering a packet in the embodiment of the present application.
The functions described in the method of the embodiment of the present application, if implemented in the form of software functional units and sold or used as independent products, may be stored in a storage medium readable by a computing device. Based on such understanding, part of the contribution to the prior art of the embodiments of the present application or part of the technical solution may be embodied in the form of a software product stored in a storage medium and including several instructions for causing a computing device (which may be a personal computer, a server, a mobile computing device or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for filtering a message is characterized by comprising the following steps:
acquiring a plurality of messages;
acquiring a plurality of preset message filtering rules; the preset message filtering rule is obtained according to a plurality of message filtering elements, and the message filtering elements are obtained according to pre-stored historical messages;
for each message, sequentially matching each message filtering rule with the message;
if the message filtering rule is successfully matched with the message, taking the message as a filtering message;
and if all the message filtering rules are failed to be matched with the messages, taking the messages as non-filtering messages.
2. The method according to claim 1, wherein the process of obtaining the message filtering element according to the history message comprises:
acquiring the value of a preset attribute item in the history message;
generating a data matrix according to the values of the attribute items; the values of the attribute items correspond to the data in the data matrix one by one;
performing dimensionality reduction processing on the data matrix to obtain a target matrix;
and aiming at each target data in the target matrix, taking the attribute item corresponding to the target data as the message filtering element.
3. The method of claim 1, wherein obtaining the plurality of message filtering rules according to the plurality of message filtering elements comprises:
acquiring a plurality of preset message filtering element sets; the message filtering element set at least comprises one message filtering element;
and aiming at each preset message filtering element set, generating a message filtering rule corresponding to the message filtering element set according to a preset message filtering rule generating algorithm, wherein the message filtering rule comprises the message filtering elements and the values of the message filtering elements, and the values of the message filtering elements are determined by the message filtering rule generating algorithm.
4. The method of claim 1, after determining that the message is a filtered message, further comprising:
and setting a filtering identifier for the filtering message, wherein the filtering identifier is used for indicating that the message is the filtering message.
5. The method of claim 1, wherein the obtaining the plurality of preset message filtering rules comprises:
displaying all preset message filtering rules;
and obtaining the plurality of message filtering rules based on the message filtering rules selected by the user from the displayed message filtering rules.
6. The method of claim 1, wherein the step of determining whether the message filtering rule is successfully matched with the message comprises:
determining message filtering elements in the message filtering rules and values of the message filtering elements;
obtaining a target value corresponding to the message filtering element from a target object; the target object comprises the message and/or a target message corresponding to the message in a preset database; determining a target message corresponding to the message according to the attribute item of the message;
judging whether the target value or a first target value meets the value of the message filtering element, wherein the first target value is a difference value between a plurality of target values; the value of the target value meeting the message filtering element is as follows: the difference value between the target value and the value of the message filtering element meets the condition of a preset threshold value; the first target value is the value of the message filtering element: the difference value between the first target value and the value of the message filtering element meets the condition of a preset threshold value;
if the target value or the first target value meets the value of the filtering item, determining that the message is successfully matched with the message filtering rule;
and if the target value or the first target value does not accord with the value of the filtering item, determining that the matching of the message and the message filtering rule fails.
7. The method of claim 6, wherein the value of the message filter element and the threshold are values set by a user based on a front-end interface.
8. A message filtering apparatus, comprising:
a first obtaining unit, configured to obtain a plurality of messages;
the second obtaining unit is used for obtaining a plurality of preset message filtering rules; the message filtering rule is obtained according to a plurality of message filtering elements, and the message filtering elements are obtained according to pre-stored historical messages;
the matching unit is used for matching each message filtering rule with the message in sequence aiming at each message;
the first determining unit is used for taking the message as a filtering message if the message filtering rule is successfully matched with the message;
and the second determining unit is used for taking the message as a non-filtering message if all the message filtering rules are failed to be matched with the message.
9. An electronic device, comprising: a processor and a memory for storing a program; the processor is configured to run the program to implement the message filtering method according to any one of claims 1 to 7.
10. A computer-readable storage medium having stored therein instructions which, when run on a computer, cause the computer to execute the method of filtering a message according to any one of claims 1-7.
CN201911136099.7A 2019-11-19 2019-11-19 Message filtering method and device Active CN110866037B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911136099.7A CN110866037B (en) 2019-11-19 2019-11-19 Message filtering method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911136099.7A CN110866037B (en) 2019-11-19 2019-11-19 Message filtering method and device

Publications (2)

Publication Number Publication Date
CN110866037A true CN110866037A (en) 2020-03-06
CN110866037B CN110866037B (en) 2022-09-20

Family

ID=69655099

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911136099.7A Active CN110866037B (en) 2019-11-19 2019-11-19 Message filtering method and device

Country Status (1)

Country Link
CN (1) CN110866037B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002243A (en) * 2022-08-02 2022-09-02 上海秉匠信息科技有限公司 Data processing method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101888369A (en) * 2009-05-15 2010-11-17 北京启明星辰信息技术股份有限公司 Method and device for matching network message rules
WO2012031497A1 (en) * 2010-09-06 2012-03-15 中兴通讯股份有限公司 Method and system for service message transmission based on matching rule
CN103078854A (en) * 2012-12-28 2013-05-01 北京亿赞普网络技术有限公司 Message filtering method and device
CN103414725A (en) * 2013-08-21 2013-11-27 北京网秦天下科技有限公司 Method and device used for detecting and filtering data message
CN109491971A (en) * 2018-10-22 2019-03-19 郑州云海信息技术有限公司 A kind of file filter method, apparatus, equipment and computer readable storage medium
CN109561106A (en) * 2018-12-29 2019-04-02 北京工业大学 A kind of marine communication message real time parsing filter method
CN109672669A (en) * 2018-12-03 2019-04-23 国家计算机网络与信息安全管理中心 The filter method and device of traffic messages

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101888369A (en) * 2009-05-15 2010-11-17 北京启明星辰信息技术股份有限公司 Method and device for matching network message rules
WO2012031497A1 (en) * 2010-09-06 2012-03-15 中兴通讯股份有限公司 Method and system for service message transmission based on matching rule
CN103078854A (en) * 2012-12-28 2013-05-01 北京亿赞普网络技术有限公司 Message filtering method and device
CN103414725A (en) * 2013-08-21 2013-11-27 北京网秦天下科技有限公司 Method and device used for detecting and filtering data message
CN109491971A (en) * 2018-10-22 2019-03-19 郑州云海信息技术有限公司 A kind of file filter method, apparatus, equipment and computer readable storage medium
CN109672669A (en) * 2018-12-03 2019-04-23 国家计算机网络与信息安全管理中心 The filter method and device of traffic messages
CN109561106A (en) * 2018-12-29 2019-04-02 北京工业大学 A kind of marine communication message real time parsing filter method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张荣 等: "正则表达式在民航空管批文中的应用", 《指挥信息系统与技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002243A (en) * 2022-08-02 2022-09-02 上海秉匠信息科技有限公司 Data processing method and device
CN115002243B (en) * 2022-08-02 2022-11-01 上海秉匠信息科技有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN110866037B (en) 2022-09-20

Similar Documents

Publication Publication Date Title
JP6708219B2 (en) Log analysis system, method and program
US9189543B2 (en) Predicting service request breaches
CN105488223B (en) Method and system for analyzing and subscribing business data events
CN110995482A (en) Alarm analysis method and device, computer equipment and computer readable storage medium
CN110866037B (en) Message filtering method and device
US20130031086A1 (en) Process automation system problem analysis tool
CN113946725B (en) Paging query method and device, storage medium and electronic equipment
CN114757639A (en) Data processing method, device, equipment and storage medium
CN108073641B (en) Method and device for querying data table
US20140156340A1 (en) System and method for identifying outlier risks
US20150278722A1 (en) Event processing device, event processing method, and event processing program
CN110008291B (en) Data early warning method and device, storage medium and electronic equipment
CN113127359A (en) Method and device for obtaining test data
CN112802603A (en) Method and device for predicting influenza degree
CN111881110A (en) Data migration method and device
CN110457323A (en) The processing method and processing device of tables of data
CN110619406A (en) Method and device for determining business abnormity
CN109919470B (en) Method and device for distributing customer information
CN111339156B (en) Method, apparatus and computer readable storage medium for long-term determination of business data
US20170139969A1 (en) Method for filtering and analyzing big data, electronic device, and non-transitory computer-readable storage medium
JP5572252B1 (en) Digital information analysis system, digital information analysis method, and digital information analysis program
CN113722602B (en) Information recommendation method and device, electronic equipment and storage medium
US20240133620A1 (en) Method for updating data of refrigerator freshness reservation model, device and storage medium
CN118134425A (en) Intelligent management method, system and medium for travel scene
CN114862262A (en) Tire resource allocation method, device, equipment and storage medium

Legal Events

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