Remote sensing satellite instruction automatic anti-editing and modifying architecture based on remote control instruction parameters
By designing an automated processing architecture based on remote control command parameters, the problems of low efficiency and error prone in decomposition and modification of satellite remote control commands are solved, efficient and reliable automated processing is achieved, and multiple instruction parameter types are supported.
Patent Information
- Application Number
- CN202510296100.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-06-27
AI Technical Summary
In the prior art, the decomposition and modification process of satellite remote control instructions relies on manual operations, is inefficient and prone to errors, especially in the case of complex tasks and diversified instruction parameters.
A remote sensing satellite instructions automatic decoding and modification architecture based on remote control command parameters is designed. Through automatic decoding method, method of automatically obtaining their decoding values based on command parameters and automatic instruction modification method, automatic processing of instruction parameters is realized.
This architecture realizes efficient and reliable decomposition and modification of remote control commands, reduces manual intervention, improves the degree of automation, supports multiple instruction parameter types, and significantly improves work efficiency.
Smart Images

Figure CN120216029A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of satellite remote control commands, and particularly to a remote sensing satellite command automatic reverse compilation and modification architecture based on remote control command parameters. Background Art
[0002] The telemetry, tracking and control (TT&C) of satellites play a very important role in the on-orbit operation and maintenance of satellites. Ground personnel can obtain the status and orbit information of on-orbit satellites through telemetry and tracking. As a widely used remote control means for on-orbit satellites, remote control enables ground operators to adjust satellite parameters, attitudes or execute specific tasks by uploading remote control commands, so as to change the satellite operation status or handle faults.
[0003] With the development of satellite technology and the trend of commercial spaceflight, the number of on-orbit satellites and the number of single-satellite mission times are increasing day by day, and the requirements for ground remote control by satellite constellations are also getting higher and higher. Among them, the remote control commands uploaded to satellites are the top priority for ensuring the smooth execution of missions, directly determining the success or failure of on-orbit missions.
[0004] The payloads carried by current on-orbit satellites are diverse and the functions are more complex. The direct manifestation of complex functions is the diversity of command types and command parameters. The parameters of a command are the core of a remote control command. A remote control command is usually a hexadecimal character code, which contains a large amount of information and determines various details such as the execution time of the mission, the mission type, and the mission payload.
[0005] Currently, the execution of on-orbit satellite missions depends on the mission planning work carried out on the ground. After the mission planning is completed, some of the parameters are embodied in the form of commands. When the staff checks, it is necessary to reverse compile the remote control command code to be uploaded, and reverse the corresponding hexadecimal number into the meaning expressed in the command set. When the mission needs to be changed and the command needs to be modified, a specific parameter can also be modified, and a new command is automatically generated after the modification is completed. Summary of the Invention
[0006] The present invention aims to solve the technical problems in the prior art and provides a remote sensing satellite command automatic reverse compilation and modification architecture based on remote control command parameters.
[0007] To solve the above technical problems, the technical solution of the present invention is specifically as follows:
[0008] A remote sensing satellite command automatic reverse compilation and modification architecture based on remote control command parameters includes: an automatic reverse compilation method, a method for automatically obtaining the reverse compilation value according to command parameters, and an automatic command modification method; wherein:
[0009] The automatic reverse compilation method specifically includes the following steps:
[0010] Step 1: Obtain the corresponding instruction parameter list L from the database according to the satellite code and the generated instruction name. The instruction parameters are sorted in ascending order according to the byte order, and in descending order according to the bit order in the case of the same byte order. The hexadecimal encoding of the instruction to be reverse - decoded is the string S;
[0011] Step 2: Format the reverse - decoding rules for the instruction parameter list L, perform cyclic value processing on the instruction parameters, and the processed instruction parameter list is L F ;
[0012] Step 3: Perform head - and - tail removal operations on the string S to be reverse - decoded, and at the same time delete the CRC check of the string, and the obtained core encoding string is S C , let the reverse - decoding result be the hash table M F , this result follows a corresponding relationship, under which the hash key is the parameter name and the actually reverse - decoded result is the hash value;
[0013] Step 4: Traverse the instruction parameter list L F , the traversed instruction parameter is set as p, and a first - in - first - out queue is defined as Q p ;
[0014] Step 5: Return the assigned hash table M F as the result, and its content is the instruction parameter name and its corresponding reverse - decoded result; the process ends;
[0015] The method for automatically obtaining the reverse - decoded value according to the instruction parameters specifically includes the following steps:
[0016] Step 1: Set the parameter for currently parsing the reverse - decoded value as p, and use the rule value of the parameter p as the reverse - decoding rule R of the parameter p. If the DecodeRule is included in the parameter attributes, use the corresponding rule of DecodeRule as the reverse - decoding rule R;
[0017] Step 2: If the reverse - decoding rule R value is Selection, that is, parse the current parameter in the selection type, and obtain the available attribute of the current parameter;
[0018] Step 3: If the reverse - decoding rule R value is Hex, that is, parse the current parameter in the hexadecimal type; if the value value of the current parameter p is a hexadecimal parameter, directly return it as the result and exit the current process; if the value value of the current parameter p is a binary parameter, convert the binary string to a hexadecimal string and return it to end the current process;
[0019] Step 4: If the reverse compilation rule R value is Binary, parse the current parameter in binary type; if the value of the current parameter p is a binary parameter, return it directly as the result and exit the current process; if the value of the current parameter p is a hexadecimal parameter, convert the hexadecimal string to a binary string and return it to end the current process;
[0020] Step 5: If the reverse compilation rule R value is Int, parse the current parameter in integer type;
[0021] Step 6: If the reverse compilation rule is Double, parse the current parameter in floating point type;
[0022] Step 7: If the reverse compilation rule is Time, parse the current parameter in time type with a specific algorithm and return the parsed result;
[0023] The automatic instruction modification method specifically includes the following steps:
[0024] Step 1: First execute the said automatic reverse compilation method on the instruction encoding to be modified. Let the hash table M returned after the reverse compilation process end, and its content is the instruction parameter name and its corresponding reverse compilation result;
[0025] Step 2: Traverse the parameter set to be modified. If the hash table M does not contain the key to be modified, an exception is thrown; if there is a key to be modified, then according to the encoding rule of the instruction parameter, assign a value to the instruction parameter, and the modified parameter set is L;
[0026] Step 3: Let the original instruction hexadecimal encoding be the string S, traverse the set L, and let the traversed instruction parameter be p;
[0027] Step 4: Perform encoding verification on the string S and add the head and tail to the instruction. The final result obtained is the available hexadecimal remote control instruction encoding, and the process ends.
[0028] In the above technical solution, in the automatic reverse compilation method, Step 2 specifically includes:
[0029] Step 2.1: Define a new empty list L F As the result set;
[0030] Step 2.2: Traverse the instruction parameter list L, let the traversed instruction parameter be p, set the temporary value value and decodeValue of the instruction parameter p to be empty, enter Step 2.3 to start the loop, and enter Step 2.5 after the loop ends;
[0031] Step 2.3: If the instruction parameter p contains the attributes attribute and the attribute contains additional attributes related to the loop, perform loop parameter related processing;
[0032] Step 2.4: Add the instruction parameter p to L F , and go back to Step 2.2 to continue the loop;
[0033] Step 2.5: Sort L F in ascending order according to the byte order, and in descending order according to the bit order when the byte orders are the same, and return L as the result set F .
[0034] In the above technical solution, in the automatic decompilation method, Step 2.3 specifically includes:
[0035] Step 2.3.1: Obtain data from the additional attributes, let RecursionTimes, i.e., the number of loops, be n, let RecursionBytes, i.e., the byte length participating in the loop, be s, and assume that the letter defined in RecuisionLetter, i.e., the loop letter, is K;
[0036] Step 2.3.2: Enter a loop, the number of loops is from 0 to n - 1. Assume that the number of loops during the explanation is the i-th time. After the loop ends, go back to Step 2.2 to continue the loop.
[0037] In the above technical solution, in the automatic decompilation method, Step 2.3.2 specifically includes:
[0038] Step 2.3.2.1: Create a new instruction parameter object p based on the traversed instruction parameter p t , and the values in the new instruction parameter object p t are the same as those in the original instruction parameter p;
[0039] Step 2.3.2.2: Replace the loop letter K in the instruction parameter name of the instruction parameter object p t with i. Assume that the byte order of the instruction parameter p is I, and replace the byte order of the instruction parameter object p t with I t , where I t is defined as follows:
[0040] I t = I + i * s
[0041] Step 2.3.2.3: Add the instruction parameter object p t to L F , and go back to Step 2.3.2.1 to continue the loop.
[0042] In the above technical solution, in the automatic decompilation method, Step 4 specifically includes:
[0043] Step 4.1: If the queue Q p is not empty, and the byte order of the parameter p and the current queue Qp If the endianness of the first element in the queue is inconsistent, then according to the current queue Q p The endianness and byte length of the first element in the queue are extracted from S C Extract the hexadecimal string from S and convert it to a binary string S B Let the popped first element be p B The loop continues until the queue Q p is empty;
[0044] Step 4.2: If the bit order of the instruction parameter p is not empty, then add the parameter p to the queue Q p ; if the bit order of the instruction parameter p is empty, then according to the endianness and byte length of the instruction parameter p, extract the hexadecimal string S C from S H Assign this hexadecimal string S H to the value of the instruction parameter p, use the method of automatically obtaining its inverse value according to the instruction parameter to obtain the inverse meaning value corresponding to the value, and add the parameter name and inverse meaning value of the instruction parameter p as the result to the hash table M F ; go back to step 4 and continue the loop.
[0045] In the above technical solution, in the automatic inverse encoding method, step 4.1 specifically includes:
[0046] Step 4.1.1: According to the bit order and bit length of the parameter p B extract the corresponding binary string from S B and assign this binary string to the value of the parameter p B ; use the method of automatically obtaining its inverse value according to the instruction parameter to obtain the inverse meaning value corresponding to the value;
[0047] Step 4.1.2: Add the parameter name and inverse meaning value of the parameter p B as the result to the hash table M F ; if the queue Q p is not empty, then go back to step 4.1.1 and continue the loop, if the queue is empty, then exit the current loop.
[0048] In the above technical solution, in the method of automatically obtaining the inverse value according to the instruction parameter, step 2 specifically includes:
[0049] Step 2.1: If the availableValue attribute of the current parameter p is empty, then throw an exception and exit the current process;
[0050] Step 2.2: If the availableValue attribute of the current parameter p does not contain the value of the parameter p, then throw an exception and exit the current process;
[0051] Step 2.3: Obtain the reverse-coded value corresponding to the value of parameter p from the availableValue attribute, return it as the result, and end the current process.
[0052] In the above technical solution, in the method for automatically obtaining the reverse-coded value according to the instruction parameter, Step 5 specifically includes:
[0053] Step 5.1: If the parameter attributes attribute contains Available, convert the value of the current parameter p to binary, intercept the string according to the actual value in Available, and after interception, convert it to an integer and save the result as I;
[0054] Step 5.2: Convert the value of the current parameter p to binary. If the parameter attributes attribute contains the Complement field, parse it as an integer in the form of two's complement; otherwise, parse it as an integer in unsigned form and save the result as I;
[0055] Step 5.3: If the parameter attributes attribute contains Dimension, multiply the integer I by the dimension value and update the integer I to a new integer value; if the parameter attributes attribute contains Equation, update the integer I to the integer value calculated according to the set formula; return the integer result I and end the current process.
[0056] In the above technical solution, in the method for automatically obtaining the reverse-coded value according to the instruction parameter, Step 6 specifically includes:
[0057] Step 6.1: If the parameter attributes attribute contains Available, convert the value of the current parameter p to binary and intercept the string according to the actual value in Available, and after interception, convert it to an integer and save the result as I;
[0058] Step 6.2: Convert the value of the current parameter p to binary. If the parameter attributes attribute contains the Complement field, parse it as an integer in the form of two's complement; otherwise, parse it as an integer in unsigned form and save the result as I;
[0059] Step 6.3: Parameters of floating-point type usually contain the Dimension attribute. Let the floating-point number be D, and update the floating-point number D to the value obtained by multiplying the integer I by the corresponding dimension; if the parameter attributes attribute contains Equation, update the floating-point number D to the calculated value after using the formula; return the floating-point number D result and end the current process.
[0060] In the above technical solution, in the automatic instruction modification method, step 3 specifically includes:
[0061] Step 3.1: If the parameter p is a byte-type parameter, then in S, replace the corresponding part of the string. The starting position of the replaced part is the byte order of the parameter p, and the length is the byte length of the parameter p, and replace it with the value of the parameter p;
[0062] Step 3.2: If the parameter p is a bit-type parameter, then intercept a string of a specific length in S. The starting position of the intercepted part is the byte order of the parameter p, and the length is the byte length of the parameter p; convert the intercepted string from hexadecimal to binary. Let the intercepted string be S b , in S b replace the corresponding part of the string. Let the byte length of the parameter p be L B , the bit order be I b , the bit length be L b , then the starting position of the replaced string is I s :
[0063] I s = I b - L B * 8 + 1
[0064] The length is the bit length of the parameter p, and replace it with the value of the parameter p.
[0065] The present invention has the following beneficial effects:
[0066] The automatic reverse compilation and modification architecture of remote sensing satellite instructions based on remote control instruction parameters of the present invention is a reverse compilation and modification system for satellite remote control instruction encoding with high versatility, good reliability and high automation.
[0067] The automatic reverse compilation and modification architecture of remote sensing satellite instructions based on remote control instruction parameters of the present invention supports multiple instruction parameter types and has a highly automated remote control instruction reverse compilation and modification process. The entire process reduces manual development intervention and is relatively efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] The present invention will be further described in detail below with reference to the drawings and specific embodiments.
[0069] Figure 1 It is a schematic diagram of instruction parameter types.
[0070] Figure 2 It is a schematic flow chart of the steps of the automatic reverse compilation method in the automatic reverse compilation and modification architecture of remote sensing satellite instructions based on remote control instruction parameters of the present invention.
[0071] Figure 3Schematic diagram of the steps of the method for automatically obtaining the reverse-coded value according to the command parameters in the remote sensing satellite command automatic reverse-coding and modification architecture based on remote control command parameters of the present invention.
[0072] Figure 4 Schematic diagram of the steps of the automatic command modification method in the remote sensing satellite command automatic reverse-coding and modification architecture based on remote control command parameters of the present invention.
[0073] Figure 5 Schematic diagram of an Excel file example.
[0074] Figure 6 Schematic diagram of the command parameter list.
[0075] Figure 7 Schematic diagram of the generated command.
[0076] Figure 8 Schematic diagram of the command reverse-coding result.
[0077] Figure 9 Schematic diagram of another command reverse-coding result.
[0078] Figure 10 Schematic diagram of the command modification process.
[0079] Figure 11 Schematic diagram of another command modification process. Detailed implementation mode
[0080] The present invention will be described in detail below with reference to the accompanying drawings.
[0081] The introduction and description of the remote sensing satellite command automatic reverse-coding and modification architecture based on remote control command parameters of the present invention include the following parts:
[0082] I. Design of command parameter classes in the remote sensing satellite command automatic reverse-coding and modification architecture based on remote control command parameters of the present invention.
[0083] In the remote sensing satellite command automatic reverse-coding and modification architecture based on remote control command parameters of the present invention, the flow method of the entire architecture revolves around the parameters of the command as the core, and the parameters of the command are designed as an independent class. Figure 1 The class diagram of this class is shown.
[0084] The command parameters are used as the core class of the command, and the characteristics of the parameters are used by subsequent various methods. The detailed information of the attributes in the class is as follows:
[0085] id: This attribute serves as the unique feature of an item in the database.
[0086] satelliteId: Indicates the satellite code to which the command parameter belongs.
[0087] commandName: Indicates the name of the command to which the command parameter belongs, such as imaging task parameters, data transmission task parameters, etc. Each command format corresponds to one command name. Command parameters with the same satellite code and command name belong to the same type of command and will be processed together.
[0088] paramName: Indicates the name of the command parameter, such as command execution time, service type, longitude and latitude of the data transmission station, etc.
[0089] byteIndex: Indicates the starting byte sequence number of the command parameter in the command encoding, and the sequence number starts from 1.
[0090] byteLength: Indicates the number of bytes occupied by the command parameter in the command encoding.
[0091] bitIndex: Indicates the starting bit sequence number of the command parameter in the command encoding. This parameter needs to be set only when the parameter is a bit type parameter, and it is an optional value.
[0092] bitLength: Indicates the bit length of the command parameter in the command encoding. This parameter needs to be set only when the parameter is a bit type parameter, and it is an optional value.
[0093] A simple explanation of byte type parameters and bit type parameters: From the perspective of encoding, command parameters are divided into two types, byte type parameters and bit type parameters. Byte type parameters can be interpreted as a whole byte, while bit type parameters usually can only be interpreted in bits. Usually, several bit type parameters form an integer multiple of bytes, and several bit type parameters in the same integer multiple of bytes have the same byte order and byte length.
[0094] rule: The rule for encoding parameters. The rule includes the following six types: Selection (parameters of the selection type, and the encoding values of such parameters can only represent several specific meanings), Int (represents an unsigned integer type. Here, Int is different from 32-bit integers in most programming languages and only represents the meaning of an integer. The framework will process it according to the specific byte length), Double (represents an unsigned floating-point type. Similarly, here Double is different from 64-bit floating-point numbers in most programming languages, and the framework will interpret it according to the specific word length), Time (represents the time type, and the framework will interpret the parameter value as time according to specific logic), Hex (represents the hexadecimal type, and at this time the parameter only indicates the hexadecimal literal value), Binary (represents binary, and at this time the parameter only indicates the binary literal value). This attribute is the key point, and the automatic forward encoding, reverse encoding, and modification of the framework are all based on the rule attribute of the parameter.
[0095] defaultValue: It can be empty. When it is not empty, it will be used as the default value of the instruction parameter for instruction encoding. Note that when the parameter type is a byte parameter, the default parameter should be given in hexadecimal and end with "H". When the parameter type is a bit parameter, the default parameter should be given in binary form and end with "b". The given default value needs to strictly conform to the corresponding length. For example, if byteLength is 1, the default value should be given in the form of "00H"; if bitLength is 4, the default value should be given in the form of "1010b".
[0096] availableValue: The attribute availableValue represents the optional values of this parameter. The parameter with the rule attribute of Selection must contain this attribute. It should store the hexadecimal or binary encoding and its corresponding actual meaning in the form of key-value pairs.
[0097] attributes: The attribute attributes stores additional parameters. There are many additional parameters, which support many additional functions in the parameter processing of the support framework. The supported additional parameter types are as follows. There can be multiple additional parameters in one attributes, specifically including:
[0098] Available: Represents the valid bits in the parameter, ending with a number + "L / R". For example, for a 2-byte parameter with 14 rightmost bits valid, Available:14R should be added to the attributes.
[0099] Complement: Represents that this parameter is encoded in two's complement form. When it is necessary to indicate that the parameter is a signed number, Complement: true should be added to the attributes.
[0100] Equation: Represents a formula. When this value exists, the framework will look for a function with the same name as the given name in a specific location to process the encoded parameter. For example, if a function named rad is written in the framework, when Equation: rad is given, the framework will process the encoded value using the rad function and return the corresponding calculation result. Equation is used to solve the problems brought about when some parameters need special processing, such as parameters that need to be converted to radians.
[0101] Dimension: Represents the dimension. When this value exists, during forward encoding, the framework will divide the parameter value by the dimension and then convert it to encoding. During reverse encoding, it will multiply the encoded value by the dimension to convert it back to the parameter value.
[0102] Odd: When the parameter needs to be set to an odd number, Odd: true should be added to the attributes. When the parameter is set to an even number, the framework will throw an exception and prevent the operation.
[0103] Even: When the parameter needs to be set to an even number, Even: true should be added to the attributes. When the parameter is set to an odd number, the framework will throw an exception and prevent the operation.
[0104] Range: Indicates the valid range of the parameter. For example, when the valid values of the parameter are from 0 to 255, Range: [0, 255] should be added to the attributes.
[0105] DecodeRule: Indicates the decoding rule of the parameter. Usually, the encoding parameter is based on the attribute rule both during encoding and decoding. When the encoding and decoding rules of some encoding parameters are inconsistent, DecodeRule can be used to indicate the rule during decoding.
[0106] RecursionBytes: The total number of bytes of the loop body where the loop parameter is located.
[0107] RecursionTimes: Indicates the number of loops of the parameter.
[0108] RecursionLetter: The representative letter in the parameter that needs to be replaced with a serial number. For example, if the parameter name is the data transmission file number K, then set it to RecursionLetter: K.
[0109] In addition to the above attributes, during the process of the framework processing the parameter, two temporary variables are introduced: value and decodeValue, which store the temporary value and the temporary decoded value of the parameter during the framework processing respectively.
[0110] II. The automatic decoding method in the remote sensing satellite command automatic decoding and modification architecture based on remote control command parameters of the present invention.
[0111] As Figure 2 shown, in the remote sensing satellite command automatic decoding and modification architecture based on remote control command parameters of the present invention, the process of automatically decoding the hexadecimal encoding of the remote control command based on the above command parameters specifically includes the following steps:
[0112] Step 1: Obtain the corresponding instruction parameter list L from the database according to the satellite code and the generated instruction name. The instruction parameters are sorted in ascending order according to the byte order, and in descending order according to the bit order in the case of the same byte order. The hexadecimal encoding of the instruction to be decoded is the string S.
[0113] Step 2: Format the instruction parameter list L according to the anti-compilation rules, perform cyclic value processing on the instruction parameters, and the instruction parameter list after processing is L F .
[0114] Step 2.1: Define a new empty list L F as the result set.
[0115] Step 2.2: Traverse the instruction parameter list L, set the traversed instruction parameter as p, set the temporary value value and decodeValue of the instruction parameter p to empty, enter Step 2.3 to start the loop, and enter Step 2.5 after the loop ends;
[0116] Step 2.3: If the instruction parameter p contains the attributes attribute and the attributes contain additional attributes related to recursion (RecursionBytes, RecursionTimes, and RecursionLetter are all defined), perform processing related to the loop parameters, otherwise enter Step 2.4.
[0117] Step 2.3.1: Obtain data from the additional attributes, let RecursionTimes, that is, the number of loops, be n, let RecursionBytes, that is, the byte length participating in the loop, be s, and assume that the letter defined in RecuisionLetter, that is, the loop letter, is K.
[0118] Step 2.3.2: Enter the loop, with the number of loops from 0 to n - 1. Assume that the number of loops during the explanation is the i-th time. After the loop ends, enter Step 2.2 to continue the loop.
[0119] Step 2.3.2.1: Create a new instruction parameter object p based on the traversed instruction parameter p t , and the values in the new instruction parameter object p t are the same as the values in the original instruction parameter p.
[0120] Step 2.3.2.2: Replace the loop letter K in the instruction parameter name of the instruction parameter object p t with i. Let the byte order of the instruction parameter p be I, and replace the byte order of the instruction parameter object p t with I t , where I t is defined as follows:[[]]
[0121] I t = I + i * s
[0122] Step 2.3.2.3: Add the instruction parameter object p t to L F , and return to Step 2.3.2.1 to continue the loop.
[0123] Step 2.4: Add the instruction parameter p to L F , and go back to Step 2.2 to continue the loop.
[0124] Step 2.5: Sort L F in ascending order according to the byte order, and in descending order according to the bit order when the byte orders are the same, and return L as the result set F .
[0125] Step 3: Remove the head and tail of the string S to be decoded, and at the same time delete the CRC check of the string, and the encoded core string is S C , let the decoding result be the hash table M F , and this result follows a correspondence relationship, under which the hash key is the parameter name and the actually decoded result is the hash value.
[0126] Step 4: Traverse the instruction parameter list L F , the traversed instruction parameter is set as p, and a first-in-first-out queue is defined as Q p .
[0127] Step 4.1: If the queue Q p is not empty and the byte order of the instruction parameter p is inconsistent with the byte order of the first element in the current queue Q p , then intercept the hexadecimal string from S according to the byte order and byte length of the first element in the current queue Q p and convert it into a binary string S C , let the popped first element be p B , and the loop continues until the queue Q B is empty. p is empty.
[0128] Step 4.1.1: Intercept the corresponding binary string from S according to the bit order and bit length of the parameter p B , and assign this binary string to the value of the parameter p B . Use the method of automatically obtaining its decoded value according to the instruction parameter to obtain the decoded meaning value corresponding to the value. B Step 4.1.2: Add the parameter name and decoded meaning value of the parameter p
[0129] as the result to the hash table M B . If the queue Q F is not empty, then go to Step 4.1.1 to continue the loop. If the queue is empty, then exit the current loop. p is not empty, then go to Step 4.1.1 to continue the loop. If the queue is empty, then exit the current loop.
[0130] Step 4.2: If the bit order of the instruction parameter p is not empty, then add the instruction parameter p to the queue Q p; If the bit sequence of instruction parameter p is empty, then extract a hexadecimal string S from S according to the byte sequence and byte length of instruction parameter p C and assign this hexadecimal string S H to the value of instruction parameter p. Use the method of automatically obtaining its reverse-coded value according to the instruction parameter to obtain the reverse-coded meaning value corresponding to the value of value, and add the parameter name and reverse-coded meaning value of instruction parameter p to the hash table M as the result H ; Go to step 4 to continue the loop. F
[0131] Step 5: Return the hash table M after the assignment is completed F as the result, and its content is the instruction parameter name and its corresponding reverse-coded result. The process ends.
[0132] III. The method of automatically obtaining the reverse-coded value according to the instruction parameter in the remote sensing satellite instruction automatic reverse-coding and modification architecture based on the remote control instruction parameter of the present invention.
[0133] As Figure 3 shown, in the remote sensing satellite instruction automatic reverse-coding and modification architecture based on the remote control instruction parameter of the present invention, the method of automatically obtaining the reverse-coded value according to the instruction parameter used in the automatic reverse-coding method specifically includes the following steps:
[0134] Step 1: Let the parameter for parsing the reverse-coded value currently be p, and use the rule value of parameter p as the reverse-coding rule R of parameter p. If the DecodeRule is included in the parameter attributes attribute, then use the rule corresponding to DecodeRule as the reverse-coding rule R.
[0135] Step 2: If the value of the reverse-coding rule R is Selection, that is, parse the current parameter in the selection type. Then obtain the available attribute of the current parameter.
[0136] Step 2.1: If the availableValue attribute of the current parameter p is empty, then throw an exception and exit the current process.
[0137] Step 2.2: If the availableValue attribute of the current parameter p does not contain the value of parameter p, then throw an exception and exit the current process.
[0138] Step 2.3: Obtain the reverse-coded value corresponding to the value of parameter p from the availableValue attribute and return it as the result to end the current process.
[0139] Step 3: If the reverse compilation rule R value is Hex, parse the current parameter in hexadecimal type; if the value of the current parameter p is a hexadecimal parameter, return it directly as the result and exit the current process; if the value of the current parameter p is a binary parameter, convert the binary string to a hexadecimal string and return it to end the current process.
[0140] Step 4: If the reverse compilation rule R value is Binary, parse the current parameter in binary type; if the value of the current parameter p is a binary parameter, return it directly as the result and exit the current process; if the value of the current parameter p is a hexadecimal parameter, convert the hexadecimal string to a binary string and return it to end the current process.
[0141] Step 5: If the reverse compilation rule R value is Int, parse the current parameter in integer type.
[0142] Step 5.1: If the parameter attributes contain Available, convert the value of the current parameter p to binary, intercept the string according to the actual value in Available, and convert it to an integer after interception. Save the result as I.
[0143] Step 5.2: Convert the value of the current parameter p to binary. If the parameter attributes contain the Complement field, parse it as an integer in two's complement form, otherwise parse it as an integer in unsigned form and save the result as I.
[0144] Step 5.3: If the parameter attributes contain Dimension, multiply the integer I by the dimension value and update the integer I to a new integer value. If the parameter attributes contain Equation, update the integer I to the integer value calculated according to the set formula. Return the integer result I and end the current process.
[0145] Step 6: If the reverse compilation rule is Double, parse the current parameter in floating-point type.
[0146] Step 6.1: If the parameter attributes contain Available, convert the value of the current parameter p to binary and intercept the string according to the actual value in Available, and convert it to an integer after interception. Save the result as I.
[0147] Step 6.2: Convert the value of the current parameter p into binary. If the Complement field is included in the parameter attributes, parse it as an integer in two's complement form; otherwise, parse it as an integer in unsigned form and save the result as I.
[0148] Step 6.3: Parameters of floating-point type usually contain a Dimension attribute. Let the floating-point number be D. Update the floating-point number D to the value obtained by multiplying the integer I by the corresponding dimension; if the Equation is included in the parameter attributes, update the floating-point number D to the calculated value after using the formula; return the result of the floating-point number D and end the current process.
[0149] Step 7: If the decompilation rule is Time, parse the current parameter using a specific algorithm in time type and return the parsed result.
[0150] IV. Automatic instruction modification method in the remote sensing satellite instruction automatic decompilation and modification architecture based on remote control instruction parameters of the present invention.
[0151] As Figure 4 shown, in the remote sensing satellite instruction automatic decompilation and modification architecture based on remote control instruction parameters of the present invention, for the automatic instruction modification method of the hexadecimal encoding of the remote control instruction based on the above instruction parameters, it specifically includes the following steps:
[0152] Step 1: First execute the above-mentioned automatic decompilation method on the instruction encoding to be modified. Let the hash table M returned after the decompilation process end, and its content is the instruction parameter name and its corresponding decompilation result.
[0153] Step 2: Traverse the parameter set to be modified. If the key to be modified is not included in the hash table M, throw an exception; if the key to be modified exists, then assign a value to the instruction parameter according to the encoding rule of the instruction parameter, and the parameter set after the modification is L.
[0154] Step 3: Let the original instruction hexadecimal encoding be S, traverse the set L, and let the traversed instruction parameter be p.
[0155] Step 3.1: If the parameter p is a byte-type parameter, then replace the corresponding part of the string in S. The starting position of the replaced part is the byte order of the parameter p, and the length is the byte length of the parameter p, and replace it with the value of the parameter p.
[0156] Step 3.2: If the parameter p is a bit-type parameter, then intercept a specific length of string in S. The starting position of the intercepted part is the byte order of the parameter p, and the length is the byte length of the parameter p. Convert the intercepted string from hexadecimal to binary. Let the intercepted string be S b , in S bReplace the corresponding part of the string, and set the byte length of parameter p to L B , with the bit order being I b , with the bit length being L b , then the starting position of the replaced string is I s :
[0157] I s = I b -L B *8 + 1
[0158] The length is the bit length of parameter p, and it is replaced with the value of parameter p
[0159] Step 4: Perform encoding verification and instruction header and footer addition operations on string S. The obtained final result is the available hexadecimal remote control instruction encoding, and the process ends
[0160] V. Example Explanation
[0161] Based on the remote control instruction parameter, the instruction automatic reverse compilation and modification architecture can be used as an independent system to perform reverse compilation and modification on the generated satellite remote control instructions. The system supports batch input of instruction parameters in the form of an Excel table, and can also input and modify individual instruction parameters. The example of the input Excel table and the instruction parameter page are respectively as Figure 5 and 6 shown
[0162] Taking the generated instruction encoding parameter as the input, the encoding can directly return the reverse compilation result of the instruction and verify it with the actual meaning recorded in the instruction. The instruction generation effect and the instruction reverse compilation result are respectively as Figures 7 - 9 shown
[0163] The parameters after reverse compilation support manual input values to modify the existing instructions. All types of instruction parameters can be modified, and multiple instruction parameter values can be modified at one time. On the modification page, it can be observed that the data of the Selection type supports selection among several options, and the data of the other types can be directly modified. The backend will check the modification result to ensure the correctness of the instruction and prevent incorrect modification. The modification process is as Figure 10 and Figure 11 shown. Most of the parameters in the figure have been modified compared with the figure of the reverse compilation result
[0164] It can be seen that the instruction automatic reverse compilation and modification architecture and system based on remote control instruction parameters are effective, and can efficiently reverse compile and modify satellite remote control instruction encodings
[0165] The automatic reverse compilation and modification architecture of remote sensing satellite commands based on remote control command parameters of the present invention is a command reverse compilation and modification system with high generality, good reliability and high automation for the reverse compilation and modification of satellite remote control command coding.
[0166] The automatic reverse compilation and modification architecture of remote sensing satellite commands based on remote control command parameters of the present invention supports multiple command parameter types and has a highly automated remote control command reverse compilation and modification process. The whole process reduces manual development intervention and is relatively efficient.
[0167] Obviously, the above embodiments are only examples for clear illustration and not limitations on the implementation manners. For those of ordinary skill in the art, other different forms of changes or variations can be made based on the above description. It is not necessary and impossible to list all the implementation manners here. And the obvious changes or variations derived therefrom are still within the protection scope of the present invention.
Claims
1. A remote sensing satellite command automatic reverse editing and modification architecture based on remote control command parameters, characterized in that: include: Automatic reverse compilation method, method for automatically obtaining reverse compilation value according to instruction parameters and automatic instruction modification method; among which: The automatic reverse compilation method specifically includes the following steps: Step 1: Obtain the corresponding command parameter list L from the database according to the satellite code and the generated command name. Sort the command parameters in ascending order according to the byte order. If the byte order is the same, sort them in reverse order according to the bit order. The hexadecimal code of the command to be reversed is a string S. Step 2: Perform reverse compilation rule formatting on the instruction parameter list L, and perform loop value processing on the instruction parameters. The instruction parameter list after processing is L F ; Step 3: Remove the head and tail of the string S to be reversed, and delete the CRC check of the string, and get the encoded core string S C , let the reverse encoding result be hash table M F , the result follows a correspondence relationship, in which the hash key is the parameter name and the actual result of the decompilation is the hash value; Step 4: Traverse the instruction parameter list L F , the traversed instruction parameter is set to p, and the first-in-first-out queue is defined as Q p ; Step 5: Assign the completed hash table M F As a result, the content is the command parameter name and its comparison result; the process ends; The method for automatically obtaining the reverse compilation value according to the instruction parameter specifically includes the following steps: Step 1: Let the parameter of the current parsed decompiled value be p, and use the rule value of parameter p as the decompilation rule R of parameter p. If the parameter attributes property contains DecodeRule, then use the rule corresponding to DecodeRule as the decompilation rule R; Step 2: If the reverse compilation rule R value is Selection, the current parameter is parsed as a selection type and the available attribute of the current parameter is obtained; Step 3: If the reverse compilation rule R value is Hex, the current parameter is parsed in hexadecimal type; if the value of the current parameter p is a hexadecimal parameter, it is directly returned as the result and the current process is exited; if the value of the current parameter p is a binary parameter, the binary string is converted into a hexadecimal string and returned, ending the current process; Step 4: If the value of the reverse compilation rule R is Binary, the current parameter is parsed as a binary type; if the value of the current parameter p is a binary parameter, it is directly returned as the result and the current process is exited; if the value of the current parameter p is a hexadecimal parameter, the hexadecimal string is converted into a binary string and returned, ending the current process; Step 5: If the reverse rule R value is Int, the current parameter is parsed as an integer type; Step 6: If the reverse compilation rule is Double, the current parameter is parsed as a floating point type; Step 7: If the reverse compilation rule is Time, the current parameter is parsed as time type using a specific algorithm and the parsing result is returned; The automatic instruction modification method specifically includes the following steps: Step 1: Firstly, the automatic reverse compilation method is executed for the instruction code to be modified, and the content of the hash table M returned after the reverse compilation process is completed is the reverse compilation result of the instruction parameter name and its comparison; Step 2: Traverse the parameter set that needs to be modified. If the hash table M does not contain the key that needs to be modified, an exception is thrown; if there is a key that needs to be modified, the instruction parameter is assigned a value according to the encoding rule of the instruction parameter. The parameter set after the change is completed is L; Step 3: Let the original instruction hexadecimal code be string S, traverse the set L, and let the traversed instruction parameter be p; Step 4: Perform code verification on the string S and add the head and tail operations to the command. The final result is the usable hexadecimal remote control command code, and the process ends.
2. The automatic reverse compilation and modification framework of remote sensing satellite commands based on remote control command parameters according to claim 1 is characterized in that: In the automatic reverse compilation method, step 2 specifically includes: Step 2.1: Define a new empty list L F As a result set; Step 2.2: traverse the instruction parameter list L, set the traversed instruction parameter to p, set the temporary value value and decodeValue of the instruction parameter p to empty, enter step 2.3 to start the loop, and enter step 2.5 after the loop ends; Step 2.3: If the instruction parameter p contains the attributes attribute, and the attributes contain loop-related additional attributes, then loop parameter-related processing is performed; Step 2.4: Add the instruction parameter p to L F , return to step 2.2 and continue the cycle; Step 2.5: L F Sort in ascending order according to the byte order. If the byte order is the same, sort in reverse order according to the bit order. Return L as the result set F .
3. The automatic reverse compilation and modification architecture of remote sensing satellite commands based on remote control command parameters according to claim 2 is characterized in that: In the automatic reverse compilation method, step 2.3 specifically includes: Step 2.3.1: Get data from the extra attributes, let RecursionTimes, i.e. the number of loops, be n, let RecursionBytes, i.e. the length of the bytes involved in the loop, be s, and let RecursionLetter, i.e. the letter defined in the loop letter, be K; Step 2.3.2: Enter the loop, the number of loops is 0 to n-1, assuming that the number of loops is the i-th time, and the loop ends and enters step 2.2 to continue the loop.
4. The automatic reverse compilation and modification framework of remote sensing satellite commands based on remote control command parameters according to claim 3 is characterized in that: In the automatic reverse compilation method, step 2.3.2 specifically includes: Step 2.3.2.1: Create a new instruction parameter object p based on the traversed instruction parameter p t , new instruction parameter object p t The values of each item in are consistent with the values of each item in the original instruction parameter p; Step 2.3.2.2: Set the instruction parameter object p t Replace the loop letter K in the command parameter name with i, set the byte order of the command parameter p to I, and set the command parameter object p to t The byte order is replaced by I t , where I t The definition is as follows: I t =I+i*s Step 2.3.2.3: Set the instruction parameter object p t Join L F , return to step 2.3.2.1 and continue the cycle.
5. The automatic reverse compilation and modification framework of remote sensing satellite commands based on remote control command parameters according to claim 1, characterized in that: In the automatic reverse compilation method, step 4 specifically includes: Step 4.1: If queue Q p Not empty, and the byte order of parameter p is the same as the current queue Q p If the byte order of the first element in is inconsistent, the current queue Q p The byte order and byte length of the first element in S C Extract the hexadecimal string and convert it into a binary string S B , let the first element popped up be p B , the cycle continues until queue Q p is empty; Step 4.2: If the bit sequence of the instruction parameter p is not empty, add the instruction parameter p to the queue Q p ; If the bit sequence of the instruction parameter p is empty, then the instruction parameter p is read from S according to its byte sequence and byte length. C Extract the hexadecimal string S H , the hexadecimal string S H Assign the value of the instruction parameter p to the value, use the method of automatically obtaining the reversed value according to the instruction parameter to obtain the reversed meaning value corresponding to the value, and add the parameter name and reversed meaning value of the instruction parameter p as the result to the hash table M F ; Go to step 4 to continue the cycle.
6. The automatic reverse compilation and modification framework of remote sensing satellite commands based on remote control command parameters according to claim 5, characterized in that: In the automatic reverse compilation method, step 4.1 specifically includes: Step 4.1.1: According to the parameter p B The bit order and bit length of S B Intercept the corresponding binary string and assign the binary string to parameter p B value; use the method of automatically obtaining its reversed value according to the instruction parameter to obtain the reversed meaning value corresponding to the value; Step 4.1.2: Set the parameter p B The parameter name and reverse meaning value are added to the hash table M as the result F ; If queue Q p If it is not empty, go to step 4.1.1 and continue the loop. If the queue is empty, exit the current loop.
7. The automatic reverse compilation and modification framework of remote sensing satellite commands based on remote control command parameters according to claim 1, characterized in that: In the method for automatically obtaining the reverse compilation value according to the instruction parameter, step 2 specifically includes: Step 2.1: If the availableValue property of the current parameter p is empty, an exception is thrown and the current process is exited; Step 2.2: If the availableValue attribute of the current parameter p does not contain the value of the parameter p, an exception is thrown and the current process is exited; Step 2.3: Get the decompiled value corresponding to the value of parameter p from the availableValue attribute, return it as the result, and end the current process.
8. The automatic reverse compilation and modification framework of remote sensing satellite commands based on remote control command parameters according to claim 1, characterized in that: In the method for automatically obtaining the reverse compilation value according to the instruction parameter, step 5 specifically includes: Step 5.1: If the parameter attributes contains Available, convert the value of the current parameter p into binary, and intercept the string according to the actual value in Available, and then convert it into an integer and save the result as I; Step 5.2: Convert the value of the current parameter p to binary. If the parameter attributes contains the Complement field, parse it into an integer in the form of two's complement. Otherwise, parse it into an integer in the form of unsigned and save the result as I. Step 5.3: If the parameter attributes contains Dimension, then multiply the integer I by the dimension value and update the integer I to a new integer value; if the parameter attributes contains Equation, then update the integer I to the integer value calculated according to the set formula; return the integer result I and end the current process.
9. The automatic reverse compilation and modification framework of remote sensing satellite commands based on remote control command parameters according to claim 1, characterized in that: In the method for automatically obtaining the reverse compilation value according to the instruction parameter, step 6 specifically includes: Step 6.1: If the parameter attributes contains Available, convert the value of the current parameter p into binary and intercept the string according to the actual value in Available, and then convert it into an integer and save the result as I; Step 6.2: Convert the value of the current parameter p to binary. If the parameter attributes contains the Complement field, parse it into an integer in the form of two's complement. Otherwise, parse it into an integer in the form of unsigned and save the result as I. Step 6.3: Parameters of floating-point type usually contain the Dimension attribute. Let the floating-point number be D. Update the floating-point number D to the value obtained by multiplying the integer I by the corresponding dimension. If the parameter attributes contains Equation, update the floating-point number D to the calculated value after using the formula. Return the floating-point number D result and end the current process.
10. The automatic reverse compilation and modification framework of remote sensing satellite commands based on remote control command parameters according to claim 1, characterized in that: In the automatic instruction modification method, step 3 specifically includes: Step 3.1: If the parameter p is a byte type parameter, replace the corresponding part of the string in S. The starting position of the replaced part is the byte order of the parameter p, the length is the byte length of the parameter p, and it is replaced with the value of the parameter p. Step 3.2: If parameter p is a bit type parameter, then extract a string of a specific length from S, where the starting position of the extracted part is the byte sequence of parameter p and the length is the byte length of parameter p; convert the extracted string from hexadecimal to binary, and set the extracted string to S b , in S b Replace the corresponding part of the string in , and set the byte length of parameter p to L B , bit order is I b , bit length is L b , then the starting position of the replaced string is I s : I s =I b -L B *8+1 The length is the bit length of parameter p, replaced by the value of parameter p.