Satellite receiving system network communication coding and decoding engine method based on XML and JSON

By adopting a network communication encoding and decoding engine method based on XML and JSON in the satellite data receiving system, the encoding and decoding process and logical description are separated, which solves the development complexity of the existing system when facing multiple heterogeneous devices and high concurrency scenarios. solve the problems of high performance and system load, and achieve efficient, stable and scalable communication processing.

CN112612535BActive Publication Date: 2025-01-21河南方达空间信息技术有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011417010.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-07
Publication Date
2025-01-21
Estimated Expiration
2040-12-07

AI Technical Summary

Technical Problem

When the monitoring system of the existing satellite data receiving system faces multiple heterogeneous devices and high concurrency scenarios, the encoding and decoding process is highly coupled with the business logic, resulting in the system being unable to adapt to dynamic expansion, complex development and high system load.

Method used

The network communication encoding and decoding engine method based on XML and JSON is used to completely separate the encoding and decoding process from the logical description. Build the communication startup object table and Json Schema through JSON for verification, use XML to define the data input and output conversion relationship table and communication command control flow table, and write the C# version of the encoding and decoding engine with the DotNetty framework as the core.

Benefits of technology

It realizes efficient communication processing and data exchange between the monitoring system and extension equipment, simplifies the programming development of the network communication process, improves the performance, stability and scalability of the system, and reduces the development complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112612535B_ABST
    Figure CN112612535B_ABST
Patent Text Reader

Abstract

The present invention proposes a network communication codec engine method based on XML and JSON for a satellite receiving system, which is used to solve the problem that the existing codec engine method cannot adapt to the dynamic expansion of monitoring objects of a monitoring system. The steps of the present invention are: using JSON to construct a Json Schema for configuring a communication startup object table and a communication startup object table; using XML to define a data input-output conversion relationship table and a communication command control flow table; the codec engine starts the data codec flow according to the communication startup object table, and performs real-time parsing and flow control on the network communication data according to the definition content of the data input-output conversion relationship table and the communication command control flow table. The present invention separates the implementation of the codec process from the logical description, simplifies and streamlines the programming development of the network communication process, facilitates developers to implement codec engines in a variety of different programming languages, and improves the versatility and extensibility of the application codec engine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of network data communication, and in particular to a satellite receiving system network communication encoding and decoding engine method based on XML and JSON. Background Art

[0002] The satellite data receiving system refers to a technical system that searches and tracks satellites, receives and records satellite remote sensing data, telemetry data and satellite attitude data. The monitoring system of the satellite data receiving system is the core of the operation and management of the satellite data receiving system. It uniformly monitors and manages all subsystem equipment, completes tasks such as mission planning, resource scheduling, process control, task automation, equipment monitoring and control functions, etc. The monitoring system is connected to each device in the satellite data receiving system through the network or serial communication method, and exchanges and communicates data with the agreed interface protocol to realize the unified monitoring and control function of the equipment in the satellite data receiving system.

[0003] The communication protocols used by various devices in the satellite data receiving system are different, and the exchanged data is also heterogeneous. For example, some devices in the physical layer are connected through the network, while other devices may communicate through serial ports. The transport layer can use different protocols such as TCP or UDP, and under the same protocol mode, there are also differences in different transmission modes such as unicast and multicast. In order to achieve communication with heterogeneous devices using different communication protocols, the monitoring system of the traditional satellite data receiving system needs to write separate encoding and decoding programs and network processing services for different devices. The implementation of the encoding and decoding process is highly coupled with the business logic processing. When the system needs to increase the number of devices or add new device types, it will involve a lot of programming and development work. In high-concurrency scenarios, the thread processing is too complicated and the system load is high. Therefore, the implementation of the encoding and decoding process is inseparable from the logical description, which cannot adapt to the dynamic expansion of the monitoring objects of the monitoring system. Developers need to spend a lot of energy on communication design and development. Summary of the invention

[0004] In view of the technical problem that the existing encoding and decoding engine method cannot adapt to the dynamic expansion of the monitoring objects of the monitoring system, the present invention proposes a satellite receiving system network communication encoding and decoding engine method based on XML and JSON, which completely separates the implementation of the encoding and decoding process and the logical description in the monitoring system application of the ground station, while ensuring easy development and the performance, stability and scalability of the system communication.

