A data processing method and system for AFC reader / writer
By compressing and analyzing frequent sequences and sparse sequences of AFC reader/writer data, the problem of insufficient data processing efficiency and adaptability of AFC reader/writer is solved, real-time and reliability of data processing are achieved, and operation management is improved. plasticity.
Patent Information
- Application Number
- CN202411147330.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-08-21
AI Technical Summary
The existing AFC reader/writer has poor data processing efficiency and adaptability, and cannot meet the needs of modern operation management.
By collecting AFC reader and writer data, convert it into data time series, mark frequent sequences and sparse sequences, define compression indicators according to data attributes, use bitmaps and lossless compression algorithms or de-redundant compression algorithms for data compression, and compress the compressed The data is transferred to the streaming processing framework, the window is dynamically adjusted, and normal and abnormal data are analyzed to determine multi-directional evaluation indicators.
It improves the efficiency and adaptability of data processing, ensures the real-time and reliability of data processing, and enhances the operational management plasticity, security and stability of the AFC reader.
Smart Images

Figure CN118656769B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of AFC reader / writer data processing, and in particular to a data processing method and system applied to an AFC reader / writer. Background Art
[0002] AFC reader is an important part of the Automatic Fare Collection (AFC) system. It is used in rail transit equipment to exchange data for rail transit special tickets, bus cards, etc. It uses radio frequency identification technology (RFID) to realize the reading and writing of contactless IC cards. Its main functions include ticket reading and writing, transaction verification code generation, key two-way authentication, ticket detection, and ticket application selection. These functions jointly support the ticket sales and inspection services of rail transit, provide passengers with a convenient entry and exit experience, and provide accurate data support for operation management.
[0003] In the prior art, because the amount of data generated by the AFC reader is large and real-time, the data processing efficiency is low, the adaptability is poor, and the real-time performance is low, which cannot meet the needs of modern operation management.
[0004] Therefore, how to improve the efficiency and adaptability of AFC reader data processing is a technical problem that needs to be solved. Summary of the invention
[0005] The purpose of the present invention is to solve the problem of poor efficiency and adaptability of AFC reader data processing in the prior art, and propose a data processing method applied to AFC reader, the method comprising:
[0006] Collect the data generated by the AFC reader and convert it into a data time series. Mark the frequent sequence part and the sparse sequence part on the data time series. Define the data compression index based on the attributes of the data time series and determine whether data compression is needed based on the data compression index.
[0007] When the data time series needs data compression, the data compression of the first compression strategy is performed on the frequent sequence part, and the data compression of the second compression strategy is performed on the sparse sequence part, so as to compress the data time series;
[0008] The compressed data is transferred to the stream processing framework, and the compressed data is decompressed and divided into multiple data streams according to the data type. A basic window is set based on the situation of each data stream, and the continuous inflow fluctuation of each data stream is monitored to expand the basic window. The data is processed through the basic window, and multiple basic windows are managed at the same time.
[0009] The stream processing framework outputs data, analyzes the normal data, abnormal data, and verification data in the data, and combines the normal data, abnormal data, and verification data to determine multi-directional evaluation indicators. The application of AFC readers is optimized through multi-directional evaluation indicators.
[0010] Among them, the first compression strategy is a combination of a bitmap compression algorithm and a lossless compression algorithm, and the second compression strategy is a combination of a bitmap compression algorithm and a de-redundancy compression algorithm. The data flow conditions include data flow rate, data block size, data fluctuation value and real-time requirements. The size of a basic window is set according to the data flow rate, data block size, data fluctuation value and real-time requirements.
[0011] In some embodiments of the present application, marking a frequent sequence part and a sparse sequence part on a data time series includes:
[0012] Obtain the application scenario and usage time node of the AFC reader / writer, determine the working period and the non-working period according to the application scenario of the AFC reader / writer, and record the usage time node as a working usage time node and a non-working usage time node according to the position of the usage time node. The working usage time node is the usage time node located in the working period, and the non-working usage time node is the usage time node located in the non-working period;
[0013] Calculate the distances between adjacent working time nodes within a preset range at both ends of the working period, and convert all working time nodes within the range from the peripheral working time nodes whose distances exceed the distance threshold to the end points of the working period into non-working time nodes, and redefine the working period and non-working period based on the non-working time nodes, wherein the peripheral working time nodes are the working time nodes that are closer to the end points of the working period among the two adjacent working time nodes;
[0014] The re-determined working period and non-working period are represented in the data time series according to the timestamps, and the frequent sequence parts are marked in the working period and the sparse sequence parts are marked in the non-working period.
[0015] In some embodiments of the present application, marking the frequent sequence part in the working period and marking the sparse sequence part in the non-working period includes:
[0016] The frequent sequence part includes a first frequent sequence part and a second frequent sequence part, and the sparse sequence part includes a first sparse sequence part and a second sparse sequence part;
[0017] Define the data time series corresponding to a single working time node where the AFC reader / writer successfully verifies as the standard series, split the data time series of the working period into multiple subsequences according to the period, calculate the support of the standard series in each subsequence, mark the subsequences whose support exceeds the support threshold as the first frequent series part, and mark the subsequences whose support does not exceed the support threshold as the second frequent series part;
[0018] The data time series of the non-working period is split into multiple subsequences according to the time period, the sparsity of each subsequence is calculated, the subsequences whose sparsity exceeds the sparsity threshold are marked as the first sparse sequence part, and the subsequences whose sparsity does not exceed the sparsity threshold are marked as the second sparse sequence part.
[0019] In some embodiments of the present application, data compression indicators are defined by attributes of the data time series, including:
[0020] The attributes of the data time series include the support, data volume, and data change rate of the first frequent sequence part and the second frequent sequence part, and the sparsity, data volume, and data change rate of the first sparse sequence part and the second sparse sequence part;
[0021] Perform weighted summation on the support, data volume, and data change rate of the first frequent sequence part and the second frequent sequence part, respectively, to obtain the composite index of the first frequent sequence part and the second frequent sequence part; perform weighted summation on the sparsity, data volume, and data change rate of the first sparse sequence part and the second sparse sequence part, respectively, to obtain the composite index of the first sparse sequence part and the second sparse sequence part; determine the data compression index of the overall data time series according to the composite index of the first frequent sequence part and the second frequent sequence part and the first sparse sequence part and the second sparse sequence part;
[0022] ;
[0023] in, is the data compression index, , , , are the weights corresponding to the first frequent sequence part, the second frequent sequence part, the first sparse sequence part, and the second sparse sequence part, respectively. , , , They are the composite indices corresponding to the first frequent sequence part, the second frequent sequence part, the first sparse sequence part, and the second sparse sequence part, respectively. , are the conversion coefficients of frequent sequences and sparse sequences respectively.
[0024] In some embodiments of the present application, a first compression strategy is used to compress data for a frequent sequence portion, and a second compression strategy is used to compress data for a sparse sequence portion, including:
[0025] Determine the value range of each type of data in the frequent sequence part and the sparse sequence part, and divide the data into finite value range type data and infinite value range type data according to the size range of the value range. Use a bitmap compression algorithm to compress the finite value range type data, use a lossless compression algorithm to compress the infinite value range type data in the frequent sequence part, and use a de-redundancy compression algorithm to compress the infinite value range type data in the sparse sequence part.
[0026] Data compression is performed on the finite value domain type data and the infinite value domain type data of the frequent sequence part by using the first compression strategy;
[0027] The finite value domain type data and the infinite value domain type data of the sparse sequence part are compressed by the second compression strategy.
[0028] In some embodiments of the present application, a basic window is set based on the situation of each data flow, and the continuous inflow fluctuation of each data flow is monitored to expand the basic window, including:
[0029] The size of the base window is the median of the standard interval of the base window size;
[0030] ;
[0031] in, is the standard interval of the basic window size, is the weight of the data flow rate, is the data flow rate, is the weight of the data block size, is the data block size, is the data fluctuation value, is the preset constant, is the first time interval, It represents the first time interval obtained by mapping the influence amount determined by the data flow rate, data block size and data fluctuation value. For real-time requirements, is the second time interval, A second time interval mapped from the real-time requirement;
[0032] The continuous inflow fluctuation of the data stream is the data fluctuation value change rate within a period of time. When the data fluctuation value change rate exceeds the data fluctuation value change rate threshold, an expansion coefficient is determined according to the difference between the data fluctuation value change rate and the data fluctuation value change rate threshold, and the basic window is expanded by the expansion coefficient.
[0033] In some embodiments of the present application, processing data through a basic window includes:
[0034] Aggregate, filter and convert data in the basic window.
[0035] In some embodiments of the present application, normal data, abnormal data and verification data are combined to determine multi-directional evaluation indicators, including:
[0036] The multi-directional evaluation indicators include early warning evaluation indicators and non-early warning evaluation indicators;
[0037] Normal data, abnormal data and verification data are input into the Markov chain model to obtain the evaluation index of the warning direction;
[0038] Normal data, abnormal data and verification data are input into the evaluation model to obtain non-warning evaluation indicators.
[0039] Correspondingly, the present application also provides a data processing system applied to an AFC reader / writer, comprising:
[0040] The first module is used to collect the data generated by the AFC reader and convert the data into a data time series, mark the frequent sequence part and the sparse sequence part on the data time series, define the data compression index according to the attributes of the data time series, and determine whether data compression is needed according to the data compression index;
[0041] The second module is used for, when the data time series needs data compression, performing data compression of the first compression strategy on the frequent sequence part and performing data compression of the second compression strategy on the sparse sequence part, thereby compressing the data time series;
[0042] The third module is used to transfer the compressed data to the stream processing framework, decompress the compressed data, and divide it into multiple data streams according to the data type. A basic window is set based on the situation of each data stream, and the continuous inflow fluctuation of each data stream is monitored to expand the basic window. The data is processed through the basic window, and multiple basic windows are managed at the same time.
[0043] The fourth module is used to process the output data of the streaming framework, analyze the normal data, abnormal data and verification data in the data, and combine the normal data, abnormal data and verification data to determine the multi-directional evaluation indicators, and optimize the application of the AFC reader through the multi-directional evaluation indicators;
[0044] Among them, the first compression strategy is a combination of a bitmap compression algorithm and a lossless compression algorithm, and the second compression strategy is a combination of a bitmap compression algorithm and a de-redundancy compression algorithm. The data flow conditions include data flow rate, data block size, data fluctuation value and real-time requirements. The size of a basic window is set according to the data flow rate, data block size, data fluctuation value and real-time requirements.
[0045] By applying the above technical solutions, the data generated by the AFC reader is collected and converted into a data time series. The frequent sequence part and the sparse sequence part are marked on the data time series. The data compression index is defined by the attribute of the data time series, and whether data compression is required is determined according to the data compression index. When the data time series needs data compression, the data compression of the first compression strategy is performed on the frequent sequence part, and the data compression of the second compression strategy is performed on the sparse sequence part, so as to compress the data time series. The compressed data is transmitted to the streaming processing framework, and the compressed data is decompressed and divided into multiple data streams according to the data type. A basic window is set according to the situation of each data stream, and the continuous inflow fluctuation of each data stream is monitored to expand the basic window. The data is processed through the basic window, and multiple basic windows are managed at the same time. The streaming processing framework outputs data, analyzes normal data, abnormal data and verification data in the data, and combines the normal data, abnormal data and verification data to determine multi-directional evaluation indicators, and optimizes the application of the AFC reader through the multi-directional evaluation indicators. This application marks the frequent sequence part and the sparse sequence part, determines whether data compression is needed according to the data compression index, and comprehensively determines whether data compression is needed based on the two types of data sequences. Different compression methods are used for different types of data sequences, which improves the adaptability and efficiency of data transmission and processing. The data is transmitted to the streaming processing framework, and the window situation is adjusted dynamically to ensure the real-time nature of data processing and improve the reliability of data processing. The application of AFC readers is optimized through multi-directional evaluation indicators, which improves the plasticity of subsequent operation and management of AFC readers and ensures the safe and stable operation of AFC readers. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 A schematic flow chart of a data processing method applied to an AFC reader / writer proposed by the present invention;
[0047] Figure 2The present invention provides a structural diagram of a data processing system applied to an AFC reader / writer. DETAILED DESCRIPTION
[0048] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0049] Reference Figure 1 , a data processing method applied to an AFC reader / writer, comprising the following steps:
[0050] Step S101, collect the data generated by the AFC reader, and convert the data into a data time series, mark the frequent sequence part and the sparse sequence part on the data time series, define the data compression index according to the attributes of the data time series, and determine whether data compression is needed according to the data compression index.
[0051] In this embodiment, the data generated by the AFC reader / writer includes ticket transaction data, device status data, parameter configuration data, etc. The data type of ticket transaction data includes data generated during transactions such as ticket purchase, recharge, entry, and exit. The data type of device status data includes information such as the working status, fault alarm, and component status of the reader / writer. The data type of parameter configuration data includes data generated when the system configures the parameters of the reader / writer, such as fare tables, ticket card control parameters, etc. According to the specific scenario of the use of the AFC reader / writer, the working time is defined to divide the frequent sequence part and the sparse sequence part. The data compression index is set according to the characteristics of both the frequent sequence part and the sparse sequence part. The data compression index describes the degree of necessity of data compression. If the data compression index exceeds the corresponding threshold, it means that data compression is required, otherwise it is not required.
[0052] In some embodiments of the present application, marking a frequent sequence part and a sparse sequence part on a data time series includes:
[0053] Obtain the application scenario and usage time node of the AFC reader / writer, determine the working period and the non-working period according to the application scenario of the AFC reader / writer, and record the usage time node as a working usage time node and a non-working usage time node according to the position of the usage time node. The working usage time node is the usage time node located in the working period, and the non-working usage time node is the usage time node located in the non-working period;
[0054] Calculate the distances between adjacent working time nodes within a preset range at both ends of the working period, and convert all working time nodes within the range from the peripheral working time nodes whose distances exceed the distance threshold to the end points of the working period into non-working time nodes, and redefine the working period and non-working period based on the non-working time nodes, wherein the peripheral working time nodes are the working time nodes that are closer to the end points of the working period among the two adjacent working time nodes;
[0055] The re-determined working period and non-working period are represented in the data time series according to the timestamps, and the frequent sequence parts are marked in the working period and the sparse sequence parts are marked in the non-working period.
[0056] In this embodiment, the application scenarios of the AFC reader are different, and the corresponding working hours and non-working hours are also different. The non-working hours here do not mean that the reader is not used, but that the reader is rarely used. The use time node is the time node when the user uses the magnetic card to aim at the AFC reader, and each use time node indicates that a user has read and written the reader. When determining the working hours and non-working hours, it is generally assumed that there are more use time nodes in the working hours than in the non-working hours.
[0057] In this embodiment, in order to accurately identify non-working time nodes, working time nodes with too large distances between adjacent working time nodes within a preset range at both ends of the working period are classified as non-working time nodes. The distance here refers to the length of time. If the distance is too large, it means that the time interval between the working time nodes is long. The distance threshold here is set relatively large.
[0058] In some embodiments of the present application, marking the frequent sequence part in the working period and marking the sparse sequence part in the non-working period includes:
[0059] The frequent sequence part includes a first frequent sequence part and a second frequent sequence part, and the sparse sequence part includes a first sparse sequence part and a second sparse sequence part;
[0060] Define the data time series corresponding to a single working time node where the AFC reader / writer successfully verifies as the standard series, split the data time series of the working period into multiple subsequences according to the period, calculate the support of the standard series in each subsequence, mark the subsequences whose support exceeds the support threshold as the first frequent series part, and mark the subsequences whose support does not exceed the support threshold as the second frequent series part;
[0061] The data time series of the non-working period is split into multiple subsequences according to the time period, the sparsity of each subsequence is calculated, the subsequences whose sparsity exceeds the sparsity threshold are marked as the first sparse sequence part, and the subsequences whose sparsity does not exceed the sparsity threshold are marked as the second sparse sequence part.
[0062] In this embodiment, each working time node has the result of successful or failed verification of the AFC reader / writer, and most of them are successful verifications. Therefore, the subsequence with successful verification is used as the standard sequence (the working time node is the point where data generation starts, and there is a process of generating data). The support of the standard sequence is the number of times or proportions of sequences similar to the standard sequence appear in each subsequence. The first frequent sequence part represents more successful verification data, and the second frequent sequence part represents relatively more failed verification data.
[0063] In this embodiment, the sparsity is a non-zero value or a ratio of valid data. The first sparse sequence part indicates that the data is very sparse, and the second sparse sequence part indicates that the data is relatively sparse, which is relatively denser and more than the first sparse sequence data.
[0064] In some embodiments of the present application, data compression indicators are defined by attributes of the data time series, including:
[0065] The attributes of the data time series include the support, data volume, and data change rate of the first frequent sequence part and the second frequent sequence part, and the sparsity, data volume, and data change rate of the first sparse sequence part and the second sparse sequence part;
[0066] Perform weighted summation on the support, data volume, and data change rate of the first frequent sequence part and the second frequent sequence part, respectively, to obtain the composite index of the first frequent sequence part and the second frequent sequence part; perform weighted summation on the sparsity, data volume, and data change rate of the first sparse sequence part and the second sparse sequence part, respectively, to obtain the composite index of the first sparse sequence part and the second sparse sequence part; determine the data compression index of the overall data time series according to the composite index of the first frequent sequence part and the second frequent sequence part and the first sparse sequence part and the second sparse sequence part;
[0067] ;
[0068] in, is the data compression index, , , , are the weights corresponding to the first frequent sequence part, the second frequent sequence part, the first sparse sequence part, and the second sparse sequence part, respectively. , , , They are the composite indices corresponding to the first frequent sequence part, the second frequent sequence part, the first sparse sequence part, and the second sparse sequence part, respectively. , are the conversion coefficients of frequent sequences and sparse sequences respectively.
[0069] In this embodiment, support, sparsity, data volume, and data change rate all affect the compression judgment. These factors are combined here to obtain a composite index combining multiple parameters, and then determine the data compression index.
[0070] Step S102, when the data time series needs data compression, the data compression of the first compression strategy is performed on the frequent sequence part, and the data compression of the second compression strategy is performed on the sparse sequence part, so as to compress the data time series.
[0071] Among them, the first compression strategy is a combination of a bitmap compression algorithm and a lossless compression algorithm, and the second compression strategy is a combination of a bitmap compression algorithm and a de-redundancy compression algorithm. The data flow conditions include data flow rate, data block size, data fluctuation value and real-time requirements. The size of a basic window is set according to the data flow rate, data block size, data fluctuation value and real-time requirements.
[0072] In this embodiment, compression is performed based on the characteristics of the frequent sequence part and the sparse sequence part.
[0073] In some embodiments of the present application, a first compression strategy is used to compress data for a frequent sequence portion, and a second compression strategy is used to compress data for a sparse sequence portion, including:
[0074] Determine the value range of each type of data in the frequent sequence part and the sparse sequence part, and divide the data into finite value range type data and infinite value range type data according to the size range of the value range. Use a bitmap compression algorithm to compress the finite value range type data, use a lossless compression algorithm to compress the infinite value range type data in the frequent sequence part, and use a de-redundancy compression algorithm to compress the infinite value range type data in the sparse sequence part.
[0075] Data compression is performed on the finite value domain type data and the infinite value domain type data of the frequent sequence part by using the first compression strategy;
[0076] The finite value domain type data and the infinite value domain type data of the sparse sequence part are compressed by the second compression strategy.
[0077] In this embodiment, for frequent sequences, since there are a large number of repeated or similar patterns in the data, and there are more key data, a compression method for a large number of repeated data and lossless data is used for compression. Lossless data is not completely lossless, but the loss is within a reasonable range. Lossless compression algorithms include Huffman coding and run-length coding. For the sparse sequence part, since it contains a large number of zero values or values close to zero, a lossy compression algorithm can be used to remove these redundant information. Redundancy removal compression algorithms include compression dictionaries and Rank & Select operations.
[0078] In this embodiment, data is divided into finite value domain type data and infinite value domain type data according to the size range of the value domain. Ticket status and transaction type usually have finite and predefined value domains. In bitmap compression, we can regard any data item with a finite and known value domain as a label or event type, and use a bitmap to indicate the existence or non-existence of these items for compression. The first compression strategy: combine bitmap compression with lossless compression. You can first perform bitmap compression on the data with a finite value domain, then perform lossless compression on the remaining data, and finally merge the two parts of the compression results. The second compression strategy: combine de-redundancy compression with bitmap compression. Similarly, first perform bitmap compression on the data with a finite value domain, then perform lossy compression on the remaining data, and finally merge them.
[0079] Step S103, transfer the compressed data to the streaming processing framework, decompress the compressed data, and divide it into multiple data streams according to the data type. Set a basic window based on the situation of each data stream, monitor the continuous inflow fluctuations of each data stream to expand the basic window, process the data through the basic window, and manage multiple basic windows at the same time.
[0080] In this embodiment, the stream processing framework (such as Apache Kafka, Apache Flink, etc.) can respond to the data immediately, reducing the lag of the data and making the data more timely. The stream processing framework usually adopts efficient algorithms and distributed computing technologies, which can process large-scale data streams and achieve high throughput and low-latency data processing. This enables the system to cope with high-speed generated data streams and meet the needs of real-time analysis and decision-making. Different types of data may require different processing logic and resources. Dividing them into different data streams can make more efficient use of resources and improve processing efficiency.
[0081] In some embodiments of the present application, a basic window is set based on the situation of each data flow, and the continuous inflow fluctuation of each data flow is monitored to expand the basic window, including:
[0082] The size of the base window is the median of the standard interval of the base window size;
[0083] ;
[0084] in, is the standard interval of the basic window size, is the weight of the data flow rate, is the data flow rate, is the weight of the data block size, is the data block size, is the data fluctuation value, is the preset constant, is the first time interval, It represents the first time interval obtained by mapping the influence amount determined by the data flow rate, data block size and data fluctuation value. For real-time requirements, is the second time interval, A second time interval mapped from the real-time requirement;
[0085] The continuous inflow fluctuation of the data stream is the data fluctuation value change rate within a period of time. When the data fluctuation value change rate exceeds the data fluctuation value change rate threshold, an expansion coefficient is determined according to the difference between the data fluctuation value change rate and the data fluctuation value change rate threshold, and the basic window is expanded by the expansion coefficient.
[0086] In this embodiment, the data flow rate indicates the amount of data flowing per unit time, such as the number of data items per second, per minute, or per hour. The data block size indicates the size of a unit data point or data block, such as the number of bytes or the number of records. The data fluctuation value is the comprehensive change of the data block size and the data flow rate within a certain period of time. Different types of data have different requirements for the real-time performance of data processing. The data fluctuation value is used to correct the comprehensive impact of the data flow rate and the data block size.
[0087] In this embodiment, the basic window is a time window, and its size is the time length. An expansion coefficient is determined according to the difference between the data fluctuation value change rate and the data fluctuation value change rate threshold. Different differences correspond to different expansion coefficients. The expanded basic window = expansion coefficient × basic window.
[0088] In some embodiments of the present application, processing data through a basic window includes:
[0089] Aggregate, filter and convert data in the basic window.
[0090] In this embodiment, data aggregation: calculating the sum, average, maximum, minimum, etc. of the data in the window. Data filtering: filtering the data in the window according to specific conditions. Data conversion: performing conversion or mapping operations on the data in the window.
[0091] Step S104, the streaming processing framework outputs data, analyzes normal data, abnormal data and verification data in the data, and combines the normal data, abnormal data and verification data to determine multi-directional evaluation indicators, and optimizes the application of the AFC reader through the multi-directional evaluation indicators.
[0092] In this embodiment, normal data can reflect the stability of reader performance, smooth ticket transactions, system security, etc., abnormal data can reflect reader failure, ticket transaction abnormalities, etc., and verification data is directly related to whether the AFC reader verification is successful or not, and is used to assist in evaluation.
[0093] In some embodiments of the present application, normal data, abnormal data and verification data are combined to determine multi-directional evaluation indicators, including:
[0094] The multi-directional evaluation indicators include early warning evaluation indicators and non-early warning evaluation indicators;
[0095] Normal data, abnormal data and verification data are input into the Markov chain model to obtain the evaluation index of the warning direction;
[0096] Normal data, abnormal data and verification data are input into the evaluation model to obtain non-warning evaluation indicators.
[0097] In this embodiment, each fault and alarm is first classified according to historical related data, the Markov state of each fault and alarm is defined, and the Markov chain transition probability from the current data to the fault and alarm state is calculated to provide early warning. Non-early warning evaluation indicators are used to evaluate the overall performance or status of the system, help operators and maintenance personnel understand the overall performance of the reader, and guide the formulation of optimization strategies.
[0098] It should be noted that the evaluation model can be any pre-trained machine learning model that can achieve the above functions.
[0099] By applying the above technical solutions, the data generated by the AFC reader is collected and converted into a data time series. The frequent sequence part and the sparse sequence part are marked on the data time series. The data compression index is defined by the attribute of the data time series, and whether data compression is required is determined according to the data compression index. When the data time series needs data compression, the data compression of the first compression strategy is performed on the frequent sequence part, and the data compression of the second compression strategy is performed on the sparse sequence part, so as to compress the data time series. The compressed data is transmitted to the streaming processing framework, and the compressed data is decompressed and divided into multiple data streams according to the data type. A basic window is set according to the situation of each data stream, and the continuous inflow fluctuation of each data stream is monitored to expand the basic window. The data is processed through the basic window, and multiple basic windows are managed at the same time. The streaming processing framework outputs data, analyzes normal data, abnormal data and verification data in the data, and combines the normal data, abnormal data and verification data to determine multi-directional evaluation indicators, and optimizes the application of the AFC reader through the multi-directional evaluation indicators. This application marks the frequent sequence part and the sparse sequence part, determines whether data compression is needed according to the data compression index, and comprehensively determines whether data compression is needed based on the two types of data sequences. Different compression methods are used for different types of data sequences, which improves the adaptability and efficiency of data transmission and processing. The data is transmitted to the streaming processing framework, and the window situation is adjusted dynamically to ensure the real-time nature of data processing and improve the reliability of data processing. The application of AFC readers is optimized through multi-directional evaluation indicators, which improves the plasticity of subsequent operation and management of AFC readers and ensures the safe and stable operation of AFC readers.
[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present invention can be implemented by hardware, or by software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present invention.
[0101] Correspondingly, the present application also provides a data processing system applied to an AFC reader / writer, such as Figure 2 As shown, including:
[0102] The first module is used to collect the data generated by the AFC reader and convert the data into a data time series, mark the frequent sequence part and the sparse sequence part on the data time series, define the data compression index according to the attributes of the data time series, and determine whether data compression is needed according to the data compression index;
[0103] The second module is used for, when the data time series needs data compression, performing data compression of the first compression strategy on the frequent sequence part and performing data compression of the second compression strategy on the sparse sequence part, thereby compressing the data time series;
[0104] The third module is used to transfer the compressed data to the stream processing framework, decompress the compressed data, and divide it into multiple data streams according to the data type. A basic window is set based on the situation of each data stream, and the continuous inflow fluctuation of each data stream is monitored to expand the basic window. The data is processed through the basic window, and multiple basic windows are managed at the same time.
[0105] The fourth module is used to process the output data of the streaming framework, analyze the normal data, abnormal data and verification data in the data, and combine the normal data, abnormal data and verification data to determine the multi-directional evaluation indicators, and optimize the application of the AFC reader through the multi-directional evaluation indicators;
[0106] Among them, the first compression strategy is a combination of a bitmap compression algorithm and a lossless compression algorithm, and the second compression strategy is a combination of a bitmap compression algorithm and a de-redundancy compression algorithm. The data flow conditions include data flow rate, data block size, data fluctuation value and real-time requirements. The size of a basic window is set according to the data flow rate, data block size, data fluctuation value and real-time requirements.
[0107] Those skilled in the art will appreciate that the modules in the system in the implementation scenario can be distributed in the system of the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more systems different from the implementation scenario. The modules in the above implementation scenario can be combined into one module, or can be further split into multiple submodules.
[0108] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A data processing method applied to an AFC reader / writer, characterized in that: include: Collect the data generated by the AFC reader and convert it into a data time series. Mark the frequent sequence part and the sparse sequence part on the data time series. Define the data compression index based on the attributes of the data time series and determine whether data compression is needed based on the data compression index. When the data time series needs data compression, the data compression of the first compression strategy is performed on the frequent sequence part, and the data compression of the second compression strategy is performed on the sparse sequence part, so as to compress the data time series; The compressed data is transferred to the stream processing framework, and the compressed data is decompressed and divided into multiple data streams according to the data type. A basic window is set based on the situation of each data stream, and the continuous inflow fluctuation of each data stream is monitored to expand the basic window. The data is processed through the basic window, and multiple basic windows are managed at the same time. The stream processing framework outputs data, analyzes the normal data, abnormal data, and verification data in the data, and combines the normal data, abnormal data, and verification data to determine multi-directional evaluation indicators. The application of AFC readers is optimized through multi-directional evaluation indicators. Among them, the first compression strategy is a combination of a bitmap compression algorithm and a lossless compression algorithm, and the second compression strategy is a combination of a bitmap compression algorithm and a de-redundancy compression algorithm. The data flow conditions include data flow rate, data block size, data fluctuation value and real-time requirements. The size of a basic window is set according to the data flow rate, data block size, data fluctuation value and real-time requirements.
2. The data processing method applied to the AFC reader / writer according to claim 1, characterized in that: Mark the frequent sequence parts and sparse sequence parts in the data time series, including: Obtain the application scenario and usage time node of the AFC reader / writer, determine the working period and the non-working period according to the application scenario of the AFC reader / writer, and record the usage time node as a working usage time node and a non-working usage time node according to the position of the usage time node. The working usage time node is the usage time node located in the working period, and the non-working usage time node is the usage time node located in the non-working period; Calculate the distances between adjacent working time nodes within a preset range at both ends of the working period, and convert all working time nodes within the range from the peripheral working time nodes whose distances exceed the distance threshold to the end points of the working period into non-working time nodes, and redefine the working period and non-working period based on the non-working time nodes, wherein the peripheral working time nodes are the working time nodes that are closer to the end points of the working period among the two adjacent working time nodes; The re-determined working period and non-working period are represented in the data time series according to the timestamps, and the frequent sequence parts are marked in the working period and the sparse sequence parts are marked in the non-working period.
3. The data processing method applied to the AFC reader / writer according to claim 2, characterized in that: And mark the frequent sequence part in the working period and mark the sparse sequence part in the non-working period, including: The frequent sequence part includes a first frequent sequence part and a second frequent sequence part, and the sparse sequence part includes a first sparse sequence part and a second sparse sequence part; Define the data time series corresponding to a single working time node where the AFC reader / writer successfully verifies as the standard series, split the data time series of the working period into multiple subsequences according to the period, calculate the support of the standard series in each subsequence, mark the subsequences whose support exceeds the support threshold as the first frequent series part, and mark the subsequences whose support does not exceed the support threshold as the second frequent series part; The data time series of the non-working period is split into multiple subsequences according to the time period, the sparsity of each subsequence is calculated, the subsequences whose sparsity exceeds the sparsity threshold are marked as the first sparse sequence part, and the subsequences whose sparsity does not exceed the sparsity threshold are marked as the second sparse sequence part.
4. The data processing method applied to the AFC reader / writer according to claim 3, characterized in that: Data compression metrics are defined by the attributes of the data time series, including: The attributes of the data time series include the support, data volume, and data change rate of the first frequent sequence part and the second frequent sequence part, and the sparsity, data volume, and data change rate of the first sparse sequence part and the second sparse sequence part; Perform weighted summation on the support, data volume, and data change rate of the first frequent sequence part and the second frequent sequence part, respectively, to obtain the composite index of the first frequent sequence part and the second frequent sequence part; perform weighted summation on the sparsity, data volume, and data change rate of the first sparse sequence part and the second sparse sequence part, respectively, to obtain the composite index of the first sparse sequence part and the second sparse sequence part; determine the data compression index of the overall data time series according to the composite index of the first frequent sequence part and the second frequent sequence part and the first sparse sequence part and the second sparse sequence part; ; in, is the data compression index, , , , are the weights corresponding to the first frequent sequence part, the second frequent sequence part, the first sparse sequence part, and the second sparse sequence part, respectively. , , , They are the composite indices corresponding to the first frequent sequence part, the second frequent sequence part, the first sparse sequence part, and the second sparse sequence part, respectively. , are the conversion coefficients of frequent sequences and sparse sequences respectively.
5. The data processing method applied to the AFC reader / writer according to claim 1, characterized in that: The first compression strategy is used to compress the data of the frequent sequence part, and the second compression strategy is used to compress the data of the sparse sequence part, including: Determine the value range of each type of data in the frequent sequence part and the sparse sequence part, and divide the data into finite value range type data and infinite value range type data according to the size range of the value range. Use a bitmap compression algorithm to compress the finite value range type data, use a lossless compression algorithm to compress the infinite value range type data in the frequent sequence part, and use a de-redundancy compression algorithm to compress the infinite value range type data in the sparse sequence part. Data compression is performed on the finite value domain type data and the infinite value domain type data of the frequent sequence part by using the first compression strategy; The finite value domain type data and the infinite value domain type data of the sparse sequence part are compressed by the second compression strategy.
6. The data processing method applied to the AFC reader / writer according to claim 1, characterized in that: A basic window is set based on the situation of each data flow, and the basic window is expanded by monitoring the continuous inflow fluctuations of each data flow, including: The size of the base window is the median of the standard interval of the base window size; ; in, is the standard interval of the basic window size, is the weight of the data flow rate, is the data flow rate, is the weight of the data block size, is the data block size, is the data fluctuation value, is the preset constant, is the first time interval, It represents the first time interval obtained by mapping the influence amount determined by the data flow rate, data block size and data fluctuation value. For real-time requirements, is the second time interval, A second time interval mapped from the real-time requirement; The continuous inflow fluctuation of the data stream is the data fluctuation value change rate within a period of time. When the data fluctuation value change rate exceeds the data fluctuation value change rate threshold, an expansion coefficient is determined according to the difference between the data fluctuation value change rate and the data fluctuation value change rate threshold, and the basic window is expanded by the expansion coefficient.
7. The data processing method applied to the AFC reader / writer according to claim 1, characterized in that: The data is processed through the basic window, including: Aggregate, filter and convert data in the basic window.
8. The data processing method applied to the AFC reader / writer according to claim 1, characterized in that: And combine normal data, abnormal data and verification data to determine multi-directional evaluation indicators, including: The multi-directional evaluation indicators include early warning evaluation indicators and non-early warning evaluation indicators; Normal data, abnormal data and verification data are input into the Markov chain model to obtain the evaluation index of the warning direction; Normal data, abnormal data and verification data are input into the evaluation model to obtain non-warning evaluation indicators.
9. A data processing system applied to an AFC reader / writer, characterized in that: include: The first module is used to collect the data generated by the AFC reader and convert the data into a data time series, mark the frequent sequence part and the sparse sequence part on the data time series, define the data compression index according to the attributes of the data time series, and determine whether data compression is needed according to the data compression index; The second module is used for, when the data time series needs data compression, performing data compression of the first compression strategy on the frequent sequence part and performing data compression of the second compression strategy on the sparse sequence part, thereby compressing the data time series; The third module is used to transfer the compressed data to the stream processing framework, decompress the compressed data, and divide it into multiple data streams according to the data type. A basic window is set based on the situation of each data stream, and the continuous inflow fluctuation of each data stream is monitored to expand the basic window. The data is processed through the basic window, and multiple basic windows are managed at the same time. The fourth module is used to process the output data of the streaming framework, analyze the normal data, abnormal data and verification data in the data, and combine the normal data, abnormal data and verification data to determine the multi-directional evaluation indicators, and optimize the application of the AFC reader through the multi-directional evaluation indicators; Among them, the first compression strategy is a combination of a bitmap compression algorithm and a lossless compression algorithm, and the second compression strategy is a combination of a bitmap compression algorithm and a de-redundancy compression algorithm. The data flow conditions include data flow rate, data block size, data fluctuation value and real-time requirements. The size of a basic window is set according to the data flow rate, data block size, data fluctuation value and real-time requirements.
