A method and system for logical time management services for federated trials

By setting time control and constraint policies in the joint testing platform, participants request logical time advancement according to preset step sizes, which solves the problem of the lack of logical time management in middleware, achieves efficient logical time synchronization and consistency management, and expands the application scope of middleware.

CN120086036BActive Publication Date: 2025-12-12HARBIN INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510159282.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-12-12
Estimated Expiration
2045-02-13

AI Technical Summary

Technical Problem

The existing joint testing platform middleware lacks support for logical time management, which leads to application limitations.

Method used

A logical time management service method is provided. By setting time control policies and time-limited policies, participants initiate logical time advancement requests to the middleware according to preset time steps. The middleware checks permissions and processes related requests, updates the timestamp lower limit, and processes the message queue to ensure the synchronization and consistency of logical time.

Benefits of technology

It achieves efficient and accurate logical time management, improves the synchronization and consistency of the joint testing platform middleware, and expands its application scope and scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120086036B_ABST
    Figure CN120086036B_ABST
Patent Text Reader

Abstract

The application discloses a logical time management service method and system for joint tests, wherein participants set time control strategies and time limited strategies, and initiate logical time advancing requests and request processing callback requests to middleware according to preset time steps, and register callback functions; a time adjuster calculates a timestamp lower limit to provide data guarantee for time advancing; the middleware receives the logical time advancing requests, checks whether the participants have the right of the time control strategies, updates the current timestamp lower limit, receives the processing callback requests, checks FIFO queues and processes queue messages, checks the time limited strategies of the participants, checks TSO queue states and processes queue messages, checks the relationship between the time requested by the participants and the timestamp lower limit, and calls the callback functions allowed by the time advancing to the participants; the application provides an efficient and accurate logical time management mechanism, and solves the problem that the middleware of the existing joint test platform does not support logical time management.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of joint test, in particular to a logical time management service method and system for joint test. BACKGROUND

[0002] The joint test platform middleware is responsible for the establishment and operation of the entire joint test system during all communications, is a public facility of the joint test platform, and can provide a high-performance, low-latency data environment between joint test system resources and application management control functions for comprehensive test system.

[0003] In joint test, real-time time and logical time are two different time mechanisms; the logical time mechanism is suitable for those that do not need to be synchronized with the actual world time. Using logical time can enable these distributed systems to simulate in a coordinated and unified manner without relying on a single physical clock. Logical time can ensure that each participating simulation model occurs in the designed time sequence through a synchronization mechanism.

[0004] However, the existing joint test platform lacks support for logical time functions. When participants in the system need to use logical time to advance, the middleware does not support logical time management services, and therefore there are limitations in application.

[0005] Therefore, how to provide an efficient and accurate logical time management mechanism to enable the joint test platform middleware to support logical time management is a problem that those skilled in the art need to solve. SUMMARY

[0006] Therefore, the present application provides a logical time management service method and system for joint test, which provides an efficient and accurate logical time management mechanism to solve the problem that the existing joint test platform middleware does not support logical time management.

[0007] To achieve the above purpose, the present application adopts the following technical solutions:

[0008] A logical time management service method for joint test, comprising the following steps:

[0009] S1. Set the time control strategy and the time limited strategy, and the participants initiate a logical time advance request to the middleware according to the preset time step to advance the new logical time;

[0010] S2. The middleware checks whether the participant has the authority of the time control strategy. If the participant is the time control strategy, go to step S3, if the participant is not the time control control strategy, go to step S4;

[0011] S3. The middleware processes the request with time control authority, the middleware updates the current lower bound of timestamp, and the time advance type of the participant who initiates the time advance is updated to time advance request service (TAR);

[0012] S4. The participant initiates a request to the middleware for processing callback, and registers the callback function, the middleware checks the state of the message queue, and determines whether there is a message to be processed;

[0013] S5. Check whether the FIFO queue is empty, if the FIFO queue is not empty, process the message in the FIFO queue, the middleware takes the message from the head of the FIFO queue, and according to the message type, initiates a request to call the callback function, and goes to step S4;

[0014] If the FIFO queue is empty, check whether the participant is part of the time-limited strategy, if not, go to step S8, if yes, go to step 6;