[0005] In order to achieve the above object, the specific implementation process of the technical solution of the present invention is as follows: A satellite receiving system network communication codec engine method based on XML and JSON, the steps of which are as follows:

[0006] Step 1: Use JSON to construct the Json Schema of the communication startup object table and the communication startup object table. The Json Schema verifies the JSON format before submitting the data to the business level.

[0007] Step 2: Use XML to define the data input / output conversion relationship table and the communication command control flow table, and construct the XML Schema of the data input / output conversion relationship table and the communication command control flow table respectively. The XML Schema verifies the XML format before submitting the data to the business level.

[0008] Step 3: The codec engine starts the data encoding and decoding process according to the communication startup object table, and loads the relevant data input-output conversion relationship table and the communication command control flow table, and performs real-time analysis and process control on the network communication data according to the definition content of the data input-output conversion relationship table and the communication command control flow table.

[0009] The communication startup object table defines the communication parameters and application layer protocol parameters started by the communication object. The communication object includes all extension device objects monitored by the monitored system in the ground station of the remote sensing satellite data receiving system. JSON uses JavaScript syntax to describe data objects. The Json Schema of the communication startup object table is constructed according to the data encoding and decoding process started according to the communication startup object table to standardize and describe the JSON file structure. The Json Schema is used to define JSON metadata and define data members, structures or types in the JSON file.

[0010] Create a JSON file of the system communication startup object table according to JSON Schema. The function of the JSON file is: create a class according to JSON Sheme. All elements defined in JSON Schema will establish classes corresponding to the names, and write multiple methods to implement the encoding and decoding process in each class; when the program is started, fill objects with the values ​​defined in the JSON file for operation and processing by the program business logic; at the same time, create an object class that maps JSON Schema to achieve serialization and deserialization.

[0011] The field name Component in the Json Schema of the communication startup object table is used to define an extension device in the system. The extension device includes: the device type DeviceType, the device name and description Desc, the device's communication information ChannelParameters, the device's subordinate relationship Category, the device attribute group DeviceAttrs, and the device's subsystem DeviceCategories; the device's communication information ChannelParameters includes the adopted protocol type, IP address, port number, extension number, and whether to adopt broadcast mode; the Json Schema verifies the written JSON file format through XMLSpy software, and the XML Schema uses XSD files to standardize and describe the XML file structure and perform constraints and verification.

[0012] The data input-output relationship table defines the field types used by the application layer protocol, the corresponding constraints and value ranges of the fields, and the communication data packet byte description; the communication command control flow table describes the interactive relationship of the application layer communication protocol.

[0013] In the XML file of the data input-output relationship table, all data types involved in the extension device are defined, and the precision, value range, unit and stepping information of the parameter are defined, such as the enumeration type EnumElements, the value range type RangeElements, and the constant type Contants; the parameter attribute group Attrs contained in the device unit is defined, and the attribute group Attrs defines the descriptive information Desc of the unit, the unit category information and the subordinate relationship ComponentCategory, the parameter name Desc and the value Value of the parameter attribute, and the value Value refers to the previously defined data type and defines the byte length occupied by the parameter for format constraints; at the same time, it also includes the reference Ref of the data type;

[0014] The unit category information and subordinate relationship CommandGroups define the communication command control process between the monitoring system and the extension device, covering the communication command control process of request commands, command responses and status reports between the monitoring system and the extension device. All communication commands are abstracted into Command objects. The Command object defines the custom frame format used by the application layer protocol of the monitoring system and extension device interface and fills in values. The custom frame structure defines the frame header, source address, destination address, data frame timestamp, data field length, data field, and frame tail information of the application layer data frame.

[0015] In the structure of the XML Schema of the communication command control flow table, Request represents the request command issued by the monitoring system to the extension device, including the status query command and unit parameter setting command of the extension device; Request defines the data field format of the custom frame used in the request command in the interface application layer protocol between the monitoring system and the extension device, including the definition of the identification number IdentificationCode, the sequence number Seq and the parameter data element group AttrValue; Respone represents the response command returned by the extension device, specifically including the status query command response and the unit parameter setting command response of the extension device, and Respone defines the custom frame used in the command response between the extension device and the monitoring system.

