CN109753276B - Control method based on illusion engine and related device - Google Patents

Control method based on illusion engine and related device Download PDF

Info

Publication number
CN109753276B
CN109753276B CN201811645022.8A CN201811645022A CN109753276B CN 109753276 B CN109753276 B CN 109753276B CN 201811645022 A CN201811645022 A CN 201811645022A CN 109753276 B CN109753276 B CN 109753276B
Authority
CN
China
Prior art keywords
interface
script
module
engine
core
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811645022.8A
Other languages
Chinese (zh)
Other versions
CN109753276A (en
Inventor
窦玉波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Tianji Qiyou Technology Co ltd
Original Assignee
Beijing Tianji Qiyou Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Tianji Qiyou Technology Co ltd filed Critical Beijing Tianji Qiyou Technology Co ltd
Priority to CN201811645022.8A priority Critical patent/CN109753276B/en
Publication of CN109753276A publication Critical patent/CN109753276A/en
Application granted granted Critical
Publication of CN109753276B publication Critical patent/CN109753276B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a control method based on a phantom engine, which is applied to a plug-in, wherein the plug-in is in communication connection with the phantom engine, and receives a service calling instruction through a script interface, wherein the service calling instruction is used for calling the service of the phantom engine, and the script interface is obtained by packaging at least one core interface, architecture auxiliary information and business logic information in the phantom engine; when a function calling instruction is received through the script interface, an engine control instruction is called through the function calling instruction, the function calling instruction corresponds to the C # language, and the engine control instruction corresponds to the C + + language; calling a target core interface according to the engine control instruction; and controlling the illusion engine to execute corresponding operation through the target core interface. The invention also discloses an engine control device. The invention encapsulates the illusion engine, and developers can use C # language to develop services by calling the script interface, thereby reducing the development difficulty.

Description

Control method based on illusion engine and related device
Technical Field
The invention relates to the technical field of virtualization, in particular to a control method based on a ghost engine and a related device.
Background
The illusion engine is a development platform, provides a large number of core technology arrays and content editing tools, and supports the infrastructure project construction of a high-end development team. The illusion engine is written to make it easier to produce content and develop programming. The use of abstract programs to create, test and perform various types of software testing tasks results from creating a virtual environment, providing efficient modules and an extensible development framework for program writers, with less program development content involved.
Currently, the ghost engine already implements the functionality of open source code (open source code), i.e., the developer can see the source code of the ghost engine. The developer mainly uses the C + + programming language when writing code in the illusion engine.
However, the C + + programming language is complex, and the C + + programming language is often used for programming with a huge code amount, so that errors are easily generated when the illusion engine is used for developing services, so that the development efficiency is low, and the development difficulty is high.
Disclosure of Invention
The embodiment of the invention provides a control method based on a ghost engine and a related device, wherein the ghost engine is packaged in two layers, the first layer is used for packaging a core interface of the ghost engine, the second layer is used for connecting the packaged core interface to a script interface, developers can use C # language to develop services by calling the script interface, and compared with C + + programming language, the C # language is less in use difficulty, so that the development efficiency can be improved, and the development difficulty is reduced.
In view of this, a first aspect of the present invention provides a control method based on a ghost engine, where the control method is applied to a plug-in, and the plug-in establishes a communication connection with the ghost engine, and the control method includes:
receiving a service calling instruction through a script interface, wherein the service calling instruction is used for calling a service of the ghost engine, the script interface is obtained by encapsulating at least one core interface, architecture auxiliary information and business logic information in the ghost engine, and the architecture auxiliary information and the business logic information are used for indicating a relationship between the at least one core interface and the script interface;
when a function calling instruction is received through the script interface, calling an engine control instruction through the function calling instruction, wherein the function calling instruction corresponds to a C # language, and the engine control instruction corresponds to a C + + language;
calling a target core interface according to the engine control instruction, wherein the target core interface belongs to one interface of the at least one core interface;
and controlling the illusion engine to execute corresponding operation through the target core interface.
In a possible design, in a first implementation manner of the first aspect of the embodiment of the present invention, before the receiving, by the script interface, the service call instruction, the method further includes:
creating a script object, wherein the script object and the script interface have a corresponding relation;
establishing an object association relation according to the script object and at least one core object in the illusion engine, wherein the core object and the core interface have a corresponding relation, and the script object is used for storing the address, the identification and the type information of the at least one core object;
generating an interface corresponding relation between the script interface and the at least one core interface according to the object association relation;
and packaging the at least one core interface according to the interface corresponding relation, the architecture auxiliary information and the service logic information to obtain the script interface.
In a possible design, in a second implementation manner of the first aspect of the embodiment of the present invention, after the encapsulating the at least one core interface according to the interface correspondence, the architecture auxiliary information, and the service logic information to obtain the script interface, the method further includes:
receiving an object removal instruction;
and setting the address of the at least one core object as an invalid address according to the object elimination instruction.
In one possible design, in a third implementation manner of the first aspect of the embodiment of the present invention, the method further includes:
calling a starting function of a script parser to enable the script parser to load a special symbolic file, wherein the special symbolic file is generated according to a general symbolic file;
after the script parser finishes the loading of the special symbol file, debugging information is sent to the script parser, so that the script parser monitors a debugging port according to the debugging information;
and receiving the running state information fed back by the script parser.
In one possible design, in a fourth implementation manner of the first aspect of the embodiment of the present invention, the method further includes:
when target resources are loaded, if the target resources do not specify a corresponding target resource packet, searching the name of the target resource packet according to the target resources, wherein the target resource packet is used for providing the target resources;
acquiring the target resource packet according to the name of the target resource packet;
when the target resource package is opened, preferentially searching a target handle through a handle management container, wherein the handle management container is used for storing N handles, and N is an integer greater than or equal to 1;
and loading the target resource according to the target handle.
A second aspect of the present invention provides an engine control apparatus applied to a plug-in, the ghost engine establishing a communication connection, the engine control apparatus including:
the system comprises a receiving module and a service calling module, wherein the receiving module is used for receiving a service calling instruction through a script interface, the service calling instruction is used for calling the service of the virtual engine, the script interface is obtained by packaging at least one core interface, architecture auxiliary information and business logic information in the virtual engine, and the architecture auxiliary information and the business logic information are used for indicating the relationship between the at least one core interface and the script interface;
the generating module is used for calling an engine control instruction through the function calling instruction when the function calling instruction is received through the script interface, wherein the function calling instruction corresponds to a C # language, and the engine control instruction corresponds to a C + + language;
the calling module is used for calling a target core interface according to the engine control instruction generated by the generating module, wherein the target core interface belongs to one interface of the at least one core interface;
and the execution module is used for controlling the illusion engine to execute corresponding operation through the target core interface called by the calling module.
In one possible design, in a first implementation manner of the second aspect of the embodiment of the present invention, the engine control apparatus further includes a creating module, an establishing module, and an encapsulating module;
the creating module is used for creating a script object before the receiving module receives a service calling instruction through a script interface, wherein the script object and the script interface have a corresponding relation;
the establishing module is configured to establish an object association relationship between the script object established by the establishing module and at least one core object in the ghost engine, where the core object and the core interface have a corresponding relationship, and the script object is configured to store an address, an identifier, and type information of the at least one core object;
the generating module is further configured to generate an interface corresponding relationship between the script interface and the at least one core interface according to the object association relationship established by the establishing module;
the encapsulation module is configured to encapsulate the at least one core interface according to the interface correspondence, the architecture auxiliary information, and the service logic information generated by the generation module, so as to obtain the script interface.
In one possible design, in a second implementation manner of the second aspect of the embodiment of the present invention, the engine control apparatus further includes a setting module;
the receiving module is further used for receiving an object elimination instruction;
the setting module is configured to set an address of the at least one core object as an invalid address according to the object removal instruction received by the receiving module.
In one possible design, in a third implementation manner of the second aspect of the embodiment of the present invention, the engine control apparatus further includes a sending module;
the calling module is further used for calling a starting function of the script parser so that the script parser loads a special symbolic file, wherein the special symbolic file is generated according to a general symbolic file;
the sending module is used for sending debugging information to the script parser after the script parser finishes the loading of the special symbol file, so that the script parser monitors a debugging port according to the debugging information;
the receiving module is further configured to receive running state information fed back by the script parser.
In a possible design, in a fourth implementation manner of the second aspect of the embodiment of the present invention, the engine control apparatus further includes a search module, an acquisition module, and a loading module;
the searching module is configured to search, when a target resource is loaded, a name of the target resource package according to the target resource if the target resource does not specify a corresponding target resource package, where the target resource package is used to provide the target resource;
the obtaining module is used for obtaining the target resource packet according to the name of the target resource packet searched by the searching module;
the searching module is configured to preferentially search a target handle through a handle management container when the target resource packet acquired by the acquiring module is opened, where the handle management container is used to store N handles, and N is an integer greater than or equal to 1;
and the loading module is used for loading the target resource according to the target handle searched by the searching module.
A third aspect of the present invention provides a terminal device, including: a memory, a transceiver, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory and comprises the following steps:
receiving a service calling instruction through a script interface, wherein the service calling instruction is used for calling a service of the ghost engine, the script interface is obtained by encapsulating at least one core interface, architecture auxiliary information and business logic information in the ghost engine, and the architecture auxiliary information and the business logic information are used for indicating a relationship between the at least one core interface and the script interface;
when a function calling instruction is received through the script interface, calling an engine control instruction through the function calling instruction, wherein the function calling instruction corresponds to a C # language, and the engine control instruction corresponds to a C + + language;
calling a target core interface according to the engine control instruction, wherein the target core interface belongs to one interface of the at least one core interface;
controlling the illusion engine to execute corresponding operation through the target core interface;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the method of the above-described aspects.
According to the technical scheme, the embodiment of the invention has the following advantages:
the embodiment of the invention provides a control method based on a phantom engine, which is applied to a plug-in, the plug-in is in communication connection with the phantom engine, a service calling instruction is received through a script interface, wherein the service calling instruction is used for calling the service of the phantom engine, the script interface is obtained by packaging at least one core interface, architecture auxiliary information and business logic information in the phantom engine, the architecture auxiliary information and the business logic information are used for indicating the relation between the at least one core interface and the script interface, when the function calling instruction is received through the script interface, the engine control instruction can be called through the function calling instruction, the function calling instruction corresponds to C #, the engine control instruction corresponds to C + +, then a target core interface is called according to the engine control instruction, and the target core interface belongs to one interface of the at least one core interface, and finally, controlling the illusion engine to execute corresponding operation through the target core interface. Through the method, the ghost engine is packaged in two layers, the core interface of the ghost engine is packaged in the first layer, the packaged core interface is connected into the script interface in the second layer, developers can use the C # language to develop services by calling the script interface, and compared with the C + + programming language, the C # language is smaller in use difficulty, so that the development efficiency can be improved, and the development difficulty is reduced.
Drawings
Fig. 1 is a schematic diagram of an embodiment of a control method based on a ghost engine according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of an engine control apparatus according to the present invention;
FIG. 3 is a schematic diagram of another embodiment of an engine control apparatus according to the present invention;
FIG. 4 is a schematic diagram of another embodiment of an engine control apparatus according to the present invention;
FIG. 5 is a schematic diagram of another embodiment of an engine control apparatus according to the present invention;
FIG. 6 is a schematic diagram of another embodiment of an engine control apparatus according to the present invention;
fig. 7 is a schematic structural diagram of a terminal device in the embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a control method based on a ghost engine and a related device, wherein the ghost engine is packaged in two layers, the first layer is used for packaging a core interface of the ghost engine, the second layer is used for connecting the packaged core interface to a script interface, developers can use C # language to develop services by calling the script interface, and compared with C + + programming language, the C # language is less in use difficulty, so that the development efficiency can be improved, and the development difficulty is reduced.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, a control method based on a phantom engine according to the present invention is described as follows, and an embodiment of the control method based on a phantom engine according to the present invention includes:
101. receiving a service calling instruction through a script interface, wherein the service calling instruction is used for calling a service of the phantom engine, the script interface is obtained by packaging at least one core interface, architecture auxiliary information and business logic information in the phantom engine, and the architecture auxiliary information and the business logic information are used for indicating the relationship between the at least one core interface and the script interface;
in this embodiment, the engine control device provided by the present invention is mainly applied to a plug-in, the plug-in establishes a communication connection with a ghost engine, and the ghost engine is a three-dimensional rendering engine and can be used to develop a three-dimensional application. Firstly, the service of the illusion engine is obtained by calling a script interface provided by a plug-in, the illusion engine is open at present, and a developer can see the source code of the illusion engine. The invention carries out two-layer encapsulation on the ghost engine, wherein the first layer encapsulates at least one core interface in the ghost engine, and the second layer encapsulates the at least one core interface into a script interface for developers to use.
In particular, the architecture assistance information as well as the business logic information is needed in the process of encapsulating the at least one core interface. The adoption of the architecture auxiliary information can help technicians to understand the association between the core interfaces and the packaging mode more easily, so that the complex association between the core interfaces in the illusion engine is constructed by using a design mode. The logic information is the method used to implement the design pattern. The logic information is not exposed outside the plug-in, thereby ensuring the confidentiality of the information and preventing the information from being maliciously tampered by people.
102. When a function calling instruction is received through a script interface, generating an engine control instruction according to the function calling instruction, wherein the function calling instruction corresponds to a C # language, and the engine control instruction corresponds to a C + + language;
in this embodiment, when a user needs to invoke a certain function provided by the illusion engine, a function call instruction may be triggered through the script interface, where the function call instruction is written in the C # language. The plug-in converts the function call instruction into an engine control instruction, and the engine control instruction is written by C + + language. That is, the core interface of the illusion engine is packaged, and the script interface is provided to improve the development efficiency, so that the development difficulty is greatly reduced by scripting development, developers only need to pay attention to business logic, and functions related to the illusion engine only use the packaged script interface instead of directly calling the illusion engine.
103. Calling a target core interface according to the engine control instruction, wherein the target core interface belongs to one interface of at least one core interface;
in this embodiment, the engine control device calls a target core interface in the ghost engine according to the engine control instruction, the target core interface belongs to a core interface in the ghost engine, and each core interface has a corresponding function, where the interface is an abstraction provided to the outside, and is used to separate an external communication method by an internal operation, so that the internal modification does not affect the way of interaction with other external entities. Several types of common core interfaces will be described below.
The first type of core interface is mainly used for providing a function of packaging the camera and providing an interface for information such as position, rotation, orientation, visual angle and the like of the camera to the outside.
The second type of core interface is mainly used for providing related functions of the packaging interface and providing interfaces with functions of interface loading, interface element searching, event response and the like.
The third type of core interface is mainly used for providing interfaces for encapsulating functions such as game objects (actors) and function mounts (components).
And the fourth type core interface is mainly used for providing a function of encapsulating scenes and providing interfaces with functions of loading, switching, unloading, element searching, seamless geodesic map management and the like for the outside.
And the fifth type of core interface is mainly used for providing an interface for packaging a skeleton animation and skin system and providing functions of loading, action playing, action switching, reloading, deformation and the like for the outside.
The sixth type of core interface is mainly used for providing interfaces with the functions of modifying the illusion engine, packaging resources, flexibly loading and updating.
The seventh core interface is mainly used for providing the function of encapsulating the particle system and providing an interface with the playing and controlling functions.
And the eighth type of core interface is mainly used for providing an interface for encapsulating the input control module.
The ninth type core interface is mainly used for providing interfaces for functions of a packaging material system and an illumination system.
104. And controlling the illusion engine to execute corresponding operation through the target core interface.
In this embodiment, after the target core interface is called, the engine control device may control the illusion engine to execute a corresponding operation through the target core interface. Before the packaged release of the project, the code of the C # language is automatically converted into the code of the C + + language, then the compilation is carried out, and finally the packaged release is carried out.
The embodiment of the invention provides a control method based on a phantom engine, which is applied to a plug-in, the plug-in is in communication connection with the phantom engine, a service calling instruction is received through a script interface, wherein the service calling instruction is used for calling the service of the phantom engine, the script interface is obtained by packaging at least one core interface, architecture auxiliary information and business logic information in the phantom engine, the architecture auxiliary information and the business logic information are used for indicating the relation between the at least one core interface and the script interface, when the function calling instruction is received through the script interface, the engine control instruction can be called through the function calling instruction, the function calling instruction corresponds to C #, the engine control instruction corresponds to C + +, then a target core interface is called according to the engine control instruction, and the target core interface belongs to one interface of the at least one core interface, and finally, controlling the illusion engine to execute corresponding operation through the target core interface. Through the method, the ghost engine is packaged in two layers, the core interface of the ghost engine is packaged in the first layer, the packaged core interface is connected into the script interface in the second layer, developers can use the C # language to develop services by calling the script interface, and compared with the C + + programming language, the C # language is smaller in use difficulty, so that the development efficiency can be improved, and the development difficulty is reduced.
Optionally, on the basis of the embodiment corresponding to fig. 1, in a first optional embodiment of the control method based on the ghost engine according to the embodiment of the present invention, before receiving the service call instruction through the script interface, the method may further include:
creating a script object, wherein the script object and a script interface have a corresponding relation;
establishing an object association relation according to the script object and at least one core object in the illusion engine, wherein the core object and the core interface have a corresponding relation, and the script object is used for storing the address, the identification and the type information of the at least one core object;
generating an interface corresponding relation between the script interface and at least one core interface according to the object association relation;
and packaging at least one core interface according to the interface corresponding relation, the architecture auxiliary information and the service logic information to obtain a script interface.
In this embodiment, how to construct a mapping relationship between the core interface and the script interface is described, the ghost engine is extended by deploying the engine control device in the plug-in, the core interface of the ghost engine is encapsulated, and a more simplified script interface is provided to the outside. It will be appreciated that in practical applications, the engine control means may support the execution of the script in the following two ways. The first way is to realize the association between the interfaces through a built-in script parser, i.e. a function registration mechanism of the script parser is used to establish a mapping relationship among the script object, the function, the core interface and the script interface. The script parser may be Mono, which is a free open source code project that aims to create a series of NET tools that match the European Computer Manufacturers Association (ECMA) standard, including C # compilers and universal language frameworks. The second way is to use the underlying language (such as C language or C + + language) to implement various functions provided by the script, and then translate the logic of the script language into code written in C + + language before package release.
Specifically, the engine control apparatus provided by the present invention can create a script object and associate the script object with a core object of the ghost engine, so that the core object of the ghost engine can be controlled by using this script object in script code. The script object and the script interface have a corresponding relation, and the core object and the core interface have a corresponding relation. The engine control device establishes the association for use by storing the address, the unique identifier and the type information of the core object of the illusion engine in the script object.
When a program is released on a mobile device, code written in the C # language can be translated into code written in the C + + language, and then compiled, packaged and released. The principle of the translation tool is to provide a one-to-one C + + function implementation for the C # language core library, so that codes in the C # language are replaced by codes in the C + + language. For example, if there are M functions in the C # language standard library, the M functions are written in the C + + language to form a one-to-one correspondence relationship.
Secondly, in the embodiment of the present invention, how to establish a mapping relationship between a core interface and a script interface is introduced, a script object needs to be created first, an object association relationship is established according to the script object and at least one core object in a ghost engine, an interface correspondence relationship between the script interface and at least one core interface is generated according to the object association relationship, and finally, at least one core interface is encapsulated according to the interface correspondence relationship, architecture auxiliary information, and business logic information, so as to obtain the script interface. Through the method, the script interface and the core interface can be associated, so that calling among different types of interfaces is realized, and the feasibility and operability of the scheme are improved.
Optionally, on the basis of the first embodiment corresponding to fig. 1, in a second optional embodiment of the control method based on the illusion engine provided in the embodiment of the present invention, after encapsulating at least one core interface according to the interface correspondence, the architecture auxiliary information, and the service logic information to obtain the script interface, the method may further include:
receiving an object removal instruction;
and setting the address of at least one core object as an invalid address according to the object elimination instruction.
In this embodiment, a method for removing the mapping relationship between the core interface and the script interface is introduced. That is, the plug-in may first receive an object removal instruction triggered by a user, and then reset, i.e., set to an invalid address, an address of at least one core object according to the object removal instruction. Specifically, when the core object is destroyed in the ghost engine, the address of the core object of the ghost engine, which is stored in the script object, is set as an invalid address. The script object may determine whether the associated ghost engine core object is valid based on detecting whether the recorded address information is valid.
In the embodiment of the present invention, after at least one core interface is encapsulated according to the interface correspondence, the architecture auxiliary information, and the service logic information to obtain the script interface, an object removal instruction may also be received, and then an address of at least one core object is set as an invalid address according to the object removal instruction. By the method, after the address of the original core object is rewritten into the invalid address, the mapping relation between the core interface and the script interface can be cancelled, so that the difficulty of setting the plug-in is reduced, and the operability of the scheme is improved.
Optionally, on the basis of the embodiment corresponding to fig. 1, in a third optional embodiment of the control method based on the ghost engine provided in the embodiment of the present invention, the method may further include:
calling a starting function of the script parser to enable the script parser to load a special symbolic file, wherein the special symbolic file is generated according to the general symbolic file;
after the script parser finishes the loading of the special symbol file, debugging information is sent to the script parser so that the script parser monitors a debugging port according to the debugging information;
and receiving the running state information fed back by the script parser.
In this embodiment, a debugging mechanism based on an engine control device will be described. The compiling and developing project firstly generates a general symbol File, namely a Program Database File (PDB), and then generates a Mono dedicated special symbol File, namely a Mono Database File (MDB), according to the general symbol File. Among them, the PDB file is a symbol file for debugging generated when a programming tool (Vsiual Studio) constructs a project. Mainly containing global variables, local variables, function names and their entry point addresses, frame pointer skip records and source code line numbers. The MDB file is an extensible utility that performs underlying debugging and editing for real-time operating systems, operating system crash dumps, user processes, user process core dumps, and target files. Debugging is the analysis of the execution and state of a software program in order to eliminate bugs. The debugging tool provides a tool for performing control so that a developer can re-execute a program in a controlled environment and display the current state of program data or evaluate an expression by means of a source language used when developing the program. The MDB file provides a fully customizable environment for debugging these programs and schemes, including a dynamic module tool that developers can use to implement debug commands in order to perform program specific analysis. Each MDB file can be used to examine programs in a variety of different contexts, including real-time and post-analysis.
Assuming that the script parser is specifically a Mono, the illusion engine is started to load the engine control device, and the engine control device is initialized to load the Mono library and call the start function of the Mono, so as to notify the Mono to load the special symbol file (i.e. the MDB file), and then the Mono can be sent debugging information, thereby notifying the Mono to monitor at least one debugging port. In addition, a target plug-in is also required to be developed for the Visu lStudio, the target plug-in adds a menu in the Visu lStudio, an Internet Protocol (IP) address and a port number of interconnection between networks monitored by the Mono can be input after clicking the menu, and then connection is established with the Mono.
In the embodiment of the present invention, the engine control device further has a debugging mechanism, that is, the engine control device may first call a start function of the script parser to enable the script parser to load the special symbol file, then send debugging information to the script parser after the script parser completes loading of the special symbol file, so that the script parser monitors the debugging port according to the debugging information, and finally receive the running state information fed back by the script parser. Through the mode, after the plug-in and the script resolver are in communication connection, the plug-in can send the endpoint information to the script resolver, so that developers can monitor the operation condition of the plug-in real time, and meanwhile, the developers can also receive monitoring information sent by the script resolver through the plug-in, so that different conditions can be responded timely, and further the feasibility of the scheme is improved.
Optionally, on the basis of the embodiment corresponding to fig. 1, in a fourth optional embodiment of the control method based on the ghost engine provided in the embodiment of the present invention, the method may further include:
when target resources are loaded, if the target resources do not specify a corresponding target resource packet, searching the name of the target resource packet according to the target resources, wherein the target resource packet is used for providing the target resources;
acquiring a target resource packet according to the name of the target resource packet;
when a target resource packet is opened, preferentially searching a target handle through a handle management container, wherein the handle management container is used for storing N handles, and N is an integer greater than or equal to 1;
and loading the target resource according to the target handle.
In this embodiment, a resource loading and updating mechanism will be introduced. First, when an application (e.g., a game) is started, a resource package information configuration table, which typically includes the name, path, Cyclic Redundancy Check (CRC) and resource package Identification (ID) of each resource package, may be pulled from the network. Each row in the resource packet information configuration table corresponds to one piece of resource information. Then, the content of the latest resource package information configuration table is compared with the state of the local resource package of the terminal, and whether the update is needed or not is determined.
If the update is needed, the plug-in generates a temporary resource retrieval file first and then writes the information of the target resource package into the resource retrieval file. Then, according to the comparison result, it can be determined which target resources are lacking, and then the target resources can be pulled from the network to the local terminal. And writing file list information (including but not limited to the name, path, CRC and resource packet ID of the target resource) corresponding to the target resource into the temporary resource retrieval file, and finally overwriting the temporary resource retrieval file into the main resource retrieval file and deleting the temporarily generated resource retrieval file.
The following will continue to describe how the target resource is loaded. And loading a local resource retrieval file of the terminal, then generating a resource retrieval data structure with a mapping relation between the target resource file name and the target resource package name, and directly loading if the target resource package from which the target resource is loaded is definitely known when one target resource is loaded. Otherwise, the resource retrieval data structure needs to be searched, so that the name of the target resource package is obtained, then the target resource package is opened, and then the target resource is loaded from the target resource package. When the target resource package is opened, the file handle needs to be added into a handle management container, the target handle is searched through the handle management container, and the target resource is loaded from the target resource package by using the target handle.
However, the number of handles that can be stored in the handle management container is often limited, and assuming that N handles can be stored in total, when N handles are reached, some handles need to be closed and deleted from the handle management container according to the least recently used principle, so that a new target handle can successfully load a target resource.
Secondly, in the embodiment of the present invention, the engine control device further has a resource update mechanism, when the target resource is loaded, whether the target resource packet is acquired is determined, if the target resource packet is not acquired, the target resource packet is searched according to the target resource, when the target resource packet is opened, the target handle is searched through the handle management container, and finally, the target resource can be loaded according to the target handle. By the above manner, handles are uniformly managed by the handle management container, and if the capacity of the handle pool has reached the upper limit, some handles are closed according to the least used principle and deleted from the handle management container, thereby ensuring the availability of the handles.
Referring to fig. 2, fig. 2 is a schematic view of an embodiment of an engine control apparatus according to an embodiment of the present invention, the engine control apparatus is applied to a plug-in, the ghost engine establishes a communication connection, and the engine control apparatus 20 includes:
a receiving module 201, configured to receive a service call instruction through a script interface, where the service call instruction is used to call a service of the ghost engine, the script interface is obtained by encapsulating at least one core interface, architecture auxiliary information, and service logic information in the ghost engine, and the architecture auxiliary information and the service logic information are used to indicate a relationship between the at least one core interface and the script interface;
a generating module 202, configured to, when a function call instruction is received through the scripting interface, call an engine control instruction through the function call instruction, where the function call instruction corresponds to a C # language and the engine control instruction corresponds to a C + + language;
a calling module 203, configured to call a target core interface according to the engine control instruction generated by the generating module 202, where the target core interface belongs to one of the at least one core interface;
the executing module 204 is configured to control the illusion engine to execute a corresponding operation through the target core interface called by the calling module 203.
In this embodiment, the receiving module 201 receives a service call instruction through a script interface, where the service call instruction is used to call a service of the ghost engine, the script interface is obtained by encapsulating at least one core interface, architecture auxiliary information, and service logic information in the ghost engine, the architecture auxiliary information and the service logic information are used to indicate a relationship between the at least one core interface and the script interface, when a function call instruction is received through the script interface, the generating module 202 calls an engine control instruction through the function call instruction, where the function call instruction corresponds to a C # language, the engine control instruction corresponds to a C + + language, and the calling module 203 calls a target core interface according to the engine control instruction generated by the generating module 202, where, the target core interface belongs to one of the at least one core interface, and the execution module 204 controls the illusion engine to execute corresponding operations through the target core interface called by the calling module 203.
The embodiment of the invention provides an engine control method, which is applied to a plug-in, the plug-in is in communication connection with a virtual engine, firstly, the engine control method receives a service call instruction through a script interface, wherein the service call instruction is used for calling the service of the virtual engine, the script interface is obtained by packaging at least one core interface, architecture auxiliary information and business logic information in the virtual engine, the architecture auxiliary information and the business logic information are used for indicating the relationship between the at least one core interface and the script interface, when the function call instruction is received through the script interface, the engine control instruction can be called through the function call instruction, the function call instruction corresponds to C #, the engine control instruction corresponds to C + +, then a target core interface is called according to the engine control instruction, and the target core interface belongs to one interface of the at least one core interface, and finally, controlling the illusion engine to execute corresponding operation through the target core interface. Through the method, the ghost engine is packaged in two layers, the core interface of the ghost engine is packaged in the first layer, the packaged core interface is connected into the script interface in the second layer, developers can use the C # language to develop services by calling the script interface, and compared with the C + + programming language, the C # language is smaller in use difficulty, so that the development efficiency can be improved, and the development difficulty is reduced.
Optionally, on the basis of the embodiment corresponding to fig. 2, please refer to fig. 3, in another embodiment of the engine control apparatus 20 provided in the embodiment of the present invention, the engine control apparatus 20 further includes a creating module 205, a building module 206, and an encapsulating module 207;
the creating module 205 is configured to create a script object before the receiving module 201 receives a service call instruction through a script interface, where the script object and the script interface have a corresponding relationship;
the creating module 206 is configured to create an object association relationship between the script object created by the creating module 205 and at least one core object in the illusion engine, where the core object and the core interface have a corresponding relationship, and the script object is used to store an address, an identifier, and type information of the at least one core object;
the generating module 202 is further configured to generate an interface corresponding relationship between the script interface and the at least one core interface according to the object association relationship established by the establishing module 206;
the encapsulating module 207 is configured to encapsulate the at least one core interface according to the interface correspondence relationship, the architecture auxiliary information, and the service logic information generated by the generating module 202, so as to obtain the script interface.
Secondly, in the embodiment of the present invention, how to establish a mapping relationship between a core interface and a script interface is introduced, a script object needs to be created first, an object association relationship is established according to the script object and at least one core object in a ghost engine, an interface correspondence relationship between the script interface and at least one core interface is generated according to the object association relationship, and finally, at least one core interface is encapsulated according to the interface correspondence relationship, architecture auxiliary information, and business logic information, so as to obtain the script interface. Through the method, the script interface and the core interface can be associated, so that calling among different types of interfaces is realized, and the feasibility and operability of the scheme are improved.
Optionally, on the basis of the embodiment corresponding to fig. 3, please refer to fig. 4, in another embodiment of the engine control apparatus 20 provided in the embodiment of the present invention, the engine control apparatus 20 further includes a setting module 208;
the receiving module 201 is further configured to, by the encapsulating module 207, encapsulate the at least one core interface according to the interface correspondence, the architecture auxiliary information, and the service logic information, so as to receive an object removal instruction after the script interface is obtained;
the setting module 208 is configured to set an address of the at least one core object as an invalid address according to the object removal instruction received by the receiving module 201.
In the embodiment of the present invention, after at least one core interface is encapsulated according to the interface correspondence, the architecture auxiliary information, and the service logic information to obtain the script interface, an object removal instruction may also be received, and then an address of at least one core object is set as an invalid address according to the object removal instruction. By the method, after the address of the original core object is rewritten into the invalid address, the mapping relation between the core interface and the script interface can be cancelled, so that the difficulty of setting the plug-in is reduced, and the operability of the scheme is improved.
Optionally, on the basis of the embodiment corresponding to fig. 2, please refer to fig. 5, in another embodiment of the engine control device 20 provided in the embodiment of the present invention, the engine control device 20 further includes a sending module 209;
the calling module 203 is further configured to call a start function of a script parser, so that the script parser loads a special symbolic file, where the special symbolic file is generated according to a general symbolic file;
the sending module 209 is configured to send debugging information to the script parser after the script parser completes loading of the special symbol file, so that the script parser monitors a debugging port according to the debugging information;
the receiving module 201 is further configured to receive running state information fed back by the script parser.
In the embodiment of the present invention, the engine control device further has a debugging mechanism, that is, the engine control device may first call a start function of the script parser to enable the script parser to load the special symbol file, then send debugging information to the script parser after the script parser completes loading of the special symbol file, so that the script parser monitors the debugging port according to the debugging information, and finally receive the running state information fed back by the script parser. Through the mode, after the plug-in and the script resolver are in communication connection, the plug-in can send the endpoint information to the script resolver, so that developers can monitor the operation condition of the plug-in real time, and meanwhile, the developers can also receive monitoring information sent by the script resolver through the plug-in, so that different conditions can be responded timely, and further the feasibility of the scheme is improved.
Optionally, on the basis of the embodiments corresponding to fig. 2, fig. 3, fig. 4, or fig. 5, please refer to fig. 6, in another embodiment of the engine control apparatus 20 according to the embodiment of the present invention, the engine control apparatus 20 further includes a searching module 210, an obtaining module 211, and a loading module 212;
the searching module 210 is configured to, when a target resource is loaded, if the target resource does not specify a corresponding target resource package, search a name of the target resource package according to the target resource, where the target resource package is used to provide the target resource;
the obtaining module 211 is configured to obtain the target resource package according to the name of the target resource package searched by the searching module 210;
the searching module 210 is configured to preferentially search a target handle through a handle management container when the target resource packet acquired by the acquiring module 211 is opened, where the handle management container is used to store N handles, and N is an integer greater than or equal to 1;
the loading module 212 is configured to load the target resource according to the target handle searched by the searching module 210.
Secondly, in the embodiment of the present invention, the engine control device further has a resource update mechanism, when the target resource is loaded, whether the target resource packet is acquired is determined, if the target resource packet is not acquired, the target resource packet is searched according to the target resource, when the target resource packet is opened, the target handle is searched through the handle management container, and finally, the target resource can be loaded according to the target handle. By the above manner, handles are uniformly managed by the handle management container, and if the capacity of the handle pool has reached the upper limit, some handles are closed according to the least used principle and deleted from the handle management container, thereby ensuring the availability of the handles.
As shown in fig. 7, for convenience of description, only the parts related to the embodiment of the present invention are shown, and details of the method according to the embodiment of the present invention are not disclosed. The terminal device may be any terminal device including a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), a Point of Sales (POS), a vehicle-mounted computer, and the like, taking the terminal device as the mobile phone as an example:
fig. 7 is a block diagram illustrating a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present invention. Referring to fig. 7, the handset includes: radio Frequency (RF) circuit 310, memory 320, input unit 330, display unit 340, sensor 350, audio circuit 360, wireless fidelity (WiFi) module 370, processor 380, and power supply 390. Those skilled in the art will appreciate that the handset configuration shown in fig. 7 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 7:
the RF circuit 310 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, receives downlink information of a base station and then processes the received downlink information to the processor 380; in addition, the data for designing uplink is transmitted to the base station. In general, the RF circuit 310 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, RF circuit 310 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The memory 320 may be used to store software programs and modules, and the processor 380 executes various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 320. The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 320 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 330 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 330 may include a touch panel 331 and other input devices 332. The touch panel 331, also referred to as a touch screen, can collect touch operations of a user (e.g., operations of the user on the touch panel 331 or near the touch panel 331 using any suitable object or accessory such as a finger, a stylus, etc.) on or near the touch panel 331, and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 331 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 380, and can receive and execute commands sent by the processor 380. In addition, the touch panel 331 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 330 may include other input devices 332 in addition to the touch panel 331. In particular, other input devices 332 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 340 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The Display unit 340 may include a Display panel 341, and optionally, the Display panel 341 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 331 can cover the display panel 341, and when the touch panel 331 detects a touch operation on or near the touch panel 331, the touch panel is transmitted to the processor 380 to determine the type of the touch event, and then the processor 380 provides a corresponding visual output on the display panel 341 according to the type of the touch event. Although in fig. 7, the touch panel 331 and the display panel 341 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 331 and the display panel 341 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 350, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 341 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 341 and/or the backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 360, speaker 361, microphone 362 may provide an audio interface between the user and the handset. The audio circuit 360 may transmit the electrical signal converted from the received audio data to the speaker 361, and the audio signal is converted by the speaker 361 and output; on the other hand, the microphone 362 converts the collected sound signals into electrical signals, which are received by the audio circuit 360 and converted into audio data, which are then processed by the audio data output processor 380 and then transmitted to, for example, another cellular phone via the RF circuit 310, or output to the memory 320 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 370, and provides wireless broadband internet access for the user. Although fig. 7 shows the WiFi module 370, it is understood that it does not belong to the essential constitution of the handset, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 380 is a control center of the mobile phone, connects various parts of the whole mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory 320, thereby performing overall monitoring of the mobile phone. Optionally, processor 380 may include one or more processing units; optionally, processor 380 may integrate an application processor, which primarily handles operating systems, user interfaces, application programs, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 380.
The handset also includes a power supply 390 (e.g., a battery) for powering the various components, optionally, the power supply may be logically connected to the processor 380 through a power management system, so that the power management system may be used to manage charging, discharging, and power consumption.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
In this embodiment of the present invention, the processor 380 included in the terminal device further has the following functions:
receiving a service calling instruction through a script interface, wherein the service calling instruction is used for calling a service of the ghost engine, the script interface is obtained by encapsulating at least one core interface, architecture auxiliary information and business logic information in the ghost engine, and the architecture auxiliary information and the business logic information are used for indicating a relationship between the at least one core interface and the script interface;
when a function calling instruction is received through the script interface, calling an engine control instruction through the function calling instruction, wherein the function calling instruction corresponds to a C # language, and the engine control instruction corresponds to a C + + language;
calling a target core interface according to the engine control instruction, wherein the target core interface belongs to one interface of the at least one core interface;
and controlling the illusion engine to execute corresponding operation through the target core interface.
Optionally, the processor 380 is further configured to perform the following steps:
creating a script object, wherein the script object and the script interface have a corresponding relation;
establishing an object association relation according to the script object and at least one core object in the illusion engine, wherein the core object and the core interface have a corresponding relation, and the script object is used for storing the address, the identification and the type information of the at least one core object;
generating an interface corresponding relation between the script interface and the at least one core interface according to the object association relation;
and packaging the at least one core interface according to the interface corresponding relation, the architecture auxiliary information and the service logic information to obtain the script interface.
Optionally, the processor 380 is further configured to perform the following steps:
receiving an object removal instruction;
and setting the address of the at least one core object as an invalid address according to the object elimination instruction.
Optionally, the processor 380 is further configured to perform the following steps:
calling a starting function of a script parser to enable the script parser to load a special symbolic file, wherein the special symbolic file is generated according to a general symbolic file;
after the script parser finishes the loading of the special symbol file, debugging information is sent to the script parser, so that the script parser monitors a debugging port according to the debugging information;
and receiving the running state information fed back by the script parser.
Optionally, the processor 380 is further configured to perform the following steps:
when target resources are loaded, if the target resources do not specify a corresponding target resource packet, searching the name of the target resource packet according to the target resources, wherein the target resource packet is used for providing the target resources;
acquiring the target resource packet according to the name of the target resource packet;
when the target resource package is opened, preferentially searching a target handle through a handle management container, wherein the handle management container is used for storing N handles, and N is an integer greater than or equal to 1;
and loading the target resource according to the target handle.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (12)

