CN116614422B - Beidou time service protocol safety analysis method - Google Patents

Beidou time service protocol safety analysis method Download PDF

Info

Publication number
CN116614422B
CN116614422B CN202310868110.9A CN202310868110A CN116614422B CN 116614422 B CN116614422 B CN 116614422B CN 202310868110 A CN202310868110 A CN 202310868110A CN 116614422 B CN116614422 B CN 116614422B
Authority
CN
China
Prior art keywords
time service
test
semantic feature
service protocol
beidou time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310868110.9A
Other languages
Chinese (zh)
Other versions
CN116614422A (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.)
Zhongneng Guoyan Beijing Information And Communication Technology Co ltd
Original Assignee
Zhongneng Guoyan Beijing Information And Communication 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 Zhongneng Guoyan Beijing Information And Communication Technology Co ltd filed Critical Zhongneng Guoyan Beijing Information And Communication Technology Co ltd
Priority to CN202310868110.9A priority Critical patent/CN116614422B/en
Publication of CN116614422A publication Critical patent/CN116614422A/en
Application granted granted Critical
Publication of CN116614422B publication Critical patent/CN116614422B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/16Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using machine learning or artificial intelligence
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Signal Processing (AREA)
  • Evolutionary Computation (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

The invention relates to the technical field of protocol security analysis, and discloses a Beidou time service protocol security analysis method, which comprises the following steps: obtaining semantic feature specifications of the Beidou time service protocol by utilizing a Beidou time service protocol semantic mining model; randomly splitting the Beidou time service protocol test data set into a plurality of test subsets; and carrying out safety test on semantic feature specifications in the test subset, generating test data for the semantic feature specifications with potential safety hazards according to the support degree, and carrying out optimization training on a semantic feature specification safety test model by utilizing the generated test data. According to the invention, by extracting the semantic feature specifications of the Beidou time service protocol, the semantic feature specifications with potential safety hazards are utilized to guide the generation of a plurality of test data, so that the randomness of the generated test data is avoided, and the mutation operation is introduced in the model optimization training process, so that the updating search range of the parameters to be optimized is enlarged, and the parameters to be optimized are prevented from falling into the local optimal solution.

Description

Beidou time service protocol safety analysis method
Technical Field
The invention relates to the technical field of protocol security analysis, in particular to a Beidou time service protocol security analysis method.
Background
The Beidou time service protocol is a wireless communication protocol for unified time service of domestic equipment, and along with the wide use of the protocol, the safety problem of the protocol also draws a wide attention. The data unit specification of the internal time service protocol of the Beidou equipment is not disclosed, so that the path of security analysis is severely limited. The existing protocol test sample generation strategy based on fuzzy test is based on variation, relies on manual analysis of a specified Beidou equipment development document, generates test samples by a method of randomly varying special fields, and performs protocol security analysis based on the test samples. However, for most devices using the Beidou time service protocol, the data unit is not disclosed, and a tester cannot acquire the protocol specification for analysis, so that the generation method of the test sample has limitations and lacks pertinence to the protocol association field. During testing, a test sample generated by the random variation strategy cannot represent a protocol format and generates excessive invalid packets, so that the tested equipment has low receiving rate and effective safety analysis is difficult to implement. Aiming at the problems, a safety analysis method facing the Beidou time service protocol is needed, and the safety analysis efficiency and reliability of the Beidou time service protocol are improved.
Disclosure of Invention
In view of the above, the invention provides a Beidou time service protocol security analysis method, which aims at: 1) Converting the Beidou time service protocol into a feature representation result by utilizing repeated iterative convolution calculation, dividing the feature representation result based on a plurality of protocol content parts represented by the Beidou time service protocol, combining semantic association among different division results, weighting each part of feature representation, realizing targeted feature specification extraction of protocol association fields, obtaining semantic feature specifications of the Beidou time service protocol, randomly splitting a constructed data test set into a plurality of test subsets, and calculating the diversity degree of each test subset, wherein the higher the diversity degree is, the greater the diversity degree is, the probability of the semantic feature specification with hidden danger is, so that safety test is preferentially conducted, further, the semantic feature specification with hidden danger is recorded, the semantic feature specification with hidden danger is utilized to guide generation of a plurality of test data, the randomness of the generated test data is avoided, the generated test data with hidden danger is utilized to conduct optimization training on the semantic feature specification safety test model, and the training effect of the semantic feature specification safety test model is improved; 2) The method comprises the steps of determining iteration step length based on the gradient of a training objective function, carrying out iteration update on parameters to be optimized, generating new optimization parameters through mutation operation on the basis of iteration results of the parameters to be optimized in the process of iteration update, and replacing the parameters to be optimized if the mutation results are better than the iteration results, so that the updating search range of the parameters to be optimized is enlarged, the parameters to be optimized are prevented from falling into a local optimal solution, and further, the test accuracy of the semantic feature standard safety test model is improved.
The Beidou time service protocol safety analysis method provided by the invention comprises the following steps of:
s1: acquiring a Beidou time service protocol data stream, and constructing a Beidou time service protocol semantic mining model, wherein the Beidou time service protocol semantic mining model takes the Beidou time service protocol data stream as input, takes semantic feature specifications as output, and obtains the semantic feature specifications of the Beidou time service protocol by utilizing the Beidou time service protocol semantic mining model;
s2: taking semantic feature specifications of the Beidou time service protocol as test data, constructing a Beidou time service protocol test data set, randomly splitting the constructed data test set into a plurality of test subsets, and calculating the diversity degree of each test subset;
s3: constructing a semantic feature specification safety test model, carrying out safety test on semantic feature specifications in a test subset according to the sequence of the diversity degree of the test subset from large to small, and recording semantic feature specifications with potential safety hazards;
s4: and carrying out test data support statistics on the semantic feature specifications obtained by recording, generating a proportion according to the support calculation sample to guide the semantic feature specifications to generate a specified number of test data, and carrying out optimization training on the semantic feature specification safety test model by utilizing the generated test data with potential safety hazards.
As a further improvement of the present invention:
optionally, the step S1 of obtaining the beidou time service protocol data stream includes:
the method comprises the steps of obtaining a Beidou time service protocol data stream, wherein the Beidou time service protocol data stream is a Beidou time service protocol standard data stream in a message information data stream sent by a Beidou satellite to a time service user machine, the message information data stream comprises standard Beidou time, satellite position information, modulated time scale information, delay information and a Beidou time service protocol, and the Beidou time service protocol comprises leap second prompt, version number, beidou time service working mode, polling time, clock precision, the number of layers of a system clock, identification of a reference clock source, maximum error of the system clock compared with the reference clock, time of leaving a sending end by the electronic information data stream and verification coding information;
the acquired Beidou time service protocol data stream has the following expression form:
wherein:
and indicating the Beidou time service protocol in the acquired nth group of message information data, wherein N indicates the total number of the acquired message information data.
Optionally, in step S1, the semantic feature specification of the beidou time service protocol is obtained by using a beidou time service protocol semantic mining model, including:
establishing a Beidou time service protocol semantic mining model, wherein the Beidou time service protocol semantic mining model takes Beidou time service protocol data flow as input and semantic feature specification as output; the Beidou time service protocol semantic mining model comprises an input layer, a convolution calculation layer, an attention layer and an output layer, wherein the input layer is used for receiving the Beidou time service protocol, the convolution calculation layer is used for calculating and obtaining a feature representation result of the Beidou time service protocol, the attention layer is used for obtaining the weight of the feature representation result, and the output layer is used for outputting semantic feature specifications of the Beidou time service protocol;
Semantic feature specifications of the Beidou time service protocol are obtained by utilizing a Beidou time service protocol semantic mining model, wherein the Beidou time service protocol isThe semantic feature specification extraction flow of (1) is as follows:
s11: input layer receiving Beidou time service protocol
S12: setting the current iterative convolution calculation times as D, the initial value of D as 1, and the maximum iterative convolution calculation times as D, and then the Beidou time service protocolThe characteristic representation result of the convolution calculation at the d-th time is +.>
S13: the convolution calculation layer calculates to obtain a characteristic representation result of the d-th convolution calculation:
wherein:
weight parameters representing four convolutional layers of the convolutional calculation layers, +.>Bias parameters representing four of the convolution layers, +.>Representing information to be recorded in the result of the characteristic representation obtained by the d-1 th convolution calculation,/for the feature representation>Representing the characteristic representation result obtained by the d-1 th convolution calculationThe deleted information needs to be filtered out,indicating the information that needs to be passed to the d-th convolution calculation process, including +.>And +.>Representing characteristic representation results obtained for the d-1 th convolution calculation +.>Performing convolution calculation +.>Representing that information is transmitted in the iterative process, so that effective information to be recorded is reserved, and invalid information is filtered and deleted;
representing an activation function- >The method comprises the steps of carrying out a first treatment on the surface of the In the embodiment of the present invention, < > a->Representing ReLU activation function, +.>Representing a Softmax activation function;
s14: if it isWill->The method is divided into 10 parts of characteristic representation results, wherein each part corresponds to protocol content in Beidou time service protocol, and 10 parts of characteristic representation results are used for Beidou time serviceThe corresponding protocol content in the time protocol is leap second prompt, version number, beidou time service working mode, polling time, clock precision, the number of layers of a system clock, identification of a reference clock source, maximum error of the system clock compared with the reference clock, time of leaving a transmitting end by an electronic information data stream and verification coding information in sequence;
attention layer pairAnd (3) performing attention weight calculation, wherein the attention weight calculation formula is as follows:
wherein:
t represents a transpose;
representing Beidou time service protocol->Middle->The number of times that part of protocol content appears in the Beidou time service protocol data stream;
representing Beidou time service protocol->Middle->Weights of partial protocol content;
an exponential function that is based on a natural constant;
representing Beidou time service protocol->Middle->Attention weight of partial protocol content;
representation->The middle 10 part of the features represent the attention weight matrix of the result;
if it isLet->Returning to step S13;
S15: output layer outputs big dipper time service protocolSemantic feature specifications of (c):
wherein:
representation->Middle->Partial feature tableIndicating result, namely Beidou time service protocol +.>Middle->The characteristics of the partial protocol content represent the results.
Optionally, in the step S2, a beidou time service protocol test data set is constructed, and the constructed data test set is randomly split into a plurality of test subsets, including:
taking semantic feature specifications of the Beidou time service protocol as test Data, and constructing a Beidou time service protocol test Data set Data:
wherein:
representing Beidou time service protocol->Semantic feature specifications of (a);
randomly splitting the constructed data test set into K test subsets, wherein the number of test data in each split test subset is thatThen kth test subset +.>The method comprises the following steps:
wherein:
represents the kth test subset +.>The j-th test data of (a).
Optionally, calculating the diversity order of each test subset in the step S2 includes:
calculating the diversity order of each split test subset, wherein the kth test subsetThe diversity factor calculation formula of (2) is:
wherein:
represents the kth test subset +.>Is a degree of diversity of (3);
Representing semantic feature Specification +.>In Beidou time service protocol test data set +.>The number of occurrences of->Representing semantic feature Specification +.>And testing the frequency in the data set in the Beidou time service protocol.
Optionally, in the step S3, according to the order of the diversity degree of the test subsets from large to small, the security test is sequentially performed on the semantic feature specifications in the test subsets by using the semantic feature specification security test model, including:
according to the sequence of the diversity degree of the test sub-set from large to small, sequentially carrying out security test on semantic feature specifications in the test sub-set by utilizing a semantic feature specification security test model, and recording semantic feature specifications with potential safety hazards;
the semantic feature specification safety test model comprises an input layer, a feature calculation layer and an output layer, wherein the input layer is used for receiving semantic feature specifications; the feature calculation layer comprises 3 convolution layers and 3 pooling layers, each convolution layer is followed by the pooling layer, each pooling layer receives the output of the previous convolution layer and takes the pooling result as the input of the next convolution layer, wherein the input of the first convolution layer is a semantic feature specification; the output layer comprises two continuous full-connection layers, wherein the first full-connection layer selects a ReLU activation function, the last full-connection layer selects a softmax activation function, and a safety test result is output Wherein 0 indicates that the Beidou time service protocol corresponding to the semantic feature specification has no potential safety hazard, and 1 indicates that the Beidou time service protocol corresponding to the semantic feature specification has potential safety hazard. In the embodiment of the invention, the security test is only carried out on the test subset with the diversity degree higher than the preset threshold value.
Optionally, in the step S4, test data support statistics is performed on semantic feature specifications with potential safety hazards, and a specified number of test data is generated by guiding the semantic feature specifications according to a support calculation sample generation proportion, including:
carrying out test data support statistics on semantic feature specifications with potential safety hazards, wherein a test data support statistics formula is as follows:
wherein:
semantic feature Specification indicating that there is a potential safety hazard at b +.>Representation->Support of->Total number of semantic feature specifications representing potential safety hazard, < ->Represents an L1 norm;
generating a proportion according to a support degree calculation sample to guide the semantic feature specification to generate a specified number of test data, wherein cosine similarity between the generated test data and a reference semantic feature specification is higher than a preset similarity threshold, the reference semantic feature specification is the semantic feature specification with potential safety hazards, and the reference semantic feature specification is guided to generate the specified number of test data, and the test data is based on the semantic feature specification The number of test data generated is: />Wherein:
wherein:
c represents the total number of the set generated test data;
training data set storage for representing semantic feature specification safety test modelThe total number of the test data of the potential safety hazard;
the semantic features normalize the total number of test data in the security test model training dataset.
Optionally, in the step S4, optimizing and training the semantic feature specification security test model by using the generated test data with potential security hazards includes:
adding the generated test data with potential safety hazards into a training data set of a semantic feature standard safety test model to obtain an updated training data set data:
wherein:
representing group c test data in the training data set data;
representing test data +.>Wherein the security test result of the test data generated by the semantic feature specification guide with potential safety hazards is 1;
training objective function for constructing semantic feature standard safety test model
Wherein:
representing the optimized parameters to be trained, namely parameters of a feature calculation layer in the semantic feature specification safety test model;
representing test data +. >Input to base +.>In the semantic feature standard safety test model, a safety test result is output by the model;
the model parameter optimization training process based on the training objective function is as follows:
s41: setting the current iteration number of the parameter to be optimized as U, the expected maximum iteration number as U, the initial value of U as 0, and initializing,/>Representing the current initial parameters to be optimized,/->Parameters to be optimized representing the current semantic feature specification security test model, < >>Representing parameters to be optimized after the nth iteration;
s42: if it isOutput +.>As parameters for optimization training and based on +.>Building semantic feature canonical securityThe sexual test model otherwise goes to step S43, wherein +.>A preset gradient threshold value is set;
s43: calculating to obtain iteration step length
Wherein:
representing a step size parameter;
representing the identity matrix;
updating parameters to be optimized based on the step size parameters:
s44: generating a random number rand between 0 and 1, and if the generated random number satisfies the following formulaPerforming mutation processing, wherein the inequality to be satisfied of the generated random number is:
wherein:
for being provided withMaximum mutation rate, jersey>The set minimum mutation rate;
wherein the mutation processing formula is as follows:
wherein:
Respectively represent arbitrary->Parameters to be optimized obtained by iteration and arbitrary +.>Parameters to be optimized obtained by iteration for several times, +.>The method comprises the steps of carrying out a first treatment on the surface of the In the embodiment of the invention, on the basis of the iteration result of the parameter to be optimized, a new optimized parameter is generated through mutation operation, and if the mutation result is better than the iteration result, the replacement is carried out, so that the updating search range of the parameter to be optimized is enlarged, and the parameter to be optimized is prevented from falling into a local optimal solution;
is->Variation results of (2);
if it isWill->Substitution with variant results->Let u=u+1, return to step S42;
if the generated random number does not satisfy the inequality, let u=u+1, return to step S42.
In order to solve the above-described problems, the present invention provides an electronic apparatus including:
a memory storing at least one instruction;
the communication interface is used for realizing the communication of the electronic equipment; and the processor executes the instructions stored in the memory to realize the Beidou time service protocol security analysis method.
In order to solve the above problems, the present invention further provides a computer readable storage medium, where at least one instruction is stored in the computer readable storage medium, where the at least one instruction is executed by a processor in an electronic device to implement the above beidou time service protocol security analysis method.
Compared with the prior art, the invention provides a Beidou time service protocol safety analysis method, which has the following advantages:
firstly, the scheme provides a semantic feature specification extraction method, and semantic feature specification of a Beidou time service protocol is obtained by using a Beidou time service protocol semantic mining model, wherein the Beidou time service protocol isThe semantic feature specification extraction flow of (1) is as follows: input layer receives Beidou time service protocol +.>The method comprises the steps of carrying out a first treatment on the surface of the Setting the current iterative convolution calculation times as D, the initial value of D as 1, and the maximum iterative convolution calculation times as D, and then the Beidou time service protocol +.>The characteristic representation result of the convolution calculation at the d-th time is +.>The method comprises the steps of carrying out a first treatment on the surface of the The convolution calculation layer calculates to obtain a characteristic representation result of the d-th convolution calculation:
wherein:weight parameters representing four convolutional layers of the convolutional calculation layers, +.>The offset parameters of four convolution layers in the convolution calculation layers are represented; />Representing an activation function->The method comprises the steps of carrying out a first treatment on the surface of the If->Will->The method comprises the steps of dividing the method into 10 parts of characteristic representation results, wherein each part corresponds to protocol content in a Beidou time service protocol, and the 10 parts of corresponding protocol content in the Beidou time service protocol sequentially comprise leap second prompt, version number, beidou time service working mode, polling time, clock precision, the number of layers of a system clock, identification of a reference clock source, maximum error of the system clock compared with the reference clock, time of leaving a transmitting end by an electronic information data stream and verification coding information; attention layer pair- >And (3) performing attention weight calculation, wherein the attention weight calculation formula is as follows:
wherein: t represents a transpose;representing Beidou time service protocol->Middle->The number of times that part of protocol content appears in the Beidou time service protocol data stream; />Representing Beidou time service protocol->Middle->Weights of partial protocol content;
an exponential function that is based on a natural constant; />Representing Beidou time service protocol->Middle->Attention weighting of partial protocol content;/>Representation->The middle 10 part of the features represent the attention weight matrix of the result; if->Let->The method comprises the steps of carrying out a first treatment on the surface of the Output layer outputs Beidou time service protocol +.>Semantic feature specifications of (c):
wherein:representation->Middle->Part of the characteristic representation results, namely Beidou time service protocol +.>Middle->The characteristics of the partial protocol content represent the results. The scheme converts the Beidou time service protocol into a feature representation result by utilizing repeated iterative convolution calculation, divides the feature representation result based on a plurality of protocol content parts represented by the Beidou time service protocol, performs weighting treatment on each part of feature representation by combining semantic association among different division results, realizes targeted feature specification extraction of protocol association fields, obtains semantic feature specification of the Beidou time service protocol, and performs weighting treatment on each part of feature representation The constructed data test set is randomly split into a plurality of test subsets, the diversity degree of each test subset is calculated, the higher the diversity degree is, the greater the probability of semantic feature specification with hidden danger is, so that safety test is preferentially conducted, further semantic feature specification with hidden danger is recorded, a plurality of test data are generated by utilizing semantic feature specification guidance with hidden danger, randomness of the generated test data is avoided, the generated test data with hidden danger is utilized to conduct optimization training on a semantic feature specification safety test model, and the training effect of the semantic feature specification safety test model is improved.
Meanwhile, the scheme provides a model parameter iterative optimization method combining parameter variation, and the model parameter optimization training process based on the training objective function is as follows: setting the current iteration number of the parameter to be optimized as U, the expected maximum iteration number as U, the initial value of U as 0, and initializing,/>Representing the current initial parameters to be optimized,/->Parameters to be optimized representing the current semantic feature specification security test model, < >>Representing parameters to be optimized after the nth iteration; if it is Output +.>As parameters for optimization training and based on +.>Constructing a semantic feature standard safety test model, otherwise turning to the stepS43, wherein->A preset gradient threshold value is set; calculating to obtain iteration step length +.>
Wherein:representing a step size parameter; />Representing the identity matrix; updating parameters to be optimized based on the step size parameters:
generating a random number rand between 0 and 1, and if the generated random number satisfies the following formulaPerforming mutation processing, wherein the inequality to be satisfied of the generated random number is:
wherein:for the set maximum mutation rate, +.>The set minimum mutation rate; wherein the mutation processing formula is as follows:
wherein:respectively represent arbitrary->Parameters to be optimized obtained by iteration and arbitrary +.>Parameters to be optimized obtained by iteration for several times, +.>;/>Is->Variation results of (2); if it isWill->Substitution with variant results->Let u=u+1, return to the iterative step; if the generated random number does not satisfy the inequality, let u=u+1, return to the iterative step. According to the scheme, iteration step length is determined based on the gradient of the training objective function, iteration updating is carried out on the parameter to be optimized, in the process of iteration updating, new optimization parameters are generated through mutation operation on the basis of the iteration result of the parameter to be optimized, if the mutation result is superior to the iteration result, replacement is carried out, the updating search range of the parameter to be optimized is enlarged, the parameter to be optimized is prevented from falling into a local optimal solution, and further the testing accuracy of the semantic feature standard safety test model is improved.
Drawings
Fig. 1 is a schematic flow chart of a security analysis method of a beidou time service protocol according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device for implementing a beidou time service protocol security analysis method according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The embodiment of the application provides a Beidou time service protocol security analysis method. The execution main body of the Beidou time service protocol security analysis method comprises, but is not limited to, at least one of electronic equipment, such as a server side, a terminal and the like, which can be configured to execute the method provided by the embodiment of the application. In other words, the Beidou time service protocol security analysis method can be executed by software or hardware installed in terminal equipment or server equipment, and the software can be a blockchain platform. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like.
Example 1
S1: the method comprises the steps of obtaining Beidou time service protocol data streams, constructing a Beidou time service protocol semantic mining model, wherein the Beidou time service protocol semantic mining model takes the Beidou time service protocol data streams as input, takes semantic feature specifications as output, and obtains the semantic feature specifications of the Beidou time service protocol by utilizing the Beidou time service protocol semantic mining model.
The step S1 of acquiring the Beidou time service protocol data stream comprises the following steps:
the method comprises the steps of obtaining a Beidou time service protocol data stream, wherein the Beidou time service protocol data stream is a Beidou time service protocol standard data stream in a message information data stream sent by a Beidou satellite to a time service user machine, the message information data stream comprises standard Beidou time, satellite position information, modulated time scale information, delay information and a Beidou time service protocol, and the Beidou time service protocol comprises leap second prompt, version number, beidou time service working mode, polling time, clock precision, the number of layers of a system clock, identification of a reference clock source, maximum error of the system clock compared with the reference clock, time of leaving a sending end by the electronic information data stream and verification coding information;
the acquired Beidou time service protocol data stream has the following expression form:
wherein:
and indicating the Beidou time service protocol in the acquired nth group of message information data, wherein N indicates the total number of the acquired message information data.
In the step S1, a Beidou time service protocol semantic mining model is utilized to obtain semantic feature specifications of the Beidou time service protocol, and the method comprises the following steps:
establishing a Beidou time service protocol semantic mining model, wherein the Beidou time service protocol semantic mining model takes Beidou time service protocol data flow as input and semantic feature specification as output; the Beidou time service protocol semantic mining model comprises an input layer, a convolution calculation layer, an attention layer and an output layer, wherein the input layer is used for receiving the Beidou time service protocol, the convolution calculation layer is used for calculating and obtaining a feature representation result of the Beidou time service protocol, the attention layer is used for obtaining the weight of the feature representation result, and the output layer is used for outputting semantic feature specifications of the Beidou time service protocol;
Semantic feature specifications of the Beidou time service protocol are obtained by utilizing a Beidou time service protocol semantic mining model, wherein the Beidou time service protocol isThe semantic feature specification extraction flow of (1) is as follows:
s11: input layer receiving Beidou time service protocol
S12: setting a current iteration volumeThe product calculation times are D, the initial value of D is 1, the maximum iterative convolution calculation times are D, and the Beidou time service protocolThe characteristic representation result of the convolution calculation at the d-th time is +.>
S13: the convolution calculation layer calculates to obtain a characteristic representation result of the d-th convolution calculation:
wherein:
weight parameters representing four convolutional layers of the convolutional calculation layers, +.>The offset parameters of four convolution layers in the convolution calculation layers are represented;
representing an activation function->The method comprises the steps of carrying out a first treatment on the surface of the In the embodiment of the present invention, < > a->Representing ReLU activation function, +.>Representing a Softmax activation function;
s14: if it isWill->The method comprises the steps of dividing the method into 10 parts of characteristic representation results, wherein each part corresponds to protocol content in a Beidou time service protocol, and the 10 parts of corresponding protocol content in the Beidou time service protocol sequentially comprise leap second prompt, version number, beidou time service working mode, polling time, clock precision, the number of layers of a system clock, identification of a reference clock source, maximum error of the system clock compared with the reference clock, time of leaving a transmitting end by an electronic information data stream and verification coding information;
Attention layer pairAnd (3) performing attention weight calculation, wherein the attention weight calculation formula is as follows:
wherein:
t represents a transpose;
representing Beidou time service protocol->Middle->The number of times that part of the protocol content appears in the Beidou time service protocol data stream;
Representing Beidou time service protocol->Middle->Weights of partial protocol content;
an exponential function that is based on a natural constant;
representing Beidou time service protocol->Middle->Attention weight of partial protocol content;
representation->The middle 10 part of the features represent the attention weight matrix of the result;
if it isLet->Returning to step S13;
s15: output layer outputs big dipper time service protocolSemantic feature specifications of (c):
wherein:
representation->Middle->Part of the characteristic representation results, namely Beidou time service protocol +.>Middle->The characteristics of the partial protocol content represent the results.
S2: and taking semantic feature specifications of the Beidou time service protocol as test data, constructing a Beidou time service protocol test data set, randomly splitting the constructed data test set into a plurality of test subsets, and calculating the diversity degree of each test subset.
And S2, constructing a Beidou time service protocol test data set, randomly splitting the constructed data test set into a plurality of test subsets, and comprising the following steps:
Taking semantic feature specifications of the Beidou time service protocol as test Data, and constructing a Beidou time service protocol test Data set Data:
wherein:
representing Beidou time service protocol->Semantic feature specification of (a);
Randomly splitting the constructed data test set into K test subsets, wherein the number of test data in each split test subset is thatThen kth test subset +.>The method comprises the following steps:
wherein:
represents the kth test subset +.>The j-th test data of (a).
The step S2 of calculating the diversity order of each test subset includes:
calculating the diversity order of each split test subset, wherein the kth test subsetThe diversity factor calculation formula of (2) is:
wherein:
represents the kth test subset +.>Is a degree of diversity of (3);
representing semantic feature Specification +.>In Beidou time service protocol test data set +.>The number of occurrences of->Representing semantic feature Specification +.>And testing the frequency in the data set in the Beidou time service protocol.
S3: establishing a semantic feature specification safety test model, carrying out safety test on semantic feature specifications in a test subset according to the sequence of the diversity degree of the test subset from large to small, and recording the semantic feature specifications with potential safety hazards.
In the step S3, according to the sequence of the diversity degree of the test subset from large to small, the semantic feature specification security test model is utilized to sequentially carry out security test on the semantic feature specification in the test subset, and the method comprises the following steps:
according to the sequence of the diversity degree of the test sub-set from large to small, sequentially carrying out security test on semantic feature specifications in the test sub-set by utilizing a semantic feature specification security test model, and recording semantic feature specifications with potential safety hazards;
the semantic feature specification safety test model comprises an input layer, a feature calculation layer and an output layer, wherein the input layer is used for receiving semantic feature specifications; the feature calculation layer comprises 3 convolution layers and 3 pooling layers, each convolution layer is followed by the pooling layer, each pooling layer receives the output of the previous convolution layer and takes the pooling result as the input of the next convolution layer, wherein the input of the first convolution layer is a semantic feature specification; the output layer comprises two continuous full layersThe first full-connection layer selects a ReLU activation function, the last full-connection layer selects a softmax activation function, and a safety test result is outputWherein 0 indicates that the Beidou time service protocol corresponding to the semantic feature specification has no potential safety hazard, and 1 indicates that the Beidou time service protocol corresponding to the semantic feature specification has potential safety hazard.
S4: and carrying out test data support statistics on the semantic feature specifications obtained by recording, generating a proportion according to the support calculation sample to guide the semantic feature specifications to generate a specified number of test data, and carrying out optimization training on the semantic feature specification safety test model by utilizing the generated test data with potential safety hazards.
In the step S4, test data support statistics is performed on semantic feature specifications with potential safety hazards, and the semantic feature specifications are guided to generate specified quantity of test data according to a support calculation sample generation proportion, including:
carrying out test data support statistics on semantic feature specifications with potential safety hazards, wherein a test data support statistics formula is as follows:
wherein:
semantic feature Specification indicating that there is a potential safety hazard at b +.>Representation->Support of->Total number of semantic feature specifications representing potential safety hazard, < ->Represents an L1 norm;
generating a proportion according to a support degree calculation sample to guide the semantic feature specification to generate a specified number of test data, wherein cosine similarity between the generated test data and a reference semantic feature specification is higher than a preset similarity threshold, the reference semantic feature specification is the semantic feature specification with potential safety hazards, and the reference semantic feature specification is guided to generate the specified number of test data, and the test data is based on the semantic feature specification The number of test data generated is: />Wherein:
wherein:
c represents the total number of the set generated test data;
the total number of test data with potential safety hazards in the semantic feature standard safety test model training data set is represented;
the semantic features normalize the total number of test data in the security test model training dataset.
In the step S4, optimizing and training the semantic feature standard security test model by using the generated test data with potential safety hazards, wherein the method comprises the following steps:
adding the generated test data with potential safety hazards into a training data set of a semantic feature standard safety test model to obtain an updated training data set data:
wherein:
representing group c test data in the training data set data;
representing test data +.>Wherein the security test result of the test data generated by the semantic feature specification guide with potential safety hazards is 1;
training objective function for constructing semantic feature standard safety test model
Wherein:
representing the optimized parameters to be trained, namely parameters of a feature calculation layer in the semantic feature specification safety test model;
representing test data +.>Input to base +. >In the semantic feature standard safety test model, a safety test result is output by the model;
the model parameter optimization training process based on the training objective function is as follows:
s41: setting the current iteration number of the parameter to be optimized as U, the expected maximum iteration number as U, the initial value of U as 0, and initializing,/>Representing the current initial parameters to be optimized,/->Parameters to be optimized representing the current semantic feature specification security test model, < >>Representing parameters to be optimized after the nth iteration;
s42: if it isOutput +.>As parameters for optimization training and based onBuilding a semantic feature specification security test model, otherwise turning to step S43, wherein +.>A preset gradient threshold value is set;
s43: calculating to obtain iteration step length
Wherein:
representing a step size parameter;
representing the identity matrix;
updating parameters to be optimized based on the step size parameters:
s44: generating a random number rand between 0 and 1, and if the generated random number satisfies the following formulaPerforming mutation processing, wherein the inequality to be satisfied of the generated random number is:
wherein:
for the set maximum mutation rate, +.>The set minimum mutation rate;
wherein the mutation processing formula is as follows:
wherein:
respectively represent arbitrary- >Parameters to be optimized obtained by iteration and arbitrary firstParameters to be optimized obtained by iteration for several times, +.>
Is->Variation results of (2);
if it isWill->Substitution with variant results->Let u=u+1, return to step S42;
if the generated random number does not satisfy the inequality, let u=u+1, return to step S42.
Example 2
Fig. 2 is a schematic structural diagram of an electronic device for implementing the security analysis method of the beidou time service protocol according to an embodiment of the present invention.
The electronic device 1 may comprise a processor 10, a memory 11, a communication interface 13 and a bus, and may further comprise a computer program, such as program 12, stored in the memory 11 and executable on the processor 10.
The memory 11 includes at least one type of readable storage medium, including flash memory, a mobile hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may in other embodiments also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only for storing application software installed in the electronic device 1 and various types of data, such as codes of the program 12, but also for temporarily storing data that has been output or is to be output.
The processor 10 may be comprised of integrated circuits in some embodiments, for example, a single packaged integrated circuit, or may be comprised of multiple integrated circuits packaged with the same or different functions, including one or more central processing units (Central Processing unit, CPU), microprocessors, digital processing chips, graphics processors, combinations of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device, connects various components of the entire electronic device using various interfaces and lines, executes or executes programs or modules (a program 12 for implementing Beidou time service protocol security analysis, etc.) stored in the memory 11, and invokes data stored in the memory 11 to perform various functions of the electronic device 1 and process data.
The communication interface 13 may comprise a wired interface and/or a wireless interface (e.g. WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the electronic device 1 and other electronic devices and to enable connection communication between internal components of the electronic device.
The bus may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
Fig. 2 shows only an electronic device with components, it being understood by a person skilled in the art that the structure shown in fig. 2 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for supplying power to each component, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described herein.
The electronic device 1 may optionally further comprise a user interface, which may be a Display, an input unit, such as a Keyboard (Keyboard), or a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device 1 and for displaying a visual user interface.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The program 12 stored in the memory 11 of the electronic device 1 is a combination of instructions that, when executed in the processor 10, may implement:
acquiring a Beidou time service protocol data stream, and acquiring semantic feature specifications of the Beidou time service protocol by utilizing a Beidou time service protocol semantic mining model;
taking semantic feature specifications of the Beidou time service protocol as test data, constructing a Beidou time service protocol test data set, randomly splitting the constructed data test set into a plurality of test subsets, and calculating the diversity degree of each test subset;
constructing a semantic feature specification safety test model, carrying out safety test on semantic feature specifications in a test subset according to the sequence of the diversity degree of the test subset from large to small, and recording semantic feature specifications with potential safety hazards;
and carrying out test data support statistics on the semantic feature specifications obtained by recording, generating a proportion according to the support calculation sample to guide the semantic feature specifications to generate a specified number of test data, and carrying out optimization training on the semantic feature specification safety test model by utilizing the generated test data with potential safety hazards.
Specifically, the specific implementation method of the above instruction by the processor 10 may refer to descriptions of related steps in the corresponding embodiments of fig. 1 to 2, which are not repeated herein.
It should be noted that, the foregoing reference numerals of the embodiments of the present invention are merely for describing the embodiments, and do not represent the advantages and disadvantages of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, apparatus, article or method that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) as described above, comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (3)