[0016] The encoding and decoding engine is a C# version of the engine written with the DotNetty framework as the core. The DotNetty framework can read and parse the data of the binary stream to complete the decoding, or encode the data object into a binary stream; a connection channel for each device is created through the JSON file, and the monitoring system regularly monitors the data packets of the network port, and starts the data encoding and decoding process, that is, starts the process of listening to receive or send data packets and starts the parsing and encoding of the data; the monitoring system implements encoding and decoding according to the defined encoding and decoding process, and realizes communication with the extension device, status monitoring and device control.

[0017] The encoding process of the monitoring system is as follows: the monitoring system constructs a parameter key-value pair data object of the extension device, determines the data domain structure according to the communication command control process table and the data input-output conversion relationship table to implement byte encoding, the encoding and decoding engine determines the format of the data to be sent, encodes and fills the data byte stream, determines the communication protocol mode according to the channel context defined in the communication startup object table, and completely fills the communication protocol data structure; after constructing a complete byte stream according to the interface protocol, it is sent to the corresponding extension device through the network.

[0018] The decoding process of the monitoring system is as follows: the monitoring system constructs a communication link connection from the monitoring server to each extension device according to the communication startup object table, and monitors the data information exchanged in the communication network in real time. When the byte stream is obtained, the communication mode is determined according to the communication startup object. The codec engine performs format parsing and corresponding communication protocol processing on the byte stream, locates the data field of the application protocol layer, and decodes the bytes or word bits defined in the communication command control flow table and the data input and output conversion relationship table one by one until all parameters and values ​​are read out and filled into the predefined Key-Value key-value pair set for subsequent processing by the business logic of the monitoring system.

[0019] Beneficial effects of the present invention: In the application of the ground station monitoring system, the present invention uses a network application layer protocol parsing method based on XML and JSON and a corresponding codec engine to complete the communication processing and data exchange between the monitoring system and the extension equipment. The data encoding and decoding process is started according to the communication startup object table, and the relevant data input-output conversion relationship table and the communication command control process table are loaded. The network communication data is analyzed in real time and the process is controlled according to the definition content of the data input-output conversion relationship table and the communication command control process table. The present invention separates the implementation of the encoding and decoding process from the logical description, simplifies and streamlines the programming development of the network communication process, uses JSON to configure the startup parameters of the encoding and decoding engine, facilitates distribution through the network, facilitates related debugging and later system maintenance, and uses XML to describe the application layer network protocol logic, which is convenient for developers to implement encoding and decoding engines in a variety of different programming languages, thereby improving the versatility and extensibility of the application encoding and decoding engine. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 A schematic diagram of the JSON Schema of the communication startup object table of the present invention.

[0022] Figure 2 A schematic diagram of the XML Schema of the data input and output relationship table of the present invention.

[0023] Figure 3 It is a schematic diagram of the XML Schema of the communication command control flow table of the present invention.

[0024] Figure 4 Flowchart encoding for the present invention.

[0025] Figure 5 Flowchart for decoding of the present invention. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] A satellite receiving system network communication codec engine method based on XML and JSON, the steps are as follows:

[0028] Step 1: Use JSON to construct the Json Schema of the communication startup object table and the communication startup object table. Json Schema verifies the JSON format before submitting the data to the business level.

[0029] The communication startup object table defines the communication parameters and application layer protocol parameters for the startup of the communication object. The communication startup object table is used to construct all extension device objects monitored by the monitoring system in the ground station of the remote sensing satellite data receiving system. Taking conventional ground station equipment as an example, it generally includes: transmitter, channel equipment, measurement and control baseband, demodulator, server, etc. Due to the different types of extension equipment, different communication protocols are used between the monitoring system. JSON uses JavaScript syntax to describe data objects. It is a syntax for storing and exchanging text information. It has a lightweight text data exchange format, is independent of language and operating platform, and is self-descriptive and easier to understand. JSON is similar to XML, but is smaller, faster, and easier to parse than XML. It is especially suitable for efficient distribution and network transmission application scenarios with limited bandwidth. Therefore, in the present invention, a general communication startup object table is constructed with JSON, the communication parameters and application layer protocol parameters started by each extension device communication object are defined, the data encoding and decoding process is started according to the communication startup object table, and the Json Schema of the communication startup object table is constructed to standardize and describe the JSON file structure, and the JSON format is verified before the data is submitted to the business level. Json Schema is used to define JSON metadata, define data members / structures / types in the JSON file, etc. The process of verifying the format of the written JSON file is implemented by Altova XMLSpy. Use Altova XMLSpy software to open the JSON file, and specify the Json Schema file that the JSON file is based on. If the elements in the JSON file are not written correctly, the XMLSpy software will give a corresponding error prompt, which needs to be modified and verified before it can be saved, thereby ensuring the correctness of the JSON file.