1. A control method based on a ghost engine is characterized in that the control method is applied to a plug-in which is in communication connection with the ghost engine, and the control method comprises the following steps:
receiving a service calling instruction through a script interface, wherein the service calling instruction is used for calling a service of the ghost engine, the script interface is obtained by encapsulating at least one core interface, architecture auxiliary information and business logic information in the ghost engine, and the architecture auxiliary information and the business logic information are used for indicating a relationship between the at least one core interface and the script interface;
when a function calling instruction is received through the script interface, calling an engine control instruction through the function calling instruction, wherein the function calling instruction corresponds to a C # language, and the engine control instruction corresponds to a C + + language;
calling a target core interface according to the engine control instruction, wherein the target core interface belongs to one interface of the at least one core interface;
and controlling the illusion engine to execute corresponding operation through the target core interface.
2. The control method of claim 1, wherein before receiving the service call instruction through the script interface, the method further comprises:
creating a script object, wherein the script object and the script interface have a corresponding relation;
establishing an object association relation according to the script object and at least one core object in the illusion engine, wherein the core object and the core interface have a corresponding relation, and the script object is used for storing the address, the identification and the type information of the at least one core object;
generating an interface corresponding relation between the script interface and the at least one core interface according to the object association relation;
and packaging the at least one core interface according to the interface corresponding relation, the architecture auxiliary information and the service logic information to obtain the script interface.
3. The method according to claim 2, wherein after encapsulating the at least one core interface according to the interface correspondence, the architecture assistance information, and the service logic information to obtain the script interface, the method further comprises:
receiving an object removal instruction;
and setting the address of the at least one core object as an invalid address according to the object elimination instruction.
4. The control method according to claim 1, characterized in that the method further comprises:
calling a starting function of a script parser to enable the script parser to load a special symbolic file, wherein the special symbolic file is generated according to a general symbolic file;
after the script parser finishes the loading of the special symbol file, debugging information is sent to the script parser, so that the script parser monitors a debugging port according to the debugging information;
and receiving the running state information fed back by the script parser.
5. The control method according to any one of claims 1 to 4, characterized in that the method further comprises:
when target resources are loaded, if the target resources do not specify a corresponding target resource packet, searching the name of the target resource packet according to the target resources, wherein the target resource packet is used for providing the target resources;
acquiring the target resource packet according to the name of the target resource packet;
when the target resource package is opened, preferentially searching a target handle through a handle management container, wherein the handle management container is used for storing N handles, and N is an integer greater than or equal to 1;
and loading the target resource according to the target handle.
6. An engine control apparatus based on a ghost engine, wherein the engine control apparatus is applied to a plug-in, and the plug-in establishes a communication connection with the ghost engine, and the engine control apparatus comprises:
the system comprises a receiving module and a service calling module, wherein the receiving module is used for receiving a service calling instruction through a script interface, the service calling instruction is used for calling the service of the virtual engine, the script interface is obtained by packaging at least one core interface, architecture auxiliary information and business logic information in the virtual engine, and the architecture auxiliary information and the business logic information are used for indicating the relationship between the at least one core interface and the script interface;
the generating module is used for calling an engine control instruction through the function calling instruction when the function calling instruction is received through the script interface, wherein the function calling instruction corresponds to a C # language, and the engine control instruction corresponds to a C + + language;
the calling module is used for calling a target core interface according to the engine control instruction generated by the generating module, wherein the target core interface belongs to one interface of the at least one core interface;
and the execution module is used for controlling the illusion engine to execute corresponding operation through the target core interface called by the calling module.
7. The engine control apparatus according to claim 6, further comprising a creation module, and an encapsulation module;
the creating module is used for creating a script object before the receiving module receives a service calling instruction through a script interface, wherein the script object and the script interface have a corresponding relation;
the establishing module is configured to establish an object association relationship between the script object established by the establishing module and at least one core object in the ghost engine, where the core object and the core interface have a corresponding relationship, and the script object is configured to store an address, an identifier, and type information of the at least one core object;
the generating module is further configured to generate an interface corresponding relationship between the script interface and the at least one core interface according to the object association relationship established by the establishing module;
the encapsulation module is configured to encapsulate the at least one core interface according to the interface correspondence, the architecture auxiliary information, and the service logic information generated by the generation module, so as to obtain the script interface.
8. The engine control apparatus according to claim 7, characterized in that the engine control apparatus further comprises a setting module;
the receiving module is further used for receiving an object elimination instruction;
the setting module is configured to set an address of the at least one core object as an invalid address according to the object removal instruction received by the receiving module.
9. The engine control apparatus according to claim 6, characterized in that the engine control apparatus further comprises a transmission module;
the calling module is further used for calling a starting function of the script parser so that the script parser loads a special symbolic file, wherein the special symbolic file is generated according to a general symbolic file;
the sending module is used for sending debugging information to the script parser after the script parser finishes the loading of the special symbol file, so that the script parser monitors a debugging port according to the debugging information;
the receiving module is further configured to receive running state information fed back by the script parser.
10. The engine control device according to any one of claims 6 to 9, characterized by further comprising a search module, an acquisition module, and a loading module;
the searching module is configured to search, when a target resource is loaded, a name of the target resource package according to the target resource if the target resource does not specify a corresponding target resource package, where the target resource package is used to provide the target resource;
the obtaining module is used for obtaining the target resource packet according to the name of the target resource packet searched by the searching module;
the searching module is configured to preferentially search a target handle through a handle management container when the target resource packet acquired by the acquiring module is opened, where the handle management container is used to store N handles, and N is an integer greater than or equal to 1;
and the loading module is used for loading the target resource according to the target handle searched by the searching module.
11. A terminal device based on a ghost engine, comprising: a memory, a transceiver, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is used for executing the program in the memory and comprises the following steps:
receiving a service calling instruction through a script interface, wherein the service calling instruction is used for calling a service of the ghost engine, the script interface is obtained by encapsulating at least one core interface, architecture auxiliary information and business logic information in the ghost engine, and the architecture auxiliary information and the business logic information are used for indicating a relationship between the at least one core interface and the script interface;
when a function calling instruction is received through the script interface, calling an engine control instruction through the function calling instruction, wherein the function calling instruction corresponds to a C # language, and the engine control instruction corresponds to a C + + language;
calling a target core interface according to the engine control instruction, wherein the target core interface belongs to one interface of the at least one core interface;
controlling the illusion engine to execute corresponding operation through the target core interface;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
12. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1 to 5.
CN201811645022.8A 2018-12-29 2018-12-29 Control method based on illusion engine and related device Active CN109753276B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811645022.8A CN109753276B (en) 2018-12-29 2018-12-29 Control method based on illusion engine and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811645022.8A CN109753276B (en) 2018-12-29 2018-12-29 Control method based on illusion engine and related device

