Synchronous processing method and device for spacecraft on-orbit control program

By monitoring synchronization conditions in the rail control program and hanging the program, the synchronization action is performed until the conditions are met, and the problem of high resource occupation in existing technologies is low. Essence

CN119356900APending Publication Date: 2025-01-24BEIJING INST OF CONTROL ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411603107.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-01-24

Smart Images

  • Figure CN119356900A_ABST
    Figure CN119356900A_ABST
Patent Text Reader

Abstract

The invention discloses a synchronous processing method and device for an on-orbit control program of a spacecraft, and belongs to the technical field of on-orbit operation of spacecrafts. The method comprises the following steps: acquiring synchronization mechanism information of an on-orbit control program; the synchronization mechanism information comprises a synchronization condition and a synchronization action which have a binding relationship; a synchronization condition in the synchronization mechanism information is monitored, the on-orbit control program corresponding to the synchronization mechanism information is in a suspended state before the synchronization condition is met, and when it is monitored that the synchronization condition is met, the on-orbit control program is started; and calling an on-orbit control program corresponding to the synchronization mechanism information to trigger and execute a synchronization action bound with the synchronization condition. According to the method, the system resource occupancy rate can be reduced, and the concurrent scheduling performance of the on-orbit control program is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of on-orbit operation of spacecraft, and in particular to a method and device for synchronously processing an on-orbit control program of a spacecraft. Background Art

[0002] At present, the on-orbit operation and on-orbit mission of spacecraft are operated manually on the ground, which is specifically a process of monitoring based on downlink telemetry data and controlling through uplink telemetry commands. Usually, uplink telemetry commands can only be sent to achieve control when downlink telemetry data meets specific conditions. This "until A is met, then start B" mechanism is a synchronization mechanism. However, the scripting language itself does not support the synchronization mechanism. Therefore, how to achieve on-orbit synchronization processing is a technical problem that needs to be solved urgently. Summary of the invention

[0003] The present invention provides a method and device for synchronously processing a spacecraft on-orbit control program. The technical solution is as follows:

[0004] In one aspect, a method for synchronously processing an on-orbit control program of a spacecraft is provided, the method comprising:

[0005] Acquiring synchronization mechanism information of an on-orbit control program; the synchronization mechanism information includes synchronization conditions and synchronization actions having a binding relationship;

[0006] The synchronization conditions in the synchronization mechanism information are monitored. Before the synchronization conditions are met, the on-track control program corresponding to the synchronization mechanism information is in a suspended state. When it is detected that the synchronization conditions are met, the on-track control program corresponding to the synchronization mechanism information is called to trigger the execution of the synchronization action bound to the synchronization condition.

[0007] In another aspect, a device for synchronously processing an on-orbit control program of a spacecraft is provided, the device comprising:

[0008] An acquisition unit, used to acquire synchronization mechanism information of an on-orbit control program; the synchronization mechanism information includes synchronization conditions and synchronization actions having a binding relationship;

[0009] The synchronization processing unit is used to monitor the synchronization conditions in the synchronization mechanism information. Before the synchronization conditions are met, the on-track control program corresponding to the synchronization mechanism information is in a suspended state. When it is monitored that the synchronization conditions are met, the on-track control program corresponding to the synchronization mechanism information is called to trigger the execution of the synchronization action bound to the synchronization condition.

[0010] On the other hand, a computer device is provided, which includes a memory and a processor, the memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory to implement the steps of the above-mentioned method for synchronous processing of the spacecraft in-orbit control program.

[0011] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the steps of the synchronization processing method of the on-orbit control program of the spacecraft are implemented.

[0012] On the other hand, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the steps of the above-mentioned method for synchronous processing of an on-orbit control program of a spacecraft.

[0013] The technical solution provided by the present invention can at least bring the following beneficial effects:

[0014] The on-track control program is implemented based on a scripting language. By configuring a synchronization mechanism for the on-track control program, the synchronization conditions and synchronization actions of the on-track control program are bound. The synchronization conditions in the synchronization mechanism information are monitored by the background. If the synchronization conditions are not met, the on-track control program is in a suspended state. Only when the synchronization conditions are met, the on-track control program is called to trigger the execution of the synchronization action bound to the synchronization conditions. It can be seen that in this solution, when the synchronization conditions are not met, the on-track control program is in a suspended state and does not occupy system resources. The on-track control program is called only when the synchronization conditions are met. Therefore, there is no need for the on-track control program to always wait online, thereby reducing the system resource occupancy rate and improving the concurrent scheduling performance of the on-track control program. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] 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 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.