1. The Beidou time service protocol safety analysis method is characterized by comprising the following steps of:
s1: acquiring a Beidou time service protocol data stream, and constructing a Beidou time service protocol semantic mining model, wherein the Beidou time service protocol semantic mining model takes the Beidou time service protocol data stream as input, takes semantic feature specifications as output, and obtains the semantic feature specifications of the Beidou time service protocol by utilizing the Beidou time service protocol semantic mining model; comprising the following steps:
the Beidou time service protocol semantic mining model comprises an input layer, a convolution calculation layer, an attention layer and an output layer, wherein the input layer is used for receiving the Beidou time service protocol, the convolution calculation layer is used for calculating and obtaining a feature representation result of the Beidou time service protocol, the attention layer is used for obtaining the weight of the feature representation result, and the output layer is used for outputting semantic feature specifications of the Beidou time service protocol;
semantic feature specifications of the Beidou time service protocol are obtained by utilizing a Beidou time service protocol semantic mining model, wherein the Beidou time service protocol x is n The semantic feature specification extraction flow of (1) is as follows:
s11: input layer receives Beidou time service protocol x n
S12: setting the current iterative convolution calculation times as D, the initial value of D as 1, and the maximum iterative convolution calculation times as D, and then the Beidou time service protocol x n Feature representation results at the d-th convolution calculationIs F d (x n );
S13: the convolution calculation layer calculates to obtain a characteristic representation result of the d-th convolution calculation:
F d (x n )=σ 2 (F d-1 (x n )w 4 +b 4 )tanh(F 3,d-1 );
F 3,d-1 =σ 2 [(F 1,d-1 +F 2,d-1 )w 3 +b 3 ];
F 1,d-1 =σ 1 (F d-1 (x n )w 1 +b 1 );
F 2,d-1 =σ 1 (F d-1 (x n )w 2 +b 2 );
wherein:
w 1 ,w 2 ,w 3 ,w 4 weight parameters representing four of the convolution layers, b 1 ,b 2 ,b 3 ,b 4 Representing offset parameters of four convolution layers in the convolution calculation layers, F 1,d-1 Representing information to be recorded in characteristic representation results obtained by d-1 th convolution calculation, F 2,d-1 Representing the information to be filtered and deleted in the characteristic representation result obtained by the d-1 th convolution calculation, F 3,d-1 Indicating information required to be passed to the d-th convolution calculation process, including F 1,d-1 F (F) 2,d-1 ,σ 2 (F d-1 (x n )w 4 +b 4 ) Representing the characteristic representation result F obtained by the d-1 th convolution calculation d-1 (x n ) Performing convolution calculation, tanh (F 3,d-1 ) Representing that information is transmitted in the iterative process, so that effective information to be recorded is reserved, and invalid information is filtered and deleted;
σ 1 (·),σ 2 (. Cndot.) represents the activation function, F 0 (x n )=x n ,F 0 (x n ) Beidou time service protocol x representing initial moment n Features of the convolution calculation of (a) represent results;
s14: if d=d, then F D (x n ) The result is represented by a feature divided into 10 parts, each part of whichThe method comprises the steps of corresponding protocol contents in a Beidou time service protocol, wherein 10 parts of the corresponding protocol contents in the Beidou time service protocol are leap second prompt, version numbers, beidou time service working modes, polling time, clock precision, the number of layers of a system clock, identification of a reference clock source, maximum error of the system clock compared with the reference clock, time of leaving a transmitting end by an electronic information data stream and verification coding information in sequence;
attention layer pair F D (x n ) And (3) performing attention weight calculation, wherein the attention weight calculation formula is as follows:
wherein:
t represents a transpose;
n represents the total number of acquired text information data;
count(x n (i) Indicating Beidou time service protocol x) n The number of times that the ith part of protocol content appears in the Beidou time service protocol data stream;
m n (i) Indicating Beidou time service protocol x n The weight of the i-th part of protocol content;
exp (·) represents an exponential function that bases on the natural constant;
indicating Beidou time service protocol x n Attention weight of the i-th part of protocol content;
attention n represents F D (x n ) The middle 10 part of the features represent the attention weight matrix of the result;
if D < D, let d=d+1, return to step S13;
s15: output layer outputs Beidou time service protocol x n Semantic feature specifications of (c):
f(x n )=[F D (x n ,1),...F D (x n ,10)]attention n
wherein:
F D (x n i) represents F D (x n ) The characteristic of the i-th part of the system represents the result, namely the Beidou time service protocol x n The characteristic of the i-th part of protocol content represents the result;
s2: taking semantic feature specifications of the Beidou time service protocol as test data, constructing a Beidou time service protocol test data set, randomly splitting the constructed data test set into a plurality of test subsets, and calculating the diversity degree of each test subset; comprising the following steps:
constructing a Beidou time service protocol test Data set Data:
Data={f(x n )|n∈[1,N]};
wherein:
f(x n ) Indicating Beidou time service protocol x n Semantic feature specifications of (a);
randomly splitting the constructed Data test set into K test subsets, wherein the number of test Data in each split test subset is N/K, and the kth test subset Data (K) is:
wherein:
representing the j-th test Data in the k-th test subset Data (k) as a semantic feature specification;
calculating the diversity degree of each split test subset, wherein the calculation formula of the diversity degree of the kth test subset Data (k) is as follows:
wherein:
H k representing the degree of diversity of the kth test subset Data (k);
representing semantic feature Specification +.>The number of times in the Beidou time service protocol test Data set Data is +. >Representing semantic feature Specification +.>Testing the frequency in the data set in the Beidou time service protocol;
s3: constructing a semantic feature specification safety test model, sequentially carrying out safety test on semantic feature specifications in a test subset by using the semantic feature specification safety test model according to the sequence of the diversity degree of the test subset from large to small, and recording the semantic feature specifications with potential safety hazards;
s4: performing test data support statistics on the semantic feature specifications obtained through recording, generating a proportion according to the support calculation samples to guide the semantic feature specifications to generate specified quantity of test data, and performing optimization training on a semantic feature specification safety test model by utilizing the generated test data with potential safety hazards; comprising the following steps:
and carrying out test data support statistics on the semantic feature specifications obtained by recording, wherein a test data support statistics formula is as follows:
wherein:
g b semantic feature specification representing the b-th potential safety hazard, sup (g b ) G represents g b B represents the total number of semantic feature specifications with potential safety hazards, and I.I represents L1 norm and p (g) b ) Representing semantic feature Specification g b Testing the frequency in the data set in the Beidou time service protocol;
Generating a proportion according to the support degree calculation sample to guide the semantic feature specification to generate a specified number of test data, wherein cosine similarity between the generated test data and a reference semantic feature specification is higher than a preset similarity threshold value, the reference semantic feature specification is the semantic feature specification with potential safety hazards, and guides the reference semantic feature specification to generate the specified number of test data,
then based on semantic feature specification g b The number of test data generated is: sup (g) b ) C, wherein:
wherein:
c represents the total number of the set generated test data;
c' represents the total number of test data with potential safety hazards in the semantic feature standard safety test model training data set;
sum semantic feature specifications test data total in a safety test model training data set;
optimizing training of the semantic feature standard security test model by using the generated test data with potential safety hazards comprises the following steps:
adding the generated test data with potential safety hazards into a training data set of a semantic feature standard safety test model to obtain an updated training data set data:
data={(h c ,label c )|c∈[1,Sum+C]};
wherein:
h c representing training numbersThe c-th group of test data in the data set;
label c = {0,1}, representing test data h c Wherein the security test result of the test data generated by the semantic feature specification guide with potential safety hazards is 1;
building a training objective function Loss (theta) of a semantic feature standard safety test model:
wherein:
θ represents the optimization parameters to be trained, namely parameters of a feature calculation layer in the semantic feature specification safety test model;
representing the test data h c Inputting the safety test result into a theta-based semantic feature standard safety test model, and outputting the safety test result by the model;
the model parameter optimization training process based on the training objective function is as follows:
s41: setting the current iteration number of the parameter to be optimized as U, the expected maximum iteration number as U, the initial value of U as 0, and initializing theta 0 =θ',θ 0 Representing the current initial parameters to be optimized, theta' representing the parameters to be optimized of the current semantic feature canonical security test model, theta u Representing parameters to be optimized after the nth iteration;
s42: if it isOutput theta u As a parameter obtained by optimization training and based on theta u Constructing a semantic feature specification safety test model, otherwise turning to step S43, wherein epsilon is a preset gradient threshold value;
s43: calculating to obtain iteration step lambda u
γ u =2-(u+1)/U;
Wherein:
γ u representing a step size parameter;
I represents an identity matrix;
updating parameters to be optimized based on the step size parameters:
θ u+1 =θ uu
s44: generating a random number rand between 0 and1, and if the generated random number satisfies the following formula, then performing a process on θ u+1 Performing mutation processing, wherein the inequality to be satisfied of the generated random number is:
wherein:
p max for the set maximum mutation rate, p min The set minimum mutation rate;
wherein the mutation processing formula is as follows:
wherein:
θ rand1rand2 respectively represent the parameters to be optimized obtained by any rand1 iteration and the parameters to be optimized obtained by any rand2 iteration, rand1, rand2 epsilon [1, u+1 ]];
For theta u+1 Variation results of (2);
if it isWill be theta u+1 Substitution with variant results->Let u=u+1, return to step S42;
if the generated random number does not satisfy the inequality, let u=u+1, return to step S42.
2. The method for analyzing security of the beidou time service protocol according to claim 1, wherein the step S1 of obtaining the beidou time service protocol data stream includes:
the method comprises the steps of obtaining a Beidou time service protocol data stream, wherein the Beidou time service protocol data stream is a Beidou time service protocol standard data stream in a message information data stream sent by a Beidou satellite to a time service user machine, the message information data stream comprises standard Beidou time, satellite position information, modulated time scale information, delay information and a Beidou time service protocol, and the Beidou time service protocol comprises leap second prompt, version number, beidou time service working mode, polling time, clock precision, the number of layers of a system clock, identification of a reference clock source, maximum error of the system clock compared with the reference clock, time of leaving a sending end by the electronic information data stream and verification coding information;
The acquired Beidou time service protocol data stream has the following expression form:
{x n |n∈[1,N]};
wherein:
x n and indicating the Beidou time service protocol in the acquired nth group of message information data, wherein N indicates the total number of the acquired message information data.
3. The security analysis method of Beidou time service protocol according to claim 1, wherein in the step S3, according to the sequence of the diversity degree of the test subsets from large to small, the security test is sequentially performed on the semantic feature specifications in the test subsets by using a semantic feature specification security test model, and the security test method comprises the following steps:
according to the sequence of the diversity degree of the test sub-set from large to small, sequentially carrying out security test on semantic feature specifications in the test sub-set by utilizing a semantic feature specification security test model, and recording semantic feature specifications with potential safety hazards;
the semantic feature specification safety test model comprises an input layer, a feature calculation layer and an output layer, wherein the input layer is used for receiving semantic feature specifications; the feature calculation layer comprises 3 convolution layers and 3 pooling layers, each convolution layer is followed by the pooling layer, each pooling layer receives the output of the previous convolution layer and takes the pooling result as the input of the next convolution layer, wherein the input of the first convolution layer is a semantic feature specification; the output layer comprises two continuous full-connection layers, wherein the first full-connection layer selects a ReLU activation function, the last full-connection layer selects a softmax activation function, and a safety test result {0,1} is output, wherein 0 represents that no safety hidden danger exists in the Beidou time service protocol corresponding to the semantic feature specification, and 1 represents that safety hidden danger exists in the Beidou time service protocol corresponding to the semantic feature specification.
CN202310868110.9A 2023-07-17 2023-07-17 Beidou time service protocol safety analysis method Active CN116614422B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310868110.9A CN116614422B (en) 2023-07-17 2023-07-17 Beidou time service protocol safety analysis method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310868110.9A CN116614422B (en) 2023-07-17 2023-07-17 Beidou time service protocol safety analysis method

