CN115827917B - Data synchronization method, device, equipment and storage medium for simulator equipment - Google Patents
Data synchronization method, device, equipment and storage medium for simulator equipment Download PDFInfo
- Publication number
- CN115827917B CN115827917B CN202310012881.8A CN202310012881A CN115827917B CN 115827917 B CN115827917 B CN 115827917B CN 202310012881 A CN202310012881 A CN 202310012881A CN 115827917 B CN115827917 B CN 115827917B
- Authority
- CN
- China
- Prior art keywords
- voter
- data synchronization
- voting
- task
- state
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000004364 calculation method Methods 0.000 claims description 38
- 238000012545 processing Methods 0.000 claims description 33
- 238000012423 maintenance Methods 0.000 claims description 19
- 230000008569 process Effects 0.000 claims description 14
- 230000004044 response Effects 0.000 claims description 13
- 230000001360 synchronised effect Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 8
- 238000012549 training Methods 0.000 claims description 4
- 230000005540 biological transmission Effects 0.000 claims description 3
- 238000004088 simulation Methods 0.000 abstract description 5
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 5
- 230000001960 triggered effect Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000007547 defect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000002441 reversible effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Images
Classifications
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Hardware Redundancy (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a data synchronization method, a device, equipment and a storage medium for simulator equipment, which are applied to the technical field of simulated driving, and the method comprises the following steps: when the condition for starting to execute the data synchronization task is met, performing the front voting according to the type of the data synchronization task; if the pre-vote passes, executing routine voting; if the routine voting is passed, determining time and resources required for executing the data synchronization task; and if the time and the resources required for executing the data synchronization task meet the preset execution conditions, executing the data synchronization task. The invention uses the expandable voter, can synchronously vote under different simulator performance environments, uses the simulator performance idle time to synchronize data, improves the integrity and usability of the driving simulator data, improves the performance of the simulation driving training software, and reduces the hardware cost.
Description
Technical Field
The present invention relates to the field of driving simulation technologies, and in particular, to a data synchronization method, apparatus, device, and storage medium for a simulator device.
Background
At present, the data synchronization aspect based on a simulator equipment computer is limited by the performance requirement of the simulator computer, and most of the performance of the simulator computer is used for simulating and restoring the driving simulation, but not for data synchronization, so that the data synchronization task is not enough resources available, and the data synchronization of the simulator is incomplete and has low availability.
The current solutions mostly rely on modes of manual recording, placing mass storage, subsequent manual copying or improving the computer performance of a driving simulator to realize data synchronization, but the effect is poor.
The defect of manual recording is that the manual recording is too dependent on manpower, the manual recording efficiency is low and the data reliability is low in the presence of a large amount of data to be recorded.
The disadvantage of placing mass storage or increasing computer performance is that it increases the cost of the driving simulator and still creates problems of low data reliability in the face of unpredictable performance issues.
Disclosure of Invention
The invention provides a data synchronization method, a data synchronization device, data synchronization equipment and a storage medium for simulator equipment. The invention constructs an expandable voter for synchronous voting under different simulator performance environments, and utilizes the simulator performance idle time to carry out automatic data synchronization and backup, thereby improving the integrity and availability of driving simulator data.
In a first aspect, embodiments of the present invention provide a data synchronization method for a simulator device, the method comprising:
when the condition for starting to execute the data synchronization task is met, performing the front voting according to the type of the data synchronization task;
the front voting is realized by a front voter, and the front voter comprises one or more front sub-determinants;
if the pre-vote passes, executing routine voting;
wherein the conventional voting is implemented by a conventional voter, which includes one or more conventional sub-voters;
if the routine voting is passed, determining time and resources required for executing the data synchronization task;
and if the time and the resources required for executing the data synchronization task meet the preset execution conditions, executing the data synchronization task.
Through the technical scheme, the reliability and the usability of the data related to the simulated driving can be improved, the performance of the simulated driving training software is improved, and the hardware cost of the driving simulator is reduced.
Optionally, the type of data synchronization task includes one or more of:
hardware data upload, usage data upload, system and software log upload, file download, motion controller configuration synchronization, signal processing system configuration synchronization, conventional time-consuming network-type tasks, conventional time-consuming computing-type tasks, or conventional time-consuming memory-type tasks.
Optionally, the conditions for starting to perform the data synchronization task include one or more of:
starting to execute the data synchronization task every fixed time from the starting of the simulator computer,
When the user exits the simulator, the data synchronization task is started to be executed,
When the training process of the simulator is finished, the data synchronization task is started to be executed,
Or when the distributed simulator maintenance task is received, starting to execute the data synchronization task.
Optionally, the preamble sub-table comprises one or more of the following:
a network state voter, a computer central processing unit state voter, or a memory state voter;
the network state voter, the computer central processing unit state voter and the memory state voter are cache voters.
Optionally, the conventional sub-voter comprises one or more of:
the system comprises a network state voter, a configuration mode voter, a computer central processing unit state voter, a training program voter, a memory state voter, a disk state voter or a simulator maintenance task voter;
the system comprises a network state voter, a computer central processing unit state voter, a memory state voter and a disk state voter, wherein the network state voter, the computer central processing unit state voter, the memory state voter and the disk state voter are cache type voters, the configuration mode voter is a calculation type voter, and the training program voter and the simulator maintenance task voter are query type voters.
Alternatively, if the regular vote passes, determining the time and resources required to perform the data synchronization task, including:
determining the time length required by the synchronous data transmission to the server according to the network uplink speed of the server;
determining the time length required for transmitting the synchronous data from the server to the local according to the network downlink speed of the server;
determining the duration required by the motion controller to execute configuration synchronization according to the response speed of the motion controller;
determining the memory occupation amount according to the size and the type of the data synchronization task packet;
and determining the occupancy rate of the central processing unit according to the type of the data synchronization task.
Optionally, the data synchronization method further includes:
if the software trusted to perform data synchronization sends out an instruction for interrupting execution, stopping the data synchronization task.
In a second aspect, an embodiment of the present invention provides a data synchronization apparatus for a simulator device, the apparatus comprising:
the front voting module is used for executing front voting according to the type of the data synchronization task when the condition for starting to execute the data synchronization task is met;
the front voting is realized by a front voter, and the front voter comprises one or more front sub-determinants;
the conventional voting module is used for executing conventional voting if the front voting passes;
wherein the conventional voting is implemented by a conventional voter, which includes one or more conventional sub-voters;
the determining module is used for determining the time and resources required by executing the data synchronization task if the conventional voting is passed;
and the execution module is used for executing the data synchronization task if the time and the resources required by executing the data synchronization task meet the preset execution conditions.
In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor implements the method according to any implementation manner of the first aspect when executing the program.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method according to any of the implementations of the first aspect.
The invention provides a data synchronization method, a device, equipment and a storage medium for simulator equipment, wherein the method comprises the following steps: when the condition for starting to execute the data synchronization task is met, performing the front voting according to the type of the data synchronization task; if the pre-vote passes, executing routine voting; if the routine voting is passed, determining time and resources required for executing the data synchronization task; and if the time and the resources required for executing the data synchronization task meet the preset execution conditions, executing the data synchronization task. The front voting is realized by a front voter, the conventional voting is realized by a conventional voter, and the front voter and the conventional voter comprise one or more sub-voters; the invention uses the expandable voter, can synchronously vote under different simulator performance environments, uses the simulator performance idle time to synchronize data, improves the integrity and usability of the driving simulator data, improves the performance of the simulation driving training software, and reduces the hardware cost.
It should be understood that the description in this summary is not intended to limit the critical or essential features of the embodiments of the invention, nor is it intended to limit the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
The above and other features, advantages and aspects of embodiments of the present invention will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar elements.
FIG. 1 is a flow chart of a method of data synchronization for a simulator device in accordance with an embodiment of the present invention;
FIG. 2 is a voting execution flow chart of an embodiment of the present invention;
FIG. 3 is a flow chart of task execution according to an embodiment of the present invention;
FIG. 4 is a flow chart of a method of data synchronization for a simulator device according to another embodiment of the invention;
FIG. 5 is a schematic diagram of a data synchronization apparatus for a simulator device according to an embodiment of the present invention;
fig. 6 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to enable a person skilled in the art to better understand the technical solutions in one or more embodiments of the present specification, the technical solutions in one or more embodiments of the present specification will be clearly and completely described below with reference to the drawings in one or more embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one or more embodiments of the present disclosure without inventive faculty, are intended to be within the scope of the present disclosure.
It should be noted that, the description of the embodiment of the present invention is only for the purpose of more clearly describing the technical solution of the embodiment of the present invention, and does not constitute a limitation on the technical solution provided by the embodiment of the present invention.
Fig. 1 is a flowchart of a data synchronization method for a simulator device according to an embodiment of the present invention. As shown in fig. 1, the method includes:
and S101, when the condition for starting to execute the data synchronization task is met, performing front voting according to the type of the data synchronization task.
Wherein the pre-voting is implemented by a pre-voter comprising one or more pre-voter sub-determinants.
Optionally, the conditions for starting to perform the data synchronization task include one or more of:
starting to execute the data synchronization task every fixed time from the starting of the simulator computer,
When the user exits the simulator, the data synchronization task is started to be executed,
When the training process of the simulator is finished, the data synchronization task is started to be executed,
Or when the distributed simulator maintenance task is received, starting to execute the data synchronization task.
Optionally, the type of data synchronization task includes one or more of:
hardware data upload, usage data upload, system and software log upload, file download, motion controller configuration synchronization, signal processing system configuration synchronization, conventional time-consuming network-type tasks, conventional time-consuming computing-type tasks, or conventional time-consuming memory-type tasks.
Optionally, the preamble sub-table comprises one or more of the following:
a network state voter, a computer central processing unit state voter, or a memory state voter;
the network state voter, the computer central processing unit state voter and the memory state voter are cache voters.
Alternatively, the front voter must be a cache voter, and requires a very fast response, the response speed being less than 5ms, when performing the voting.
Optionally, the voting value calculation of the network state voter is triggered by timing, network request/response, and the base value is 50;
illustratively, the vote value calculation basis and manner may be one or more of the following:
network delay (PING) of synchronizing data to a target server, the set delay range meeting the requirements within 10 ms; the calculation method is as follows:
in the method, in the process of the invention,for network delay value, ++>For the n-th vote value, +.>The vote value is the n-1 st vote value.
Synchronizing the uplink speed of the data to the target server, and setting the uplink speed to be more than 2 MB/meeting the requirement; the calculation method is as follows:
in the method, in the process of the invention,for network upstream speed, < >>For the n-th vote value, +.>The vote value is the n-1 st vote value.
Synchronizing the downlink speed of the data to the target server, and setting the uplink speed to be more than 2 MB/meeting the requirement; the calculation method is as follows:
in the method, in the process of the invention,for network downstream speed, < >>For the n-th vote value, +.>The vote value is the n-1 st vote value.
The network delay variance of the synchronous data to the target server is set to be lower than 900 and meets the requirement; the calculation method is as follows:
in the method, in the process of the invention,for the variance of the network delay +.>For the n-th vote value, +.>The vote value is the n-1 st vote value. />
Optionally, the calculation of the vote value of the computer central processor state voter is triggered by a timed task.
Illustratively, the vote value calculation basis and manner may be one or more of the following:
according to the CPU number read by the operating system, the specific calculation formula is as follows:
in the method, in the process of the invention,for the vote value of each CPU core, +.>For the vote value calculated in the last step or for the default vote value,>and the voting value obtained by the calculation is obtained.
The calculation is carried out according to the CPU utilization rate (%) returned by the system counter, and the specific calculation formula is as follows:
in the method, in the process of the invention,for each individual CPU thread usage, and (2)>A vote value for each CPU core.
Optionally, the memory state voter vote value calculation is triggered by a timed task.
Illustratively, the basis and manner of calculating the vote value may be one or more of the following:
the calculation is performed according to the available memory space (MB), and the specific calculation formula is as follows:
where MEM is the amount of memory available and X is the vote value.
S102, if the front voting is passed, performing conventional voting.
Wherein the regular voting is implemented by a regular voter comprising one or more regular sub-voters.
Optionally, the conventional sub-voter comprises one or more of:
the system comprises a network state voter, a configuration mode voter, a computer central processing unit state voter, a training program voter, a memory state voter, a disk state voter or a simulator maintenance task voter;
the system comprises a network state voter, a computer central processing unit state voter, a memory state voter and a disk state voter, wherein the network state voter, the computer central processing unit state voter, the memory state voter and the disk state voter are cache type voters, the configuration mode voter is a calculation type voter, and the training program voter and the simulator maintenance task voter are query type voters.
The cache type voter is provided with independent execution cache threads, and the calculation result is synchronized to the cache, so that the value is directly taken from the cache when the voter is used, and the response time is not more than 2ms.
Illustratively, the computational voter does not contain threads, outputs the computation results in real time, limits the algorithm complexity, requires the time complexity to be below O (n), and has a response time of not more than 100ms.
Illustratively, the query voter, which does not contain threads, does not perform calculations, but rather queries values from the operating system or application software, with a response time of no more than 100ms.
Optionally, a hybrid voter is also included, without limiting the flow of the voter, which typically occurs in the top-level voter.
Optionally, the specific contents of the network state voter, the computer cpu state voter, and the memory state voter may refer to step S101, which is not described herein.
Optionally, the surface value of the configuration mode voter is calculated by the configured related parameters, the algorithm is different according to the model of the simulator, and the time complexity is O (1).
Optionally, the training program voter performs vote value calculation by reading related information from the training program, the calculation mode is not unique, and the related calculation basis includes one or more of the following:
whether the training program is on, when the trainee logged in the training program has learned, the subject currently being performed by the training program, the current idle time of the training program, or the current rendering frame rate of the training program.
Alternatively, the disk state voter calculation is triggered by a timed task, with a base value of 100.
Illustratively, the vote value calculation basis and manner may be one or more of the following:
according to the residual space (GB) of the disk where the task cache is located, the calculation is carried out according to the following specific calculation formula:
wherein, disc is the residual space of the DISK,for the n-th vote value, +.>The vote value is the n-1 st vote value.
The calculation is carried out according to the IO occupancy rate (%) of the magnetic disk, and the specific calculation formula is as follows:
in the method, in the process of the invention,for disk IO usage, +.>For the n-th vote value, +.>The vote value is the n-1 st vote value.
The calculation (ms) is performed according to the response speed of the magnetic disk, and the specific calculation formula is as follows:
in the method, in the process of the invention,for the response speed of the magnetic disk, < > is->For the n-th vote value, +.>The vote value is the n-1 st vote value.
Optionally, when the simulator maintenance task voter calculates the vote value, relevant information is read from the maintenance system, the calculation mode is not unique, and the relevant calculation basis comprises one or more of the following:
the expiration time of the periodic maintenance, the type of the next maintenance, or the maintenance weight of the present device.
Illustratively, FIG. 2 is a voting execution flow chart of an embodiment of the present invention, as shown in FIG. 2:
illustratively, the voter determines the mode of operation based on command inputs, the parameters of which include: a voting coefficient and a voting timeout period, the voting coefficient being capable of affecting the voting result when voted without overruling a vote, and the vote having to give the result within the timeout period.
It should be noted that the input of the voter command is not mandatory, and whether to use the parameter may be determined based on the internal implementation of the voter.
Illustratively, the voting controller is configured to control execution of the voting, and specifically includes one or more of the following: time control of the votes, performing voting calculations, invoking sub-voting calculations, deciding whether to refresh the buffered votes, or finally outputting calculations and checks of the vote values.
The method further comprises a voting cache for caching the executed voting results, wherein all voters use the same voting cache space, no additional lock is allowed, all atomic operations are controlled by the voting cache internally and stored in a key value mode, and a memory cache database can be adopted under certain conditions, for example: redis.
The voting controller may output a vote value, for example, after the voting is completed.
And S103, if the conventional voting is passed, determining the time and resources required for executing the data synchronization task.
Alternatively, if the regular vote passes, determining the time and resources required to perform the data synchronization task, including:
determining the time length required by the synchronous data transmission to the server according to the network uplink speed of the server;
determining the time length required for transmitting the synchronous data from the server to the local according to the network downlink speed of the server;
determining the duration required by the motion controller to execute configuration synchronization according to the response speed of the motion controller;
determining the memory occupation amount according to the size and the type of the data synchronization task packet;
and determining the occupancy rate of the central processing unit according to the type of the data synchronization task.
And S104, if the time and the resources required for executing the data synchronization task meet the preset execution conditions, executing the data synchronization task.
Illustratively, fig. 3 is a task execution flow chart according to an embodiment of the present invention, as shown in fig. 3:
the data synchronization tasks may be managed, for example, by a task controller.
Specifically, the task priority is determined according to the type of the input data synchronization task, the task with higher priority is executed earlier, and the input but not executed task is stored in the queue to be executed according to the priority.
Wherein the functions of the task controller include one or more of the following:
receiving a task command, arranging a voter and recording the task command in a queue to be executed, taking out the task from the queue to be executed after receiving the execution command, performing voting on whether the task is executed, calculating time consumption and resources of the task, executing the task and recording the task in the execution queue, or stopping and withdrawing the task being executed after receiving the interrupt execution.
Optionally, the data synchronization method further includes:
if the software trusted to perform data synchronization sends out an instruction for interrupting execution, stopping the data synchronization task.
Illustratively, the message is issued after the end of the execution of the interrupt command and the request to withdraw the synchronization task, the response of the request is not processed, and the whole interrupt process takes no more than 50ms.
Illustratively, FIG. 4 is a flow chart of a data synchronization method for a simulator device in accordance with another embodiment of the present invention; as shown in fig. 4:
the method includes the steps that after a command of data synchronization is received, first, pre-voting is conducted according to the task type, the pre-voting comprises a plurality of pre-sub-votes, the pre-sub-votes are achieved through pre-sub-votes, a voting result is determined according to output of each pre-sub-voter, if a pre-sub-voter with a vote overrule gives out overrule, the whole pre-voting is not passed, the data synchronization is not executed, and time of the next voting is set.
Otherwise, if the front voting is passed, further conventional voting is carried out, the conventional voting also comprises a plurality of conventional sub-votes, the conventional sub-votes are realized through conventional sub-voters, if a conventional sub-voter with a vote overrule gives out overrule, the whole conventional voting is not passed, the data synchronization is not carried out, and the time of the next voting is set.
Otherwise, if the conventional voting is passed, the execution time required by the data synchronization task is estimated, the execution time is synchronized to other programs, and if other trusted programs inform that the data synchronization is interrupted, the data synchronization is stopped, an end message is issued, and the data synchronization task is withdrawn. And if the data is not interrupted, executing the data synchronization task.
The embodiment of the invention provides a data synchronization method for simulator equipment, which comprises the following steps: when the condition for starting to execute the data synchronization task is met, performing the front voting according to the type of the data synchronization task; if the pre-vote passes, executing routine voting; if the routine voting is passed, determining time and resources required for executing the data synchronization task; and if the time and the resources required for executing the data synchronization task meet the preset execution conditions, executing the data synchronization task. The front voting is realized by a front voter, the conventional voting is realized by a conventional voter, and the front voter and the conventional voter comprise one or more sub-voters; the embodiment of the invention uses the expandable voter, can synchronously vote under different simulator performance environments, uses the simulator performance idle time to synchronize data, improves the integrity and usability of driving simulator data, improves the performance of simulation driving training software, and reduces the hardware cost.
An apparatus for performing the above-described data synchronization method for a simulator device according to an embodiment of the present application is described in detail below with reference to fig. 5.
Fig. 5 is a schematic structural diagram of a data synchronization apparatus for a simulator device according to an embodiment of the present invention; as shown in fig. 5, the data synchronization device 50 includes:
a pre-voting module 501, configured to perform pre-voting according to a type of a data synchronization task when a condition for starting to perform the data synchronization task is satisfied;
the front voting is realized by a front voter, and the front voter comprises one or more front sub-determinants;
a conventional voting module 502, configured to perform conventional voting if the pre-voting passes;
wherein the conventional voting is implemented by a conventional voter, which includes one or more conventional sub-voters;
a determining module 503, configured to determine time and resources required for performing the data synchronization task if the conventional voting passes;
and the execution module 504 is configured to execute the data synchronization task if the time and the resource required for executing the data synchronization task meet the preset execution conditions.
Optionally, the type of data synchronization task includes one or more of:
hardware data upload, usage data upload, system and software log upload, file download, motion controller configuration synchronization, signal processing system configuration synchronization, conventional time-consuming network-type tasks, conventional time-consuming computing-type tasks, or conventional time-consuming memory-type tasks.
Optionally, the conditions for starting to perform the data synchronization task include one or more of:
starting to execute the data synchronization task every fixed time from the starting of the simulator computer,
When the user exits the simulator, the data synchronization task is started to be executed,
When the training process of the simulator is finished, the data synchronization task is started to be executed,
Or when the distributed simulator maintenance task is received, starting to execute the data synchronization task.
Optionally, the preamble sub-table comprises one or more of the following:
a network state voter, a computer central processing unit state voter, or a memory state voter;
the network state voter, the computer central processing unit state voter and the memory state voter are cache voters.
Optionally, the conventional sub-voter comprises one or more of:
the system comprises a network state voter, a configuration mode voter, a computer central processing unit state voter, a training program voter, a memory state voter, a disk state voter or a simulator maintenance task voter;
the system comprises a network state voter, a computer central processing unit state voter, a memory state voter and a disk state voter, wherein the network state voter, the computer central processing unit state voter, the memory state voter and the disk state voter are cache type voters, the configuration mode voter is a calculation type voter, and the training program voter and the simulator maintenance task voter are query type voters.
Optionally, the determining module 503 is further configured to determine a duration required for transmitting the synchronization data to the server according to the network uplink speed of the server; determining the time length required for transmitting the synchronous data from the server to the local according to the network downlink speed of the server; determining the duration required by the motion controller to execute configuration synchronization according to the response speed of the motion controller; determining the memory occupation amount according to the size and the type of the data synchronization task packet; and determining the occupancy rate of the central processing unit according to the type of the data synchronization task.
Optionally, the data synchronization device further includes a control module (not shown in the figure) for stopping the data synchronization task if the software trusted for data synchronization issues an instruction to interrupt execution.
The embodiment of the present invention also provides a computer electronic device, fig. 6 shows a schematic diagram of a structure of an electronic device to which the embodiment of the present invention can be applied, and as shown in fig. 6, the computer electronic device includes a central processing module (CPU) 601 which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for system operation are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other through a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 610 as needed, so that a computer program read out therefrom is installed into the storage section 608 as needed.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described modules or modules may also be provided in a processor, for example, as: a processor comprises a pre-voting module 501, a regular vote 502, a determining module 503 and an executing module 504, wherein the names of these modules do not in some cases constitute a limitation of the module itself, for example, the executing module 504 may also be described as "executing module 504 for executing a data synchronization task if the time and resources required for executing the data synchronization task meet preset execution conditions".
As another aspect, the present invention also provides a computer-readable storage medium, which may be a computer-readable storage medium contained in a data synchronization apparatus for a simulator device as described in the above embodiments; or may be a computer-readable storage medium, alone, that is not incorporated into an electronic device. The computer readable storage medium stores one or more programs for use by one or more processors to perform a data synchronization method for a simulator device described in the present invention.
The above description is only illustrative of the preferred embodiments of the present invention and of the principles of the technology employed. It will be appreciated by persons skilled in the art that the scope of the invention referred to in the present invention is not limited to the specific combinations of the technical features described above, but also covers other technical features formed by any combination of the technical features described above or their equivalents without departing from the inventive concept. Such as the above-mentioned features and the technical features disclosed in the present invention (but not limited to) having similar functions are replaced with each other.
Claims (8)
1. A method of data synchronization for a simulator device, comprising:
when the condition for starting to execute the data synchronization task is met, performing front voting according to the type of the data synchronization task; the front voting is realized by a front voter, and the front voter comprises one or more front sub-determinants; the preamble sub-determinant includes one or more of the following: a network state voter, a computer central processing unit state voter, or a memory state voter; the network state voter, the computer central processing unit state voter and the memory state voter are cache voters;
if the pre-vote passes, performing conventional voting; the conventional voting is realized by a conventional voter, and the conventional voter comprises one or more conventional sub-voters; the conventional sub-voter comprises one or more of the following: the system comprises a network state voter, a configuration mode voter, a computer central processing unit state voter, a training program voter, a memory state voter, a disk state voter or a simulator maintenance task voter; the network state voter, the computer central processing unit state voter, the memory state voter and the disk state voter are cache type voters, the configuration mode voter is a calculation type voter, and the training program voter and the simulator maintenance task voter are query type voters;
if the conventional voting is passed, determining the time and resources required for executing the data synchronization task;
and if the time and the resources required for executing the data synchronization task meet the preset execution conditions, executing the data synchronization task.
2. The data synchronization method of claim 1, wherein the type of data synchronization task comprises one or more of:
hardware data upload, usage data upload, system and software log upload, file download, motion controller configuration synchronization, signal processing system configuration synchronization, conventional time-consuming network-type tasks, conventional time-consuming computing-type tasks, or conventional time-consuming memory-type tasks.
3. The data synchronization method of claim 2, wherein the condition to begin performing the data synchronization task includes one or more of:
starting to execute the data synchronization task at fixed time intervals from the starting time of the simulator computer,
When the user exits the simulator, the data synchronization task is started to be executed,
When the training process of the simulator is finished, the data synchronization task is started to be executed,
Or when the distributed simulator maintenance task is received, starting to execute the data synchronization task.
4. The data synchronization method of claim 1, wherein the determining the time and resources required to perform the data synchronization task if the regular vote passes comprises:
determining the time length required by synchronous data transmission to a server according to the network uplink speed of the server;
determining the time length required by the synchronous data to be transmitted from the server to the local according to the network downlink speed of the server;
determining the duration required by the motion controller to execute configuration synchronization according to the response speed of the motion controller;
determining the memory occupation amount according to the size and the type of the data synchronization task packet;
and determining the occupancy rate of the central processing unit according to the type of the data synchronization task.
5. The data synchronization method according to claim 1, characterized in that the data synchronization method further comprises:
and if the software which is trusted to perform data synchronization sends out an instruction for interrupting execution, stopping the data synchronization task.
6. A data synchronization apparatus for a simulator device, comprising:
the pre-voting module is used for executing pre-voting according to the type of the data synchronization task when the condition for starting to execute the data synchronization task is met; the front voting is realized by a front voter, and the front voter comprises one or more front sub-determinants; the preamble sub-determinant includes one or more of the following: a network state voter, a computer central processing unit state voter, or a memory state voter; the network state voter, the computer central processing unit state voter and the memory state voter are cache voters;
the conventional voting module is used for executing conventional voting if the front voting passes; the conventional voting is realized by a conventional voter, and the conventional voter comprises one or more conventional sub-voters; the conventional sub-voter comprises one or more of the following: the system comprises a network state voter, a configuration mode voter, a computer central processing unit state voter, a training program voter, a memory state voter, a disk state voter or a simulator maintenance task voter; the network state voter, the computer central processing unit state voter, the memory state voter and the disk state voter are cache type voters, the configuration mode voter is a calculation type voter, and the training program voter and the simulator maintenance task voter are query type voters;
the determining module is used for determining the time and the resource required by executing the data synchronization task if the conventional vote passes;
and the execution module is used for executing the data synchronization task if the time and the resources required by executing the data synchronization task meet the preset execution conditions.
7. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, the processor implementing the method according to any of claims 1 to 5 when the computer program is executed.
8. A computer readable storage medium, characterized in that a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310012881.8A CN115827917B (en) | 2023-01-05 | 2023-01-05 | Data synchronization method, device, equipment and storage medium for simulator equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310012881.8A CN115827917B (en) | 2023-01-05 | 2023-01-05 | Data synchronization method, device, equipment and storage medium for simulator equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115827917A CN115827917A (en) | 2023-03-21 |
CN115827917B true CN115827917B (en) | 2023-04-28 |
Family
ID=85520201
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310012881.8A Active CN115827917B (en) | 2023-01-05 | 2023-01-05 | Data synchronization method, device, equipment and storage medium for simulator equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115827917B (en) |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6970481B2 (en) * | 2001-04-17 | 2005-11-29 | Microsoft Corporation | Methods and systems for distributing multimedia data over heterogeneous networks |
US10475350B1 (en) * | 2016-04-11 | 2019-11-12 | State Farm Mutual Automobile Insurance Company | System and method for a driving simulator on a mobile device |
WO2018194952A1 (en) * | 2017-04-17 | 2018-10-25 | Octavo Systems Llc | Mixed signal computer architecture |
CN113193998B (en) * | 2021-04-27 | 2022-11-15 | 清华大学 | Network emulation method, programmable switch, and computer-readable storage medium |
CN114816875A (en) * | 2022-04-25 | 2022-07-29 | 武汉木仓科技股份有限公司 | Method, device and equipment for testing upper computer accessories of driving simulator |
-
2023
- 2023-01-05 CN CN202310012881.8A patent/CN115827917B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN115827917A (en) | 2023-03-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111813513B (en) | Method, device, equipment and medium for scheduling real-time tasks based on distribution | |
CN109885389A (en) | A kind of parallel deep learning scheduling training method and system based on container | |
Rao et al. | Unsynchronized parallel discrete event simulation | |
CN106375416B (en) | Consistency dynamic adjusting method and device in distributed data-storage system | |
Hu et al. | CEC: A containerized edge computing framework for dynamic resource provisioning | |
WO2016150324A1 (en) | Page module rendering method, apparatus and display device | |
CN114895773B (en) | Energy consumption optimization method, system and device for heterogeneous multi-core processor and storage medium | |
CN111597035B (en) | Simulation engine time propulsion method and system based on multithreading | |
WO2021184724A1 (en) | Method and apparatus and device for automatically adjusting timing backup operation initiation time, and medium | |
CN110196680B (en) | Data processing method, device and storage medium | |
CN109164997A (en) | Distributed picture rendering and picture control method for playing back, device and equipment | |
WO2017015059A1 (en) | Efficient cache warm up based on user requests | |
CN113760983A (en) | Data processing method, system and non-transitory computer readable storage medium | |
CN115827917B (en) | Data synchronization method, device, equipment and storage medium for simulator equipment | |
US20160188761A1 (en) | Asynchronous Parallel Simulation Protocol for Stream Processing Platforms | |
CN113504966B (en) | GPU cluster scheduling strategy simulation method and GPU cluster simulator | |
McLean et al. | Predictable time management for real-time distributed simulation | |
CN112783613B (en) | Method and device for scheduling units | |
Liu | Real-time scheduling of logical processes for parallel discrete-event simulation | |
CN116764235A (en) | Data processing method and related device | |
JPH05101015A (en) | Device and method for simulation | |
Jeong et al. | A pre-scheduling mechanism for multimedia presentation synchronization | |
CN108920722B (en) | Parameter configuration method and device and computer storage medium | |
Wen et al. | Fast DRL-based scheduler configuration tuning for reducing tail latency in edge-cloud jobs | |
Rong | Design and Implementation of Operating System in Distributed Computer System Based on Virtual Machine |
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 |