[0030] like Figure 1As shown in the Json Schema of the communication startup object table, the field name Component is used to define a certain extension device in the system. The extension device includes: DeviceType (type of device), Desc (name and description of the device), ChannelParameters (communication information of the device: including the protocol type, IP address, port number, extension number, whether broadcast mode is used), Category (subordinate relationship of the device), DeviceAttrs (device attribute group), DeviceCategories (subsystem to which the device belongs). For detailed JSON file descriptions, see Table 1-Table 3.

[0031] Table 1 Communication startup object table JSON file description

[0032]

[0033] Table 2 Component object description

[0034]

[0035] Table 3 ChannelParameters object description

[0036]

[0037] Create a JSON file of the system communication startup object table according to JSON Schema. The JSON file is written by the developer and must be defined according to the constraints and rules defined in Json Schema. The role of the JSON file: create a class according to JSON Sheme. When the program starts, use the values ​​defined in the JSON file to initialize and fill in objects one by one, and read the data in the JSON file into the computer memory for the program business logic to operate and process. At the same time, create an object class that maps JSON Schema to achieve serialization and deserialization. The role of serialization and deserialization is to realize the conversion between object instances in the program (in memory) and files (in the hard disk). During the encoding and decoding process, use deserialization to read the configuration file (XML file or JSON file), instantiate the created class, and create objects for business logic processing, thereby realizing the separation of configuration files and processing logic. When new devices need to be added to the system, only the configuration file (XML or JSON file) needs to be changed, and there is no need to change the processing logic program.

[0038] For example, create a JSON file to describe an S-band transmitter. This is a startup object. The type and description of the device are defined as SSPA. Desc: describes the device name. Lang can be localized according to the current program thread culture. For example, if Lang is en-US and the current program thread culture is an English system, the device name is displayed as "SSPA1". If Lang is zh-cn and the current program thread culture is an English system, it displays "S transmitter 1". ChannelParameters is the network communication parameters that the monitoring system and S transmitter need to provide to achieve communication. The Id: value is set to cmd, indicating that the monitoring system is connected to the control port of the transmitter. CommType refers to the type of communication: if it is set to UDP, it means that the monitoring system and the transmitter communicate through the UDP protocol. CommOption is the detailed communication configuration parameter: the defined LocalIp is used to set the local address of the monitoring system and the device. For example, if it is set to 192.168.128.10, it means that in the communication address between the monitoring system and the transmitter, the local IP address of the monitoring system is set to 192.168.128.10, and the local port is set to 7001; RemoteIp is used to set the remote address of the monitoring system and the extension device, that is, the IP of the extension device is set to 192.168.128.103, and the destination port RemotePort is set to 7001; ProtocolType describes other parameters necessary for the monitoring system and the transmitter to achieve communication.

[0039] Create a class based on the Json Schema file. All elements defined in the Schema will create corresponding classes. Multiple methods are defined in the class to implement the required functions. When the program starts, an instance of a class will be created based on the defined JSON data elements. If there are corresponding definitions in the JSON file, the program will create multiple Component objects for devices such as transmitters and demodulators. Then, the program's processing logic uses these objects to implement specific functions. For example, the program reads the JSON file and creates the startup object of the transmitter, then creates a connection from 192.168.128.10 to 192.168.128.103, listens to port 7001, captures data packets between the two IPs, and prepares for the next step of encoding and decoding. In this step, the methods in the corresponding class include the processing of network protocol judgment and protocol frame headers.

[0040] Step 2: Use XML to define the data input / output conversion relationship table and the communication command control flow table, and construct the XML Schema of the data input / output conversion relationship table and the communication command control flow table respectively. The XML Schema verifies the XML format before submitting the data to the business level.

