CN116955020A - Aircraft data forwarding method, control system, equipment and storage medium - Google Patents

Aircraft data forwarding method, control system, equipment and storage medium Download PDF

Info

Publication number
CN116955020A
CN116955020A CN202310824496.3A CN202310824496A CN116955020A CN 116955020 A CN116955020 A CN 116955020A CN 202310824496 A CN202310824496 A CN 202310824496A CN 116955020 A CN116955020 A CN 116955020A
Authority
CN
China
Prior art keywords
aircraft data
buffer
port
processing thread
array
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.)
Pending
Application number
CN202310824496.3A
Other languages
Chinese (zh)
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.)
Shenzhen Border Intelligent Control Technology Co ltd
Original Assignee
Shenzhen Border Intelligent Control 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 Shenzhen Border Intelligent Control Technology Co ltd filed Critical Shenzhen Border Intelligent Control Technology Co ltd
Priority to CN202310824496.3A priority Critical patent/CN116955020A/en
Publication of CN116955020A publication Critical patent/CN116955020A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2002Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where interconnections or communication control functionality are redundant
    • G06F11/2007Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where interconnections or communication control functionality are redundant using redundant communication media
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/52Program synchronisation; Mutual exclusion, e.g. by means of semaphores
    • G06F9/526Mutual exclusion algorithms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5018Thread allocation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Communication Control (AREA)

Abstract

The application relates to the technical field of aircrafts and provides an aircraft data forwarding method, a control system, equipment and a storage medium. The method can improve the stability of data forwarding of the aircraft.

Description