Publications (2)

Publication Number Publication Date
CN116614422A CN116614422A (en) 2023-08-18
CN116614422B true CN116614422B (en) 2023-09-29

Family

ID=87680314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310868110.9A Active CN116614422B (en) 2023-07-17 2023-07-17 Beidou time service protocol safety analysis method

Country Status (1)

Country Link
CN (1) CN116614422B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109085615A (en) * 2018-08-01 2018-12-25 桂林电子科技大学 A kind of BPC big dipper multi-mode time service method and system
CN114660346A (en) * 2022-03-18 2022-06-24 武汉大学 Shunt vector measurement device and method based on Beidou time service and crystal oscillator clock
CN115080203A (en) * 2022-05-13 2022-09-20 广东工业大学 Beidou test task scheduling method and system based on task relevance
CN115913427A (en) * 2022-11-04 2023-04-04 深圳市乐凡信息科技有限公司 Beidou module testing method, device, equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11782183B2 (en) * 2021-04-26 2023-10-10 Institute Of Geology And Geophysics, Chinese Academy Of Sciences Magnetotelluric inversion method based on fully convolutional neural network

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109085615A (en) * 2018-08-01 2018-12-25 桂林电子科技大学 A kind of BPC big dipper multi-mode time service method and system
CN114660346A (en) * 2022-03-18 2022-06-24 武汉大学 Shunt vector measurement device and method based on Beidou time service and crystal oscillator clock
CN115080203A (en) * 2022-05-13 2022-09-20 广东工业大学 Beidou test task scheduling method and system based on task relevance
CN115913427A (en) * 2022-11-04 2023-04-04 深圳市乐凡信息科技有限公司 Beidou module testing method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
北斗高精度授时终端测试技术研究;刘浩;万豪;申国锋;;中国检验检测(05);全文 *