[0041] The data input and output relationship table defines the field types used by the application layer protocol, the corresponding constraints and value ranges of the fields, and the description of the communication data packet structure. The communication command control flow table describes the interactive relationship of the application layer communication protocol.

[0042] XML is an extensible markup language that provides a unified method to describe and exchange structured data that is independent of the operating system and application programs. It has the characteristics of being platform-independent, easy to expand, interactive, and semantic, making it a de facto standard for data exchange. The present invention uses XML to define the data input and output conversion relationship table between the monitoring system and each extension device.

[0043] Build the XML Schema of the data input and output relationship table, standardize and describe the XML file structure in the form of XSD file, and verify the XML format before submitting the data to the business level.

[0044] The following uses XSD to verify the XML file as an example: create an XML file for each extension device. Taking the S-band downconverter as an example, define the data input and output relationship table XML file of the S-band downconverter, name it "S_DC.xml", use XMLSpay software to open the S_DC.xml file, and specify the defined Scheme (.xsd) file.

[0045] like Figure 2 As shown, Manifest represents a certain extension device. In the XML file, first, all data types involved in the extension device are defined, and the precision, value range, unit and stepping information of the parameters are defined, such as EnumElements represents the enumeration type, RangeElements represents the value range type, and Contants represents the constant type; secondly, the parameter attribute group Attrs contained in the device unit is defined. The attribute group Attrs defines the unit's descriptive information Desc, unit category information and subordinate relationship ComponentCategory, parameter name Desc and value Value of the parameter attribute. Value references the previously defined data type and defines the byte length occupied by the parameter for format constraints. Ref is a reference, and EnumRef specifies the reference to the enumeration type defined in the pre-defined enumeration type EnumElements. Similarly, RangeRef and ContanRefCharRef specify the reference to the corresponding numerical value, constant, and character data type respectively. CommandGroups defines the communication command control process between the monitoring system and the extension device.

[0046] An enumeration with the ID SLDC_EquipmentStautusEmunAttr is defined. When the corresponding position in the received data packet is 0, the reading is normal; if 01 is received, it is read as a fault. Similarly, define the state parameter group reported by the S-band downconverter to the monitoring system. For example, if one of the parameters is named "equipment status", EnumRef is used to specify that the parameter uses the Enum enumeration type element defined by "EquipmentStautusEmunAttr". At the same time, the holdtype in Value is defined as byte, which means that a byte at the corresponding position in the data packet is used to represent the device parameter. The byte is read as 0 or 1, indicating that the value of the parameter "equipment status" is normal or faulty. In this way, the specific process of encoding or decoding is formulated, that is, when the monitoring system captures a frame of data reported by the S-band downconverter device to the monitoring system, the program reads the corresponding byte representing the parameter "equipment status". If the decoded value is 0, the monitoring system program will assign the parameter "equipment status" the string "normal".

[0047] CommandGroups defines the communication command control process between the monitoring system and the extension device, covering the communication command control process such as request command, command response and status reporting between the monitoring system and the extension device. All communication commands are abstracted as Command objects. Command defines the custom frame format used by the application layer protocol of the monitoring system and extension device interface and fills in values. The custom frame structure defines the frame header, source address, destination address, data frame timestamp, data field length, data field, frame tail and other information of the application layer data frame.

[0048] The structure of the XML Schema of the communication command control flow table is as follows Figure 3 As shown, Request represents the request command sent by the monitoring system to the extension device, including the status query command of the extension device, the unit parameter setting command, etc. Request defines the data field format of the custom frame used in the request command in the interface application layer protocol between the monitoring system and the extension device, such as the definition of the identification number IdentificationCode, the sequence number Seq, and the parameter data element group AttrValue. Respone represents the response command returned by the extension device, including the status query command response of the extension device, the unit parameter setting command response, etc. Respone defines the custom frame used in the command response between the extension device and the monitoring system.

[0049] Step 3: The codec engine starts the data encoding and decoding process according to the communication startup object table, and loads the relevant data input and output conversion relationship table and the communication command control flow table, and performs real-time analysis and process control on the network communication data according to the definition content of the data input and output conversion relationship table and the communication command control flow table.