Aircraft data forwarding method, control system, equipment and storage medium
Technical Field
The present application relates to the field of aircraft technologies, and in particular, to an aircraft data forwarding method, a control system, a device, and a storage medium.
Background
In the prior art, the forwarding of the aircraft data can be realized only in one communication frequency band, and when the aircraft data is interfered by signals, the existing aircraft data forwarding method has poor stability, so that unpredictable potential safety hazards occur in the running process of the aircraft easily, and therefore, a method is needed to solve the problem.
Disclosure of Invention
The application provides an aircraft data forwarding method, a control system, equipment and a storage medium, which are used for improving the stability of aircraft data forwarding.
In a first aspect, the present application provides an aircraft data forwarding method, where the method is used in an aircraft control system, where the aircraft control system is provided with a plurality of serial ports, and communication frequency bands of communication stations connected to the serial ports are different from each other, and the method includes:
when any serial port receives aircraft data and serial port interruption occurs, determining a first buffer based on the serial port; the first buffer is a receiving buffer matched with the serial port;
storing the aircraft data into the first buffer, determining a first processing thread based on the serial port, and sending a signal to the first processing thread so that the first processing thread takes the aircraft data out of the first buffer and analyzes the aircraft data; the first processing thread is a processing thread matched with the serial port;
acquiring an analysis result of the aircraft data, and judging whether the first processing thread successfully analyzes the aircraft data or not based on the analysis result;
if the first processing thread successfully analyzes the aircraft data, acquiring a port matched with the serial port, and determining a second buffer based on the port; the second buffer is a sending buffer matched with the port;
storing the parsed aircraft data into the second buffer, determining a second processing thread based on the port, and sending a signal to the second processing thread, so that the second processing thread takes the parsed aircraft data out of the second buffer and sends the parsed aircraft data to an application program corresponding to the port; wherein the second processing thread is a processing thread that matches the port.
In one implementation, before the storing the parsed aircraft data in the second buffer, the method further includes:
detecting whether the mutual exclusion lock is released;
if the mutual exclusion lock is released, adding the mutual exclusion lock to the parsed storage thread of the aircraft data; the storage thread is used for storing the parsed aircraft data to the second buffer;
after the storing the parsed aircraft data in the second buffer, the method further includes releasing the exclusive lock.
In one implementation, the method for releasing the mutual exclusion lock includes:
acquiring an identification code of the mutual exclusion lock, and acquiring a mutual exclusion lock release function matched with the mutual exclusion lock from a preset mutual exclusion lock release function database based on the identification code;
releasing the mutual exclusion lock based on the mutual exclusion lock release function, and marking the mutual exclusion lock as an unused state.
In one implementation, the first processing thread parses the aircraft data using a mavlink protocol.
In one implementation, the method further includes encrypting the aircraft data prior to storing the aircraft data in the first buffer.
In one implementation, the encryption processing method includes:
acquiring a first identification code and a second identification code; the first identification code is the identification code of the first buffer, and the second identification code is the identification code of the second buffer;
randomly sequencing all characters in a character column of a preset standard coding table, and sequentially filling the characters into the character column to obtain a target coding table;
acquiring a first array and a second array based on the target coding table; the first array is an array corresponding to the first identification code, and the second array is an array corresponding to the second identification code;
extracting numbers which do not appear in the second array from the first array, and extracting numbers which do not appear in the first array from the second array;
randomly sequencing all the extracted numbers to obtain a first encryption array;
generating a second encrypted array using a random number generator;
and encrypting the parsed aircraft data based on the first encryption array and the second encryption array.
In one implementation, the encrypting the parsed aircraft data based on the first encryption array and the second encryption array includes:
acquiring a port number of the port, and judging the parity of the number of the port number at a designated position;
extracting target numbers from the first encryption array and the second encryption array respectively based on parity of numbers of the port numbers at specified positions;
randomly sequencing all the extracted target numbers to obtain a target encryption array;
encrypting the aircraft data using the target encryption array.
In a second aspect, the present application provides an aircraft control system, the aircraft control system being provided with a plurality of serial ports, communication frequency bands of communication stations connected to the serial ports being different from each other, the aircraft control system comprising:
the first determining module is used for determining a first buffer based on the serial port when any serial port receives aircraft data and serial port interruption occurs; the first buffer is a receiving buffer matched with the serial port;
the second determining module is used for storing the aircraft data into the first buffer, determining a first processing thread based on the serial port, and sending a signal to the first processing thread so that the first processing thread can take the aircraft data out of the first buffer and analyze the aircraft data; the first processing thread is a processing thread matched with the serial port;
the first acquisition module is used for acquiring an analysis result of the aircraft data and judging whether the first processing thread successfully analyzes the aircraft data or not based on the analysis result;
the second acquisition module is used for acquiring a port matched with the serial port if the first processing thread successfully analyzes the aircraft data, and determining a second buffer based on the port; the second buffer is a sending buffer matched with the port;
a third determining module, configured to store the parsed aircraft data in the second buffer, determine a second processing thread based on the port, and send a signal to the second processing thread, so that the second processing thread takes the parsed aircraft data out of the second buffer and sends the parsed aircraft data to an application program corresponding to the port; wherein the second processing thread is a processing thread that matches the port.
In a third aspect, the application provides a terminal device comprising a processor, a memory and a computer program stored on the memory and executable by the processor, wherein the computer program, when executed by the processor, implements any of the aircraft data forwarding methods as described above.
In a fourth aspect, the application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any of the aircraft data forwarding methods described above.
The application provides an aircraft data forwarding method, a control system, equipment and a storage medium, wherein the method is used for an aircraft control system, the aircraft control system is provided with a plurality of serial ports, communication frequency bands of communication radio stations connected by the serial ports are different from each other, the method firstly stores aircraft data into a receiving buffer matched with the serial ports when any serial port receives the aircraft data and is interrupted, takes out the aircraft data from the first buffer and analyzes the aircraft data by using a first processing thread matched with the serial port, then obtains a port matched with the serial port after the first processing thread successfully analyzes the aircraft data, determines a second buffer matched with the port, stores the aircraft data into the second buffer, and finally sends the aircraft data after analysis to an application program corresponding to the port based on the second processing thread matched with the port. The method can improve the stability of data forwarding of the aircraft.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of an aircraft data forwarding method according to an embodiment of the present application;
FIG. 2 is a block schematic diagram of an aircraft control system provided in an embodiment of the present application;
fig. 3 is a schematic block diagram of a structure of a terminal device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
It is also to be understood that the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
In the prior art, the forwarding of the aircraft data can be realized only in one communication frequency band, and when the aircraft data is interfered by signals, the existing aircraft data forwarding method has poor stability, so that unpredictable potential safety hazards occur in the running process of the aircraft easily, and therefore, a method is needed to solve the problem.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
Referring to fig. 1, fig. 1 is a flowchart illustrating an aircraft data forwarding method according to an embodiment of the present application, where the aircraft data forwarding method according to an embodiment of the present application is used in an aircraft control system 100 shown in fig. 2, the aircraft control system 100 is provided with a plurality of serial ports, and communication frequency bands of communication stations connected by the serial ports 160 are different from each other, as shown in fig. 1, and the aircraft data forwarding method according to an embodiment of the present application includes steps S100 to S500.
Step S100, when any serial port 160 receives aircraft data and serial port interruption occurs, determining a first buffer based on the serial port 160; wherein the first buffer is a receiving buffer matched with the serial port 160.
It may be understood that each serial port 160 matches one first buffer, and the serial ports 160 and the first buffers are in a one-to-one correspondence, and determining the first buffer based on the serial port 160 in step S100 refers to determining the first buffer matched with the serial port 160 that receives the aircraft data and generates the serial port interrupt.
Step 200, storing the aircraft data in the first buffer, determining a first processing thread based on the serial port 160, and sending a signal to the first processing thread, so that the first processing thread takes the aircraft data out of the first buffer and parses the aircraft data; wherein the first processing thread is a processing thread that matches the serial port 160.
It may be understood that each serial port 160 matches one first processing thread, and the serial port 160 and the first processing thread are in a one-to-one correspondence, and determining the first processing thread based on the serial port 160 in step S200 refers to determining the first processing thread matched with the serial port 160 that receives the aircraft data and generates the serial port interrupt.
The first processing thread analyzes the aircraft data by adopting a mavlink protocol, and analyzes the aircraft data by adopting the mavlink protocol, so that an application program of any manufacturer can analyze the aircraft data, and the stability of forwarding the aircraft data is further improved.
And step S300, acquiring an analysis result of the aircraft data, and judging whether the first processing thread successfully analyzes the aircraft data or not based on the analysis result.
In step S300, the analysis result may be analyzed based on a preset analysis result analysis model to determine whether the first processing thread successfully analyzes the aircraft data.
Step S400, if the first processing thread successfully analyzes the aircraft data, acquiring a port matched with the serial port 160, and determining a second buffer based on the port; the second buffer is a sending buffer matched with the port.
It can be understood that each serial port 160 matches one port, the serial ports 160 and the ports are in a one-to-one correspondence, and the obtaining the ports matched with the serial ports 160 in step S400 refers to obtaining the ports matched with the serial ports based on the serial ports 160 that receive the aircraft data and generate the serial port interrupt, each port matches one second buffer, and the ports and the second buffers are in a one-to-one correspondence.
Step S500, storing the parsed aircraft data into the second buffer, determining a second processing thread based on the port, and sending a signal to the second processing thread, so that the second processing thread takes the parsed aircraft data out of the second buffer and sends the parsed aircraft data to an application program corresponding to the port; wherein the second processing thread is a processing thread that matches the port.
It will be appreciated that each port corresponds to a second processing thread, the ports are in a one-to-one correspondence with the second processing threads, each port corresponds to an application, and the ports are in a one-to-one correspondence with the application.
The aircraft data forwarding method provided in this embodiment is used in an aircraft control system 100, the aircraft control system 100 is provided with a plurality of serial ports 160, communication frequency bands of communication stations connected by the serial ports 160 are different, when any serial port 160 receives aircraft data and serial port interruption occurs, the aircraft data is stored in a receiving buffer matched with the serial port 160, the aircraft data is taken out from the first buffer and analyzed by using a first processing thread matched with the serial port 160, then after the first processing thread successfully analyzes the aircraft data, a port matched with the serial port 160 is obtained, a second buffer matched with the port is determined, the aircraft data is stored in the second buffer, and finally the analyzed aircraft data is sent to an application program corresponding to the port based on the second processing thread matched with the port. Because the aircraft data forwarding method provided in this embodiment is used in the aircraft control system 100 provided with the plurality of serial ports 160, and the communication frequency bands of the communication stations connected by the serial ports 160 are different from each other, the aircraft data can be forwarded by using the method even if the aircraft data forwarding method is interfered by signals, and the method can improve the stability of aircraft data forwarding.
In some embodiments, before said storing the parsed aircraft data in the second buffer, the method further comprises the steps of:
detecting whether the mutual exclusion lock is released;
if the mutual exclusion lock is released, adding the mutual exclusion lock to the parsed storage thread of the aircraft data; the storage thread is used for storing the parsed aircraft data to the second buffer;
after the storing the parsed aircraft data in the second buffer, the method further includes releasing the exclusive lock.
By adopting the method of the embodiment, accidental modification of the data when the plurality of analyzed aircraft data are simultaneously stored in the second buffer can be avoided, and the safety and stability of the data are improved, so that the stability of the aircraft data forwarding method is further improved.
In some embodiments, the method of releasing the mutual exclusion lock includes the steps of:
acquiring an identification code of the mutual exclusion lock, and acquiring a mutual exclusion lock release function matched with the mutual exclusion lock from a preset mutual exclusion lock release function database based on the identification code;
releasing the mutual exclusion lock based on the mutual exclusion lock release function, and marking the mutual exclusion lock as an unused state.
The method of the embodiment can improve the success rate of releasing the mutual exclusion lock, the mutual exclusion lock is marked as an unused state, and when the subsequent analyzed aircraft data needs to be stored in the second buffer, the mutual exclusion lock is directly added into a storage thread corresponding to the second buffer, so that the speed of storing the analyzed aircraft data in the second buffer is improved, and the forwarding speed of the aircraft data is improved.
In some embodiments, the method further comprises encrypting the aircraft data prior to storing the aircraft data in the first buffer.
According to the embodiment, the safety of the aircraft data can be improved by carrying out encryption processing on the aircraft data, and the aircraft data is prevented from being tampered, so that the stability of the aircraft data forwarding method is further improved.
In some embodiments, the method of encryption processing includes the steps of:
acquiring a first identification code and a second identification code; the first identification code is the identification code of the first buffer, and the second identification code is the identification code of the second buffer;
randomly sequencing all characters in a character column of a preset standard coding table, and sequentially filling the characters into the character column to obtain a target coding table;
acquiring a first array and a second array based on the target coding table; the first array is an array corresponding to the first identification code, and the second array is an array corresponding to the second identification code;
extracting numbers which do not appear in the second array from the first array, and extracting numbers which do not appear in the first array from the second array;
randomly sequencing all the extracted numbers to obtain a first encryption array;
generating a second encrypted array using a random number generator;
and encrypting the parsed aircraft data based on the first encryption array and the second encryption array.
For example, the standard code table is shown in table 1, the character sequence of the character string in the standard code table is ABCDEFGHIJ, the character sequence obtained by randomly sorting all the characters in the character string in table 1 is cheagjdbb, and the obtained target code table is shown in table 2.
Table 1 Standard coding Table
Table 2 target encoding table
If the first identification code is ABCDEF and the second identification code is EFGHIJ, the first array is 390627 and the second array is 274185, all the extracted numbers are 3,9,0,6,3,9,0,6, and the first encrypted array obtained by randomly ordering all the extracted numbers is 14589063.
According to the embodiment, the first digits and the second digits are obtained based on the first identification code, the second identification code and the target coding table, digits which do not appear in the second digits are extracted from the first digits, digits which do not appear in the first digits are extracted from the second digits, all the extracted digits are randomly ordered to obtain a first encryption digit group, then a second encryption digit group is generated by using a random number generator, and finally the aircraft data are encrypted based on the first encryption digit group and the second encryption digit group, so that the encryption effect of encrypting the aircraft data can be improved, the safety of the aircraft data is further improved, and the stability of forwarding the aircraft data is improved. .
In some embodiments, the encrypting the parsed aircraft data based on the first and second encryption arrays includes the steps of:
acquiring a port number of the port, and judging the parity of the number of the port number at a designated position;
extracting target numbers from the first encryption array and the second encryption array respectively based on parity of numbers of the port numbers at specified positions;
randomly sequencing all the extracted target numbers to obtain a target encryption array;
encrypting the aircraft data using the target encryption array.
Wherein extracting the target number in the first encryption array and the second encryption array based on the parity of the number of the port number at the specified position refers to extracting the same number as the parity of the number of the port number at the specified position in the first encryption array and the second encryption array, respectively.
Illustratively, the port number is 81, the first encryption array is 14589063, the second encryption array is 2560945, and the number of the specified location of the port number is 1, then the numbers extracted from the first encryption array and the second encryption array are 1,5,9,3,5,9,5.
By adopting the method of the embodiment, the encryption effect of encrypting the aircraft data can be improved, so that the safety of the aircraft data is further improved, and the stability of forwarding the aircraft data is improved.
Referring to fig. 2, fig. 2 is a schematic block diagram of an aircraft control system 100 according to an embodiment of the present application, where, as shown in fig. 2, the aircraft control system 100 provided in the embodiment of the present application is provided with a plurality of serial ports 160, and communication frequency bands of communication stations connected by the serial ports 160 are different from each other, as shown in fig. 2, the aircraft control system 100 includes:
the first determining module 110 is configured to determine, based on the serial port 160, a first buffer when any serial port 160 receives aircraft data and a serial port interrupt occurs; wherein the first buffer is a receiving buffer matched with the serial port 160;
a second determining module 120, configured to store the aircraft data in the first buffer, determine a first processing thread based on the serial port 160, and send a signal to the first processing thread, so that the first processing thread takes the aircraft data out of the first buffer and parses the aircraft data; wherein the first processing thread is a processing thread matched with the serial port 160;
a first obtaining module 130, configured to obtain an analysis result of the aircraft data, and determine whether the first processing thread successfully analyzes the aircraft data based on the analysis result;
a second obtaining module 140, configured to obtain a port matched with the serial port 160 if the first processing thread successfully parses the aircraft data, and determine a second buffer based on the port; the second buffer is a sending buffer matched with the port;
a third determining module 150, configured to store the parsed aircraft data in the second buffer, determine a second processing thread based on the port, and send a signal to the second processing thread, so that the second processing thread takes the parsed aircraft data out of the second buffer and sends the parsed aircraft data to an application program corresponding to the port; wherein the second processing thread is a processing thread that matches the port.
It should be noted that, for convenience and brevity of description, specific working processes of the above-described system and each module may refer to corresponding processes in the foregoing embodiment of the aircraft data forwarding method, which are not described herein again.
The aircraft control system 100 provided by the above-described embodiment may be implemented in the form of a computer program which can be run on the terminal device 200 as shown in fig. 3.
Referring to fig. 3, fig. 3 is a schematic block diagram of a structure of a terminal device 200 according to an embodiment of the present application, where the terminal device 200 includes a processor 201 and a memory 202, and the processor 201 and the memory 202 are connected through a system bus 203, and the memory 202 may include a nonvolatile storage medium and an internal memory.
The non-volatile storage medium may store a computer program. The computer program comprises program instructions which, when executed by the processor 201, cause the processor 201 to perform any of the aircraft data forwarding methods described above.
The processor 201 is used to provide computing and control capabilities supporting the operation of the overall terminal device 200.
The internal memory provides an environment for the execution of a computer program in a non-volatile storage medium that, when executed by the processor 201, causes the processor 201 to perform any of the aircraft data forwarding methods described above.
It will be appreciated by those skilled in the art that the structure shown in fig. 3 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation of the terminal device 200 related to the present application, and that a specific terminal device 200 may include more or less components than those shown in the drawings, or may combine some components, or have a different arrangement of components.
It should be appreciated that the processor 201 may be a central processing unit (Central Processing Unit, CPU), and the processor 201 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
In some embodiments, the processor 201 is configured to execute a computer program stored in the memory to implement the following steps:
when any serial port 160 receives aircraft data and serial port interruption occurs, determining a first buffer based on the serial port 160; wherein the first buffer is a receiving buffer matched with the serial port 160;
storing the aircraft data in the first buffer, determining a first processing thread based on a serial port 160, and sending a signal to the first processing thread to enable the first processing thread to take the aircraft data out of the first buffer and parse the aircraft data; wherein the first processing thread is a processing thread matched with the serial port 160;
acquiring an analysis result of the aircraft data, and judging whether the first processing thread successfully analyzes the aircraft data or not based on the analysis result;
if the first processing thread successfully analyzes the aircraft data, acquiring a port matched with the serial port 160, and determining a second buffer based on the port; the second buffer is a sending buffer matched with the port;
storing the parsed aircraft data into the second buffer, determining a second processing thread based on the port, and sending a signal to the second processing thread, so that the second processing thread takes the parsed aircraft data out of the second buffer and sends the parsed aircraft data to an application program corresponding to the port; wherein the second processing thread is a processing thread that matches the port.
In some embodiments, before implementing the storing the parsed aircraft data in the second buffer, the processor 201 is further configured to implement:
detecting whether the mutual exclusion lock is released;
if the mutual exclusion lock is released, adding the mutual exclusion lock to the parsed storage thread of the aircraft data; the storage thread is used for storing the parsed aircraft data to the second buffer;
processor 201 is further configured to implement releasing the mutual exclusion lock after implementing the storing of the parsed aircraft data to the second buffer.
In some embodiments, processor 201, when implementing releasing the mutex lock, is to implement:
acquiring an identification code of the mutual exclusion lock, and acquiring a mutual exclusion lock release function matched with the mutual exclusion lock from a preset mutual exclusion lock release function database based on the identification code;
releasing the mutual exclusion lock based on the mutual exclusion lock release function, and marking the mutual exclusion lock as an unused state.
In some embodiments, processor 201 is further configured to implement encryption of the aircraft data prior to implementing storage of the aircraft data in the first buffer.
In some embodiments, processor 201, when implementing encryption processing of the aircraft data, is to implement:
acquiring a first identification code and a second identification code; the first identification code is the identification code of the first buffer, and the second identification code is the identification code of the second buffer;
randomly sequencing all characters in a character column of a preset standard coding table, and sequentially filling the characters into the character column to obtain a target coding table;
acquiring a first array and a second array based on the target coding table; the first array is an array corresponding to the first identification code, and the second array is an array corresponding to the second identification code;
extracting numbers which do not appear in the second array from the first array, and extracting numbers which do not appear in the first array from the second array;
randomly sequencing all the extracted numbers to obtain a first encryption array;
generating a second encrypted array using a random number generator;
and encrypting the parsed aircraft data based on the first encryption array and the second encryption array.
In some embodiments, when implementing the encrypting the parsed aircraft data based on the first encryption array and the second encryption array, the processor 201 is configured to implement:
acquiring a port number of the port, and judging the parity of the number of the port number at a designated position;
extracting target numbers from the first encryption array and the second encryption array respectively based on parity of numbers of the port numbers at specified positions;
randomly sequencing all the extracted target numbers to obtain a target encryption array;
encrypting the aircraft data using the target encryption array.
It should be noted that, for convenience and brevity of description, the specific working process of the terminal device 200 described above may refer to the corresponding process of the aircraft data forwarding method, and will not be described herein.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program that, when executed by one or more processors, causes the one or more processors to implement an aircraft data forwarding method as provided by the embodiments of the present application.
The computer readable storage medium may be an internal storage unit of the terminal device 200 of the foregoing embodiment, for example, a hard disk or a memory of the terminal device 200. The computer readable storage medium may also be an external storage device of the terminal device 200, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which the terminal device 200 is equipped with.
While the application has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. An aircraft data forwarding method, which is used for an aircraft control system, wherein the aircraft control system is provided with a plurality of serial ports, and communication frequency bands of communication radio stations connected by the serial ports are different from each other, and the method comprises the following steps:
when any serial port receives aircraft data and serial port interruption occurs, determining a first buffer based on the serial port; the first buffer is a receiving buffer matched with the serial port;
storing the aircraft data into the first buffer, determining a first processing thread based on the serial port, and sending a signal to the first processing thread so that the first processing thread takes the aircraft data out of the first buffer and analyzes the aircraft data; the first processing thread is a processing thread matched with the serial port;
acquiring an analysis result of the aircraft data, and judging whether the first processing thread successfully analyzes the aircraft data or not based on the analysis result;
if the first processing thread successfully analyzes the aircraft data, acquiring a port matched with the serial port, and determining a second buffer based on the port; the second buffer is a sending buffer matched with the port;
storing the parsed aircraft data into the second buffer, determining a second processing thread based on the port, and sending a signal to the second processing thread, so that the second processing thread takes the parsed aircraft data out of the second buffer and sends the parsed aircraft data to an application program corresponding to the port; wherein the second processing thread is a processing thread that matches the port.
2. The aircraft data forwarding method of claim 1, wherein prior to said storing the parsed aircraft data in the second buffer, the method further comprises:
detecting whether the mutual exclusion lock is released;
if the mutual exclusion lock is released, adding the mutual exclusion lock to the parsed storage thread of the aircraft data; the storage thread is used for storing the parsed aircraft data to the second buffer;
after the storing the parsed aircraft data in the second buffer, the method further includes releasing the exclusive lock.
3. The aircraft data forwarding method of claim 2, wherein the method of releasing the mutual exclusion lock comprises:
acquiring an identification code of the mutual exclusion lock, and acquiring a mutual exclusion lock release function matched with the mutual exclusion lock from a preset mutual exclusion lock release function database based on the identification code;
releasing the mutual exclusion lock based on the mutual exclusion lock release function, and marking the mutual exclusion lock as an unused state.
4. The aircraft data forwarding method of claim 1, wherein the first processing thread parses the aircraft data using a mavlink protocol.
5. The aircraft data forwarding method of claim 1, wherein the method further comprises encrypting the aircraft data prior to storing the aircraft data in the first buffer.
6. The aircraft data forwarding method of claim 5, wherein the encryption processing method comprises:
acquiring a first identification code and a second identification code; the first identification code is the identification code of the first buffer, and the second identification code is the identification code of the second buffer;
randomly sequencing all characters in a character column of a preset standard coding table, and sequentially filling the characters into the character column to obtain a target coding table;
acquiring a first array and a second array based on the target coding table; the first array is an array corresponding to the first identification code, and the second array is an array corresponding to the second identification code;
extracting numbers which do not appear in the second array from the first array, and extracting numbers which do not appear in the first array from the second array;
randomly sequencing all the extracted numbers to obtain a first encryption array;
generating a second encrypted array using a random number generator;
and encrypting the parsed aircraft data based on the first encryption array and the second encryption array.
7. The aircraft data forwarding method of claim 6, wherein the encrypting the parsed aircraft data based on the first encryption array and the second encryption array comprises:
acquiring a port number of the port, and judging the parity of the number of the port number at a designated position;
extracting target numbers from the first encryption array and the second encryption array respectively based on parity of numbers of the port numbers at specified positions;
randomly sequencing all the extracted target numbers to obtain a target encryption array;
encrypting the aircraft data using the target encryption array.
8. An aircraft control system, characterized in that the aircraft control system is provided with a plurality of serial ports, and communication frequency bands of communication radio stations connected by the serial ports are different from each other, the aircraft control system comprising:
the first determining module is used for determining a first buffer based on the serial port when any serial port receives aircraft data and serial port interruption occurs; the first buffer is a receiving buffer matched with the serial port;
the second determining module is used for storing the aircraft data into the first buffer, determining a first processing thread based on the serial port, and sending a signal to the first processing thread so that the first processing thread can take the aircraft data out of the first buffer and analyze the aircraft data; the first processing thread is a processing thread matched with the serial port;
the first acquisition module is used for acquiring an analysis result of the aircraft data and judging whether the first processing thread successfully analyzes the aircraft data or not based on the analysis result;
the second acquisition module is used for acquiring a port matched with the serial port if the first processing thread successfully analyzes the aircraft data, and determining a second buffer based on the port; the second buffer is a sending buffer matched with the port;
a third determining module, configured to store the parsed aircraft data in the second buffer, determine a second processing thread based on the port, and send a signal to the second processing thread, so that the second processing thread takes the parsed aircraft data out of the second buffer and sends the parsed aircraft data to an application program corresponding to the port; wherein the second processing thread is a processing thread that matches the port.
9. A terminal device, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable by the processor, wherein the computer program, when executed by the processor, implements the aircraft data forwarding method according to any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the aircraft data forwarding method according to any one of claims 1 to 7.
CN202310824496.3A 2023-07-06 2023-07-06 Aircraft data forwarding method, control system, equipment and storage medium Pending CN116955020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310824496.3A CN116955020A (en) 2023-07-06 2023-07-06 Aircraft data forwarding method, control system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310824496.3A CN116955020A (en) 2023-07-06 2023-07-06 Aircraft data forwarding method, control system, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116955020A true CN116955020A (en) 2023-10-27