Also Published As

Publication number Publication date
CN116614422A (en) 2023-08-18

Similar Documents

Publication Publication Date Title
WO2022160449A1 (en) Text classification method and apparatus, electronic device, and storage medium
CN112380343B (en) Problem analysis method, device, electronic equipment and storage medium
US20190384809A1 (en) Methods and systems for providing universal portability in machine learning
CN110083774B (en) Method and device for determining application recommendation list, computer equipment and storage medium
CN110555451A (en) information identification method and device
CN113327136B (en) Attribution analysis method, attribution analysis device, electronic equipment and storage medium
CN112181835A (en) Automatic testing method and device, computer equipment and storage medium
CN112559923A (en) Website resource recommendation method and device, electronic equipment and computer storage medium
CN111831708A (en) Missing data-based sample analysis method and device, electronic equipment and medium
CN113313211B (en) Text classification method, device, electronic equipment and storage medium
CN112541688B (en) Service data verification method and device, electronic equipment and computer storage medium
CN116614422B (en) Beidou time service protocol safety analysis method
CN111782774B (en) Method and device for recommending problems
CN116578696A (en) Text abstract generation method, device, equipment and storage medium
CN113656586B (en) Emotion classification method, emotion classification device, electronic equipment and readable storage medium
CN112215336B (en) Data labeling method, device, equipment and storage medium based on user behaviors
CN111859985B (en) AI customer service model test method and device, electronic equipment and storage medium
CN110442767B (en) Method and device for determining content interaction platform label and readable storage medium
CN113515591A (en) Text bad information identification method and device, electronic equipment and storage medium
CN111738005A (en) Named entity alignment method and device, electronic equipment and readable storage medium
CN116578690B (en) Insurance customer service method and system based on artificial intelligence
CN113592606B (en) Product recommendation method, device, equipment and storage medium based on multiple decisions
CN112084391B (en) Method, device, equipment and computer medium for acquiring dependent package information
CN111414452B (en) Search word matching method and device, electronic equipment and readable storage medium
CN114757541B (en) Performance analysis method, device, equipment and medium based on training behavior data

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