[0016] Figure 1 It is a schematic diagram of a virtual architecture of a satellite-borne computer for realizing autonomous operation on orbit provided by an embodiment of the present invention;

[0017] Figure 2 It is a flow chart of a method for synchronously processing a spacecraft on-orbit control program provided by an embodiment of the present invention;

[0018] Figure 3It is a structural diagram of a synchronous processing device for an on-orbit control program of a spacecraft provided by an embodiment of the present invention;

[0019] Figure 4 It is a hardware architecture diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0021] Please refer to Figure 1 , which is a schematic diagram of the onboard computer architecture for achieving on-orbit autonomous operation. An on-orbit control program is formed for the status monitoring based on downlink telemetry data and the control based on uplink remote control commands performed by ground personnel. There can be multiple on-orbit control programs, and multiple on-orbit control programs are stored in the on-board memory. By adding an engine to the on-board software, the task running device in the on-board software is used to run the original task normally. When on-orbit autonomous operation is required, the engine creates a virtual machine, and creates a coroutine in the virtual machine to run the on-orbit control program, thereby achieving on-orbit autonomous control.

[0022] The onboard software has a control cycle, and the on-orbit control program has a scheduling cycle, and the scheduling cycle is N times the control cycle, where N is a positive integer. In each control cycle, the onboard software needs to run the original task, and after the original task is completed, a fixed time is allocated to the engine to run the on-orbit control program. In other words, an on-orbit control program is scheduled once in each scheduling cycle, and the scheduling point is within the fixed time allocated for each control cycle.

[0023] The decision basis for each operation control command in the on-orbit control program is the telemetry data obtained by the task running device to reflect the real-time operation status. That is to say, the control command in the on-orbit control program can only be executed when the telemetry data meets specific conditions. If the specific conditions are not met, it is necessary to wait until the special conditions are met. The concept of this synchronization mechanism comes from the operating system. The synchronization processing function requires the support of the operating system, but the script language and the script virtual machine itself do not support the synchronization mechanism. Therefore, the on-orbit control program implemented using the script language needs to expand the capabilities of the script language and increase the functional support for the synchronization mechanism. The synchronization processing required in the on-orbit control program does not involve synchronization between multiple tasks / multiple coroutines, but for an on-orbit control program itself "until A is satisfied, then start B", that is, in the coroutine, until the A state is satisfied, the next step B will be executed, otherwise it will wait. In order to be able to detect whether the A state is satisfied during the waiting period, the conventional operation is to ensure that the on-orbit control program is always in the CPU occupied state, so that B will be executed immediately when the A state is detected to be satisfied. However, if the on-orbit control program occupies the CPU while waiting, the concurrent scheduling performance of the on-orbit control program will be reduced.

[0024] In view of the above problems, the inventive concept of the present invention is that the synchronization mechanism of multiple on-track control programs running in the foreground is processed by the background of the virtual machine, the on-track control program is configured with a synchronization mechanism, the synchronization condition and the synchronization action have a binding relationship, and when the synchronization condition is not met, the background monitors whether the synchronization condition is met, the on-track control program is suspended and no longer occupies system resources, and the on-track control program is scheduled to execute the synchronization action only when the synchronization condition is met.

[0025] Then, the virtual machine may include two virtual devices, one is an on-track control device for running the on-track control program in the foreground, and the other is a synchronization processing device for performing the synchronization processing of the on-track control program of the embodiment of the present invention in the background.

[0026] The specific implementation of the above concept is described below.

[0027] Please refer to Figure 2 , an embodiment of the present invention provides a method for synchronously processing an on-orbit control program of a spacecraft, the method comprising:

[0028] Step 200, obtaining synchronization mechanism information of the on-orbit control program; the synchronization mechanism information includes synchronization conditions and synchronization actions having a binding relationship;

[0029] Step 202, monitor the synchronization conditions in the synchronization mechanism information. Before the synchronization conditions are met, the on-track control program corresponding to the synchronization mechanism information is in a suspended state. When it is detected that the synchronization conditions are met, the on-track control program corresponding to the synchronization mechanism information is called to trigger the execution of the synchronization action bound to the synchronization condition.