Family

ID=88452186

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310824496.3A Pending CN116955020A (en) 2023-07-06 2023-07-06 Aircraft data forwarding method, control system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116955020A (en)

Similar Documents

Publication Publication Date Title
US9705678B1 (en) Fast CAN message authentication for vehicular systems
US20230188553A1 (en) Can bus protection systems and methods
US10726130B2 (en) Method and device for verifying upgrade of diagnosis connector of diagnostic equipment, and diagnosis connector
CN107425957B (en) Password attack method and device and heterogeneous acceleration platform
US10536264B2 (en) Efficient cryptographically secure control flow integrity protection
CN109413051B (en) Data encryption method and device, computer equipment and storage medium
CN110113329B (en) Verification method and device for verification code
CN107273150B (en) Preloading firmware downloading and writing method and device
US8582765B2 (en) Masking of data in a calculation
CN112685777A (en) Information desensitization method, apparatus, computer device and medium
CN111694589A (en) Upgrade package generation method and device, server and computer readable storage medium
CN109976751B (en) Model operation method, related device and computer readable storage medium
US8700918B2 (en) Data masking
CN116955020A (en) Aircraft data forwarding method, control system, equipment and storage medium
US11474961B2 (en) Reducing runtime load for vehicle system data encryption using crypto engine with direct memory access (DMA)
CN113849859A (en) Linux kernel modification method, terminal device and storage medium
US20170262626A1 (en) Method and system for authentication of a storage device
CN107368337B (en) Application downloading method and device and terminal equipment
CN113765651A (en) Safety communication method suitable for chips in vehicle-mounted ECU
CN112035379B (en) Method and device for using storage space, storage medium and electronic device
CN107102946B (en) Program detection method and device and electronic equipment
CN112329033A (en) Data encryption method, device, equipment and storage medium
CN114424193A (en) Flash package encryption method and device, electronic equipment and computer storage medium
CN109190394B (en) Mail transmission method based on encryption technology and terminal equipment
CN114884646B (en) System password storage method based on improved MD5 encryption processing

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