Publications (2)

Publication Number Publication Date
CN109753276A CN109753276A (en) 2019-05-14
CN109753276B true CN109753276B (en) 2020-12-22

Family

ID=66405052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811645022.8A Active CN109753276B (en) 2018-12-29 2018-12-29 Control method based on illusion engine and related device

Country Status (1)

Country Link
CN (1) CN109753276B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113010218A (en) * 2019-12-20 2021-06-22 ***通信集团陕西有限公司 Plug-in loading method and device, computing equipment and computer storage medium
CN111540062B (en) * 2020-04-09 2023-03-24 厦门龙视科技有限公司 Path generation method based on UE engine
CN112416751A (en) * 2020-10-15 2021-02-26 北京达佳互联信息技术有限公司 Processing method and device for interface automation test and storage medium
CN112527430A (en) * 2020-12-03 2021-03-19 万翼科技有限公司 Data deployment method and related device
CN112596713B (en) * 2020-12-30 2024-02-06 深圳须弥云图空间科技有限公司 Processing method and device based on illusion engine, electronic equipment and storage medium
CN114006894B (en) * 2020-12-30 2023-11-14 深圳市万翼数字技术有限公司 Data processing system, method, electronic device, and computer storage medium
CN113111277A (en) * 2021-04-01 2021-07-13 苏州美房云客软件科技股份有限公司 Method for controlling large-screen of virtual engine PC (personal computer) by mobile terminal
CN113835736A (en) * 2021-08-18 2021-12-24 华建数创(上海)科技有限公司 Digital-analog real-time linkage implementation mechanism for illusion engine
CN115576952B (en) * 2022-11-14 2023-05-26 润芯微科技(江苏)有限公司 Method for realizing vehicle-mounted android platform communication structure based on Unreal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007060596A (en) * 2005-08-23 2007-03-08 Ntt Docomo Inc Transmission power control method and mobile communication system
CN105900518A (en) * 2013-08-27 2016-08-24 华为技术有限公司 System and method for mobile network function virtualization
CN108803872A (en) * 2018-05-08 2018-11-13 上海嘉奥信息科技发展有限公司 The plug-in system of force feedback hardware is called in illusory engine

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007060596A (en) * 2005-08-23 2007-03-08 Ntt Docomo Inc Transmission power control method and mobile communication system
CN105900518A (en) * 2013-08-27 2016-08-24 华为技术有限公司 System and method for mobile network function virtualization
CN108803872A (en) * 2018-05-08 2018-11-13 上海嘉奥信息科技发展有限公司 The plug-in system of force feedback hardware is called in illusory engine