[0030] In the embodiment of the present invention, the on-track control program is implemented based on a scripting language. By configuring a synchronization mechanism for the on-track control program, the synchronization conditions and synchronization actions of the on-track control program are bound. The synchronization conditions in the synchronization mechanism information are monitored by the background. If the synchronization conditions are not met, the on-track control program is in a suspended state. Only when the synchronization conditions are monitored to be met, the on-track control program is called to trigger the execution of the synchronization action bound to the synchronization conditions. It can be seen that in this solution, when the synchronization conditions are not met, the on-track control program is in a suspended state and does not occupy system resources. The on-track control program is called only when the synchronization conditions are met. Therefore, there is no need for the on-track control program to always wait online, thereby reducing the system resource occupancy rate and improving the concurrent scheduling performance of the on-track control program.

[0031] Described below Figure 2 How the steps shown are performed.

[0032] The synchronization mechanism in the embodiment of the present invention may at least include: an event synchronization mechanism, and / or a waiting synchronization mechanism.

[0033] The event synchronization mechanism and the waiting synchronization mechanism are explained below respectively.

[0034] The first one is event synchronization mechanism.

[0035] In the embodiment of the present invention, when the on-track control program is written in a scripting language, the events of the on-track control program need to be described. After the on-track control program is loaded into the virtual machine, it needs to be initialized first. During the initialization process, a request can be made to create an event of the on-track control program. Specifically, when the synchronization processing device obtains the synchronization mechanism information of the on-track control program, it can include:

[0036] A1: receiving an event creation request sent by the coroutine of the on-orbit control program when the on-orbit control program is initialized; the event creation request carries an event ID, a trigger condition and a response action;

[0037] A2: Determine the category of the event based on the event ID; the categories include: global events and local events; global events are shared events of all on-track control programs, managed by a global event array, and the synchronization mechanism information of global events includes event ID, trigger conditions, response actions, and the status of the coroutine requesting to create the event; local events are private events of on-track control programs, and each on-track control program has a local event array to manage its private events, and the synchronization mechanism information of private events includes event ID, trigger conditions, and response actions;

[0038] A3: When the category is a global event, determine whether the event has been created in the global event array. If so, add the coroutine state currently requesting to create the event to the synchronization mechanism information of the global event. Otherwise, store the synchronization mechanism information of the global event in the global event array.

[0039] A4: When the category is a local event, determine whether the event has been created in the local event array corresponding to the on-track control program. If so, report an error; if not, store the synchronization mechanism information of the local event in the corresponding local event array.

[0040] In the embodiment of the present invention, an event is requested to be created during the initialization of the on-track control program. One on-track control program is executed by one coroutine. Multiple on-track control programs correspond to multiple coroutines one by one. During the initialization of the on-track control program, the coroutine sends the event to be created by the on-track control program to the synchronization processing device. In order to ensure which events need to be created during the initialization of the on-track control program, event creation needs to be edited according to a predefined grammatical form.

[0041] In one implementation, the syntax for event creation is: EVENT_CREATE(evtid:integer,trigger:function,[action:function]), which includes three description fields, namely event ID, trigger condition and response action, where event ID is an integer, trigger condition and response action are functions, and response action description field indicates the action to be performed after the condition specified in the trigger condition description field is met, and the action is optional.

[0042] In step A2, in one embodiment, the global events may include: onboard software global events and on-orbit control program global events; wherein, the onboard software global events are defined by the onboard software. That is to say, the on-orbit control program global events may also be defined in the original task of normal operation. In this way, when obtaining the synchronization mechanism information of the on-orbit control program, it also includes: obtaining the onboard software global events defined by the onboard software, which are managed by the onboard array.

[0043] It can be seen that in the embodiment of the present invention, the event categories include: onboard software global events, on-orbit control program global events and local events.

[0044] In order to determine the event category, the embodiment of the present invention can pre-configure the value ranges corresponding to event IDs of different categories, and determine which category the event to be created belongs to based on which value range the event ID is in.

[0045] For example, the value range of the event ID of the onboard software global event can be [0x2000, 0x2400);

[0046] The value range of the event ID of the global event of the on-track control program can be [0x3000, 0x3400);

[0047] The value range of the event ID of a local event can be [0x4000, 0x4100).

[0048] Since the event creation request carries an event ID, the category can be determined based on the value range of the event ID.

[0049] It should be noted that, since the onboard software global event is defined by the onboard software, if the event type created by the onboard control program's coroutine request is an onboard software global event, an error is reported.

