Movatterモバイル変換


[0]ホーム

URL:


CN110412888A - Adjust method, apparatus, medium and the electronic equipment of the speed of simulation process - Google Patents

Adjust method, apparatus, medium and the electronic equipment of the speed of simulation process
Download PDF

Info

Publication number
CN110412888A
CN110412888ACN201910356690.7ACN201910356690ACN110412888ACN 110412888 ACN110412888 ACN 110412888ACN 201910356690 ACN201910356690 ACN 201910356690ACN 110412888 ACN110412888 ACN 110412888A
Authority
CN
China
Prior art keywords
frequency
module
emulation module
emulation
simulation process
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910356690.7A
Other languages
Chinese (zh)
Other versions
CN110412888B (en
Inventor
门慧勇
陈寅杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Everything Mirror Beijing Computer System Co ltd
Original Assignee
Mobile Internet Technology Group Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mobile Internet Technology Group Co LtdfiledCriticalMobile Internet Technology Group Co Ltd
Priority to CN201910356690.7ApriorityCriticalpatent/CN110412888B/en
Publication of CN110412888ApublicationCriticalpatent/CN110412888A/en
Application grantedgrantedCritical
Publication of CN110412888BpublicationCriticalpatent/CN110412888B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Classifications

Landscapes

Abstract

This disclosure relates to a kind of method, apparatus, medium and the electronic equipment of the speed for adjusting simulation process.The described method includes: in response to the control instruction for receiving characterization control simulation process acceleration or deceleration, according to the first frequency for sending message in simulation process to each emulation module, the second frequency that message is sent to each emulation module is determined respectively, if control instruction characterization accelerates, then the second frequency of any emulation module is greater than the first frequency of the emulation module, if control instruction characterization is slowed down, the second frequency of any emulation module is less than the first frequency of the emulation module;According to each second frequency, the triggering command for carrying timestamp is sent to emulation module corresponding with second frequency, timestamp, which is used to indicate, carries the virtual moment locating for time server when the triggering command of the timestamp is sent.In this way, it can be achieved that acceleration or deceleration to simulation process, freely control simulation process the time it takes, are conducive to the research and development of research staff.

Description

Adjust method, apparatus, medium and the electronic equipment of the speed of simulation process
Technical field
This disclosure relates to field of computer technology, and in particular, to it is a kind of adjust simulation process speed method, dressIt sets, medium and electronic equipment.
Background technique
Currently, automatic Pilot has become the hot topic of vehicular field, the realization of automatic Pilot needs to complete a large amount ofTest assignment, and in order to avoid causing unnecessary loss during actual test, it can generally be existed using traffic simulation technologyTest is completed in simulated environment, to save expense and reduce risk of equipment damage.An important parameter is exactly in emulation technologySimulation time, in existing simulation process, simulation time referring generally to the real time, and timing criteria also with real time phaseTogether, that is to say, that the process for needing to occupy A duration in actual conditions, in simulation process must spending same A duration come intoRow emulation.By taking the emulation testing for automated driving system as an example, the content of emulation testing is automated driving system specificSpecific test assignment is completed in environment, and accumulative mileage reaches certain mileage number.For single test assignment, ifThe task definition that the generation that is exceedingly fast in a short time is deposited in test assignment can not be for since emulation duration is identical as practical durationThe task definition carries out careful analysis, is not easy to the research and development of researcher;And for mileage requirement, in vehicle actual travelJourney reach test request mileage number need spend how long, will be spent in emulation testing how long, in this way, can alsoCause simulation efficiency low.
Summary of the invention
Purpose of this disclosure is to provide it is a kind of adjust simulation process speed method, apparatus, medium and electronic equipment, withThe speed of simulation process is adjusted.
To achieve the goals above, according to the disclosure in a first aspect, providing a kind of side of speed for adjusting simulation processMethod is applied to time server, which comprises
In response to receiving control instruction, according in simulation process to each emulation module send message first frequency,The second frequency that message is sent to each emulation module is determined respectively, wherein is imitated described in the control instruction characterization controlTrue process acceleration or deceleration, if simulation process described in the control instruction characterization control accelerates, any emulation module pairThe second frequency answered is greater than the corresponding first frequency of the emulation module, if imitating described in the control instruction characterization controlTrue process is slowed down, then the corresponding second frequency of any emulation module is less than corresponding first frequency of the emulation moduleRate;
According to each second frequency, is sent to the emulation module corresponding with the second frequency and carry having timeThe triggering command of stamp completes the artificial tasks for corresponding to corresponding timestamp to trigger each emulation module, wherein when describedBetween stamp be used to indicate the triggering command for carrying the timestamp virtual moment locating for time server when being sent.
Optionally, the control instruction includes the adjusting information characterized to the speed regulating degree of simulation process;
It is described in response to receiving control instruction, according in simulation process to each emulation module send message first frequencyRate determines the second frequency that message is sent to each emulation module respectively, comprising:
According to the adjusting information and the first frequency, is determined respectively to each emulation module and send messageSecond frequency.
Optionally, the adjusting information be for before same simulation process, adjusting with practical duration occupied after adjustingRatio;
It is described according to the adjusting information and the first frequency, determine sent to each emulation module respectivelyThe second frequency of message, comprising:
First frequency corresponding with first object emulation module is obtained, the first object emulation module is any emulation mouldBlock;
Second frequency f corresponding with the first object emulation module is calculated according to following formula2:
f2=f1*k
Wherein, f1For the first frequency corresponding with the first object emulation module, k is described for sameBefore simulation process, adjusting with the ratio of practical duration occupied after adjusting.
Optionally, described according to each second frequency, it is sent out to the emulation module corresponding with the second frequencyThe triggering command for carrying timestamp is sent, completes the emulation times for corresponding to corresponding timestamp to trigger each emulation moduleBusiness, comprising:
The triggering command for carrying the timestamp for being used to indicate the destination virtual moment, institute are sent to the second target simulator moduleStating the second target simulator module is any emulation module;
If receiving the second target simulator module to appoint for the emulation that is used to indicate that the destination virtual moment sendsThe task that business is completed completes message and has received the task completion message of other emulation modules, it is determined that updated targetVirtual moment, and using the updated destination virtual moment as the new destination virtual moment, and return described to theThe step of transmission of two target simulator modules carries the triggering command for the timestamp for being used to indicate the destination virtual moment, wherein instituteOther emulation modules are stated to include in addition to the second target simulator module, it need to be arrived at the updated destination virtual momentThe preceding emulation module for completing artificial tasks, the updated destination virtual moment is the base at the virtual moment not updatedIncrease what target duration obtained on plinth, the numerical value of the target duration is equal to and the second target simulator module corresponding secondThe inverse of frequency.
Optionally, described according to each second frequency, it is sent out to the emulation module corresponding with the second frequencySend the triggering command for carrying timestamp, further includes:
The triggering for carrying the timestamp for being used to indicate the destination virtual moment is being sent to the second target simulator moduleStart timing when instruction, wherein timing criteria is reference with the real time;
If timing duration is greater than or equal to preset duration and does not receive the described of the second target simulator module transmissionTask completes message, exports the prompt information for prompting the second target simulator module exception.
According to the second aspect of the disclosure, a kind of device of speed adjusting simulation process is provided, Time Service is applied toDevice, described device include:
Determining module, for disappearing to the transmission of each emulation module according in simulation process in response to receiving control instructionThe first frequency of breath determines the second frequency that message is sent to each emulation module, wherein the control instruction table respectivelySign controls the simulation process acceleration or deceleration, if simulation process described in the control instruction characterization control accelerates, any instituteThe corresponding second frequency of emulation module is stated greater than the corresponding first frequency of the emulation module, if the control instruction tableSign controls the simulation process and slows down, then the corresponding second frequency of any emulation module is corresponding less than the emulation moduleThe first frequency;
Sending module is used for according to each second frequency, to the emulation module corresponding with the second frequencyThe triggering command for carrying timestamp is sent, completes the emulation times for corresponding to corresponding timestamp to trigger each emulation moduleBusiness, wherein the timestamp is used to indicate the triggering command for carrying the timestamp when being sent locating for the time serverThe virtual moment.
Optionally, the control instruction includes the adjusting information characterized to the speed regulating degree of simulation process;
The determining module includes determining submodule, for according to the adjusting information and the first frequency, differenceDetermine the second frequency that message is sent to each emulation module.
Optionally, the adjusting information be for before same simulation process, adjusting with practical duration occupied after adjustingRatio;
The determining submodule is used for:
First frequency corresponding with first object emulation module is obtained, the first object emulation module is any emulation mouldBlock;
Second frequency f corresponding with the first object emulation module is calculated according to following formula2:
f2=f1*k
Wherein, f1For the first frequency corresponding with the first object emulation module, k is described for sameBefore simulation process, adjusting with the ratio of practical duration occupied after adjusting.
Optionally, the sending module, comprising:
Sending submodule carries the time for being used to indicate the destination virtual moment for sending to the second target simulator moduleThe triggering command of stamp, the second target simulator module are any emulation module;
Submodule is updated, if sent for receiving the second target simulator module for the destination virtual momentBeing used to indicate artificial tasks completion of the task completes message and has received the task completion message of other emulation modules, then reallyThe fixed updated destination virtual moment, and using the updated destination virtual moment as the destination virtual moment newly,And return to the triggering command for sending to the second target simulator module and carrying the timestamp for being used to indicate the destination virtual momentThe step of, wherein other described emulation modules include in addition to the second target simulator module, need to be in the updated targetThe emulation module of completion artificial tasks before the virtual moment arrives, the updated destination virtual moment is in the institute not updatedIt states and increases what target duration obtained on the basis of the virtual moment, the numerical value of the target duration is equal to and second target simulatorThe inverse of the corresponding second frequency of module.
Optionally, the sending module, further includes:
Timing submodule, for carrying to the second target simulator module transmission and being used to indicate the destination virtual momentTimestamp triggering command when start timing, wherein timing criteria with the real time be reference;
Output sub-module is imitated if being greater than or equal to preset duration for timing duration and not receiving second targetThe task that true module is sent completes message, exports the prompt information for prompting the second target simulator module exception.
According to the third aspect of the disclosure, a kind of computer readable storage medium is provided, computer program is stored thereon with,The step of disclosure first aspect the method is realized when the program is executed by processor.
According to the fourth aspect of the disclosure, a kind of electronic equipment is provided, comprising:
Memory is stored thereon with computer program;
Processor, for executing the computer program in the memory, to realize described in disclosure first aspectThe step of method.
Through the above technical solutions, in response to the control instruction for receiving characterization control simulation process acceleration or deceleration, rootAccording to the first frequency for sending message in simulation process to each emulation module, determines to each emulation module send message respectivelySecond frequency, and according to each second frequency, refer to side corresponding with the second frequency triggering that very transmission carries timestamp fastlyIt enables, completes the artificial tasks for corresponding to corresponding timestamp to trigger each emulation module.In this manner it is achieved that simulation processAcceleration or deceleration, freely control simulation process the time it takes, also, by the acceleration to simulation process, it can be shortIt finds the problem and solves in time, by the deceleration to simulation process, it is more careful to carry out to the part to go wrongResearch, such as investigated for accident.To be conducive to the research and development of research staff, higher-quality emulation may be implemented.
Other feature and advantage of the disclosure will the following detailed description will be given in the detailed implementation section.
Detailed description of the invention
Attached drawing is and to constitute part of specification for providing further understanding of the disclosure, with following toolBody embodiment is used to explain the disclosure together, but does not constitute the limitation to the disclosure.In the accompanying drawings:
Fig. 1 is the flow chart of the method for the speed of the adjusting simulation process provided according to an embodiment of the present disclosure;
Fig. 2 is in the method for the speed of the adjusting simulation process provided according to the disclosure, according to each second frequency, toThe corresponding emulation module of second frequency sends the triggering command for carrying timestamp, is corresponded to triggering each emulation module completionA kind of illustrative schematic diagram of a scenario of the artificial tasks of response time stamp;
Fig. 3 is in the method for the speed of the adjusting simulation process provided according to the disclosure, according to each second frequency, toThe corresponding emulation module of second frequency sends the triggering command for carrying timestamp, is corresponded to triggering each emulation module completionA kind of illustrative schematic diagram of a scenario of the artificial tasks of response time stamp;
Fig. 4 is the block diagram of the device of the speed of the adjusting simulation process provided according to an embodiment of the present disclosure;
Fig. 5 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.
Specific embodiment
It is described in detail below in conjunction with specific embodiment of the attached drawing to the disclosure.It should be understood that this place is retouchedThe specific embodiment stated is only used for describing and explaining the disclosure, is not limited to the disclosure.
Fig. 1 is the method for the speed of the adjusting simulation process provided according to an embodiment of the present disclosure, and this method canTo be applied to time server (that is, time server in analogue system).This method may comprise steps of.
In a step 11, in response to receiving control instruction, message is sent to each emulation module according in simulation processFirst frequency, respectively determine to each emulation module send message second frequency.
Firstly, being briefly described to time server, emulation module and communication between the two.The disclosure is mentionedIn the method for confession, time server is added in analogue system, can implement virtual time in entire analogue system.ExampleGround, the virtual time can be identical as the real time, alternatively, the virtual time can be different from the real time.In analogue systemComprising at least one emulation module, emulation module is configured as completing the corresponding artificial tasks of the emulation module, wherein emulation mouldBlock is after receiving sometime stamp, the achievable artificial tasks corresponding to the timestamp.In simulation process, time serverIt can be communicated with emulation module, to determine the emulation module of addition time cycle, determine that the artificial tasks of emulation module are completeAt situation, determine the emulation module in time departure period.Time server is stored with the synchronous list of a cycle, for recordingThe emulation module of time cycle is added.After time server receives the addition time cycle request of emulation module transmission, it will useIt is added in cycle synchronisation list in the information (for example, ID of emulation module) for indicating the emulation module, while to the emulation mouldThe block transmission addition period receives the response, then the emulation module is successfully joined the time cycle.Time server receives emulation moduleAfter the time departure periodic request of transmission, the information (for example, ID of emulation module) of the emulation module will be used to indicate from the periodIt is deleted in synchronous list, while leaving the period to emulation module transmission and receiveing the response, then emulation module success time departurePeriod.In simulation process, time server can to emulation module recorded in cycle synchronisation list send message (for example,Instruction), timestamp can be carried in the message, so that corresponding emulation module completes the artificial tasks for corresponding to timestamp,If also, emulation module completes a certain artificial tasks, can send task to time server and complete message, then, Time ServiceDevice would know that the artificial tasks of the emulation module are completed.It should be noted that emulating mould in the method provided by the disclosureBlock all refers to emulation module present in cycle synchronisation list, this is hereinafter not repeated to illustrate.
Wherein, emulation module is when sending the request of addition time cycle to time server, also simultaneously to time serverSend set of frequency required for the emulation module, in simulation process, time server then on the basis of the set of frequency, toThe emulation module sends message, under initial situation, that is, simulation process speed be not conditioned in the case where, in step 11The corresponding first frequency of emulation module can be identical as set of frequency required for the emulation module.It should be noted that byIt is different in the set of frequency of each emulation module, so time server sends the frequency of message to each emulation moduleAlso it is different, that is to say, that each emulation module corresponds to the first frequency of oneself, to each imitative described in step 11True module sends the first frequency of message, is to emulate according to the corresponding first frequency of each emulation module to corresponding in factModule sends message.Illustratively, if there are three emulation module (module 1, module 2 and module 3) modules, and the time cycle is added altogether, andThe corresponding first frequency of module 1 is 6Hz, and the corresponding first frequency of module 2 is 3Hz, and the corresponding first frequency of module 3 is 1Hz, thenTime server with the frequency of 6Hz to module 1 send message, with the frequency of 3Hz to module 2 send message, with the frequency of 1Hz toModule 3 sends message.
Illustratively, time server can the set of frequency according to required for emulation module each in cycle synchronisation list,Itself frequency is arranged.Preferably, the frequency of time server itself can set for frequency required for all emulation modulesThe least common multiple set.For example, if there are three emulation (module 4, module 5 and module 6) modules, and the time cycle is added altogether, andSet of frequency required for module 4 is 6Hz, and set of frequency required for module 5 is 3Hz, and set of frequency required for module 6 is4Hz, then the set of frequency of itself can be 12Hz (12 is 6,3,4 least common multiple) by time server.Time serverThe frequency of itself can be used for the virtual time of renewal time server.Illustratively, if the frequency of time server itself is12Hz, then without other factors influence in the case where, time server by with the frequency renewal time server of 12Hz it is virtual whenBetween, and 1/12 (s) is more newly increased every time.
Control instruction can be with characterization control simulation process acceleration or deceleration.If also, control instruction characterization control emulatedJourney accelerates, then the corresponding second frequency of any emulation module is greater than the corresponding first frequency of the emulation module;If control instruction tableSign control simulation process slows down, then the corresponding second frequency of any emulation module is less than the corresponding first frequency of the emulation module.Illustratively, if there are three emulation module (module 1, module 2 and module 3) modules, and time cycle, and module 1 corresponding the is added altogetherOne frequency is 6Hz, and the corresponding first frequency of module 2 is 3Hz, and the corresponding first frequency of module 3 is 1Hz, if then control instruction tableSign control simulation process accelerates, then the corresponding second frequency of module 1 can be 12Hz, and the corresponding second frequency of module 2 can be6Hz, the corresponding second frequency of module 3 can be 2Hz.
In step 12, it according to each second frequency, is sent to emulation module corresponding with second frequency and carries having timeThe triggering command of stamp.
Wherein, timestamp can serve to indicate that when the triggering command for carrying the timestamp is sent locating for time serverThe virtual moment.Time server sends to emulation module corresponding with second frequency according to each second frequency and carries having timeThe triggering command of stamp completes the artificial tasks for corresponding to corresponding timestamp to trigger each emulation module.Shown in aboveFor three emulation modules (module 1, module 2 and module 3), the corresponding first frequency of module 1 is 6Hz, module 2 corresponding firstFrequency is 3Hz, and the corresponding first frequency of module 3 is 1Hz, and control instruction characterization control simulation process accelerates, so that module 1Corresponding second frequency is 12Hz, and the corresponding second frequency of module 2 is 6Hz, and the corresponding second frequency of module 3 is 2Hz.So,For module 1, time server is 12 triggering commands of transmission per second by 6 triggering commands (before variation) variations of transmission per second(after variation), wherein time server is into 12 triggering commands that module is sent after variation, preceding 6 triggering commands and variation6 times transmitted by preceding are identical (that is, entrained timestamp do not change), to apply the second frequency since n-th secondFor rate, before variation, time server should send 6 triggering commands corresponding to n-th second, and after variation, Time ServiceIn 12 triggering commands transmitted by device, the triggering command and preceding should send for n-th second the 6 time triggering command of variation of preceding 6 transmissionsIdentical, then the triggering command of 6 transmissions is then identical as preceding should send for (n+1)th second 6 time triggering command is changed, and therefore, is becomingIt is that the artificial tasks of 2s (real time) should be spent to complete in 1s (real time) script in fact, to realize after changeControl simulation process required by control instruction accelerates.Similarly for module 2 and module 3, not repeated description herein.AccordinglyGround, if control instruction characterization control simulation process slows down, time server will reduce to each emulation module and send messageIt is imitative to reach control to make the artificial tasks that should spend m1 (duration) originally that m2 (duration, and m1 < m2) be spent just to complete for frequencyThe effect that true process is slowed down.
Through the above scheme, in response to receiving the control instruction of characterization control simulation process acceleration or deceleration, according to imitativeThe first frequency for sending message during true to each emulation module, determines to each emulation module send the second of message respectivelyFrequency, and according to each second frequency, the triggering command for carrying timestamp is sent to emulation module corresponding with second frequency,The artificial tasks for corresponding to corresponding timestamp are completed to trigger each emulation module.In this manner it is achieved that adding to simulation processSpeed is slowed down, freely control simulation process the time it takes, also, by the acceleration to simulation process, can be in short-termIt is interior to find the problem and solve, by the deceleration to simulation process, more careful grind can be carried out to the part to go wrongStudy carefully, such as is investigated for accident.To be conducive to the research and development of research staff, higher-quality emulation may be implemented.
In order to make those skilled in the art more understand technical solution provided in an embodiment of the present invention, below to aboveCorresponding steps are described in detail.
Firstly, in response to receiving control instruction, being sent out according in simulation process to each emulation module in step 11The first frequency of message is sent, the second frequency for sending message to each emulation module is determined respectively, is described in detail.
In a kind of possible embodiment, control instruction may include the speed regulating degree characterized to simulation processAdjust information.Therefore, in this embodiment, step 11 may comprise steps of:
According to information and first frequency is adjusted, the second frequency that message is sent to each emulation module is determined respectively.
Control instruction may include adjusting information, and adjusting information, which can be used for characterizing, adjusts journey to the speed of simulation processDegree.For same emulation module, if adjusting information representation is big to the speed regulating degree of simulation process, the emulation module firstGap between frequency and second frequency can be larger, and if adjusting information representation to the speed regulating degree of simulation processSmall, then the gap between the emulation module first frequency and second frequency can be smaller.
In a kind of possible embodiment, different regulating gradients can be set for the acceleration/deceleration of simulation process, oftenA kind of regulating gradient can correspond to different frequency variations.For example, it is arranged two if the acceleration/deceleration of simulation processRegulating gradient B1 and B2 (the corresponding regulating degree of B2 be greater than the corresponding regulating degree of B1), be corresponding in turn in frequency change C1 andC2 (C2 is greater than C1).So, if control instruction characterization is corresponding to the adjusting information that simulation process accelerates and includes in control instructionIn regulating gradient B2, if then the first frequency of a certain emulation module is D1, the corresponding second frequency of the emulation module is then D1+C2.If control instruction characterization corresponds to regulating gradient B1 to the adjusting information that simulation process slows down and includes in control instruction,If the first frequency of a certain emulation module is D2, the corresponding second frequency of the emulation module is D2-C1.It should be noted thatThe regulating gradient and the corresponding frequency change of each regulating gradient that accelerate, slow down may be the same or different, withAnd for different emulation modules, acceleration, the regulating gradient slowed down and the corresponding frequency change of each regulating gradient can phasesTogether, it can also be different, the disclosure is not limited this.
In alternatively possible embodiment, adjust information can for for before same simulation process, adjusting with adjustingThe ratio of occupied practical duration afterwards.Illustratively, adjusting information can be used to indicate that the specific setting to regulating degree.To adjustIt saves before being adjusted in information and the ratio of occupied practical duration is 2 citings after adjusting, exactly adjusting the preceding duration spent is2 times of duration used after adjusting, that is, by 2 speed of simulation process (acceleration);With adjust in information adjust before with adjust after instituteThe ratio of the practical duration occupied is 1/2 citing, and the duration that is spent is the half of duration used after adjusting before exactly adjusting,It is exactly by 0.5 speed of simulation process (deceleration).
Correspondingly, it according to information and first frequency is adjusted, determines to each emulation module send the second of message respectivelyFrequency may comprise steps of:
Obtain first frequency corresponding with first object emulation module;
Calculate second frequency corresponding with first object emulation module.
Wherein, first object emulation module can be any emulation module.It should be noted that practical execute in this methodStep when, each emulation module can become a first object emulation module, that is, time server will be eachEmulation module adjusts a secondary frequencies.Operation is adjusted to the frequency of each emulation module and follows the step and to the stepIt illustrates.
Illustratively, it can calculate with first object emulation module according to following formula to corresponding second frequency f2:
f2=f1*k
Wherein, f1For first frequency corresponding with first object emulation module, k be for same simulation process, adjusting beforeWith the ratio of practical duration occupied after adjusting.
For example, if k=2, that is, the duration that is spent is 2 times of duration used after adjusting before adjusting, that is, will be imitatedTrue 2 speed of process (acceleration), and the first frequency f of first object emulation module1=3Hz, then the first object emulation module pairThe second frequency f answered2=6Hz.
Using aforesaid way, can the regulating degree to simulation process acceleration or deceleration controlled with high accuracy, makeThe controllability of simulation process is stronger, easily studied.
In the following, to, according to each second frequency, being carried to emulation module corresponding with second frequency transmission in step 12The triggering command of timestamp is described in detail.
In a kind of possible embodiment, step 12 be may comprise steps of:
According to each second frequency, the triggering for carrying timestamp to emulation module corresponding with second frequency transmission refers toIt enables.
After determining the second frequency for each emulation module, time server can be according to each emulation module pairThe second frequency answered sends triggering command to corresponding emulation module.Illustratively, if there are two emulation module (module 7 and moulds altogetherBlock 8), wherein the second frequency of module 7 is 4Hz, and the second frequency of module 8 is 6Hz, then time server can according to 4Hz toModule 7 sends triggering command, sends triggering command to module 8 according to 6Hz.
In alternatively possible embodiment, it is contemplated that each emulation module is likely to occur delay when executing task, walksRapid 12 may comprise steps of:
In the first step, it is sent to the second target simulator module and carries the timestamp for being used to indicate the destination virtual momentTriggering command;
In the second step, imitative for being used to indicate for destination virtual moment transmission if receiving the second target simulator moduleThe task that true task is completed completes message and has received the task completion message of other emulation modules, it is determined that updatedThe destination virtual moment, and using the updated destination virtual moment as the new destination virtual moment, and return to above-mentioned first step.
Wherein, the second target simulator module can be any emulation module.It should be noted that practical execute in this methodStep when, each emulation module can become the second target simulator module, that is, time server will be continuously it is eachEmulation module sends triggering command, but time server is mutually isolated the operation of each the second target simulator module, that is to say, that for time server with during once executing above-mentioned two step, the second target simulator module is constant, do not appear in same the case where the second target simulator module changes in the process.Time server emulates mould to eachThe operation of block follows above-mentioned steps and the explanation to above-mentioned steps.
The triggering command for carrying the timestamp for being used to indicate the destination virtual moment is being sent to the second target simulator module.Second target simulator module after receiving the triggering command with timestamp, appoint by achievable emulation corresponding with the timestampBusiness, and sent after completion task to time server and be used to indicate the task completion message that this artificial tasks is completed.
Time server is receiving the second target simulator module for the task completion message of destination virtual moment transmissionAfterwards, if the task that time server has received other emulation modules at this time completes message, it is determined that updated destination virtualMoment.Wherein, other emulation modules include in addition to the second target simulator module, the destination virtual moment in the updated are needed to arrive itThe preceding emulation module for completing artificial tasks, the updated destination virtual moment was increased on the basis of the virtual moment not updatedTarget duration obtains, and the numerical value of target duration is equal to the inverse of second frequency corresponding with the second target simulator module.
Time server receive the second target simulator module for the destination virtual moment send task complete message andHave received other emulation modules task complete message, it may be said that it is bright institute it is in need in the updated the destination virtual moment arrivalCompleting before for task is completed, therefore can promote virtual time, continues the virtual time of time server, and moreIt is newly the updated destination virtual moment.For the second target simulator module, updated destination virtual moment and updateThe time differed between the preceding destination virtual moment should be the second target simulator module corresponding period, that is, the second targetThe inverse of the corresponding second frequency of emulation module.And if not receiving the second target simulator module and being sent for the destination virtual momentTask complete message, then illustrate that the second target simulator module postpones, therefore will not determine updated destination virtualMoment, and can wait until that receive the second target simulator module disappears for the task completion that the destination virtual moment sends alwaysBreath and the task completion message for having received other emulation modules, just can determine whether the updated destination virtual moment.NamelyIt says, if detecting the presence of emulation module is not timely completed artificial tasks (do not receive corresponding task and complete message), at thisIn the open method provided, time server will be waited always, until all emulation modules that should complete task returnTask completes message, also, in waiting process, the time of time server be will not continue to, that is to say, that if the timeThe server virtual moment waits when being P, then before waiting for, no matter how much the actual time passs, in time serverIn, it will be always held at the P moment, until all emulation modules that should complete task return task and complete message.In detailExplanation will be provided below in conjunction with actual example.
After determining the updated destination virtual moment, so that it may empty using the updated destination virtual moment as new targetThe quasi- moment, and first step is returned, to constantly trigger the artificial tasks of each emulation module according to second frequency.
Fig. 2 and Fig. 3 is in the method for the speed of the adjusting simulation process provided according to the disclosure, according to each second frequencyRate sends the triggering command for carrying timestamp to emulation module corresponding with second frequency, complete to trigger each emulation moduleAt a kind of illustrative schematic diagram of a scenario for the artificial tasks for corresponding to response time stamp.As shown in Figures 2 and 3, when showingBetween server and three emulation modules (emulation module 31, emulation module 32 and emulation module 33), wherein the of emulation module 31Two frequencies are 6Hz, and the second frequency of emulation module 32 is 3Hz, and the second frequency of emulation module 33 is 1Hz, also, in the figureThe task used time is completed with the rectangle representation module 31 with oblique line, completes the task used time with the rectangle representation module 32 of white filling,The task used time is completed with the rectangle representation module 33 of filled black.In the case where without task delay, three in 1sThe task of module normally completes and (does not have module to postpone) schematic diagram of a scenario of situation, is used as reference, wherein in order to say hereinafter1s is divided into six parts with 0~6 this several dotted lines, marks in figure, 7 moment are represented, when two neighboring by bright convenienceBetween difference be 1/6 (s), hereinafter will be directly illustrated with 0~6 pair of each moment, no longer illustrate the actual time difference 1/6(s).Occur postponing (module 32, module between 1~moment of moment 2 to module 31 below in conjunction with Fig. 3 and above step33 normally complete task in the 1s) the case where be explained.
Firstly, being that the second target simulator module is illustrated with module 31.At 0 moment, needs to send to module 31 and triggerInstruction, therefore first step is first carried out, triggering command is sent to module 31.Then, the task completion for receiving module 31 disappearsBreath, at this point, the updated destination virtual moment was 1 moment, and the moment arrives and needs to complete the emulation mould of artificial tasks beforeBlock only has module 31, therefore, can be empty as the new target of time server by the updated destination virtual moment (1 moment)Quasi- moment (correspondingly, the virtual moment of time server was 1 moment at this time), and return to first step, that is, 1 moment toModule 31 sends triggering command.Then, the receiving module 31 of the task completes message (as shown in figure 3, receiving appointing for module 31Business is completed message and is spent a large amount of time), at this point, the updated destination virtual moment was 2 moment, and needed before moment arrivalCompleting the emulation modules of artificial tasks, there are also modules 32 in addition to module 31, therefore, if the having received module 32 of the task is completedMessage, then can be (corresponding as the new destination virtual moment of time server by the updated destination virtual moment (2 moment)Ground, the virtual moment of time server was 2 moment at this time), and first step is returned to, that is, send to module 31 at 2 momentTriggering command.Subsequent step is similar to what is be outlined above, is not repeated to describe.Above description is from Postponement module (module31) explanation that the angle of itself carries out.
Explanation will be re-started from the angle of normal module below, will be that the second target simulator module is said with module 32It is bright.It at 0 moment, needs to send triggering command to module 32, therefore first step is first carried out, sends triggering to module 32 and refer toIt enables.Then, the receiving module 32 of the task completes message, at this point, the updated destination virtual moment was 2 moment, and the momentArriving, there are also modules 31 in addition to module 32 for the emulation module for needing to complete artificial tasks before, since module 31 postpones, InThe task that the receiving module 32 of the task completes not receiving module 32 when message completes message, therefore, time serverThe virtual moment will remain in for 1 moment, and the task of module 31 is waited to complete message, disappear until receiving the task from module 31Breath, time server just can by the updated destination virtual moment (2 moment) as new destination virtual moment (correspondingly, thisWhen time server the virtual moment be 2 moment), and return to first step, that is, send triggering to module 32 at 2 moment and refer toIt enables.For subsequent process to it is the above similar, do not repeat to repeat herein.
That is, time server and normally complete the emulation module of task will be to the emulation module postponedIt is waited, postpones current time, until the emulation module postponed completes task, to realize time synchronization.
Using aforesaid way, the Time Synchronization Mechanism provided by time server and the disclosure be may be implemented eachThe time synchronization of emulation module, and the mutual waiting between emulation module may be implemented, and can be used as adding for simulation processSpeed or slow down basis, prevent to during simulation process acceleration or deceleration time of occurrence dislocation, data perturbation situations such as, guaranteeSimulated mass.
In addition, on the basis of above-mentioned steps, in the method that the disclosure provides, step 12 can with the following steps are included:
Refer to the triggering for carrying the timestamp for being used to indicate the destination virtual moment with the transmission of the second target simulator moduleStart timing when enabling;
If timing duration is greater than or equal to preset duration and does not receive the task completion of the second target simulator module transmissionMessage exports prompt information.
The case where task postpones is completed for emulation module, completion disappears if emulation module can not return to task for a long timeBreath or emulation module failure, which make it forever, can not return to task completion message, in order to avoid time server and other emulationThe unlimited waiting of module, can introduce timeout treatment mechanism.That is, carrying to the transmission of the second target simulator module for referring toStarting timing when showing the triggering command of the timestamp at destination virtual moment, wherein timing criteria should be reference with the real time,Exactly send the real time passed through after triggering command.If timing duration is greater than or equal to preset duration and does not receive yetThe task that second target simulator module is sent completes message, then prompt information can be exported, to prompt the second target simulator moduleIt is abnormal, it is handled convenient for staff.Illustratively, time server can export prompt letter to the terminal where staffBreath.
In addition, if timing duration is greater than or equal to preset duration and does not receive the transmission of the second target simulator module yetTask completes message, illustrates emulation module exception, can stop current simulation process at this time, waits related personnel's processing.
Using aforesaid way, start timing when to triggering command is sent with the second target simulator module, if timing durationReach the task completion message that preset duration does not receive the transmission of the second target simulator module yet, then can export prompt information,Related personnel's processing is waited, the unlimited waiting of time server and emulation module without exception is prevented.
Fig. 4 is the block diagram of the device of the speed of the adjusting simulation process provided according to an embodiment of the present disclosure, such asShown in Fig. 4, which can be applied to time server, and described device 40 includes:
Determining module 41, for being sent to each emulation module according in simulation process in response to receiving control instructionThe first frequency of message determines the second frequency that message is sent to each emulation module, wherein the control instruction respectivelySimulation process acceleration or deceleration described in characterization control, it is any if simulation process described in the control instruction characterization control acceleratesThe corresponding second frequency of the emulation module is greater than the corresponding first frequency of the emulation module, if the control instructionSimulation process described in characterization control slows down, then the corresponding second frequency of any emulation module is less than the emulation module pairThe first frequency answered;
Sending module 42 is used for according to each second frequency, to the emulation mould corresponding with the second frequencyBlock sends the triggering command for carrying timestamp, completes the emulation for corresponding to corresponding timestamp to trigger each emulation moduleTask, wherein the timestamp is used to indicate the triggering command for carrying the timestamp when being sent locating for the time serverThe virtual moment.
Optionally, the control instruction includes the adjusting information characterized to the speed regulating degree of simulation process;
The determining module 41 includes determining submodule, for dividing according to the adjusting information and the first frequencyThe second frequency of message Que Ding not be sent to each emulation module.
Optionally, the adjusting information be for before same simulation process, adjusting with practical duration occupied after adjustingRatio;
The determining submodule is used for:
First frequency corresponding with first object emulation module is obtained, the first object emulation module is any emulation mouldBlock;
Second frequency f corresponding with the first object emulation module is calculated according to following formula2:
f2=f1*k
Wherein, f1For the first frequency corresponding with the first object emulation module, k is described for sameBefore simulation process, adjusting with the ratio of practical duration occupied after adjusting.
Optionally, the sending module 42, comprising:
Sending submodule carries the time for being used to indicate the destination virtual moment for sending to the second target simulator moduleThe triggering command of stamp, the second target simulator module are any emulation module;
Submodule is updated, if sent for receiving the second target simulator module for the destination virtual momentBeing used to indicate artificial tasks completion of the task completes message and has received the task completion message of other emulation modules, then reallyThe fixed updated destination virtual moment, and using the updated destination virtual moment as the destination virtual moment newly,And return to the triggering command for sending to the second target simulator module and carrying the timestamp for being used to indicate the destination virtual momentThe step of, wherein other described emulation modules include in addition to the second target simulator module, need to be in the updated targetThe emulation module of completion artificial tasks before the virtual moment arrives, the updated destination virtual moment is in the institute not updatedIt states and increases what target duration obtained on the basis of the virtual moment, the numerical value of the target duration is equal to and second target simulatorThe inverse of the corresponding second frequency of module.
Optionally, the sending module 42, further includes:
Timing submodule, for carrying to the second target simulator module transmission and being used to indicate the destination virtual momentTimestamp triggering command when start timing, wherein timing criteria with the real time be reference;
Output sub-module is imitated if being greater than or equal to preset duration for timing duration and not receiving second targetThe task that true module is sent completes message, exports the prompt information for prompting the second target simulator module exception.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this methodEmbodiment in be described in detail, no detailed explanation will be given here.
Fig. 5 is the block diagram of a kind of electronic equipment shown according to an exemplary embodiment.For example, electronic equipment 1900 can be withIt is provided as a server, for example, time server.Referring to Fig. 5, electronic equipment 1900 includes processor 1922, and quantity canOne or more and memory 1932 are thought, for storing the computer program that can be executed by processor 1922.MemoryThe computer program stored in 1932 may include it is one or more each correspond to one group of instruction module.ThisOutside, processor 1922, which can be configured as, executes the computer program, to execute the side of the speed of above-mentioned adjusting simulation processMethod.
In addition, electronic equipment 1900 can also include power supply module 1926 and communication component 1950, the power supply module 1926It can be configured as the power management for executing electronic equipment 1900, which can be configured as realization electronic equipment1900 communication, for example, wired or wireless communication.In addition, the electronic equipment 1900 can also include that input/output (I/O) connectsMouth 1958.Electronic equipment 1900 can be operated based on the operating system for being stored in memory 1932, such as WindowsServerTM, Mac OS XTM, UnixTM, LinuxTM etc..
In a further exemplary embodiment, a kind of computer readable storage medium including program instruction is additionally provided, it shouldThe step of method of the speed of above-mentioned adjusting simulation process is realized when program instruction is executed by processor.For example, the computerReadable storage medium storing program for executing can be the above-mentioned memory 1932 including program instruction, and above procedure instruction can be by electronic equipment 1900The method that processor 1922 is executed to complete the speed of above-mentioned adjusting simulation process.
The preferred embodiment of the disclosure is described in detail in conjunction with attached drawing above, still, the disclosure is not limited to above-mentioned realityThe detail in mode is applied, in the range of the technology design of the disclosure, a variety of letters can be carried out to the technical solution of the disclosureMonotropic type, these simple variants belong to the protection scope of the disclosure.
It is further to note that specific technical features described in the above specific embodiments, in not lanceIn the case where shield, it can be combined in any appropriate way.In order to avoid unnecessary repetition, the disclosure to it is various canNo further explanation will be given for the combination of energy.
In addition, any combination can also be carried out between a variety of different embodiments of the disclosure, as long as it is without prejudice to originallyDisclosed thought equally should be considered as disclosure disclosure of that.

Claims (10)

In response to receiving control instruction, according to the first frequency for sending message in simulation process to each emulation module, respectivelyDetermine the second frequency that message is sent to each emulation module, wherein emulated described in the control instruction characterization controlJourney acceleration or deceleration, if simulation process described in the control instruction characterization control accelerates, any emulation module is correspondingThe second frequency is greater than the corresponding first frequency of the emulation module, if emulating described in the control instruction characterization controlJourney is slowed down, then the corresponding second frequency of any emulation module is less than the corresponding first frequency of the emulation module;
If receive the second target simulator module for the destination virtual moment send to be used to indicate artificial tasks completeAt task complete message and have received other emulation modules task complete message, it is determined that updated destination virtualMoment, and using the updated destination virtual moment as the new destination virtual moment, and return described to the second meshMark emulation module transmission the step of carrying the triggering command for the timestamp for being used to indicate the destination virtual moment, wherein it is described itsHis emulation module include in addition to the second target simulator module, need to be complete before updated destination virtual moment arrivesAt the emulation module of artificial tasks, the updated destination virtual moment is on the basis of the virtual moment not updatedIncrease what target duration obtained, the numerical value of the target duration is equal to second frequency corresponding with the second target simulator moduleInverse.
Determining module, for sending message to each emulation module according in simulation process in response to receiving control instructionFirst frequency determines the second frequency that message is sent to each emulation module respectively, wherein the control instruction characterization controlThe simulation process acceleration or deceleration is made, it is any described imitative if simulation process described in the control instruction characterization control acceleratesThe true corresponding second frequency of module is greater than the corresponding first frequency of the emulation module, if control instruction characterization controlIt makes the simulation process to slow down, then the corresponding second frequency of any emulation module is less than the corresponding institute of the emulation moduleState first frequency;
CN201910356690.7A2019-04-292019-04-29Method, apparatus, medium, and electronic device for adjusting speed of simulation processActiveCN110412888B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201910356690.7ACN110412888B (en)2019-04-292019-04-29Method, apparatus, medium, and electronic device for adjusting speed of simulation process

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201910356690.7ACN110412888B (en)2019-04-292019-04-29Method, apparatus, medium, and electronic device for adjusting speed of simulation process

Publications (2)

Publication NumberPublication Date
CN110412888Atrue CN110412888A (en)2019-11-05
CN110412888B CN110412888B (en)2020-05-29

Family

ID=68357754

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201910356690.7AActiveCN110412888B (en)2019-04-292019-04-29Method, apparatus, medium, and electronic device for adjusting speed of simulation process

Country Status (1)

CountryLink
CN (1)CN110412888B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111381516A (en)*2020-02-262020-07-07上海航天控制技术研究所Automatic statistical method and system for testing time of complex system
CN114036645A (en)*2021-11-162022-02-11中智行科技有限公司ROS-based simulation method and device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20080269977A1 (en)*2007-04-302008-10-30International Truck Intellectual Property Company, LlcAutomated synchronized service intervals for vehicles
CN105911986A (en)*2016-04-252016-08-31百度在线网络技术(北京)有限公司Unmanned vehicle perception test system and test method
CN106873397A (en)*2017-01-232017-06-20同济大学Intelligent network joins automobile " hardware in loop " accelerated loading emulation test system
CN106951627A (en)*2017-03-152017-07-14北京百度网讯科技有限公司Emulation test method, device, equipment and the computer-readable recording medium of Vehicular automatic driving
CN107991898A (en)*2016-10-262018-05-04法乐第(北京)网络科技有限公司A kind of automatic driving vehicle simulating test device and electronic equipment
CN108241354A (en)*2016-12-262018-07-03乐视汽车(北京)有限公司For the test method of automatic Pilot analogue system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20080269977A1 (en)*2007-04-302008-10-30International Truck Intellectual Property Company, LlcAutomated synchronized service intervals for vehicles
CN105911986A (en)*2016-04-252016-08-31百度在线网络技术(北京)有限公司Unmanned vehicle perception test system and test method
CN107991898A (en)*2016-10-262018-05-04法乐第(北京)网络科技有限公司A kind of automatic driving vehicle simulating test device and electronic equipment
CN108241354A (en)*2016-12-262018-07-03乐视汽车(北京)有限公司For the test method of automatic Pilot analogue system
CN106873397A (en)*2017-01-232017-06-20同济大学Intelligent network joins automobile " hardware in loop " accelerated loading emulation test system
CN106951627A (en)*2017-03-152017-07-14北京百度网讯科技有限公司Emulation test method, device, equipment and the computer-readable recording medium of Vehicular automatic driving

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN111381516A (en)*2020-02-262020-07-07上海航天控制技术研究所Automatic statistical method and system for testing time of complex system
CN114036645A (en)*2021-11-162022-02-11中智行科技有限公司ROS-based simulation method and device and electronic equipment

Also Published As

Publication numberPublication date
CN110412888B (en)2020-05-29

Similar Documents

PublicationPublication DateTitle
CN106294897A (en)A kind of implementation method being applicable to electro-magnetic transient Multiple Time Scales real-time simulation interface
CN106844822A (en)A kind of carrier rocket Hardware In The Loop Simulation Method for supporting rapid virtual-to-physical to exchange
CN110412888A (en)Adjust method, apparatus, medium and the electronic equipment of the speed of simulation process
CN112527723A (en)UVM-based SPI verification platform and verification method
CN110570705B (en)Multi-navigation management simulation system combined training method based on self-adaptive grouping
CN109657379B (en)Simulation verification platform for airplane model
WO2017113848A1 (en)Testing method, testing platform and simulated testing device for test case
CN110945511B (en) Device and method for simulating in sync with real-time system
CN111367257B (en)Dual ultra-real-time rapid simulation test system and method applied to control system
CN107817789A (en)CAN emulation test system
CN106777665A (en)Improve the method and system of cooperating simulation platform verification efficiency
CN103973793A (en)Distributed aviation electronic testing system
US12032876B2 (en)Device and method for simulating a controlled machine or installation
CN108021034A (en)A kind of accurate timing and the system and method for data synchronization
CN105740039A (en)RTX and VMIC based GNC real-time simulation system construction method
EP3531739A1 (en)Testing the resource reservation behavior of at least a first device under test in an emulated device-to-device network environment
CN110069876A (en)A kind of experiment management method and device
CN107329869B (en)Simulation method and device of system on chip
CN103729215B (en)Ethernet board data input/output method
CN114187767A (en)Traffic signal control method, control module, interface module and simulation test system
CN113835358A (en)DCS semi-physical full-range simulation system
JP2880827B2 (en) Power system training simulator
CN110750869A (en) A design method of multi-component dynamics simulation module of attitude and orbit control system
CN115599001B (en)Simulation verification environment for airborne PHM system
CN103747088A (en)Data transmission method for full-range analog machine and data transmission system

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CP01Change in the name or title of a patent holder

Address after:Room 307, 3 / F, supporting public building, Mantingfangyuan community, qingyanli, Haidian District, Beijing 100086

Patentee after:Beijing Wuyi Vision digital twin Technology Co.,Ltd.

Address before:Room 307, 3 / F, supporting public building, Mantingfangyuan community, qingyanli, Haidian District, Beijing 100086

Patentee before:DANGJIA MOBILE GREEN INTERNET TECHNOLOGY GROUP Co.,Ltd.

CP01Change in the name or title of a patent holder
TR01Transfer of patent right

Effective date of registration:20220915

Address after:Room 315, 3rd Floor, Supporting Public Building, Mantingfangyuan Community, Qingyunli, Haidian District, Beijing 100000

Patentee after:Everything mirror (Beijing) computer system Co.,Ltd.

Address before:Room 307, 3 / F, supporting public building, Mantingfangyuan community, qingyanli, Haidian District, Beijing 100086

Patentee before:Beijing Wuyi Vision digital twin Technology Co.,Ltd.

TR01Transfer of patent right

[8]ページ先頭

©2009-2025 Movatter.jp