[0050] With DotNetty framework as the core, write a C# version of high-performance codec engine. DotNetty is a mature network programming framework that implements basic communication processing such as network data packet splicing and gluing at the bottom layer, parses binary code stream data to complete decoding, or encodes data objects into binary code streams. The codec engine starts the data encoding and decoding process according to the communication startup object table, and loads the relevant data input and output conversion relationship table and communication command control flow table, and performs real-time analysis and process control on network communication data according to the definition content of the data input and output conversion relationship table and the communication command control flow table.

[0051] The device connection channel is created based on the JSON file of the startup object table. The program of the monitoring system implements the function of monitoring the network port at a fixed time interval. Starting the data encoding and decoding process means starting the communication connection port monitoring to complete the data receiving or sending process. For example: if the monitoring software receives a frame of data sent by the extension device on the channel, the monitoring software will decode it according to the defined decoding process. The encoding process is that the monitoring software encodes according to the defined encoding process and sends it to the extension device.

[0052] For the communication startup object table of the S-band downconverter, after the monitoring service software of the monitoring system is started, it will read the Json file of the communication startup object table, obtain an instance startup object of S_DC, and create a communication connection from the monitoring service software to the downconverter device according to the parameter settings in the startup object. The monitoring service software sends extension query instructions at regular intervals and monitors the response information of the downconverter in real time. For communication, the monitoring service software and the S-band downconverter will agree on an interface protocol to describe the parameters that need to be transmitted between the two, as well as the communication method and format, etc., which can be combined to determine the structure and type of the data packet for communication between the monitoring service software and the S-band downconverter.

[0053] Assuming that the two communicate, the monitoring service software needs to periodically send a query command: the agreed query command frame format is shown in Table 4:

[0054] Table 4 Serial port custom frame format - query command frame format of S down-conversion device

[0055]

[0056] Therefore, it can be concluded that the status query data frame sent by the monitoring service software to the S-band downconverter is: 1A1A0100F0040001011B1B.

[0057] Assuming that the parameters that the S-band down converter needs to report to the monitoring service software are as shown in Table 5, the reporting frame format of the parameter status query response reported by the S-band down converter to the monitoring service software is set as shown in Table 6.

[0058] Table 5 S-band downconverter unit status elements

[0059]

[0060] Table 6 Serial port custom frame format - S down-conversion device status reporting frame format

[0061]

[0062] Therefore, the status query response reporting frame of the S down-conversion device is: 1A1A0001F104000BXXXXXXXXXXXXXXXXXXXXXXXXX1B1B.

[0063] In order to realize the encoding and decoding process, the data input-output conversion relationship table XML file of the S downconverter device is defined in advance, which defines four parameters, the type of parameter, and the number of bytes occupied. When the program decodes, it reads the data domain part in the data frame and can determine which bytes are the values ​​of the specific device parameters based on the data input-output conversion relationship table.

[0064] In the communication command control flow table XML file of the inverter device under S, the communication commands between the monitoring system and the device are defined:

[0065] <request>< / request> The content of the time defines the status query command sent by the monitoring service software to the inverter device under S: the monitoring software reads <request>< / request> The file is used to encode the entire status query data frame, and then combined with the specific communication protocol, the protocol header is further added according to the communication protocol format, and finally sent to the S downconverter device.

[0066] <response>< / Response >The content between defines the frame structure of the status report information received by the monitoring service software from the S down converter device. The data input-output conversion relationship table specifies the reference of the attribute group, such as refid=Unit1Attr, which means that when the bytes in the data domain are read, the specific values ​​of the four parameters of the S down converter device are read according to the structure of the data input-output conversion relationship table XML file Unit1Attr.

[0067] The coding process of the monitoring system is as follows Figure 4 As shown, the monitoring system constructs the extension device parameter key-value pair data object, determines the data domain structure to implement byte encoding according to the communication command control flow table and the data input and output conversion relationship table, and the codec engine determines the format of the data to be sent, encodes and fills the data byte stream, determines the communication protocol mode according to the channel context defined in the communication startup object table, and completely fills the communication protocol data structure, such as the frame header and frame tail of the communication data frame. After the complete byte stream is constructed according to the interface protocol, it is sent to the corresponding extension device through the network.