[0015] S6. Process the message in the TSO queue, the system processes all TSO messages whose timestamps are less than or equal to the minimum value of the lower bound of timestamp (LBTS) and the participant's request time, and according to the message type, initiates a request to call the callback function to the participant, and goes to step S4;

[0016] S7. Check the relationship between the participant's request time and the LBTS, if the request time is less than the LBTS, go to step S8, if the request time is greater than or equal to the LBTS, go to step S4, and send the request in a loop until the request time is less than the LBTS;

[0017] S8. The middleware calls the callback function of the participant to allow time advance, and changes the time advance type of the participant to no time advance, and ends the processing process.

[0018] Preferably, the time control strategy is specifically:

[0019] If the original state is a non-time-limited participant:

[0020] Let the current minimum advanceable time of the test system be LBTSG, and the effective logical time of the participant be ELT = LogicTime + Lookahead, LogicTime represents the minimum logical time of the participant to apply to become a time control participant, and Lookahead is the expected minimum time step of the participant;

[0021] If ELT ≥ LBTSG, set the logical time of the participant to LogicTime;

[0022] If ELT < LBTSG, the participant's logical time is advanced directly to LBTSG at join, in line with the system's minimum time;

[0023] If the original state is a time-constrained participant:

[0024] The start time of time control, LogicTime, is in line with the participant's current logical time;

[0025] If ELT < LBTSG, the participant's logical time is advanced directly to LBTSG at join, in line with the system's minimum time;

[0026] If ELT > LBTSG, the participant's logical time is advanced directly to LBTSG, at which point ELT = LBTSG + Lookahead, and then becomes a valid time-constrained participant with LogicTime = LBTSG.

[0027] Preferably, the time-constrained strategy is as follows:

[0028] If the original state is a non-time-constrained participant:

[0029] When LogicTime < LBTSG, the participant's logical time is directly adjusted to the minimum advanceable time LBTSG, and it immediately becomes a time-constrained participant;

[0030] When LogicTime > LBTSG, the system suspends the participant until the system's LBTS advances to the participant's logical time, i.e. LogicTime < LBTSG. Once the condition is met, the system middleware calls back the TimeConstrainedEnabled() service, so that the participant becomes a time-constrained participant and is allowed to receive timestamp-ordered TSO messages;

[0031] If the original state is a time-constrained participant:

[0032] When LogicTime < LBTSG, the participant directly switches to the time-constrained state, with the logical time remaining unchanged, and immediately becomes a legal TSO message receiver;

[0033] When LogicTime > LBTSG, the participant calculates a new LBTS value based on the current situation. If the calculated value satisfies LogicTime ≤ LBTSG, the participant switches to the time-constrained state. Otherwise, the participant is suspended until the system's LBTS advances to a point after the participant's logical time, i.e., LogicTime ≤ LBTSG. The system middleware then reactivates the participant to the time-constrained state by calling back the TimeConstrainedEnabled() service.

[0034] Preferably, the message logic flow in the middleware is as follows:

[0035] Participant 1 sends messages to participant n through other functional modules of the middleware;

[0036] The time management module determines the message sorting type based on the message sorting mechanism and puts the message into the message queue of participant n, including TSO message queue or RO message queue. The RO queue is a first-in-first-out (FIFO) queue.

[0037] Participant n invokes the middleware's time-advancement request service TAR;

[0038] The time management module calculates the lower bound timestamp (LBTS) of participant n. If the message meets the sending conditions, the message is sent to participant n.

[0039] Once all eligible messages in the message queue have been sent and the LBTS is greater than the time requested by participant n, the middleware will call back the participant's service TAG, allowing the participant to proceed at time n.

[0040] Preferably, the middleware operations under time management include: allowing time to advance, sending TSO messages, and pending matters;

[0041] In the advance-allowed state, if the time requested by a participant is less than LBTS and the timestamp of the head message, the middleware allows the participant to advance its logical time. In the TSO data sending state, if the timestamp of the head message is less than t and LBTS, the message fully meets the sending conditions, and the middleware will send the message. In the pending state, if the request time and the timestamp of the head message are greater than or equal to LBTS, the middleware will prohibit the sending of TSO messages and the advancement of the participant's logical time.

