Research on Stereo Library Based on Homogeneous Markov Chain

The intelligent inventory has not yet been implemented in the automated three-dimensional library. The warehouse basically relies on the accounts of the warehouse. It is really necessary to check the pallets manually with the help of a stacker, or venture into the aisle to check on the spot, or install radio frequency identification (RFID) on the pallet. The radio frequency recognition device on the stacker’s loading platform obtains the information of a specific pallet to achieve a physical inventory. After investigation, the results that can pass the three-dimensional library system automatic library are still blank. For the three-dimensional library, the intelligent inventory is of great significance to the actual production. It can automatically identify whether the goods in the designated cargo space are consistent with the storage according to the needs of the warehouse manager, so the demand for the intelligent inventory is very urgent.


Introduction
The three-dimensional warehouse has remarkable characteristics, especially the advantages of fast cargo storage and storage, large storage capacity, and high space utilization. It has become a key link in logistics and is widely used in various manufacturing enterprises. Mainly distributed in the fields of medicine, tobacco, food, manufacturing, coal industry, military department, airport and port. As the scale of automated three-dimensional warehouses has increased, deeper requirements have gradually emerged. An important function in the warehouse management system, such as "distribution warehouse", appears to be stretched in the automated three-dimensional warehouse system. How to confirm a certain point in time, the warehouse Whether the physical inventory is consistent with the information, and whether the goods in the warehouse are checked against the information in the database, has become a very important and realistic issue.

Homogeneous Markov chain definition
It is called the stationary distribution of a finite Markov chain, if it satisfies the condition: The existence of a stationary distribution vector: There must be at least one stationary vector for an irreducible and non-periodic Markov chain with k states.
For any irreducible and aperiodic Markov chain with k states, if an initial probability vector X0 is arbitrarily given.
Here is the stationary distribution corresponding to the probability transition matrix P, and the above formula is to limit a certain vector norm. The above formula provides a theoretical basis for us to find the stable distribution of the Markov chain. The most important thing to apply the Markov chain is to find the stable distribution of the Markov chain.

Virtual Inventory Design
This article's warehouse management system mainly includes three functional modules: data preprocessing module, data learning module and abnormal operation module.

Data pre-processing
The data preprocessing module mainly includes the data acquisition submodule and the preprocessing submodule.
1) Data acquisition sub-module. In this article, the warehouse management system uses SQL statements as the data source for abnormal operations. Therefore, it is necessary to collect the high-shelf database SQL operation requests in the database log files.
2) Preprocessing sub-module. In this module, the collected data is mainly processed and processed to make it conform to the input of the next module. According to the requirements of the PostgreSQL database, all collected data needs to be processed into a sequence. Therefore, the keywords in the SQL request need to be extracted and combined into a learning sequence. In the implementation process, since the keywords of the SQL statement are usually English words with multiple letters, the operation is more complicated in the learning and operation process. In order to optimize the execution efficiency of the algorithm, the keywords are statistically classified and replaced by a single English letter.

Data learning
The data learning module includes a sequence library establishment sub-module and a POSTGRESQLbased behavior feature extraction sub-module.
1) Sequence library building module. For the preprocessed sequence, define W short sequences of different lengths, and set the corresponding frequency weights. is a short sequence of length k intercepted by y. In addition, since the length of y is determined by k, y is also called a stream of length k generated from y. . Obtain preprocessed data, and generate W short sequences of different lengths. Generate sequence s=(s1, s2,..., sr) of W streams of different lengths 1 2 , , , W s s s  , 1 2 is a stream of length ( ) l i , collected and preprocessed data will eventually form a sequence, by s=(s1, s2, …, sl) means, where l means the number of SQL query fields in the sequence, and sj' (1≤j'≤l) means the j' field in the sequence s.
Extract different short sequences in each stream and calculate their frequency of occurrence. In the data stream si, different short sequence types can be expressed as 1 2 ( ) , , , of different short sequence types in the data stream i s . The frequency of each short sequence is Combine all the different short sequences in all data streams into the normal sequence library, and calculate their weighted frequency of occurrence in the normal sequence library.
Combining all the different short sequences into the normal sequence library, the normal sequence library POSTGRESQL can be expressed as Sort according to the weighted frequency of each short sequence, and divide them into N-1 groups. After sorting all the different kinds of short sequences in descending order according to the weighted frequency of occurrence, the result can be expressed as 2) Behavior feature extraction module based on POSTGRESQL. Before operating abnormal behavior, the warehouse management system needs to establish the behavior characteristics of the normal behavior of the elevated warehouse. In this paper, a discrete-time Markov chain is constructed using the states of short sequences of different lengths as the behavioral characteristics of the elevated library. In the method in this paper, the number of states N needs to be set in advance. First, it is necessary to obtain the behavior mode of each command in the learning data s=(s1, s2,..., sr); then according to the N-1 grouping in POSTGRESQL, the Markov chain state of each behavior mode is IOP Publishing doi:10.1088/1742-6596/2083/3/032039 4 generated, and thus obtained A Markov chain state set; finally the transition probability matrix P of the Markov chain is established.