Also Published As

Publication number Publication date
CN109753276A (en) 2019-05-14

Similar Documents

Publication Publication Date Title
CN109753276B (en) Control method based on illusion engine and related device
CN108415739B (en) Hook method and device for dynamic link library function and storage medium
CN108897562B (en) Installation package updating method, device, medium and equipment
CN107038112B (en) Application interface debugging method and device
CN107943683B (en) Test script generation method and device, electronic equipment and storage medium
CN106598584B (en) Method, device and system for processing resource file
CN106502703B (en) Function calling method and device
CN106547844B (en) A kind for the treatment of method and apparatus of user interface
CN107908407B (en) Compiling method and device and terminal equipment
CN106227588A (en) The creation method of a kind of multi-instance object, device and mobile terminal
CN108920220B (en) Function calling method, device and terminal
CN107102904A (en) Exchange method and device based on mixed application
CN109240902B (en) Method and device for acquiring firmware code of electronic equipment
CN107273139A (en) A kind of method for updating system, equipment and computer-readable recording medium
CN110058850A (en) A kind of development approach of application, device and storage medium
CN108897533A (en) A kind of method, apparatus and terminal of function call
CN106713608A (en) Application function state modifying method and apparatus, and terminal
CN110046497B (en) Function hook realization method, device and storage medium
CN108090345A (en) Linux system external command performs method and device
CN111966491A (en) Method for counting occupied memory and terminal equipment
CN106933636A (en) Start method, device and the terminal device of plug-in services
CN105005529B (en) A kind of method and device that application program is tested
CN106407800A (en) A hook method and a terminal device
CN108664389B (en) Test method, test device and terminal
CN104423990B (en) A kind of update method and device of magnet

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