Equipment virtual training modeling method, device, terminal equipment and system
By introducing an XML script file and process management module into the software framework for equipment virtual training, the problem of the difficulty in applying the IDEF modeling method in equipment virtual training is solved, achieving an efficient development process and reduced costs.
Patent Information
- Application Number
- CN202210528336.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-16
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-05-16
AI Technical Summary
While the IDEF modeling method is widely used in structured design and analysis, it is difficult to apply directly to virtual equipment training due to the lack of a software framework, resulting in low development efficiency and high costs.
A novel software framework is adopted, which uses XML script files that define equipment fault repair rules, and utilizes a process management module to parse the script content and schedule and manage training steps, transforming the code in the development process into business logic, including the management of initialization, steps, conditions, actions and status values.
It significantly improved the development efficiency of the equipment virtual training system, reduced the development workload by 70%, lowered development costs, reduced software defects, and shortened the development cycle.
Smart Images

Figure CN114968005B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of virtual training simulators, and in particular to equipment virtual training modeling methods, devices, terminal equipment and systems. Background Art
[0002] According to project experience, one of the main tasks of developing equipment virtual training simulators is to build training subjects. Different equipment, different training types, and different training subjects have similarities and uniqueness in their contents. In order to improve the efficiency of building training subjects, a training subject modeling method is needed. Through modeling, training subjects can be directly generated without modifying the program or writing code.
[0003] The closest existing technology is the IDEF (Integrated Computer-Aided Manufacturing Definition) modeling method, which includes several subdivision modeling methods, such as functional modeling (IDEF0), information modeling (IDEF1), dynamic modeling (IDEF2), etc. The IDEF modeling method is a related method based on structured design and analysis technology and activity models, and is widely used. However, due to its more abstract nature, it is difficult to directly apply it to subdivision fields in actual application. IDEF is only a description method, and there is no related software framework that can be used for software engineering. It is urgent to develop a new software framework for application in equipment virtual training. Summary of the invention
[0004] In order to overcome the problems existing in the related technology, the embodiments of the present application provide equipment virtual training modeling methods, devices, terminal devices and systems, which can apply a new software framework to equipment virtual training, shorten the development cycle of equipment virtual training, and reduce development costs.
[0005] This application is implemented through the following technical solutions:
[0006] In a first aspect, an embodiment of the present application provides an equipment virtual training modeling method, comprising:
[0007] According to predefined equipment fault maintenance rules, an XML script file of the equipment fault maintenance training subject is defined; the script parser is called by the process management module to parse the XML script file to obtain the script content; the script content includes initialization information, steps, conditions, actions and status values; based on the parsed script content, the steps of the equipment fault maintenance training subject are updated; the process management module schedules and manages the operation steps of the equipment fault maintenance training according to preset scheduling rules.
[0008] In a possible implementation manner of the first aspect, the process management module calls a script parser to parse the XML script file, including:
[0009] According to the path of the script file of the equipment fault maintenance training subject, the process management module calls the script parser to obtain the parsed script content; based on the initialization information, the UI (User Interface, i.e., the tools, components and spare parts in the user interface) and three-dimensional scene of the equipment fault maintenance training subject are initialized; based on the UI and three-dimensional scene, an event provider is registered.
[0010] In a possible implementation manner of the first aspect, the updating of the steps of the equipment fault maintenance training subject based on the parsed script content includes:
[0011] The process management module registers the Update function; the process management module uses the Update function to traverse the event provider and obtain a list of new events in the current frame; the new event is an external input event collected by the event provider; in the list of new events, an empty event is inserted; the empty event is generated in each frame of the system operation and passed to the unconditional operation step; the process management module obtains the first state of the current step of the equipment fault maintenance training subject, and if the current step is in an inactive state, activates the current step; the first state of the step includes activated and inactivated;
[0012] If the current step is in an activated state, the process management module cyclically calls the Update function according to a preset time period to update the steps of the equipment fault maintenance training subject;
[0013] The process management module calls the Update function to match the new event with the condition of the current step of the equipment failure maintenance training subject;
[0014] After the matching is completed, the corresponding actions of the steps of the equipment failure maintenance training subject are updated.
[0015] In a possible implementation manner of the first aspect, after the matching is completed, the corresponding action of the step of updating the equipment fault maintenance training subject includes:
[0016] After the matching is completed, the second state of the current step of the equipment fault maintenance training subject is obtained; the second state of the current step includes executing action and completed execution;
[0017] Based on the acquired second state of the current step, updating the corresponding action of the current step of the equipment failure maintenance training subject;
[0018] The corresponding actions of updating the current step of the equipment failure maintenance training subject include:
[0019] If the current step status is completed, then the current step update of the current frame is terminated; if the current step status is in execution, then wait for the process management module to call the Update function in the next frame to update the next step of the equipment fault maintenance training subject;
[0020] When the process management module calls the Update function in the next frame to update the next step of the equipment failure maintenance training subject, the next step is the current step.
[0021] In a possible implementation manner of the first aspect, after the matching is completed, the corresponding actions of the steps of the equipment fault maintenance training subject are updated, further comprising:
[0022] According to the step type of the equipment fault maintenance training subject, the corresponding action of the current step type is updated; the step type of the equipment fault maintenance training subject is a pre-set step type corresponding to the new event, and the pre-set step type includes: abstract logic steps and combination steps; the abstract logic steps include logic steps and loop steps; the combination steps include serial combination steps and parallel combination steps; the parallel combination steps include parallel all steps, parallel specified steps and parallel random steps; the corresponding actions of the steps of the equipment fault maintenance training subject include the equipment fault maintenance training animation action and update status value.
[0023] In a possible implementation of the first aspect, the process management module includes a serial combination step of training subjects; the serial combination step of training subjects is used to store all the operation steps of the corresponding equipment fault maintenance training; the operation steps have multiple step types, which are nested with each other according to preset relationships of different types of steps.
[0024] In a second aspect, an embodiment of the present application provides an equipment virtual training modeling device, comprising:
[0025] An input module is used to define an XML script file of an equipment fault maintenance training subject according to predefined equipment fault maintenance rules; a parsing module is used to parse the XML script file by calling a script parser through a process management module to obtain script content; the script content includes initialization information, steps, conditions, actions and status values; a process management module is used to update the steps of the equipment fault maintenance training subject based on the parsed script content; the process management module schedules and manages the operation steps of the equipment fault maintenance training according to preset scheduling rules.
[0026] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the equipment virtual training modeling method as described in any one of the first aspects is implemented.
[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the equipment virtual training modeling method as described in any one of the first aspect, or the equipment virtual training modeling method as described in any one of the second aspect, is implemented.
[0028] In a fifth aspect, an embodiment of the present application provides an equipment virtual training modeling system, comprising the equipment virtual training modeling device as described in the second aspect, and the terminal device as described in the third aspect.
[0029] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0030] In the embodiment of the present application, a new software framework is applied to equipment virtual training in the entire development process. The main work is changed from the previous program coding to defining XML files, so that the center of the entire development process is changed from code to business logic, which can reduce the development workload of the equipment virtual training system by 70%, greatly improve the development efficiency, reduce software defects caused by coding, greatly shorten the development cycle, and reduce development costs.
[0031] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0032] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0034] Figure 1 It is a flowchart of an equipment virtual training modeling method provided by an embodiment of the present application;
[0035] Figure 2 It is a schematic diagram of a logical step advancement process provided by an embodiment of the present application;
[0036] Figure 3 This is a schematic diagram of a cycle step advancement process provided by an embodiment of the present application;
[0037] Figure 4 This is a schematic diagram of a serial combination step advancement process provided by an embodiment of the present application;
[0038] Figure 5 This is a schematic diagram of a parallel combination step advancement process provided by an embodiment of the present application;
[0039] Figure 6 It is a structural schematic diagram of an equipment virtual training modeling device provided in one embodiment of the present application;
[0040] Figure 7 It is a structural diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0041] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0042] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0043] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0044] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.
[0045] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0046] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0047] The IDEF modeling method is a method based on structured design and analysis techniques and activity models, and is widely used. However, due to its more abstract nature, it is difficult to directly apply it to specific areas in actual applications. IDEF is only a description method, and there is no related software framework that can be used in software engineering.
[0048] Based on the above problems, an equipment virtual training modeling method is provided in an embodiment of the present application, and a new software framework is applied to equipment virtual training. The main work is changed from the previous program coding to defining XML files, so that the center of the entire development process is changed from code to business logic, which can reduce the development workload of the equipment virtual training system by 70%, greatly improve the development efficiency, reduce software defects caused by coding, greatly shorten the development cycle, and reduce development costs.
[0049] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present application are clearly and completely described below. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0050] Figure 1 is a schematic flow chart of a method for modeling equipment virtual training provided by an embodiment of the present application, with reference to Figure 1 , the detailed description of the equipment virtual training modeling method is as follows:
[0051] In step 101, an XML script file of equipment failure maintenance training subjects is defined according to predefined equipment failure maintenance rules.
[0052] In order to support the operation of equipment virtual training, the training subjects are defined as an XML file using XML syntax. XML syntax itself supports multi-level parent-child relationships, which is consistent with the definition of steps. The parent-child relationship in the XML file is converted into the parent-child relationship of the step.
[0053] In step 102, the script parser is called by the process management module to parse the XML script file and obtain the script content; the script content includes initialization information, steps, conditions, actions and status values.
[0054] The initialization information includes information such as objects (buttons) in the component bar and spare parts bar. The script parser also parses the object definitions of the component bar and spare parts bar to generate the objects in the component bar and spare parts bar. The properties of the object include name, icon, name and time.
[0055] Among them, the equipment virtual training modeling framework includes five elements: step, event, condition, action and state value.
[0056] Among them, a step is a definition of a group of operations or a step of operation in the equipment maintenance process, and can also be a step of operation that is automatically executed or notified by an external system. Steps are divided into logical steps and combined steps. Logical steps accept events, make logical judgments based on conditions, and start to execute their actions after the judgment conditions are passed. Combined steps can contain multiple sub-steps, which control the execution of sub-steps in terms of execution order and execution flow. The above sub-step types can be the same or different.
[0057] For example, "Use a screwdriver to unscrew the screws on the front cover" is an operation step, "Unscrew the three plugs A, B, and C respectively" is a group of operations, and "Wait for vehicle S to issue a launch command and launch a missile" is an operation notified by an external system. They can all be defined as a step.
[0058] Exemplarily, each time the process management module calls a step, it returns a call result, such as a tool error, an object error, a correct operation, an invalid operation, etc.
[0059] Among them, events are defined as external inputs, including user operation inputs or messages or instructions sent by other subsystems through the network; events are generated by event providers.
[0060] For example, clicking on an object in the scene and clicking on an object on the interface are both events.
[0061] Among them, conditions belong to logical steps and are the judgment rules of the steps.
[0062] For example, "the mouse clicks on XXX object" is a condition. Conditions are used to match the currently generated events. A step can contain multiple conditions. When all conditions are met, the step starts to execute the action through logical judgment.
[0063] Exemplarily, the event type and the condition type have a corresponding relationship, and their parameters are also the same.
[0064] Exemplarily, the condition includes selecting a 3D object and a 2D object, that is, if the event matches the preset condition, the type of the selected object should be consistent.
[0065] Exemplarily, the parameters for selecting the 3D object condition include the name of the tool and the 3D object, such as using a “screwdriver” to unscrew a “screw”.
[0066] Among them, action refers to the output generated by the virtual scene after the correct operation steps, including equipment fault repair training animation actions and updated status values.
[0067] For example, after the user tightens the screw, the performance action is animated to show the process of "the screw gradually rotates outward and then hides". The action is a continuous execution process, so during the execution of the action, the state of the step will be set to "executing the action".
[0068] For example, an animation action has multiple sub-actions built in, including: rotation and translation, translation, rotation, zooming, 360° rotation, quaternion rotation, visibility, indicator light on, indicator light off, indicator light flashing, object flashing, etc. An animation action includes a start time field, which allows the animation to not be executed immediately after activation, but to wait for a period of time before starting to execute. Using the above fields, multiple animation actions can be combined more conveniently so that the preset actions are executed in sequence.
[0069] For example, updating the state value to text and the state value operation often appear together and are placed after the state value operation to display the value of a certain state value on a text object in the scene.
[0070] For example, some combination panels include a display screen, and by pressing a button, the content of the display screen is modified. The state value is modified by pressing the button, and the state value operation action is implemented. After the state value is modified, it is also displayed on the display screen, which is implemented by updating the state value to text.
[0071] Specifically, the process management module calls the script parser to parse the XML script file, including: according to the path of the script file of the corresponding equipment fault maintenance training subject, the process management module calls the script parser to obtain the parsed script content; based on the initialization information, initializes the UI and three-dimensional scene of the corresponding equipment fault maintenance training subject; based on the UI and three-dimensional scene, registers the event provider.
[0072] In step 103, based on the parsed script content, the steps of the equipment fault maintenance training subject are updated; the process management module schedules and manages the operation steps of the equipment fault maintenance training according to the preset scheduling rules.
[0073] Specifically, based on the parsed script content, the steps of the above equipment failure maintenance training subject are updated, including:
[0074] The process management module registers the Update function; the process management module uses the Update function to traverse the event provider and obtain a list of new events in the current frame; the new event is an external input event collected by the event provider; in the list of new events, an empty event is inserted; the empty event is generated in each frame of the system operation and passed to the unconditional operation step; the process management module obtains the first state of the current step of the equipment fault maintenance training subject, and if the current step is in an inactivated state, activates the current step; the first state of the step includes activated and inactivated.
[0075] If the current step is in the activated state, the process management module calls the Update function cyclically according to the preset time period to update the steps of the equipment fault maintenance training subject; the process management module calls the Update function to match the new event with the conditions of the current step of the equipment fault maintenance training subject; after the matching is completed, the corresponding action of the step of the equipment fault maintenance training subject is updated.
[0076] The above step status definitions are inherited by all subtype steps. Each step has only one of the above statuses at a certain moment.
[0077] Specifically, after the matching is completed, the corresponding actions of the step of updating the equipment failure maintenance training subject include:
[0078] After the matching is completed, the second state of the current step of the equipment fault maintenance training subject is obtained; the second state of the current step includes executing the action and completing the execution; based on the obtained second state of the current step, the corresponding action of the current step of the equipment fault maintenance training subject is updated.
[0079] Update the corresponding actions of the current step of the equipment failure maintenance training course, including:
[0080] If the current step status is completed, the current step update of the current frame is ended; if the current step status is in execution, the process management module is waited for the next frame to call the Update function to update the next step of the equipment fault maintenance training subject.
[0081] When the process management module calls the Update function in the next frame to update the next step of the equipment failure maintenance training subject, the next step is the current step.
[0082] Specifically, after the matching is completed, the corresponding actions of the steps of the equipment fault maintenance training subject are updated, and also include: according to the step type of the equipment fault maintenance training subject, updating the corresponding actions of the current step type; the step type of the equipment fault maintenance training subject is a pre-set step type corresponding to the new event, and the pre-set step type includes: abstract logic steps, combination steps; the abstract logic steps include logic steps and loop steps; combination steps include serial combination steps and parallel combination steps; parallel combination steps include parallel all steps, parallel specified steps and parallel random steps.
[0083] The corresponding actions of the steps of the equipment failure repair training subject include equipment failure repair training animation actions and updating status values.
[0084] Among them, in order to make the step classification hierarchy reasonable, the abstract logic step abstracts the common attributes and methods of the logic step and the loop step; the combination step abstracts the common attributes and methods of the "step combination", and the combination step includes a sub-step list that stores the sub-steps belonging to the step.
[0085] Among them, Figure 2 As shown, for the logic step, the corresponding action of advancing the logic step includes:
[0086] Get the step status of the equipment fault maintenance training subject; if the step status of the equipment fault maintenance training subject is in execution, advance all actions corresponding to the steps of the equipment fault maintenance training subject; after advancing all actions corresponding to the steps of the equipment fault maintenance training subject, determine whether all actions corresponding to the steps of the equipment fault maintenance training subject have been fully executed; if all actions corresponding to the steps of the equipment fault maintenance training subject have been fully executed, set the operation steps of the equipment fault maintenance training subject to completion; if all actions corresponding to the steps of the equipment fault maintenance training subject have not been fully executed, end the current action update; all actions corresponding to the steps of the equipment fault maintenance training subject include equipment fault maintenance training animation actions and update status values.
[0087] If the step status of the equipment fault maintenance training subject is activated, determine whether the new event matches the conditions of the step of the equipment fault maintenance training subject; if the new event matches the conditions of the step of the equipment fault maintenance training subject, activate all corresponding actions of the step and set the step status to executing action; if the new event does not match the conditions of the step of the equipment fault maintenance training subject, exit this step update.
[0088] Exemplarily, there are tool 1 and tool 2, accessory 1 and accessory 2, and the preset condition is that tool 1 clicks accessory 1, and tool 2 clicks accessory 2; if the user uses tool 1 to click accessory 2, and tool 2 clicks accessory 1, the new event does not match the conditions of the steps of the equipment failure maintenance training subject; if the user uses tool 1 to click accessory 1, and tool 1 to click accessory 2, the new event still does not match the conditions of the steps of the equipment failure maintenance training subject, and this step update is exited; only when tool 1 clicks accessory 1 and tool 2 clicks accessory 2, the preset condition is met, all corresponding actions of the current step are activated, and the step status is set to executing action, and the next action is continued.
[0089] Among them, Figure 3 As shown, for the loop step, the corresponding action of advancing the loop step includes:
[0090] Get the step status of the equipment fault maintenance training subject; if the step status of the equipment fault maintenance training subject is in execution, advance the corresponding action of the step of the equipment fault maintenance training subject; after advancing the corresponding action of the step of the equipment fault maintenance training subject, determine whether the corresponding action of this step has been fully executed; if the corresponding action of the step of the equipment fault maintenance training subject has been fully executed, set the current step to complete; if all actions have not been completed, end the current step update.
[0091] If the step status of the equipment fault maintenance training subject is activated, advance the sub-steps of the step of the equipment fault maintenance training subject, and update all conditions corresponding to all actions, all conditions include preset step results and preset conditions; make a judgment based on the sub-step results and conditions. If the sub-step results meet the preset step results and the conditions meet the preset conditions, activate all actions and set the step status to executing actions.
[0092] Exemplarily, there are existing tools 1 and tool 2, accessory 1 and accessory 2, and a display, and the preset condition is that tool 1 clicks accessory 1, tool 2 clicks accessory 2, and the display displays the value m; if the user uses tool 1 to click accessory 1 and tool 2 to click accessory 2, and the display displays a result value of n after the operation, n and m are not equal, and the preset condition is not met; if the user uses tool 1 to click accessory 1 and tool 2 to click accessory 2, and the display displays a result value of n after the operation, n and m are equal, then the preset condition is met, all corresponding actions of the steps of the equipment fault maintenance training subject are activated, and the step status of the equipment fault maintenance training subject is set to executing action, and the next action is continued, that is, all conditions are met, including simultaneously meeting the preset step results and preset conditions; the above preset conditions are the conditions of the steps of the equipment fault maintenance training subject.
[0093] Among them, Figure 4 As shown, for the serial combination step, the corresponding action of advancing the serial combination step includes:
[0094] Get the step status of the equipment fault maintenance training subject; if the step status of the equipment fault maintenance training subject is inactive, exit the step execution of the equipment fault maintenance training subject; if the step status is activated, get the current sub-step; if the sub-step status is inactive, activate the sub-step, and call the sub-step update; determine whether the current sub-step has been updated; if the current sub-step is not completed, exit the step execution of the equipment fault maintenance training subject; if the current sub-step has been completed, determine whether all sub-steps have been completed; if all sub-steps are not completed, add one to the current sub-step; if all sub-steps are completed, the serial combination step is completed.
[0095] It should be understood that a serial combination step is to execute a group of sub-steps one by one in sequence.
[0096] Among them, Figure 5 As shown, for the parallel combination step, the corresponding action of advancing the parallel combination step includes:
[0097] Traverse the sub-steps of the equipment failure maintenance training subject; determine the status of the sub-steps, if the status of the sub-steps of the equipment failure maintenance training subject is not activated, activate the sub-steps of the equipment failure maintenance training subject; advance the sub-steps; after traversing all the sub-steps, if the status of the sub-steps that must be completed is completed, the parallel combination steps of the equipment failure maintenance training subject are completed; the above-mentioned sub-steps that must be completed can be all sub-steps, specified sub-steps or random sub-steps.
[0098] For example, in the disassembly process, A can be disassembled first, or B can be disassembled first. Disassembly of A requires three steps, and disassembly of B requires three steps. The three steps of disassembly of A can be organized into a serial combination step, and the three steps of disassembly of B can also be organized into a serial combination step, and then the two serial combination steps can be organized into a parallel combination step. In this way, during the training process, the order of disassembly of A and B is no longer fixed, which increases flexibility. The serial combination step is usually used to organize sub-processes as sub-processes of the parallel combination step.
[0099] Exemplarily, for the above situation, the two combinations of A and B can be disassembled at the same time. A can be disassembled first and then B, or B can be disassembled first and then A, or the two sub-processes can be performed alternately.
[0100] Exemplarily, in the parallel combination step, all sub-steps are activated at the same time and can be executed in parallel. According to different ending conditions, it can be divided into parallel all steps, parallel specified steps and parallel random steps. Parallel all steps means that all sub-steps are activated and executed at the same time, and the step is not completed until all sub-steps are completed; parallel specified steps means that all sub-steps are activated and executed at the same time. When a specified sub-step is completed, the step is completed regardless of the execution status of other sub-steps; parallel random steps means that all sub-steps are activated and executed at the same time. When the parallel random step is activated, a random number is generated. The random number is used to specify the sub-step. When the specified sub-step is completed, the step is completed.
[0101] For example, for the same fault phenomenon, there may be two fault causes. In order to prevent the training process from becoming rigid, the fault cause changes randomly during each training. Through parallel random steps, a maintenance process required for one fault cause is randomly selected. Only after the maintenance process is completed, the subject training is completed.
[0102] Specifically, the process management module includes a training subject serial combination step; a training subject serial combination step is used to store all operation steps of equipment fault maintenance training; the operation steps have multiple step types, which are nested with each other according to preset relationships of different types of steps.
[0103] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0104] Corresponding to the equipment virtual training modeling method described in the above embodiment, Figure 6 A structural block diagram of an equipment virtual training modeling device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0105] See also Figure 6 The equipment virtual training modeling device in the embodiment of the present application may include a request input module 201, a parsing module 202 and a process management module 203.
[0106] Among them, the request acquisition module 201 is used to define the XML script file of the equipment fault maintenance training subject according to the pre-defined equipment fault maintenance rules; the parsing module 202 is used to parse the XML script file by calling the script parser through the process management module to obtain the script content; the script content includes initialization information, steps, conditions, actions and status values; the process management module 203 is used to update the steps of the equipment fault maintenance training subject based on the parsed script content; the process management module schedules and manages the operation steps of the equipment fault maintenance training according to the preset scheduling rules.
[0107] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0108] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0109] The present application also provides a terminal device, see Figure 7 The terminal device 300 may include: at least one processor 310, a memory 320, and a computer program stored in the memory 320 and executable on the at least one processor 310. When the processor 310 executes the computer program, the steps in any of the above-mentioned method embodiments are implemented, for example Figure 1 Steps 101 to 103 in the illustrated embodiment. Alternatively, when the processor 310 executes the computer program, the functions of each module / unit in the above-mentioned device embodiments are implemented, for example Figure 6Functions of modules 201 to 203 are shown.
[0110] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 320, and executed by the processor 310 to complete the present application. The one or more modules / units may be a series of computer program segments that can complete specific functions, and the program segments are used to describe the execution process of the computer program in the terminal device 300.
[0111] Those skilled in the art will understand that Figure 7 It is only an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, buses, etc.
[0112] The processor 310 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0113] The memory 320 may be an internal storage unit of the terminal device, or an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. The memory 320 is used to store the computer program and other programs and data required by the terminal device. The memory 320 may also be used to temporarily store data that has been output or is to be output.
[0114] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0115] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in each embodiment of the above-mentioned data operation method can be implemented.
[0116] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in each embodiment of the above-mentioned data operation method when executing the computer program product.
[0117] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0118] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0119] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0120] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0121] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0122] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for modeling equipment virtual training, characterized in that: include: Define the XML script file of equipment failure maintenance training subjects according to the pre-defined equipment failure maintenance rules; The process management module calls the script parser to parse the XML script file to obtain the script content; the script content includes initialization information, steps, conditions, actions and status values; The process management module calls the script parser to parse the XML script file, including: According to the path of the script file of the equipment failure maintenance training subject, the process management module calls the script parser to obtain the parsed script content; Initializing the UI and three-dimensional scene of the equipment failure maintenance training subject based on the initialization information; Registering event providers based on the UI and the three-dimensional scene; Based on the parsed script content, the steps of the equipment fault maintenance training subject are updated; the process management module schedules and manages the operation steps of the equipment fault maintenance training according to the preset scheduling rules; The updating of the steps of the equipment failure maintenance training subject based on the parsed script content includes: The process management module registers the Update function; The process management module uses the Update function to traverse the event provider to obtain a list of new events in the current frame; the new events are external input events collected by the event provider; Inserting an empty event into the list of new events; the empty event is generated in each frame of the system operation and passed to the step of unconditional operation; The process management module obtains the first state of the current step of the equipment failure maintenance training subject, and activates the current step if the current step is in an inactive state; the first state of the current step includes activated and inactivated; If the current step is in an activated state, the process management module cyclically calls the Update function according to a preset time period to update the steps of the equipment fault maintenance training subject; The process management module calls the Update function to match the new event with the condition of the current step of the equipment failure maintenance training subject; After the matching is completed, the corresponding actions of the steps of the equipment failure maintenance training subject are updated.
2. The equipment virtual training modeling method according to claim 1, characterized in that: After the matching is completed, the corresponding actions of the step of updating the equipment failure maintenance training subject include: After the matching is completed, the second state of the current step of the equipment fault maintenance training subject is obtained; the second state of the current step includes being executed and completed; Based on the acquired second state of the current step, updating the corresponding action of the current step of the equipment failure maintenance training subject; The corresponding actions of updating the current step of the equipment failure maintenance training subject include: If the status of the current step is completed, then the update of the current step in the current frame is terminated; if the status of the current step is in execution, then wait for the process management module to call the Update function in the next frame to update the next step of the equipment fault maintenance training subject; When the process management module calls the Update function in the next frame to update the next step of the equipment failure maintenance training subject, the next step is the current step.
3. The equipment virtual training modeling method according to claim 2, characterized in that: After the matching is completed, the corresponding actions of the steps of the equipment failure maintenance training subject are updated, and further include: According to the step type of the equipment failure maintenance training subject, updating the corresponding action of the current step type; The type of the step of the equipment failure maintenance training subject is a pre-set step type corresponding to the new event, and the pre-set step type includes: abstract logic step and combination step; the abstract logic step includes logic step and loop step; the combination step includes serial combination step and parallel combination step; the parallel combination step includes parallel all steps, parallel specified steps and parallel random steps; The corresponding actions of the steps of the equipment failure repair training subject include the equipment failure repair training animation actions and updated status values.
4. The equipment virtual training modeling method according to claim 1, characterized in that: The process management module includes a training subject serial combination step; the one training subject serial combination step is used to store all the operation steps of the equipment fault maintenance training; the operation steps have multiple step types, which are nested with each other according to preset relationships of different types of steps.
5. An equipment virtual training modeling device, characterized in that: include: An input module, used to define an XML script file of equipment failure maintenance training subjects according to predefined equipment failure maintenance rules; A parsing module, used to parse the XML script file by calling the script parser through the process management module to obtain the script content; the script content includes initialization information, steps, conditions, actions and status values; The analysis module is specifically used for: According to the path of the script file of the equipment failure maintenance training subject, the process management module calls the script parser to obtain the parsed script content; Initializing the UI and three-dimensional scene of the equipment failure maintenance training subject based on the initialization information; Registering event providers based on the UI and the three-dimensional scene; A process management module is used to update the steps of the equipment fault maintenance training subject based on the parsed script content; the process management module schedules and manages the operation steps of the equipment fault maintenance training according to preset scheduling rules; The process management module is specifically used for: Register Update function; Using the Update function to traverse the event provider, obtain a list of new events in the current frame; the new events are external input events collected by the event provider; Inserting an empty event into the list of new events; The empty event is generated in each frame of the system operation and passed to the step that runs unconditionally; Acquire the first state of the current step of the equipment failure maintenance training subject, and if the current step is in an inactive state, activate the current step; the first state of the current step includes activated and inactivated; If the current step is in an activated state, the process management module cyclically calls the Update function according to a preset time period to update the steps of the equipment fault maintenance training subject; Calling the Update function to match the new event with the condition of the current step of the equipment failure maintenance training subject; After the matching is completed, the corresponding actions of the steps of the equipment failure maintenance training subject are updated.
6. A terminal device, comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 4 is implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.
8. An equipment virtual training modeling system, characterized in that: The equipment virtual training modeling system is composed of the terminal device described in claim 6 and other physical devices.