[0050] In an embodiment of the present invention, when the on-orbit control program requests to create an event, in order to ensure the uniqueness of each event and prevent repeated creation of a certain event, it is necessary to determine whether the event requested to be created has been created. In order to be able to quickly determine whether an event has been created, different categories of events are managed separately. Among them, global events are managed by a global event array (in one implementation, the onboard software global events and the on-orbit control program global events are respectively managed by corresponding global event arrays), and local events are managed by the local event arrays of the corresponding on-orbit control programs. For example, the local events of on-orbit control program 1 are managed by local event array 1, and the local events of on-orbit control program 2 are managed by local event array 2...

[0051] Furthermore, when the number of events is large, it is necessary to traverse each event that has been created one by one, which is time-consuming. In one embodiment of the present invention, the event array is jointly managed with the corresponding event linked list, and the event linked list stores the index of the event ID.

[0052] Specifically, you can first use the event ID to search for the corresponding event list. If the event list does not include the event ID, it means that the event has not been created. If the event list includes the event ID, you can directly index into the corresponding event array to further determine whether the event stored in the event array is the same as the event to be created. If so, it means that the event has been created, otherwise an error is reported.

[0053] For the event synchronization mechanism, after the event is created, you can request to activate or deactivate the event. After the event is created, it can be activated by default. If you request to deactivate the event, the event is in an inactive state.

[0054] In one implementation, the syntax forms of requesting activation and deactivation of an event may be: EVENT_REF(evtid:integer) and EVENT_UNREF(evtid:integer), respectively. Both operations include only one description field, which is the event ID.

[0055] In one embodiment of the present invention, synchronization processing of an on-orbit control program is achieved by monitoring the created events, and the synchronization conditions in the synchronization mechanism information are monitored, which may specifically include: determining and traversing a target event that is in an activated state and whose trigger condition of the event is not marked, determining whether the trigger condition of the target event is met, and if so, marking the trigger condition of the target event, so as to schedule the on-orbit control program based on the marked trigger condition and the bound unmarked response action, and when it is determined that the on-orbit control program has executed the response action in the target event, marking the response action of the target event.

[0056] In order to prevent the event from being monitored again because the event has already met the trigger condition, it is necessary to mark the trigger conditions in the event that does not need to be monitored; in addition, it is also necessary to mark the response action that has been executed. This is because the on-orbit control program is only scheduled for execution within a fixed duration in each control cycle. The monitoring of the event is in the non-scheduling period. During the non-scheduling period, only the unmarked trigger conditions are monitored. When the trigger condition is detected to be met in the non-scheduling interval, the trigger condition is marked, indicating that the marked trigger condition will not be monitored next; during the scheduling of the on-orbit control program, the on-orbit control program can be scheduled according to the marked trigger condition and the bound unmarked response action. After the response action is executed, the response action is marked, thus ensuring that the event has been processed.

[0057] Furthermore, in addition to the above-mentioned activation and deactivation requests for events, it is also possible to request a state reset and active triggering of an event.

[0058] Among them, the state reset is used to clear the marks of the trigger condition and response action in the event so as to reuse the event. Active triggering is to directly and actively execute the response action without satisfying the trigger condition.

[0059] In one implementation, the syntax forms of state reset and active triggering can be: EVENT_RESET(evtid:integer) and EVENT_RAISE(evtid:integer), respectively. Both operations include only one description field, which is the event ID.

[0060] Furthermore, when the on-track control program completes its operation, the events created by the on-track control program need to be cleared, specifically:

[0061] Traverse the global event array used to manage global events of the on-track control program, check the coroutine state of each event stored in the global event array, determine whether there is a coroutine of the on-track control program, and if there is only this coroutine, delete the event; if there is and there are other coroutines, remove the coroutine state of the on-track control program in the event;

[0062] Deleting the event from the local event array used for managing the local events of the on-orbit control program;

[0063] When there is a global event of the onboard software, the global event array used to manage the global events of the onboard software is traversed, and the coroutine status of each event stored in the global event array is checked to determine whether there is a coroutine of the on-orbit control program. If there is only this coroutine, the event is deactivated and the coroutine status in the event is deleted; if there are and there are other coroutines, the coroutine status of the on-orbit control program in the event is removed.

[0064] The above completes the description of the event synchronization mechanism. The following will continue to describe the waiting synchronization mechanism.

[0065] The second is waiting for synchronization mechanism.

[0066] In an embodiment of the present invention, when writing an on-track control program using a scripting language, it is necessary to describe the waiting synchronization statement of the on-track control program. When the synchronization mechanism is a waiting synchronization mechanism, the synchronization condition is a waiting condition, and the synchronization action is an execution action. The waiting synchronization information corresponding to the waiting synchronization mechanism includes a waiting condition and an execution action. Among them, the waiting synchronization information is created when the coroutine of the on-track control program runs to the waiting synchronization statement in the running program interval.

[0067] Then, the obtaining of the synchronization mechanism information of the on-track control program may include: obtaining the waiting synchronization information created by the coroutine of the on-track control program during the execution of the program.

[0068] It can be seen that the acquisition time nodes of waiting synchronization information and events are different. Waiting synchronization information is obtained during the operation of the orbit control program, and events are obtained during the initialization process before the orbit control program runs.

[0069] In one embodiment of the present invention, when the synchronization condition in the synchronization mechanism information is monitored, it may specifically include:

[0070] Determine the delay category of the waiting condition in the waiting synchronization information, where the delay category includes at least one or more of: waiting for a time period, waiting for an absolute time, waiting for a group of conditions to be satisfied, and waiting for a group of events to occur;

[0071] According to the delay category of the waiting condition in the waiting synchronization information, whether the waiting condition is satisfied is monitored.

[0072] In one implementation, the grammatical form of the wait synchronization statement may be: WAIT(second:integer|obtime:double|cond:function|({evtid:integer}, logop:or|and),[action:function]); including two description fields of the wait condition and the execution action.

[0073] In the embodiment of the present invention, the waiting condition has delay categories, and different delay categories require different monitoring methods to be implemented. Specifically:

[0074] When the delay type of the waiting condition in the waiting synchronization information is waiting for a time period, whether the waiting condition is met is determined based on the creation time of the waiting synchronization information and the current system time; the time period is usually an integer number of seconds;

[0075] When the delay type of the waiting condition in the waiting synchronization information is waiting for an absolute time, whether the waiting condition is satisfied is determined based on the current system time; the absolute time is the on-board time, and usually, the absolute time is a floating point number;

[0076] When the delay category of the waiting condition in the waiting synchronization information is waiting for a group of conditions to be met, and the group of conditions is implemented by a condition function, the condition function corresponding to the group is executed to determine whether the waiting condition is met;

[0077] When the delay type of the waiting condition in the waiting synchronization information is waiting for a group of events to occur, the group of events is monitored, and when it is determined that the logical relationship in the group of events is satisfied, it is determined that the waiting condition is satisfied. The logical relationship may be a logical OR or a logical AND.

[0078] In an embodiment of the present invention, when the on-track control program is scheduled to run, when it runs to a wait synchronization statement, it requests to create wait synchronization information. At this time, it monitors whether the wait condition in the wait synchronization information is met. If not, the coroutine running the on-track control program is suspended and execution is paused to wait for the next scheduling.

[0079] Since the on-orbit control program has a fixed scheduling cycle, there is always an objective delay error in determining whether the waiting condition is met during the scheduling cycle. The accuracy of the delay error is the duration corresponding to the scheduling cycle. For example, if the scheduling cycle is 1 second, then the delay is expected to be n seconds. The worst case actual delay effect is a delay of n+1 seconds, which is acceptable for on-orbit operation scenarios.

[0080] In one embodiment of the present invention, in order to improve the delay accuracy, during each on-track control program scheduling interruption, it can be determined whether the waiting condition corresponding to the on-track control program for waiting for synchronization information is met. If it is met, after the execution action of the waiting condition is executed, the coroutine of the on-track control program is suspended, and the execution of the on-track control program is suspended to wait for the operation after the execution action at the next scheduling. In this way, the delay error can be reduced within one scheduling cycle.

[0081] The embodiment of the present invention realizes two functions, event synchronization and waiting synchronization, in a satellite-borne embedded environment without the need for operating system support by binding synchronization conditions with synchronization actions, thereby greatly improving the performance of concurrent operation of on-orbit control programs, and making the on-orbit control program have higher responsiveness than the operation process of manually judging the operating status of a spacecraft on the ground when specific conditions are met.

[0082] Please refer to Figure 3 The embodiment of the present invention provides a synchronous processing device for an on-orbit control program of a spacecraft, the device comprising:

[0083] The acquisition unit 300 is used to acquire synchronization mechanism information of the on-track control program; the synchronization mechanism information includes synchronization conditions and synchronization actions having a binding relationship;

[0084] The synchronization processing unit 302 is used to monitor the synchronization conditions in the synchronization mechanism information. Before the synchronization conditions are met, the on-track control program corresponding to the synchronization mechanism information is in a suspended state. When it is detected that the synchronization conditions are met, the on-track control program corresponding to the synchronization mechanism information is called to trigger the execution of the synchronization action bound to the synchronization condition.

[0085] In one embodiment of the present invention, the synchronization mechanism is an event synchronization mechanism; the acquisition unit is specifically used for:

[0086] Receive an event creation request sent by the coroutine of the on-orbit control program when the on-orbit control program is initialized; the event creation request carries an event ID, a trigger condition, and a response action;

[0087] Determine the category of the event based on the event ID; the categories include: global events and local events; global events are shared events of all on-track control programs, managed by a global event array, and the synchronization mechanism information of global events includes event ID, trigger conditions, response actions, and the state of the coroutine requesting to create the event; local events are private events of on-track control programs, and each on-track control program has a local event array to manage its private events, and the synchronization mechanism information of private events includes event ID, trigger conditions, and response actions;

[0088] When the category is a global event, determine whether the event has been created in the global event array. If so, add the coroutine state currently requesting to create the event to the synchronization mechanism information of the global event. Otherwise, store the synchronization mechanism information of the global event in the global event array.

[0089] When the category is a local event, it is determined whether the event has been created in the local event array corresponding to the on-track control program. If so, an error is reported; if not, the synchronization mechanism information of the local event is stored in the corresponding local event array.

[0090] In one embodiment of the present invention, the global event includes an onboard software global event and an on-orbit control program global event; the onboard software global event is defined by the onboard software;

[0091] The acquisition unit is also used to: acquire onboard software global events defined by the onboard software, which are managed by the onboard array;

[0092] If the event type created by the coroutine request of the on-orbit control program is a global event of the onboard software, an error is reported;

[0093] And / or, the event array is jointly managed with the corresponding event linked list, and the event linked list stores the index of the event ID.

[0094] In one embodiment of the present invention, the state of the created event includes an activated state and an inactivated state; the synchronization condition is a trigger condition, and the synchronization action is a response action;

[0095] When the synchronization processing unit monitors the synchronization condition in the synchronization mechanism information, the following steps are specifically performed:

[0096] Determine and traverse a target event that is in an activated state and whose trigger condition is not marked, determine whether the trigger condition of the target event is satisfied, and if satisfied, mark the trigger condition of the target event to schedule the on-orbit control program based on the marked trigger condition and the bound unmarked response action, and mark the response action of the target event after determining that the on-orbit control program has executed the response action in the target event.

[0097] In one embodiment of the present invention, the synchronization mechanism is a waiting synchronization mechanism; the synchronization condition is a waiting condition, and the synchronization action is an execution action;

[0098] The acquisition unit is specifically used to: acquire the waiting synchronization information created by the coroutine of the on-track control program during the running of the program; the waiting synchronization information includes: waiting conditions and execution actions.

[0099] In one embodiment of the present invention, when the synchronization processing unit monitors the synchronization condition in the synchronization mechanism information, the following steps are specifically performed:

[0100] Determine the delay category of the waiting condition in the waiting synchronization information, where the delay category includes at least one or more of: waiting for a time period, waiting for an absolute time, waiting for a group of conditions to be satisfied, and waiting for a group of events to occur;

[0101] According to the delay category of the waiting condition in the waiting synchronization information, whether the waiting condition is satisfied is monitored.

[0102] It should be noted that the synchronization processing device for the on-orbit control program of a spacecraft provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the synchronization processing device for the on-orbit control program of a spacecraft provided in the above embodiment and the synchronization processing method embodiment of the on-orbit control program of a spacecraft belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0103] The embodiment of the present application also provides a computer device, please refer to Figure 4 The computer device includes a processor and a memory, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, at least one program, a code set or an instruction set is loaded and executed by the processor to implement the synchronous processing method of the spacecraft on-orbit control program provided by the above-mentioned method embodiments.

[0104] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the synchronous processing method of the space vehicle on-orbit control program provided by the above-mentioned method embodiments.

[0105] An embodiment of the present application also provides a computer program product, which includes a computer program. A processor of a computer device reads the computer program from a computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the synchronization processing method of the space vehicle in-orbit control program described in any of the above embodiments.