[0068] The monitoring service software reads the specific parameters of the extension device in the data frame and uses a unified parameter key-value pair object to load the specific parameters. Define the data object of ParamValueKeyPair to load the parameter groups of different devices. Therefore, the monitoring program can use ParamValueKeyPairGroup to create the parameter group of the S down-conversion device:

[0069] Parameter group object for S downconverter device:

[0070] ParamValueKeyPairGroup

[0071] {

[0072] Id="S downconversion",

[0073] List <paravaluekeypair>paramValueKeyPairs={

[0074] ParaValueKeyPair1={"Device Status","Normal"},

[0075] ParaValueKeyPair2={"S-band operating frequency","144Hz"},

[0076] ParaValueKeyPair3={"S down-conversion RF attenuation","5dB"},

[0077] ParaValueKeyPair4={"S down-conversion IF attenuation"," 6dB"}

[0078] }

[0079] }

[0080] Afterwards, the monitoring program can use the parameter group object to implement various business logic processing, such as displaying the parameters on the user interface; or the user inputs the parameter value through the user interface and sends it to the S down-conversion device through a control command to implement device parameter control.

[0081] The decoding process of the monitoring system is as follows Figure 5 As shown, the monitoring system builds a communication link connection from the monitoring server to each extension device according to the communication startup object table, and monitors the data information exchanged by the communication network in real time. When the byte stream is obtained, the communication mode (TCP, UDP, etc.) is determined according to the communication startup object. The codec engine parses the format of the byte stream and processes the corresponding communication protocol, locates the data field of the application protocol layer, and decodes the bytes or word bits defined in the communication command control flow table and the data input and output conversion relationship table one by one until all parameters and values ​​are read out and filled into the predefined Key-Value key-value pair set for subsequent processing by the business logic of the monitoring system.

[0082] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.< / paravaluekeypair> < / response>

Claims

1. A satellite receiving system network communication coding and decoding engine method based on XML and JSON, characterized in that: The steps are as follows: Step 1: Use JSON to construct the Json Schema of the communication startup object table and the communication startup object table. JsonSchema verifies the JSON format before submitting the data to the business level. The communication startup object table defines the communication parameters and application layer protocol parameters of the communication object startup. The communication object includes all extension device objects monitored by the monitoring system in the ground station of the remote sensing satellite data receiving system. JSON uses JavaScript syntax to describe data objects. According to the communication startup object table, the data encoding and decoding process is started to build the Json Schema of the communication startup object table to standardize and describe the JSON file structure. The Json Schema is used to define JSON metadata, define data members, structures or types in the JSON file. Step 2: Use XML to define the data input / output conversion relationship table and the communication command control flow table, and construct the XML Schema of the data input / output conversion relationship table and the communication command control flow table respectively. The XML Schema verifies the XML format before submitting the data to the business level. The data input-output conversion relationship table defines the field types used by the application layer protocol, the corresponding constraints and value ranges of the fields, and the communication data packet byte description; the communication command control flow table describes the interactive relationship of the application layer communication protocol; Step 3: The codec engine starts the data encoding and decoding process according to the communication startup object table, and loads the relevant data input-output conversion relationship table and the communication command control flow table, and performs real-time analysis and process control on the network communication data according to the definition content of the data input-output conversion relationship table and the communication command control flow table.

2. The satellite receiving system network communication coding and decoding engine method based on XML and JSON according to claim 1, characterized in that: Create a JSON file of the system communication startup object table according to JSON Schema. The function of the JSON file is: create a class according to JSON Sheme. All elements defined in JSON Schema will establish classes corresponding to the names, and write multiple methods to implement the encoding and decoding process in each class; when the program is started, fill objects with the values ​​defined in the JSON file for operation and processing by the program business logic; at the same time, create an object class that maps JSON Schema to achieve serialization and deserialization.

3. The satellite receiving system network communication coding and decoding engine method based on XML and JSON according to claim 1 or 2, characterized in that: The field name Component in the Json Schema of the communication startup object table is used to define an extension device in the system. The extension device includes: the device type DeviceType, the device name and description Desc, the device's communication information ChannelParameters, the device's subordinate relationship Category, the device attribute group DeviceAttrs, and the device's subsystem DeviceCategories; the device's communication information ChannelParameters includes the adopted protocol type, IP address, port number, extension number, and whether to adopt broadcast mode; the Json Schema verifies the written JSON file format through XMLSpy software, and the XML Schema uses XSD files to standardize and describe the XML file structure and perform constraints and verification.

