Disclosure of Invention
The invention mainly aims to overcome the defect of low test efficiency of test, operation and control data caused by long time for downloading complete telemetering in the prior art, and provides a data test method, a device, electronic equipment and a medium based on satellite instructions.
In order to achieve the above object, a first aspect of the present invention provides a data testing method based on satellite commands, including the following steps:
after the satellite receives the satellite instruction, confirming the structure of the satellite data frame and the structure mapping rule driving function;
when the satellite task is scheduled, the satellite converts the operation data into a satellite data frame according to the structure of the data frame and a structure mapping rule driving function;
the satellite data frame is issued to a measurement, operation and control service platform;
and the test, operation and control service platform analyzes the satellite data frame and sends analyzed data to the test platform.
In an exemplary embodiment of the present application, said driving a function according to a structure and a structure mapping rule of said data frame, the satellite converting the operation data into the satellite data frame, comprises:
determining target satellite data included in the satellite data frame according to the structure of the data frame;
writing a data frame structure script according to the structure mapping rule driving function;
and executing the data frame structure script to generate a satellite data frame.
In an exemplary embodiment of the present application, the confirming the structure of the satellite data frame and the structure mapping rule driving function comprises:
confirming the version number, passing mark, internal no command mark, idle position, spacecraft identification word, virtual channel identification word, frame length and frame serial number of the satellite data frame structure;
and searching a structure mapping rule driving function corresponding to the satellite data frame structure in a preset database.
In an example embodiment of the present application, the parsing, by the measurement, operation and control service platform, the satellite data frame includes:
the measurement, operation and control service platform confirms the data frame structure script of the issued satellite data frame;
and executing the data frame structure script and analyzing the satellite data frame.
In an example embodiment of the present application, the creating simulation system includes: the data testing method further comprises the following steps: the satellite maps the first frame structure script to UDP socket service and corresponds to a monitoring interface of the test, operation and control service platform; the satellite transmits the satellite data frame to a measurement, operation and control service platform through the monitoring interface;
the data frame structure script of the satellite data frame which is confirmed and issued by the measurement, operation and control service platform comprises:
confirming a frame structure mapping rule function of the satellite data frame according to the UDP socket service;
and writing a data frame structure script of the issued satellite data frame according to the structure mapping rule driving function.
In an example embodiment of the present application, the test platform is provided with an interface for viewing and modifying structural frame structure parameters of the satellite data frames.
In an example embodiment of the present application, the data testing method further includes: and displaying the analysis data in real time.
As a second aspect of the present invention, the present invention provides a data testing apparatus based on satellite commands, comprising:
the satellite is used for confirming the structure and the structure mapping rule driving function of a satellite data frame after receiving a satellite instruction, and converting the operation data into the satellite data frame according to the structure and the structure mapping rule driving function of the data frame when a satellite task is scheduled; the satellite data frame is issued to a measurement, operation and control service platform;
the test, operation and control service platform is connected with the test platform; and the test, operation and control service platform is used for receiving the transmitted satellite data frame, analyzing the satellite data frame and sending analyzed data to the test platform.
As a third aspect of the present invention, the present invention provides an electronic apparatus comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of the first aspects above.
As a fourth aspect of the invention, the invention provides a computer readable medium having stored thereon a computer program which, when executed by a processor, performs the method of any of the first aspects described above.
The satellite command conversion method has the advantages that after the satellite receives the satellite command, the test data required by the satellite command is converted into the satellite data frame according to the structure of the data frame and the structure mapping rule driving function and is downloaded, other data are not required to be downloaded at the same time, the defect that the test efficiency of the test, operation and control data is low due to the fact that the time for downloading complete telemetering is long in the prior art is overcome, the downloading time is shortened, and the test efficiency is improved.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The same reference numerals denote the same or similar parts in the drawings, and thus, a repetitive description thereof will be omitted.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
It will be understood that, although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one element from another. Thus, a first component discussed below may be termed a second component without departing from the teachings of the present concepts. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
It will be appreciated by those skilled in the art that the drawings are merely schematic representations of exemplary embodiments, and that the blocks or processes shown in the drawings are not necessarily required to practice the present application and are, therefore, not intended to limit the scope of the present application.
According to a first embodiment of the present invention, the present invention provides a data testing method based on satellite commands, as shown in fig. 1, including the following steps:
and S11, confirming the structure of the satellite data frame and the structure mapping rule driving function after the satellite receives the satellite command.
The satellite command may be a command transmitted to the satellite by the measurement, operation and control service platform. As shown in fig. 2, the entire satellite data testing framework may include: the system comprises a satellite, a test, operation and control service platform and a test system. In fig. 2, the satellite and the measurement, operation and control service platform may each include a frame structure script, a frame structure mapping rule, a task scheduling, a rule base, and a Java test function, and the test system includes a task result determination module that three-dimensionally displays a determination result. The measurement, operation and control service platform is mainly responsible for performing remote measurement and remote control, satellite fault diagnosis, satellite orbit control and orbit determination, task planning and automatic scheduling on the satellite and two-dimensional and three-dimensional simulation demonstration of the rocket satellite, and is realized through satellite remote measurement and control software.
When the test, operation and control service platform needs to test data generated by a certain task executed by the satellite, a frame structure formed by the test data is used as a satellite instruction to be sent to the satellite. And after receiving the instruction, the satellite puts the test data into the position corresponding to the frame structure.
Specifically, after the satellite receives the satellite command, confirming the structure of the satellite data frame and the structure mapping rule driving function may include the following steps:
and S111, confirming data included in the satellite data frame structure.
Fig. 9 schematically shows a schematic diagram of a satellite command. As shown in fig. 9, the satellite data frame structure may include data such as a version number, a pass flag, an intra-command flag, an idle bit, a space vehicle identification word, a virtual channel identification word, a frame length, and a frame sequence number.
And S112, searching a structure mapping rule driving function corresponding to the satellite data frame structure in a preset database.
The satellite system can be preset with a database, and the database stores a structure mapping rule driving function corresponding to the satellite data frame structure. After the satellite receives the instruction and confirms the satellite data frame structure, the structure mapping rule driving function corresponding to the satellite data frame structure can be obtained by searching the database.
After the structure mapping rule driving function corresponding to the satellite data frame structure is obtained, step S12 is performed.
And S12, when the satellite task is scheduled, the satellite converts the operation data into the satellite data frame according to the structure of the data frame and the structure mapping rule driving function.
The task scheduling function is to acquire the tracked task from the task plan, regularly call interfaces of other services, send a message to the information sending module, call all other micro services and further complete the task scheduling. The specific method is shown in fig. 4:
step 0-1: the front end Web creates a new task and instructs a task scheduler;
step 0-2: the task scheduling scheduler responds and informs the front end Web whether the operation of creating a new task is successful or not;
step 1-1: the task scheduling scheduler creates a timer according to the defined time.
Step 2-1: and when the timing task reaches the starting time, the frame structure mapping comparator executes the script.
Step 2-2: the frame structure mapping comparator completes the execution of the task and informs the task scheduling scheduler to send a message to the task responsible person to modify the task into an exit state.
Step 3-1: and the front-end Web establishes connection with the frame structure mapping comparator through the websocket in the task execution process, so that a frame structure mapping rule driving function is called.
Step 3-2: and after the task execution of the frame structure mapping comparator is finished, the task scheduling executor interrupts the websocket connection and sends a message to a task responsible person, and the task execution is finished.
Specifically, the converting the operation data into the satellite data frame by the satellite according to the structure of the data frame and the structure mapping rule driving function comprises:
and S121, determining target satellite data included in the satellite data frame according to the structure of the data frame.
And S122, writing a data frame structure script according to the structure mapping rule driving function.
And S123, executing the data frame structure script to generate a satellite data frame.
And S124, issuing the satellite data frame to a measurement, operation and control service platform.
Taking the structure mapping rule driving function as the data frame keyword extraction function as an example, the scheduling process of the structure mapping rule driving function is briefly described. Fig. 3 schematically shows a schematic diagram of frame structure mapping rule driven function scheduling, and as shown in fig. 3, the frame structure mapping rule driven function scheduling process includes the following steps:
first, a data frame keyword extraction function is written for a structure of a satellite data frame.
Second, the data frame structure rules are mapped to the database.
Next, a Java script is written and executed.
And then, converting the satellite data into satellite data frames according to the data frame mapping relation.
And after receiving the transmitted satellite data frame, the measurement, operation and control service platform executes the step S14.
And S14, the test, operation and control service platform analyzes the satellite data frame and sends the analyzed data to the test platform.
The analyzing the satellite data frame by the measurement, operation and control service platform may include the following steps:
s141, the measurement, operation and control service platform confirms the data frame structure script of the issued satellite data frame;
and S142, executing the data frame structure script and analyzing the satellite data frame.
Optionally, the data testing method may further include the steps of: the satellite maps the first frame structure script to a UDP (User Datagram Protocol) socket service and corresponds to a monitoring interface of the measurement, operation and control service platform; and the satellite transmits the satellite data frame to a measurement, operation and control service platform through the monitoring interface.
The determining, operating and controlling service platform may determine the data frame structure script of the delivered satellite data frame, where the data frame structure script may include: confirming a frame structure mapping rule function of the satellite data frame according to the UDP socket service; and writing a data frame structure script of the issued satellite data frame according to the structure mapping rule driving function.
Optionally, the test platform is provided with an interface, and the interface is used for viewing and modifying the structural frame structure parameters of the satellite data frame.
Optionally, the data testing method further includes: and displaying the analysis data in real time.
Referring to fig. 2-5, the steps of the satellite command-based data testing method are described in a complete embodiment. This embodiment comprises the steps of:
step1, writing a frame structure mapping rule driving function in a database for the version number of a data frame, a passing mark, an internal command-free mark, an idle bit, a spacecraft identification word, a virtual channel identification word, a frame length and a frame serial number packaging function, and mapping a frame structure script to UDP socket service and corresponding to a monitoring interface one by one.
And 2, loading the frame structure configuration rule function of the existing satellite from the database after the satellite service is started.
And 3, starting a three-dimensional display service by the test framework for pushing a frame structure analysis result in real time.
And 4, calling a frame structure configuration rule function when the satellite tracking data is issued through a task scheduling and arranging program.
And 5, issuing a satellite data frame through the web front end when the satellite passes the station.
And 6, after receiving the satellite data frame, the measurement, operation and control service platform starts an internal function example, associates the internal function example with a distributed frame structure mapping rule driving function, allocates a monitoring port and starts UDP socket service for analyzing the frame structure.
And 7, receiving the satellite data frames by the measurement, operation and control service platform through the established UDP socket service port.
And 8, analyzing the data frame by the measurement, operation and control service platform according to the satellite frame structure script.
And 9, the test, operation and control service platform pushes the data frame analysis result and pushes the key word analysis result of the data frame to a message bus service for further processing by other modules.
And step 10, the measurement, operation and control service platform starts a UDP socket client, and sends the residual unresolved data frame result to other UDP sockets for continuing to resolve.
And 11, if no corresponding keyword is found after the analysis, directly sending the data frame to other scripts for processing.
And step 12, the front end of the test framework can check and modify the frame structure analysis parameters through the interface.
According to the invention, after the satellite receives the satellite command, the test data required by the satellite command is converted into the satellite data frame according to the structure of the data frame and the structure mapping rule driving function and is downloaded without simultaneously downloading other data, so that the defect of low test efficiency of the test, operation and control data caused by long time for downloading complete telemetering in the prior art is overcome, the downloading time is shortened, and the test efficiency is improved.
Fig. 6 schematically shows a data testing apparatus based on satellite commands, and according to a second embodiment of the present invention, the HIA of the present invention provides a data testing apparatus 600 based on satellite commands, using the method of the first embodiment. As shown in fig. 6, the data testing apparatus 600 based on satellite commands includes:
the satellite 610 is used for confirming the structure and structure mapping rule driving function of a satellite data frame after receiving a satellite instruction, and converting the operation data into the satellite data frame according to the structure and structure mapping rule driving function of the data frame when a satellite task is scheduled; transmitting the satellite data frame to a measurement, operation and control service platform 620;
the test, operation and control service platform 620 is connected with the test platform 630; the test, operation and control service platform 620 is configured to receive the satellite data frame sent down, analyze the satellite data frame, and send the analyzed data to the test platform 620.
According to a third embodiment of the present invention, there is provided an electronic device, as shown in fig. 7, and fig. 7 is a block diagram of an electronic device according to an exemplary embodiment.
An electronic device 800 according to this embodiment of the application is described below with reference to fig. 7. The electronic device 800 shown in fig. 7 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 7, the electronic device 800 is in the form of a general purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one memory unit 820, a bus 830 connecting the various system components (including the memory unit 820 and the processing unit 810), a display unit 840, and the like.
Wherein the storage unit stores program code that can be executed by the processing unit 810, such that the processing unit 810 performs the steps according to various exemplary embodiments of the present application described in the present specification. For example, the processing unit 810 may perform the steps as shown in fig. 1.
The memory unit 820 may include readable media in the form of volatile memory units such as a random access memory unit (RAM)8201 and/or a cache memory unit 8202, and may further include a read only memory unit (ROM) 8203.
The memory unit 820 may also include a program/utility 8204 having a set (at least one) of program modules 8205, such program modules 8205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 830 may be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 800 may also communicate with one or more external devices 800' (e.g., keyboard, pointing device, bluetooth device, etc.) such that a user can communicate with devices with which the electronic device 800 interacts, and/or any devices (e.g., router, modem, etc.) with which the electronic device 800 can communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 850. Also, the electronic device 800 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 860. The network adapter 860 may communicate with other modules of the electronic device 800 via the bus 830. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware.
Thus, according to a fourth embodiment of the present invention, there is provided a computer readable medium. As shown in fig. 8, the technical solution according to the embodiment of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present invention.
The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: after the satellite receives the satellite instruction, confirming the structure of the satellite data frame and the structure mapping rule driving function; when the satellite task is scheduled, the satellite converts the operation data into a satellite data frame according to the structure of the data frame and a structure mapping rule driving function; the satellite data frame is issued to a measurement, operation and control service platform; and the test, operation and control service platform analyzes the satellite data frame and sends analyzed data to the test platform.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
Exemplary embodiments of the present invention are specifically illustrated and described above. It is to be understood that the invention is not limited to the precise construction, arrangements, or instrumentalities described herein; on the contrary, the invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.