CN112507180B - Method and device for converting time of analog machine, electronic equipment and storage medium - Google Patents

Method and device for converting time of analog machine, electronic equipment and storage medium Download PDF

Info

Publication number
CN112507180B
CN112507180B CN202011460622.4A CN202011460622A CN112507180B CN 112507180 B CN112507180 B CN 112507180B CN 202011460622 A CN202011460622 A CN 202011460622A CN 112507180 B CN112507180 B CN 112507180B
Authority
CN
China
Prior art keywords
time
simulator
time period
real time
real
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.)
Active
Application number
CN202011460622.4A
Other languages
Chinese (zh)
Other versions
CN112507180A (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.)
Zhejiang Supcon Technology Co Ltd
Original Assignee
Zhejiang Supcon Technology 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 Zhejiang Supcon Technology Co Ltd filed Critical Zhejiang Supcon Technology Co Ltd
Priority to CN202011460622.4A priority Critical patent/CN112507180B/en
Publication of CN112507180A publication Critical patent/CN112507180A/en
Application granted granted Critical
Publication of CN112507180B publication Critical patent/CN112507180B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E30/00Energy generation of nuclear origin
    • Y02E30/30Nuclear fission reactors

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a method and a device for converting simulator time, electronic equipment and a storage medium, wherein in the method for converting the simulator time, a time conversion command of a simulator is received at first, and the time conversion command is analyzed to obtain the simulator time needing to be converted. And then, inquiring a preset time conversion list, and determining a simulator time period in which the simulator time is positioned and a real time period corresponding to the simulator time period. And finally, calculating to obtain the real time corresponding to the simulator time in the real time period based on the simulator time, the simulator time period and the real time period. The problem of among the prior art can't be accurate convert the time of simulator to corresponding real time is solved.

Description