Abnormal operation
Once the behavioral characteristics of the high-bay warehouse are formed, the basic operation of the abnormal operation warehouse management system is to compare the operation sequence with historical data, and determine whether the two belong to the same high-bay warehouse. The deviation between the behavioral characteristics of the operated elevated library and the historical data is an important indicator of intrusion. Therefore, it is assumed that the historical data belong to the same elevated library. In the abnormal operation stage of the warehouse management system in this article, the classification value determined by the transition probability matrix is the only measure to determine the abnormal behavior, which will greatly reduce the computational burden of the warehouse management system. The main steps are as follows: 1) Obtain and preprocess audit data. In the abnormal operation stage, it is necessary to collect the original SQL command lines generated by the elevated library to be operated (that is, the data that needs to be audited), and the collected data is preprocessed to form a sequence. c=(c1, c2,..., ct) represents the preprocessed operation sequence, where cj is the j-th command in the operation sequence, and t represents the number of commands in the operation sequence.
2) Define the state of the operation sequence and generate the state sequence. According to the behavior pattern extraction algorithm and the Markov chain state generation algorithm, taking the normal sequence library T and the operation sequence c= (c1, c2,..., ct) as input, the state sequence corresponding to the operation sequence q=(q1,q2, … ,qM' ). The short sequence intercepted by c=(c1,c2,…,ct) may not be included in POSTGRESQL, so in the state sequence q=(q1,q2,…,qM' ), the state value may be N.
3) Obtain the classification value corresponding to the state sequence. In the state sequence q=(q1,q2, … ,qM' ), for each state qi(1 ≤ i ≤ M' -1), the transition probability from qi to qi+1 is Pr(qi+1,qi)=qi,qi+1. The classification value transferred from qi to qi+1 is defined as, In the formula: ψ(i) is the classification value transferred from qi to qi+1; δ is the critical value of probability, which needs to be set in advance. When ψ(i)=1, it represents a normal transition; otherwise, it represents an abnormal transition has occurred. After calculating the classification values of all states, a sequence of classification values (ψ(1), ψ(2), ..., ψ(M'-1)) is obtained. 4) Calculate the judgment value. Although individual transfers may deviate from historical precedents, the large number of behavioral collections in the effective elevated library should conform to historical behaviors on the subject, and the intruder's behavior will deviate significantly from the historical behavior. Therefore, the warehouse management system in this paper applies a sliding window to the classification value sequence to obtain a large number of behaviors, and then calculates its judgment value. In this paper, a mean sliding window is used. The judgment value of ψ(n) in the classification value sequence (ψ(1), ψ(2),..., ψ(M'-1)) is defined as In the formula: D(n) is the judgment value corresponding to the classification value ψ(n), n is successively increased by 1 (w≤n≤M'-1); w is the window size. 5) Determine whether the elevated warehouse behavior is abnormal. The threshold λ for judging whether the behavior of the elevated warehouse is abnormal needs to be set in advance according to the system requirements. Whether the behavior of the currently operated elevated warehouse is abnormal is determined by D(n) and λ. If D(n) ≥λ, the current behavior of the operated high-bay warehouse is considered normal, otherwise, if D(n) <λ, then the current behavior of the operated high-bay warehouse is considered abnormal. In this article, the current behavior corresponds to w classification values ψ(n-w+1), ψ(n-w+2),...,ψ(n), and w+1 states (qn-w+1, qn-w+2,...,qn,qn+1) related. The threshold λ is a parameter with high sensitivity. The higher threshold, the higher the success rate of abnormal operations and the higher the false alarm rate; the lower the threshold, the lower the success rate of abnormal operations and the lower the false alarm rate.

Demonstration of results
Virtual inventory characteristic (VIC), In the signal operation theory, it is used to express the trade-off between the operation rate and the false alarm rate. Figure 1 shows the judgment value curves of the three high-bay warehouses. It can be seen from Figure 1 that the curves of the high-bay warehouse 2 and the high-bay warehouse 3 can be clearly distinguished from the curve of the high-bay warehouse 1, that is, different elevated warehouses. The behavior characteristics of the library are different. Once there is an internal attack on the database, there must be a big difference between the behavioral pattern of the attacker and the behavioral pattern of the normal inventory. The judgment value curve of the operated high-bay warehouse will fluctuate greatly. When the warehouse management system operates to fluctuate When the set threshold is exceeded, it can be considered that there is an abnormality in the inventory.

Conclusion
The demonstration shows that the operational performance of the warehouse management system has a great relationship with the selected threshold λ. The larger the λ is, the higher the operation rate and false alarm rate of the warehouse management system will be, and the lower the false alarm rate. Therefore, it is necessary to select a more appropriate value of λ through testing. In addition, the number of states N will also have a certain impact on the performance of the warehouse management system. Figure 3 shows the curve of the warehouse management system when N is equal to 4, 5, and 6, and the threshold λ is different. It can be seen from Figure 3 that when N=5, the performance of the warehouse management system is better than when N=6 and N=4, and when λ=0.84, the performance of the warehouse management system is optimal.