[0042] Preferably, the participant's lower timestamp limit (LBTS) represents the participant's maximum safe time advance value, meaning that the participant will not receive TSO messages with timestamp values ​​less than this value in the future. The calculation method is as follows:

[0043]

[0044] The lower bound timestamp (LBTS) of the experimental system is the minimum LBTS of all participants:

[0045] LBTS = Min(LBTS i i = 1, 2,..., n.

[0046] A logical time management service system for joint test based on the logical time management service method for joint test, comprising a participant, a middleware, a time adjuster and a message queue;

[0047] The participant is configured to set a time control strategy and a time limited strategy, and initiate a logical time advancing request to the middleware according to a preset time step to advance a new logical time; and initiate a request for processing callback to the middleware and register a callback function.

[0048] The time adjuster is configured to calculate a lower bound of time stamp LBTS for time management, and provide data guarantee for time advancing.

[0049] The middleware is configured to receive a logical time advancing request, check whether the participant has the right of time control strategy, and update a current lower bound of time stamp; receive a request for processing callback initiated by the participant, check a message queue state, check a FIFO queue, process messages in the FIFO queue, check whether the participant is a time limited strategy, check a TSO queue state, process messages in the TSO queue, check a relationship between a time requested by the participant and the LBTS, and call a callback function allowing time advancing to the participant.

[0050] Preferably, the middleware comprises a time management module and a time sorting mechanism; and the message queue comprises a TSO message queue and a RO message queue, and the RO queue is a first-in first-out FIFO queue.

[0051] Compared with the prior art, the logical time management service method and system for joint test provided by the present application can flexibly set and update time management strategies by the local participant based on the logical time management service based on time steps, and can request time advancing according to a preset time step, so as to coordinate simulation activities of each member in the simulation process and ensure synchronization and consistency of the simulation process; the logical time management service of the middleware of the joint test platform is expanded, an efficient and accurate logical time management mechanism is provided, the performance in logical time synchronization and management is significantly improved, and the application range and scalability of the middleware are expanded. BRIEF DESCRIPTION OF DRAWINGS

[0052] In order to make the technical solutions in the embodiments of the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the accompanying drawings in the following description only aim at the embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative effort based on the provided drawings.

[0053] Figure 1 Time advancing flow chart based on step length provided by the present application;

[0054] Figure 2 Request time step advancing sequence chart provided by the present application;

[0055] Figure 3 Request processing callback timing chart provided by the present application;

[0056] Figure 4 Time control strategy implementation flow chart provided by the present application;

[0057] Figure 5 Time limited strategy implementation flow chart provided by the present application;

[0058] Figure 6 Logical flow chart of messages in middleware provided by the present application;

[0059] Figure 7 Participant message queue data structure schematic diagram provided by the present application;

[0060] Figure 8 Execution operation condition schematic diagram of middleware provided by the present application;

[0061] Figure 9 Static structure design diagram of middleware logical time management service provided by the present application. DETAILED DESCRIPTION

[0062] The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort belong to the scope of protection of the present application.

[0063] The embodiments of the present application disclose a logical time management service method for joint test, like Figures 1-3 , comprising the following steps:

[0064] S1. Setting time control strategy and time limited strategy, participants initiate logical time advancing request to middleware according to preset time step length to advance new logical time;

[0065] S2. The middleware checks whether the participant has the right of time control strategy, if the participant is the time control strategy, go to step S3, if the participant is not the time control strategy, go to step S4;

[0066] S3. The middleware processes the request with the right of time control, the middleware updates the lower limit of the current timestamp, and updates the time advance type of the participant who initiates the time advance to the time advance request service TAR;

[0067] S4. The participant initiates the request processing callback request to the middleware, and registers the callback function, the middleware checks the message queue state, and decides whether there is a message to be processed;

[0068] S5. Check whether the FIFO queue is empty, if the FIFO queue is not empty, process the message in the FIFO queue, the middleware takes the message from the head of the FIFO queue, and according to the message type, initiates the request of calling the callback function, and goes to step S4;

[0069] If the FIFO queue is empty, check whether the participant is part of the time limited strategy, if not, go to step S8, if yes, go to step 6;

[0070] S6. Process the message in the TSO queue, the system processes all TSO messages whose timestamps are less than or equal to the minimum value of the lower limit of the timestamp LBTS and the participant request time, that is, Min(LBTS, participant request time), and according to the message type, initiates the request of calling the callback function to the participant, and goes to step S4;

[0071] S7. Check the relationship between the participant request time and the LBTS, if the request time is less than the LBTS, go to step S8, if the request time is greater than or equal to the LBTS, go to step S4, and the request is sent in a loop until the request time is less than the LBTS;

[0072] S8. The middleware calls the callback function of allowing time advance to the participant, and changes the time advance type of the participant to no time advance, and ends the processing process.

[0073] In order to further implement the above technical solutions, such as Figure 4 The time control strategy is specifically: in the logical time management, all federal members have independent time control strategies, when a new time control participant joins the system, the participant broadcasts an empty message with a timestamp to other nodes, and other participants include the participant in the time control strategy list. The time limited participant needs to participate in the calculation of the minimum advanceable time LBTS according to the updated list.

[0074] When a participant applies to become a time regulation participant, its effective logical time ELT must not be less than the current system's LBTS, otherwise it can cause system time rollback, thus violating the rule of logical time advancement; correspondingly, if the participant also belongs to a time limited participant, its logical time advancement range must not exceed the LBTS of the trial system, thus the logical time of the participant needs to be kept within the range allowed by the system, i.e. not less than LBTS and not more than LBTS.

[0075] The setting of a time regulation participant is implemented by calling the service enableTimeRegulation(LogicTime, Lookahead), where LogicTime represents the minimum logical time at which the participant applies to become a time regulation participant, and Lookahead is the participant's expected minimum time step, and the calling service includes the following two cases:

[0076] If the original state is a non-time limited participant:

[0077] Let the current minimum advanceable time LBTS of the trial system be LBTSG, and the participant's effective logical time ELT = LogicTime + Lookahead, where LogicTime represents the minimum logical time at which the participant applies to become a time regulation participant, and Lookahead is the participant's expected minimum time step;

[0078] If ELT ≥ LBTSG, set the participant's logical time to LogicTime;

[0079] If ELT < LBTSG, directly advance the participant's logical time to LBTSG when joining, so as to keep consistent with the system's minimum time;

[0080] If the original state is a time limited participant:

[0081] The starting time LogicTime of time regulation is kept consistent with the participant's current logical time;

[0082] If ELT ≤ LBTSG, the participant will advance its current logical time to LBTSG when becoming a time regulation participant, so as to ensure that the timestamp order TSO messages sent after this logical time are valid;

[0083] If ELT > LBTSG, the participant's logical time is directly advanced to LBTSG, at this time ELT = LBTSG + Lookahead, and then becomes an effective time regulation participant with LogicTime = LBTSG.

[0084] In order to further implement the above technical solutions, such as Figure 5, the time-constrained policy is as follows:

[0085] In the logical time management, a participant can be set as a time-constrained participant by calling the enableTimeConstrained() service. All participants maintain a list of time-constrained participants, so when a participant is set as a time-constrained participant, it can immediately calculate its minimum advanceable time LBTS based on the list and quickly complete the state switching. Assuming that the current logical time of the participant is LogicTime and the LBTS of the test system is LBTSG, the specific steps include:

[0086] If the original state is a non-time-constrained participant:

[0087] When LogicTime < LBTSG, the logical time of the participant is directly adjusted to the minimum advanceable time LBTSG, and the participant becomes a time-constrained participant immediately.

[0088] When LogicTime > LBTSG, the system suspends the participant until the LBTS of the system advances to the logical time of the participant, i.e., LogicTime ≤ LBTSG. Once the condition is met, the system middleware calls back the TimeConstrainedEnabled() service to make the participant a time-constrained participant and allow it to receive timestamp-ordered TSO messages.

[0089] If the original state is a time-constrained participant:

[0090] When LogicTime ≤ LBTSG, the participant directly switches to the time-constrained state, the logical time remains unchanged, and it becomes a legal TSO message receiver immediately.

[0091] When LogicTime > LBTSG, the participant calculates a new LBTS value according to the current situation. If the calculation satisfies LogicTime ≤ LBTSG, the participant switches to the time-constrained state. Otherwise, the participant is suspended until the LBTS of the system advances to the logical time of the participant, i.e., LogicTime ≤ LBTSG, and the system middleware activates the participant as a time-constrained participant by calling the TimeConstrainedEnabled() service again.

[0092] In the test system, each participant corresponds to a change / interaction information flow of the subscription object attribute thereof; after the message reaches the middleware, the message is taken over by the time management module, the ordering type of the message is determined, and the message is put into the message queue of the participant; the middleware does not immediately send the message, but after the participant sends a clear time advancing request to the middleware, the ordering type of the message is determined again, and the lower bound of the time stamp of the participant is calculated, and then all RO messages are unconditionally sent and TSO messages are conditionally selected to be sent, until all messages are sent, the middleware calls the user function TAG to allow the user to advance the logical time.

[0093] In order to further implement the above technical solution, the logical flow of the message in the middleware is as follows: Figure 6

[0094] The participant 1 sends a message to the participant n through other functional modules of the middleware;

[0095] The time management module determines the ordering type of the message according to the message ordering mechanism, and puts the message into the message queue of the participant n, including the TSO message queue or the RO message queue, and the RO queue is a first-in first-out (FIFO) queue, as shown in Figure 7 ;

[0096] The participant n calls the time advancing request service TAR of the middleware;

[0097] The time management module calculates the lower bound LBTS of the time stamp of the participant n, and if the message meets the sending condition, the message is sent to the participant n;

[0098] After the messages meeting the condition in the message queue are sent, and the LBTS is greater than the time requested to be advanced by the participant n, the middleware calls the participant service TAG to allow the participant n to advance the time.

[0099] In the embodiment, the data structure of the message queue is as shown in Figure 7 The middleware establishes two message queues for each federation member, one is the RO message queue, and the other is the TSO message queue, and the specific process is as follows: when initialized, the middleware creates a participant list to store the related information of the joined participants; each participant in the participant list contains a pointer to the instance of the participant queue class (Queues), and the instance of the participant queue class contains an RO message queue and a TSO message queue, wherein the RO queue is a first-in first-out (FIFO) queue, and each queue has a head pointer and a tail pointer for dequeuing and enqueuing operations; the queue class also provides queue operation methods, such as message joining, pushing, querying, and message type determination.

[0100] In order to further implement the above technical solution, the logical flow of the message in the middleware is as follows: Figure 8 ​The operation of the middleware under time management includes: allowing time advancing, sending TSO message and pending;

[0101] In the advancing allowed state, the participant's request time is less than the timestamp of the head message and the LBTS, the middleware allows the participant to advance its logical time; in the TSO data sending state, the timestamp of the head message is less than t and the LBTS, the message completely satisfies the sending condition, and the middleware will send the message; in the pending state, when the request time and the timestamp of the head message are greater than or equal to the LBTS, the middleware will prohibit the sending of the TSO message and the advancing of the participant's logical time.

[0102] In the embodiment, as Figure 8 The TSO message grouping in the middle is specific, Head represents the timestamp of the head message, t is the time of the participant's request advancing, the arrow to the left represents less than, the arrow to the right represents greater than, the white dot represents the strict less than relationship, the timestamp of the message at the head of the TSO queue represents the minimum timestamp of the message in the TSO queue, the LBTS represents the minimum timestamp of the message to be received, and the time of the participant's request advancing represents the maximum timestamp of the TSO message to be sent; the six situations in the figure include all possible values of the timestamp Head of the head message, the LBTS and the time t of the participant's request advancing, and are considered in three situations: (1) Figure 8 1 and 2 in the middle, Head≤LBTS; (2) Figure 8 3 and 4 in the middle, Head>LBTS; (3) 5 and 6, in these groupings, t includes all time values on the time axis; (1) and (2) include all cases of the LBTS and the Head; (3) represents that the TSO queue is empty and there is no TSO message.

[0103] In order to further implement the above technical scheme, the lower limit LBTS of the timestamp of the participant represents the maximum safe time advancing value of the participant, in the future, no TSO message with a timestamp value less than the value will be received, and the calculation method is:

[0104]

[0105] The lower limit LBTS of the timestamp of the test system is the minimum value of the LBTS of all participants:

[0106] LBTS=Min(LBTS i )i=1,2,...,n.

[0107] A logical time management service system for joint testing, as Figure 9 , based on a logical time management service method for joint testing, includes a participant, middleware, a time regulator and a message queue;

[0108] The participant is configured to set a time control strategy and a time limited strategy, and to send a logical time advancing request to the middleware according to a preset time step to advance a new logical time; and to send a request for a request processing callback to the middleware and register a callback function;

[0109] The time adjuster is configured to calculate a lower bound time stamp (LBTS) of time management, and to provide data guarantee for time advancing;

[0110] The middleware is configured to receive a logical time advancing request, to check whether the participant has the right of time control strategy, and to update a current lower bound time stamp; to receive a processing callback request sent by the participant, to check a message queue state, to check a FIFO queue, to process a message in the FIFO queue, to check whether the participant is a time limited strategy, to check a TSO queue state, to process a message in the TSO queue, to check a relationship between a participant request time and the LBTS, and to call a callback function allowing time advancing to the participant.

[0111] To further implement the above technical solution, the middleware comprises a time management module and a time ordering mechanism; and the message queue comprises a TSO message queue and a RO message queue, and the RO queue is a first in first out (FIFO) queue.

[0112] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts of each embodiment can be referred to each other. For the device disclosed by the embodiments, since it corresponds to the method disclosed by the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0113] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for a logical time management service for joint trials, characterized by, The method comprises the following steps: S1. Setting a time control strategy and a time limited strategy, a participant initiates a logical time advancing request to middleware according to a preset time step to advance a new logical time; S2. The middleware checks whether the participant has the right of the time control strategy, if the participant has the right of the time control strategy, step S3 is performed, if the participant does not have the right of the time control strategy, step S4 is performed; S3. The middleware processes the request of the participant with the time control right, the middleware updates a current lower limit of a time stamp, and the time advancing type of the participant initiating the time advancing is updated to a time advancing request service TAR; S4. The participant initiates a request processing callback request to the middleware, and registers a callback function, the middleware checks a message queue state, and determines whether there is a message to be processed; S5. If the FIFO queue is not empty, the message in the FIFO queue is processed, the middleware takes the message from the head of the FIFO queue, initiates a request of calling the callback function according to the message type, and step S4 is performed; If the FIFO queue is empty, it is checked whether the participant belongs to the time limited strategy, if the participant does not belong to the time limited strategy, step S8 is performed, if the participant belongs to the time limited strategy, step S6 is performed; S6. The message in the TSO queue is processed, the system processes all TSO messages with a time stamp less than or equal to the minimum value of a time stamp lower limit LBTS and a participant request time, and initiates a request of calling the callback function to the participant according to the message type, and step S4 is performed; S7. The relationship between the participant request time and the LBTS is checked, if the request time is less than the LBTS, step S8 is performed, if the request time is greater than or equal to the LBTS, step S4 is performed, and the request is sent in a loop until the request time is less than the LBTS; S8. The middleware calls the callback function of allowing the time advancing to the participant, and changes the time advancing type of the participant to not performing the time advancing, and the processing process is ended.