Method and device for converting time of analog machine, electronic equipment and storage medium
Technical Field
The present application relates to the field of data structures and algorithms, and in particular, to a method and an apparatus for converting a time of an analog machine, an electronic device, and a storage medium.
Background
The technology of the nuclear power station analog machine is developed along with the development requirement of a nuclear power industry, and is gradually developed and perfected along with the development of the nuclear power industry and modern scientific technology. The nuclear power station simulator technology plays an important role in the aspects of nuclear power system design, building debugging, operation analysis, personnel training, nuclear safety analysis, procedure verification and the like. At present, the technology of a nuclear power station simulator becomes an indispensable matching technical field for the development of nuclear power industry worldwide.
At present, most of simulator systems can only simulate instantaneous data and cannot completely realize the functions of storing, replaying, backtracking and the like of interval data and scene data. The fundamental reason is that in the prior art, the time of the simulator cannot be accurately converted into the corresponding real time. Because the time of the simulator is different from the real time, the time of the simulator can change along with the change of the running state of the simulator, and the time change speed in different states is also different from the time change speed of the real time.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for converting a time of a simulator, an electronic device, and a storage medium, so as to solve the problem that the time of the simulator cannot be accurately converted into a corresponding real time in the prior art.
In order to achieve the above purpose, the present application provides the following technical solutions:
the application discloses in a first aspect a method for converting time of an analog machine, comprising:
receiving a time conversion instruction of the analog machine;
analyzing the time conversion instruction to obtain the time of the analog machine needing to be converted;
inquiring a preset time conversion list, and determining a simulator time period in which the simulator time is positioned and a real time period corresponding to the simulator time period;
and calculating to obtain the real time corresponding to the simulator time in the real time period based on the simulator time, the simulator time period and the real time period.
Optionally, in the method, a process of constructing the preset time conversion list includes:
when a simulator command sent by the simulator is received, recording simulator time when the simulator command is received as starting simulator time of the current state, and recording real time when the simulator command is received as starting real time of the current state, wherein the simulator command is used for changing the running state of the simulator;
when a next simulator command sent by the simulator is received, recording simulator time when the next simulator command is received as the simulator ending time of the current state, and recording real time when the next simulator command is received as the real ending time of the current state;
and storing each recorded time period of the simulation machine and the corresponding real time period of the time period into the time conversion list, wherein the time period of the simulation machine refers to the time period between the time of ending the simulation machine and the time of starting the simulation machine, and the real time period refers to the time period between the time of ending the simulation machine and the time of starting the simulation machine.
Optionally, in the method, the querying a preset time conversion list to determine a time period of the analog machine in which the time of the analog machine is located includes:
numbering each simulator time period in the time conversion list;
and determining the time period of the simulator in which the simulator time is positioned by utilizing a dichotomy.
Optionally, in the method, the calculating, based on the simulator time, the simulator time period, and the real time period, a real time corresponding to the simulator time in the real time period includes:
taking the difference value of the simulator time and the starting simulator time of the simulator time period as a first result value;
taking the ratio of the first result value to the time interval of the time period of the analog machine as a second result value;
taking the product of the second result value and the time interval of the real time period as a third result value;
and taking the sum of the third result value and the starting time of the real time period as the real time corresponding to the simulator time in the real time period.
Optionally, the method further includes:
and if the simulator time period corresponding to the simulator time cannot be found in a preset time conversion list, generating prompt information of simulator time conversion abnormity.
The second aspect of the present application discloses a device for converting analog machine time, comprising:
the receiving unit is used for receiving a time conversion instruction of the analog machine;
the analysis unit is used for analyzing the time conversion instruction to obtain the time of the analog machine to be converted;
the system comprises a query unit, a time conversion unit and a time conversion unit, wherein the query unit is used for querying a preset time conversion list and determining a simulator time period in which the simulator time is positioned and a real time period corresponding to the simulator time period;
and the calculating unit is used for calculating to obtain the real time corresponding to the simulator time in the real time period based on the simulator time, the simulator time period and the real time period.
Optionally, in the foregoing apparatus, the query unit includes:
the first recording subunit is used for recording the simulator time when the simulator command is received as the starting simulator time of the current state and recording the real time when the simulator command is received as the starting real time of the current state when the simulator command is received, wherein the simulator command is used for changing the running state of the simulator;
the second recording subunit is configured to, when receiving a next simulator command sent by the simulator, record simulator time when the next simulator command is received as end simulator time of the current state, and record real time when the next simulator command is received as end real time of the current state;
and the storage subunit is used for storing each recorded simulator time period and the corresponding real time period thereof into the time conversion list, wherein the simulator time period refers to the time period between the end simulator time and the start simulator time, and the real time period refers to the time period between the end real time and the start real time.
Optionally, in the foregoing apparatus, the query unit includes:
the numbering subunit is used for numbering each simulator time period in the time conversion list;
and the determining subunit is used for determining the simulator time period in which the simulator time is positioned by utilizing a dichotomy.
Optionally, in the foregoing apparatus, the calculating unit includes:
the first calculating subunit is used for taking the difference value between the simulator time and the starting simulator time of the simulator time period as a first result value;
a second calculating subunit, configured to use a ratio of the first result value to a time interval of the simulator time period as a second result value;
a third calculation subunit, configured to take a product of the second result value and the time interval of the real time period as a third result value;
and the fourth calculating subunit is used for taking the sum of the third result value and the starting time of the real time period as the real time corresponding to the simulator time in the real time period.
Optionally, the above apparatus further comprises:
and the information generating unit is used for generating prompt information of abnormal time conversion of the analog machine if the analog machine time period corresponding to the analog machine time cannot be found in a preset time conversion list.
A third aspect of the present application discloses an electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of the first aspects of the present invention.
A fourth aspect of the present application discloses a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of the first aspect of the present invention.
According to the technical scheme, in the method for converting the time of the analog machine, the time conversion instruction of the analog machine is received at first, and the time conversion instruction is analyzed to obtain the time of the analog machine needing to be converted. And then, inquiring a preset time conversion list, and determining a simulator time period in which the simulator time is positioned and a real time period corresponding to the simulator time period. And finally, calculating to obtain the real time corresponding to the simulator time in the real time period based on the simulator time, the simulator time period and the real time period. Therefore, by utilizing the method, according to the pre-established time conversion list, when a certain time of the simulator needs to be converted, the preset time conversion list can be inquired, the time period of the simulator where the time of the simulator is located and the real time period corresponding to the time period of the simulator are determined, and the real time corresponding to the time of the simulator in the real time period can be accurately calculated. The problem of among the prior art can't be accurate convert the time of simulator to corresponding real time is solved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for converting analog machine time disclosed in an embodiment of the present application;
FIG. 2 is a flowchart of an embodiment of a process for constructing the time transition list in step S103 disclosed in another embodiment of the present application;
FIG. 3 is a schematic diagram of an apparatus for converting analog machine time disclosed in another embodiment of the present application;
fig. 4 is a schematic diagram of an electronic device according to another embodiment of the disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Moreover, in this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
As known from the background art, most of the existing simulator systems can only simulate instantaneous data, but cannot completely realize the functions of storing, replaying, backtracking and the like of interval data and scene data. The fundamental reason is that in the prior art, the time of the simulator cannot be accurately converted into the corresponding real time. Because the time of the simulator is different from the real time, the time of the simulator can change along with the change of the running state of the simulator, and the time change speed in different states is also different from the time change speed of the real time.
In view of this, the present application provides a method and an apparatus for converting a time of a simulator, an electronic device, and a storage medium, so as to solve the problem that the time of the simulator cannot be accurately converted into a corresponding real time in the prior art.
The embodiment of the application discloses a method for converting time of an analog machine, which specifically includes, as shown in fig. 1:
and S101, receiving a time conversion instruction of the analog machine.
It should be noted that, when some service modules need to obtain the real time corresponding to a certain simulator time, a time conversion instruction of the relevant simulator is sent to the simulator time conversion module. The time conversion instruction may include data such as instruction sender information and simulator time. After receiving the time conversion instruction, the simulator time conversion module can convert the simulator time and the real time according to the time conversion instruction.
And S102, analyzing the time conversion instruction to obtain the time of the analog machine needing to be converted.
It should be noted that, after receiving the time conversion instruction, the analog machine time conversion module analyzes the time conversion instruction, and obtains the analog machine time required for conversion by the relevant service module from the time conversion instruction.
S103, inquiring a preset time conversion list, and determining a simulator time period in which the simulator time is positioned and a real time period corresponding to the simulator time period.
It should be noted that after the simulator time needing to be converted is obtained, the pre-constructed time conversion list is queried according to the simulator time needing to be converted, which time period the simulator time period corresponding to the simulator time needing to be converted currently in the time conversion list is determined, and meanwhile, according to the simulator time period corresponding to the simulator time period in the time conversion list, the real time period corresponding to the simulator time period in the time conversion list is found. The time conversion list is constructed in advance according to simulator time in the simulator and real time corresponding to the simulator time, and each time period of the simulator time and each corresponding real time period are recorded.
Optionally, in another embodiment of the present application, an implementation manner of the time conversion list constructing process in step S103 may include, as specifically shown in fig. 2:
s201, when a simulator command sent by a simulator is received, recording simulator time when the simulator command is received as starting simulator time of the current state, and recording real time when the simulator command is received as starting real time of the current state, wherein the simulator command is used for changing the running state of the simulator.
It should be noted that the simulation system of this embodiment includes a model server module, a simulation control module, a time conversion module, and a service module. The model server module is mainly used for receiving data such as simulator commands, bit number data and simulator time. The simulation control module is mainly used for generating a time conversion list and managing bit number related data. The time conversion module is mainly used for realizing the conversion between the time of the simulator and the real time. The service module is each functional module, such as an early warning module, a data module, and the like. The modules are connected through an interface machine so as to transmit data.
It should be further noted that, when the model server module receives a simulator command sent by the simulator, the interface machine connected to the model server records the current simulator command and the simulator time corresponding to the simulator command, and records the real time corresponding to the simulator time. And then sending the current simulator command, the simulator time corresponding to the simulator command and the real time corresponding to the simulator time to the simulation control module through the interface machine. And after receiving the data, the simulation control module records the state of the simulator corresponding to the simulator command, then takes the simulator time corresponding to the simulator command as the initial simulator time of the current simulator state, and takes the real time corresponding to the current simulator time as the real initial time of the current simulator state.
The simulator command is used to change the running state of the simulator, for example, if the current simulator command is a freeze start command, the running state of the simulator will enter the freeze state. Common analog machine states typically include: freezing state, normal running state, double-speed running state and the like. In the freezing state, the time of the simulator is always in the same time, and the real time is in a constantly changing state at the moment, so the interval at the moment corresponds to the freezing operation interval, the starting time and the ending time of the interval are the same simulator time, but the starting time corresponding to the real time is the real time when the system receives the freezing command, the ending time is the current real time, and the operation speed of the simulator time in the state is 0. Under the normal operation state, the time operation speed of the simulator is consistent with the real time speed. Under the multiple operation state, the time operation speed of the simulator is in a multiple relation with the real time speed, and can be a multiple which is faster than the real time or a multiple which is slower than the real time.
S202, when a next simulator command sent by the simulator is received, recording simulator time when the next simulator command is received as the simulator ending time of the current state, and recording real time when the next simulator command is received as the real ending time of the current state.
It should be noted that, after step S201, when the model server module receives the next simulator command sent by the simulator, the duration of the current running state of the simulator is described to be over, and the interface connected to the model server records the current simulator command and the simulator time corresponding to the simulator command, and simultaneously records the real time corresponding to the simulator time. And then sending the current simulator command, the simulator time corresponding to the simulator command and the real time corresponding to the simulator time to the simulation control module through the interface machine. And after receiving the data, the simulation control module records the state of the simulator corresponding to the simulator command, then takes the simulator time corresponding to the simulator command as the simulation finishing time of the current state of the simulator, and takes the real time corresponding to the current simulator time as the real finishing time of the current state of the simulator.
S203, storing each recorded time period of the simulator and the corresponding real time period of the simulator in a time conversion list, wherein the time period of the simulator refers to the time period between the time of finishing the simulator and the time of starting the simulator, and the real time period refers to the time period between the time of finishing the simulator and the time of starting the simulator.
It should be noted that the recorded time period of the simulation machine for each operation state of the simulation machine and the corresponding real time period thereof are stored in the time conversion list, where the time period of the simulation machine refers to the time period between the time of ending the simulation machine and the time of starting the simulation machine recorded in the above steps S201 and S202, and the real time period refers to the time period between the time of ending the simulation machine and the time of starting the simulation machine recorded in the above steps S201 and S202. For example, the simulator sends a command for starting normal multiple operation, the time of the simulator is 0 time, the real time is 6 points, then the simulator sends a command for finishing normal multiple operation, the time of the simulator is 10 times, the real time is 6 points and 10 minutes, the time period of the simulator corresponding to the current normal multiple operation state is 0 time to 10 times, the corresponding real time period is 6 points to 6 points and 10 minutes, and the time period is recorded in the time conversion list.
It should be noted that steps S201 to S203 are executed repeatedly, and each time a simulator command sent by a simulator is received, the corresponding simulator time and the corresponding real time are recorded, and each simulator time period and the corresponding real time period recorded are stored in the time conversion list.
Optionally, in another embodiment of the application, the step S103 of querying a preset time conversion list and determining an implementation manner of a time period of the analog machine in which the time of the analog machine is located specifically includes:
numbering is done for each simulator time segment in the time transition list.
And determining the time period of the analog machine in which the time of the analog machine is positioned by using a dichotomy.
It should be noted that, in the time conversion list, the time periods are numbered from small to large in time sequence for each simulator. And when the time period corresponding to the simulator time needs to be inquired, determining the simulator time period in which the simulator time is positioned by utilizing a dichotomy. For example, there are three time slots in the time transition list, which are respectively time 0 to time 10, numbered 0, time 10 to time 11, numbered 1, time 11 to 12, and numbered 2. At this time, the analog machine time needing to be converted is 5 hours, and (0+2)/2 is equal to 1, the time 5 is compared with the time period numbered 1, and the time 5 is smaller than any time in the time period numbered 1 and does not belong to the time period, so that the analog machine time period corresponding to the time 5 in which the analog machine time is numbered 0 is determined.
And S104, calculating to obtain the real time corresponding to the simulator time in the real time period based on the simulator time, the simulator time period and the real time period.
It should be noted that after the time period of the simulation machine corresponding to the time of the simulation machine to be converted and the corresponding real time period are found from the time conversion list, the real time corresponding to the time of the simulation machine in the real time period can be calculated according to the conversion formula for converting the time of the simulation machine into the real time. And then real time obtained by time conversion of the simulator is sent to a relevant service module in real time.
Optionally, in another embodiment of the present application, an implementation manner of step S104 may include:
and taking the difference value of the simulator time and the starting simulator time of the simulator time period as a first result value.
And taking the ratio of the first result value to the time interval of the time period of the analog machine as a second result value.
The product of the second result value and the time interval of the real time period is taken as a third result value.
And taking the sum of the third result value and the starting time of the real time period as the real time corresponding to the time of the simulator in the real time period.
It should be noted that, according to the searched time period and the real time period of the simulator, the start simulation time, the start end time, and the current time period interval of the time period of the simulator are respectively obtained, and the start real time, the end real time, and the current real time period interval of the real time period are respectively obtained. Then, the difference value between the time of the simulator and the time of the starting simulator of the time period of the simulator is firstly solved, then the ratio of the difference value to the time interval of the time period of the simulator is solved, then the product of the ratio and the time interval of the real time period is calculated, and finally the sum of the product and the starting time of the real time period is calculated, namely the real time corresponding to the time of the simulator in the real time period.
The specific formula can be as follows:
real time ═ start real time of real time period + ((simulator time-start simulation time)/current simulator time period time interval) × current real time period time interval.
It should be noted that, since the time conversion list records the simulator time corresponding to the real time, the real time can be converted into the simulator time by using the time conversion list, and the formula can be:
the simulator time is the starting simulation time of the simulator time period + ((real time-starting real time)/(current real time period)). the current simulator time period time interval.
For a specific conversion process, reference may be made to the contents of the foregoing embodiments, which are not described herein again.
Optionally, in another embodiment of the present application, the method for converting the analog machine time may further include:
and if the simulator time cannot be found in the preset time conversion list, generating prompt information of abnormal simulator time conversion.
It should be noted that, if the simulator time period corresponding to the simulator time cannot be found in the preset time conversion list, it indicates that the simulator time that needs to be converted currently is an abnormal time point, and therefore, a prompt message indicating that the simulator time conversion is abnormal is generated and sent to the relevant service module for prompting.
In the method for converting the time of the analog machine provided by the embodiment of the application, the time conversion instruction of the analog machine is received at first, and the time conversion instruction is analyzed to obtain the time of the analog machine needing to be converted. And then, inquiring a preset time conversion list, and determining a simulator time period in which the simulator time is positioned and a real time period corresponding to the simulator time period. And finally, calculating to obtain the real time corresponding to the simulator time in the real time period based on the simulator time, the simulator time period and the real time period. Therefore, by utilizing the method, according to the pre-established time conversion list, when a certain time of the simulator needs to be converted, the preset time conversion list can be inquired, the time period of the simulator where the time of the simulator is located and the real time period corresponding to the time period of the simulator are determined, and the real time corresponding to the time of the simulator in the real time period can be accurately calculated. The problem of among the prior art can't be accurate convert the time of simulator to corresponding real time is solved.
Another embodiment of the present application further discloses a device for converting time of an analog machine, as shown in fig. 3, specifically including:
the receiving unit 301 is configured to receive a time conversion instruction of the analog machine.
The parsing unit 302 is configured to parse the time conversion instruction to obtain the simulator time to be converted.
The query unit 303 is configured to query a preset time conversion list, and determine a simulator time period in which the simulator time is located and a real time period corresponding to the simulator time period.
The calculating unit 304 is configured to calculate, based on the simulator time, the simulator time period, and the real time period, to obtain a real time corresponding to the simulator time in the real time period.
In the device for converting the simulator time provided in the embodiment of the present application, first, the receiving unit 301 receives a time conversion command of the simulator, and the analyzing unit 302 analyzes the time conversion command to obtain the simulator time to be converted. Then, the query unit 303 queries a preset time conversion list to determine a time period of the simulation machine in which the time of the simulation machine is located and a real time period corresponding to the time period of the simulation machine. Finally, the calculating unit 304 calculates the real time corresponding to the simulator time in the real time period based on the simulator time, the simulator time period and the real time period. Therefore, by utilizing the method, according to the pre-established time conversion list, when a certain time of the simulator needs to be converted, the preset time conversion list can be inquired, the time period of the simulator where the time of the simulator is located and the real time period corresponding to the time period of the simulator are determined, and the real time corresponding to the time of the simulator in the real time period can be accurately calculated. The problem that the time of a simulator cannot be accurately converted into corresponding real time in the prior art is solved.
In this embodiment, the specific implementation processes of the receiving unit 301, the analyzing unit 302, the querying unit 303 and the calculating unit 304 can refer to the contents of the method embodiment corresponding to fig. 1, and are not described herein again.
Optionally, in another embodiment of the present application, an implementation manner of the querying unit 303 specifically includes:
the first recording subunit is used for recording the simulator time when the simulator command is received as the starting simulator time of the current state and recording the real time when the simulator command is received as the starting real time of the current state when the simulator command is received, wherein the simulator command is used for changing the running state of the simulator.
And the second recording subunit is used for recording the simulator time when the next simulator command sent by the simulator is received as the simulator ending time of the current state, and recording the real time when the next simulator command is received as the real ending time of the current state.
And the storage subunit is used for storing each recorded time period of the simulation machine and the corresponding real time period thereof into the time conversion list, wherein the time period of the simulation machine refers to the time period between the time for ending the simulation machine and the time for starting the simulation machine, and the real time period refers to the time period between the time for ending the real time and the time for starting the real time.
In this embodiment, the specific implementation processes of the first recording subunit, the second recording subunit, and the storage subunit can refer to the content of the method embodiment in fig. 2, and are not described herein again.
Optionally, in another embodiment of the present application, an implementation manner of the querying unit 303 specifically includes:
and the numbering subunit is used for numbering each simulator time period in the time conversion list.
And the determining subunit is used for determining the simulator time period in which the simulator time is positioned by utilizing a dichotomy.
In this embodiment, the specific execution process of numbering the sub-units and determining the sub-units may refer to the content of the corresponding method embodiment, which is not described herein again.
Optionally, in another embodiment of the present application, an implementation manner of the calculating unit 304 specifically includes:
and the first calculating subunit is used for taking the difference value of the simulator time and the starting simulator time of the simulator time period as a first result value.
And the second calculating subunit is used for taking the ratio of the first result value to the time interval of the time period of the analog machine as a second result value.
A third calculation subunit, configured to take a product of the second result value and the time interval of the real time period as a third result value.
And the fourth calculating subunit is used for taking the sum of the third result value and the starting time of the real time period as the real time corresponding to the simulator time in the real time period.
In this embodiment, for the specific implementation processes of the first calculating subunit, the second calculating subunit, the third calculating subunit, and the fourth calculating subunit, reference may be made to the contents of the corresponding method embodiments described above, and details are not described here again.
Optionally, in another embodiment of the present application, the apparatus for converting analog machine time may further include:
and the information generating unit is used for generating prompt information of abnormal time conversion of the analog machine if the analog machine time period corresponding to the analog machine time cannot be found in the preset time conversion list.
In this embodiment, for the specific execution process of the information generating unit, reference may be made to the contents of the corresponding method embodiments described above, and details are not described here again.
Another embodiment of the present application further provides an electronic device, as shown in fig. 4, specifically including:
one or more processors 401.
A storage device 402 having one or more programs stored thereon.
The one or more programs, when executed by the one or more processors 401, cause the one or more processors 401 to implement the method as in any one of the embodiments described above.
Another embodiment of the present application further provides a computer storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method according to any one of the above embodiments.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, the system or system embodiments, which are substantially similar to the method embodiments, are described in a relatively simple manner, and reference may be made to some descriptions of the method embodiments for relevant points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the components and steps of the various examples have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method for converting analog machine time is characterized by comprising the following steps:
receiving a time conversion instruction of the analog machine;
analyzing the time conversion instruction to obtain the time of the analog machine needing to be converted;
inquiring a preset time conversion list, and determining a simulator time period in which the simulator time is positioned and a real time period corresponding to the simulator time period;
calculating to obtain real time corresponding to the simulator time in the real time period based on the simulator time, the simulator time period and the real time period;
the process of constructing the preset time conversion list comprises the following steps:
when a simulator command sent by the simulator is received, recording simulator time when the simulator command is received as starting simulator time of the current state, and recording real time when the simulator command is received as starting real time of the current state, wherein the simulator command is used for changing the running state of the simulator;
when a next simulator command sent by the simulator is received, recording the simulator time when the next simulator command is received as the simulator ending time of the current state, and recording the real time when the next simulator command is received as the real ending time of the current state;
and storing each recorded time period of the simulation machine and the corresponding real time period of the time period into the time conversion list, wherein the time period of the simulation machine refers to the time period between the time of ending the simulation machine and the time of starting the simulation machine, and the real time period refers to the time period between the time of ending the simulation machine and the time of starting the simulation machine.
2. The method of claim 1, wherein said querying a preset time conversion list to determine a simulation machine time period in which the simulation machine time is located comprises:
numbering each simulator time period in the time conversion list;
and determining the time period of the analog machine in which the time of the analog machine is positioned by using a dichotomy.
3. The method of claim 1, wherein calculating a real time corresponding to the simulation machine time in the real time period based on the simulation machine time, the simulation machine time period, and the real time period comprises:
taking the difference value of the simulator time and the starting simulator time of the simulator time period as a first result value;
taking the ratio of the first result value to the time interval of the time period of the simulator as a second result value;
taking the product of the second result value and the time interval of the real time period as a third result value;
and taking the sum of the third result value and the starting time of the real time period as the real time corresponding to the simulator time in the real time period.
4. The method of claim 1, further comprising:
and if the simulator time period corresponding to the simulator time cannot be found in a preset time conversion list, generating prompt information of simulator time conversion abnormity.
5. An apparatus for converting analog machine time, comprising:
the receiving unit is used for receiving a time conversion instruction of the analog machine;
the analysis unit is used for analyzing the time conversion instruction to obtain the time of the analog machine to be converted;
the system comprises a query unit, a time conversion unit and a time conversion unit, wherein the query unit is used for querying a preset time conversion list and determining a simulator time period in which the simulator time is positioned and a real time period corresponding to the simulator time period;
the calculation unit is used for calculating to obtain the real time corresponding to the simulator time in the real time period based on the simulator time, the simulator time period and the real time period;
the query unit comprises:
the first recording subunit is used for recording the simulator time when the simulator command is received as the starting simulator time of the current state and recording the real time when the simulator command is received as the starting real time of the current state when the simulator command is received, wherein the simulator command is used for changing the running state of the simulator;
the second recording subunit is configured to, when receiving a next simulator command sent by the simulator, record simulator time when the next simulator command is received as end simulator time of the current state, and record real time when the next simulator command is received as end real time of the current state;
and the storage subunit is used for storing each recorded simulator time period and the corresponding real time period thereof into the time conversion list, wherein the simulator time period refers to the time period between the end simulator time and the start simulator time, and the real time period refers to the time period between the end real time and the start real time.
6. The apparatus of claim 5, wherein the query unit comprises:
the numbering subunit is used for numbering each analog machine time period in the time conversion list;
and the determining subunit is used for determining the simulator time period in which the simulator time is positioned by utilizing dichotomy.
7. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-4.
8. A computer storage medium, having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method of any of claims 1 to 4.
CN202011460622.4A 2020-12-11 2020-12-11 Method and device for converting time of analog machine, electronic equipment and storage medium Active CN112507180B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011460622.4A CN112507180B (en) 2020-12-11 2020-12-11 Method and device for converting time of analog machine, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011460622.4A CN112507180B (en) 2020-12-11 2020-12-11 Method and device for converting time of analog machine, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112507180A CN112507180A (en) 2021-03-16
CN112507180B true CN112507180B (en) 2022-07-05