[0106] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0107] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0108] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0109] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for synchronously processing a spacecraft on-orbit control program, characterized in that: The method comprises: Acquiring synchronization mechanism information of an on-orbit control program; the synchronization mechanism information includes synchronization conditions and synchronization actions having a binding relationship; The synchronization conditions in the synchronization mechanism information are monitored. Before the synchronization conditions are met, the on-track control program corresponding to the synchronization mechanism information is in a suspended state. When it is detected that the synchronization conditions are met, the on-track control program corresponding to the synchronization mechanism information is called to trigger the execution of the synchronization action bound to the synchronization condition.

2. The method according to claim 1, characterized in that The synchronization mechanism is an event synchronization mechanism; The step of obtaining the synchronization mechanism information of the on-orbit control program includes: Receive an event creation request sent by the coroutine of the on-orbit control program when the on-orbit control program is initialized; the event creation request carries an event ID, a trigger condition, and a response action; Determine the category of the event based on the event ID; the categories include: global events and local events; global events are shared events of all on-track control programs, managed by a global event array, and the synchronization mechanism information of global events includes event ID, trigger conditions, response actions, and the state of the coroutine requesting to create the event; local events are private events of on-track control programs, and each on-track control program has a local event array to manage its private events, and the synchronization mechanism information of private events includes event ID, trigger conditions, and response actions; When the category is a global event, determine whether the event has been created in the global event array. If so, add the coroutine state currently requesting to create the event to the synchronization mechanism information of the global event. Otherwise, store the synchronization mechanism information of the global event in the global event array. When the category is a local event, it is determined whether the event has been created in the local event array corresponding to the on-track control program. If so, an error is reported; if not, the synchronization mechanism information of the local event is stored in the corresponding local event array.

3. The method according to claim 2, characterized in that The global events include onboard software global events and on-orbit control program global events; the onboard software global events are defined by onboard software; The obtaining of synchronization mechanism information of the on-orbit control program further includes: obtaining on-board software global events defined by the on-board software, which are managed by the on-board array; If the event type created by the coroutine request of the on-orbit control program is a global event of the onboard software, an error is reported; And / or, the event array is jointly managed with the corresponding event linked list, and the event linked list stores the index of the event ID.

4. The method according to claim 2, characterized in that: The status of the created event includes the activated state and the deactivated state; the synchronization condition is the trigger condition, and the synchronization action is the response action; Monitoring the synchronization condition in the synchronization mechanism information includes: Determine and traverse a target event that is in an activated state and whose trigger condition is not marked, determine whether the trigger condition of the target event is satisfied, and if satisfied, mark the trigger condition of the target event to schedule the on-orbit control program based on the marked trigger condition and the bound unmarked response action, and mark the response action of the target event after determining that the on-orbit control program has executed the response action in the target event.

5. The method according to claim 1, characterized in that: The synchronization mechanism is a waiting synchronization mechanism; the synchronization condition is a waiting condition, and the synchronization action is an execution action; The obtaining of synchronization mechanism information of the on-track control program includes: obtaining waiting synchronization information created by the coroutine of the on-track control program during the running of the program; the waiting synchronization information includes: waiting conditions and execution actions.

6. The method according to claim 5, characterized in that Monitoring the synchronization condition in the synchronization mechanism information includes: Determine the delay category of the waiting condition in the waiting synchronization information, where the delay category includes at least one or more of: waiting for a time period, waiting for an absolute time, waiting for a group of conditions to be satisfied, and waiting for a group of events to occur; According to the delay category of the waiting condition in the waiting synchronization information, whether the waiting condition is satisfied is monitored.

7. A synchronous processing device for an on-orbit control program of a spacecraft, characterized in that: The device comprises: An acquisition unit, used to acquire synchronization mechanism information of an on-orbit control program; the synchronization mechanism information includes synchronization conditions and synchronization actions having a binding relationship; The synchronization processing unit is used to monitor the synchronization conditions in the synchronization mechanism information. Before the synchronization conditions are met, the on-track control program corresponding to the synchronization mechanism information is in a suspended state. When it is monitored that the synchronization conditions are met, the on-track control program corresponding to the synchronization mechanism information is called to trigger the execution of the synchronization action bound to the synchronization condition.

8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory to implement the steps of any one of the methods described in claims 1-6.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The method comprises a computer program, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.