2. A method for logical time management service for federated experiments according to claim 1, wherein, The time control strategy is specifically: If the original state is a non-time limited participant: Let the current minimum advancing time LBTS of the test system be LBTSG, the effective logical time ELT of the participant is LogicTime+Lookahead, LogicTime represents the minimum logical time of the participant applying to become a time control participant, and Lookahead is the expected minimum time step of the participant; If ELT≥LBTSG, the logical time of the participant is set to LogicTime; If ELT If the original state is a time limited participant: The starting time LogicTime of the time control is consistent with the current logical time of the participant; If ELT≤LBTSG, the current logical time of the participant is advanced to LBTSG when the participant becomes a time control participant, so that the time stamp order TSO message sent after the logical time is valid; If ELT > LBTSG, the participant's logical time is directly advanced to LBTSG, at which time ELT = LBTSG + Lookahead, and the participant becomes the time control participant with LogicTime = LBTSG.

3. The method for logical time management service for federated testing of claim 1, wherein, The time-constrained policy is as follows: If the original state is a non-time-constrained participant: When LogicTime < LBTSG, the participant's logical time is directly adjusted to the minimum advanceable time LBTSG, and the participant becomes a time-constrained participant immediately; When LogicTime > LBTSG, the participant is suspended until the system's LBTS advances to the participant's logical time, i.e., LogicTime ≤ LBTSG, at which time the system middleware calls the TimeConstrainedEnabled() service to enable the participant to become a time-constrained participant and to receive TSO messages; If the original state is a time-constrained participant: When LogicTime ≤ LBTSG, the participant directly switches to the time-constrained state and becomes a legal TSO message receiver immediately; When LogicTime > LBTSG, the participant calculates a new LBTS value according to the current situation, and switches to the time-constrained state if the calculated LBTS satisfies LogicTime ≤ LBTSG; otherwise, the participant is suspended until the system's LBTS advances to the participant's logical time, i.e., LogicTime ≤ LBTSG, at which time the system middleware calls the TimeConstrainedEnabled() service to enable the participant to become a time-constrained participant.

4. The method for logical time management service for federated testing of claim 1, wherein, The logical flow of messages in the middleware is as follows: Participant 1 sends a message to participant n through other functional modules of the middleware; The time management module determines the ordering type of the message according to the message ordering mechanism, and places the message in the message queue of participant n, including the TSO message queue or the RO message queue, which is a first-in first-out (FIFO) queue; Participant n calls the time advance request (TAR) service of the middleware; The time management module calculates the lower bound of the timestamp (LBTS) of participant n, and sends the message to participant n if the message meets the sending condition; When the messages in the message queue that meet the sending condition are sent and the LBTS is greater than the time requested by participant n to advance, the middleware calls the participant service TAG to allow participant n to advance its logical time.

5. The method for logical time management service for federated testing of claim 1, wherein, The operations of the middleware under the time management include allowing time advance, sending TSO messages, and pending; In the advance-allowed state, the participant's requested time is less than the LBTS and the timestamp of the head message, and the middleware allows the participant to advance its logical time; in the TSO data sending state, the timestamp of the head message is less than t and the LBTS, and the message fully meets the sending condition, and the middleware sends the message; in the pending state, the requested time and the timestamp of the head message are greater than or equal to the LBTS, and the middleware prohibits the sending of TSO messages and the advance of the participant's logical time.

6. The method for logical time management service for federated testing of claim 1, wherein, The lower bound of timestamp LBTS of a participant represents the maximum safe time advance value of the participant, and the participant will not receive a TSO message with a timestamp value less than the value in the future. The calculation method is: The lower bound of timestamp LBTS of the test system is the minimum value of the LBTS of all participants: LBTS = Min(LBTS i i = 1, 2,..., n.

7. A logical time management service system for federated trials, characterized by The logical time management service method for joint testing according to any one of claims 1-6 comprises a participant, middleware, a time adjuster and a message queue. The participant is configured to set a time control strategy and a time limited strategy, and initiate a logical time advance request to the middleware according to a preset time step to advance a new logical time; and initiate a request for processing callback to the middleware and register a callback function. The time adjuster is configured to calculate a lower bound of timestamp LBTS for time management, and provide data guarantee for time advance. The middleware is configured to receive a logical time advance request, check whether the participant has the permission of the time control strategy, and update a current lower bound of timestamp; receive a request for processing callback initiated by the participant, check a message queue state, check a FIFO queue, process a message in the FIFO queue, check whether the participant is a time limited strategy, check a TSO queue state, process a message in the TSO queue, check a relationship between a time requested by the participant and the LBTS, and call a callback function for allowing time advance to the participant.

8. A logical time management service system for federated trials as claimed in claim 7, wherein, The middleware comprises a time management module and a time ordering mechanism; and the message queue comprises a TSO message queue and a RO message queue, and the RO queue is a first-in first-out FIFO queue.

Citation Information

Patent Citations

  • Virtual test middleware system based on The ACE ORB (TAO)

    CN102937895A

  • Lightweight message middleware system and method of virtual test range verification system

    CN111381983A