Family

ID=74972414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011460622.4A Active CN112507180B (en) 2020-12-11 2020-12-11 Method and device for converting time of analog machine, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112507180B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104205064A (en) * 2012-03-16 2014-12-10 国际商业机器公司 Transformation of a program-event-recording event into a run-time instrumentation event
WO2016088281A1 (en) * 2014-12-01 2016-06-09 Nec Corporation Multiple query optimization in sql-on- hadoop systems
CN110390484A (en) * 2019-07-24 2019-10-29 西北工业大学 A kind of industrial operations augmented reality instruction designing system and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003016134A (en) * 2001-07-02 2003-01-17 Matsushita Electric Ind Co Ltd Method for converting logic circuit model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104205064A (en) * 2012-03-16 2014-12-10 国际商业机器公司 Transformation of a program-event-recording event into a run-time instrumentation event
WO2016088281A1 (en) * 2014-12-01 2016-06-09 Nec Corporation Multiple query optimization in sql-on- hadoop systems
CN110390484A (en) * 2019-07-24 2019-10-29 西北工业大学 A kind of industrial operations augmented reality instruction designing system and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
盘式制动器性能试验台模拟机的研制;赵奇平等;《汽车科技》;20070125;全文 *

Also Published As

Publication number Publication date
CN112507180A (en) 2021-03-16