4. The satellite receiving system network communication codec engine method based on XML and JSON according to claim 3, characterized in that: In the XML file of the data input-output conversion relationship table, all data types involved in the extension device are defined, and the information of the precision, value range, unit and step of the parameter is defined, including the enumeration type EnumElements, the value range type RangeElements, and the constant type Contants; the parameter attribute group Attrs contained in the device unit is defined, and the attribute group Attrs defines the descriptive information Desc of the unit, the unit category information and the subordinate relationship ComponentCategory, the parameter name Desc and the value Value of the parameter attribute, and the value Value refers to the previously defined data type and defines the byte length occupied by the parameter for format constraints; at the same time, it also includes the reference Ref of the data type; The unit category information and subordinate relationship CommandGroups define the communication command control process between the monitoring system and the extension device, covering the communication command control process of request command, command response and status reporting between the monitoring system and the extension device. All communication commands are abstracted into Command objects. The Command object defines the custom frame format used by the application layer protocol of the monitoring system and extension device interface and fills in the values. The custom frame structure defines the frame header, source address, destination address, data frame timestamp, data field length, data field, and frame tail information of the application layer data frame.

5. The satellite receiving system network communication codec engine method based on XML and JSON according to claim 4, characterized in that: In the structure of the XML Schema of the communication command control flow table, Request represents the request command issued by the monitoring system to the extension device, including the status query command and unit parameter setting command of the extension device; Request defines the data field format of the custom frame used in the request command in the interface application layer protocol between the monitoring system and the extension device, including the definition of the identification number IdentificationCode, the sequence number Seq and the parameter data element group AttrValue; Respone represents the response command returned by the extension device, specifically including the status query command response and the unit parameter setting command response of the extension device, and Respone defines the custom frame used in the command response between the extension device and the monitoring system.

6. The satellite receiving system network communication coding and decoding engine method based on XML and JSON according to claim 4 or 5, characterized in that: The encoding and decoding engine is a C# version engine written with DotNetty framework as the core; The DotNetty framework can read and parse binary stream data to complete decoding, or encode data objects into binary streams; a connection channel for each device is created through a JSON file, and the monitoring system regularly listens to data packets on the network port. Starting the data encoding and decoding process means starting the process of listening to receive or send data packets and starting the parsing and encoding of the data; the monitoring system implements encoding and decoding according to the defined encoding and decoding process, and realizes communication with the extension device, status monitoring and device control.

7. The satellite receiving system network communication codec engine method based on XML and JSON according to claim 6, characterized in that: The encoding process of the monitoring system is as follows: the monitoring system constructs a data object of the extension device parameter key-value pair, determines the data domain structure to implement byte encoding according to the communication command control process table and the data input-output conversion relationship table, the encoding and decoding engine determines the format of the data to be sent, encodes and fills the data byte stream, determines the communication protocol mode according to the channel context defined in the communication startup object table, and completely fills the communication protocol data structure; after constructing a complete byte stream according to the interface protocol, it is sent to the corresponding extension device through the network.

8. The satellite receiving system network communication coding and decoding engine method based on XML and JSON according to claim 6, characterized in that: The decoding process of the monitoring system is as follows: the monitoring system constructs a communication link connection from the monitoring server to each extension device according to the communication startup object table, and monitors the data information exchanged in the communication network in real time. When the byte stream is obtained, the communication mode is determined according to the communication startup object. The codec engine performs format parsing and corresponding communication protocol processing on the byte stream, locates the data field of the application protocol layer, and decodes the bytes or word bits defined in the communication command control flow table and the data input and output conversion relationship table one by one until all parameters and values ​​are read out and filled into the predefined Key-Value key-value pair set for subsequent processing by the business logic of the monitoring system.

Citation Information

Patent Citations

  • XML description-based inter-astronautic measurement and control equipment command translation algorithm

    CN106383811A

  • Satellite ground system communication protocol implementation method based on configuration file

    CN110324325A