Similar Documents

Publication Publication Date Title
CN102216908B (en) Support the system, the method and apparatus that perform the action corresponding to detection event
CN103441861B (en) A kind of data record generation method and device
CN104246767A (en) Telemetry system for a cloud synchronization system
WO2018082340A1 (en) Simulation test system and method
CN107704387B (en) Method, device, electronic equipment and computer readable medium for system early warning
CN107391378A (en) The generation method and device of a kind of test script
CN108540352B (en) Optimization expansion method for automatic matching of user channels of online education system
CN103218295A (en) Method and system for testing message handling capacity of ESB (Enterprise Service Bus)
CN111814443A (en) Table generation method and device combining RPA and AI, computing equipment and storage medium
US9455940B2 (en) Information processing apparatus and information processing method
CN112507180B (en) Method and device for converting time of analog machine, electronic equipment and storage medium
JP5093099B2 (en) Resource information management apparatus, system, method, and program
Lingrand et al. Optimization of jobs submission on the EGEE production grid: modeling faults using workload
JP2008108154A (en) Management system for operation performance information
CN117061049A (en) Data reporting method, device, equipment and storage medium
CN110673866A (en) Method and system for displaying online upgrade progress, electronic device and storage medium
CN114598622B (en) Data monitoring method and device, storage medium and computer equipment
CN110309032A (en) Data managing method, device and electronic equipment
CN106998467B (en) Media playback quality test method and device
CN111506422B (en) Event analysis method and system
CN112199229A (en) Data processing method, device, equipment and storage medium
JP4962239B2 (en) Resource usage acquisition device, resource usage acquisition method, and resource usage acquisition processing program
CN110321276A (en) The generation method and device of test case
CN111881060B (en) Interface performance testing method and device and electronic equipment
CN115034937A (en) Data processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant