WO2020057234A1 - Engine isolation method, related device, and computer-readable storage medium - Google Patents
Engine isolation method, related device, and computer-readable storage medium Download PDFInfo
- Publication number
- WO2020057234A1 WO2020057234A1 PCT/CN2019/095120 CN2019095120W WO2020057234A1 WO 2020057234 A1 WO2020057234 A1 WO 2020057234A1 CN 2019095120 W CN2019095120 W CN 2019095120W WO 2020057234 A1 WO2020057234 A1 WO 2020057234A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- layer
- game
- capabilities
- capability
- call
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/76—Adapting program code to run in a different environment; Porting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/545—Interprogram communication where tasks reside in different layers, e.g. user- and kernel-space
Definitions
- the present invention relates to the technical field of mobile terminals, and in particular, to an engine isolation method, a mobile terminal, and a computer-readable storage medium.
- H5 games Small games developed based on the browser environment, such as H5 games (HTML5 games), are widely used on mobile terminals such as mobile phones because they have the advantage of not downloading and playing online directly.
- game developers develop game code based on the browser kernel.
- the H5 game runs on a mobile terminal, it is limited by the browser development environment. It is necessary to use the browser kernel to parse and execute the JS file in the game.
- the JS layer and the system layer are generally used.
- the JS layer directly calls the system layer's capabilities to implement the game's functions. If the system layer is updated, the JS layer will also be updated accordingly, and the corresponding game code needs to be changed again, increasing the game development cost.
- the embodiments of the present application provide an engine isolation method, related equipment, and a computer-readable storage medium. Selecting different JS engines according to the system type can make full use of the built-in engine capabilities and reduce the cost of game development.
- the first aspect of the embodiments of the present application provides an engine isolation method.
- the engine isolation method is applied to a game platform that runs on a mobile terminal.
- the game platform includes a system layer, a bridge layer, and a JS layer.
- a bridge layer connects the system layer and the JS layer, the bridge layer encapsulates the system capabilities of the system layer, and the method includes:
- the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer;
- the bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer;
- the bridging layer exposes the encapsulated system capability to the JS layer, and the encapsulated system capability is available for the JS layer to call.
- the second aspect of the embodiments of the present application provides an engine isolation device.
- the engine isolation device is applied to a game platform.
- the game platform runs on a mobile terminal.
- the game platform includes a system layer, a bridge layer, and a JS layer.
- the bridge layer connects the system layer and the JS layer.
- the bridge layer encapsulates the system capabilities of the system layer.
- the engine isolation device includes a determination unit and a processing unit, where:
- the determining unit is configured to determine a JS engine corresponding to the system layer according to a system type of the system layer when a first game runs on the game platform;
- the processing unit is configured to call a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer;
- the processing unit is further configured to expose the encapsulated system capability to the JS layer, and the encapsulated system capability is for the JS layer to call.
- a third aspect of the embodiments of the present application provides a mobile terminal, including a processor and a memory, where the memory is configured to store one or more programs, and the one or more programs are configured to be executed by the processor.
- the program includes steps for performing some or all of the steps as described in any method in the first aspect of the embodiments of the present application.
- a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program for electronic data exchange, wherein the computer program causes a computer to execute the first aspect of the embodiment of the present application Some or all of the steps described in either method.
- a fifth aspect of the embodiments of the present application provides a computer program product.
- the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the program as described in the first embodiment of the present application. Some or all of the steps described in any method in one aspect.
- the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer; the bridge layer calls the JS engine corresponding to the system layer to run the
- the game code of a game is processed, the bridge layer exposes the encapsulated system capabilities to the JS layer, and the encapsulated system capabilities are called by the JS layer.
- the embodiment of the present application can add a bridge layer to isolate the JS layer from the system layer.
- the bridge layer can encapsulate the system capabilities of the system layer, and the encapsulated system capabilities can be used by the JS layer to avoid the JS layer directly interacting with the system layer. There is no need to adapt to the system layer, and the game code of the first game running in the JS layer does not need to adapt to a different type of system, which can reduce the game development cost.
- FIG. 1 is a schematic flowchart of an engine isolation method disclosed in an embodiment of the present application
- FIG. 2 is a schematic diagram of distribution of a system layer, a bridge layer, and a JS layer disclosed in an embodiment of the present application;
- FIG. 3 is a schematic flowchart of another engine isolation method disclosed in an embodiment of the present application.
- FIG. 5 is a schematic flowchart of another engine isolation method disclosed in an embodiment of the present application.
- FIG. 6 is a schematic flowchart of another engine isolation method disclosed in an embodiment of the present application.
- FIG. 7 is a schematic structural diagram of an engine isolation device disclosed in an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of a mobile terminal disclosed in an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of still another mobile terminal disclosed in an embodiment of the present application.
- an embodiment herein means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention.
- the appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they independent or alternative embodiments that are mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
- the mobile terminals involved in the embodiments of the present application may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices, or other processing devices connected to a wireless modem, and various forms of user equipment (User Equipment (UE), mobile station (MS), terminal device (terminal), and so on.
- UE User Equipment
- MS mobile station
- terminal terminal device
- mobile terminals the devices mentioned above are collectively referred to as mobile terminals.
- FIG. 1 is a schematic flowchart of an engine isolation method disclosed in an embodiment of the present application. As shown in FIG. 1, the engine isolation method includes the following steps.
- the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer.
- the game platform is a software module for running a game application, and can be run on a mobile terminal such as a mobile phone.
- the game platform includes a system layer, a bridge layer, and a JS (JavaScript) layer.
- the system layer can be understood as the bottom layer and is responsible for providing system capabilities related to the bottom layer of the mobile terminal, such as the ability to access memory and the ability to make calls.
- the first game may be a small game developed based on a browser environment, such as an H5 game (HTML5 game).
- the JS layer can be understood as the upper layer, which is responsible for running the small game.
- the game code of the small game can be run in the JS layer.
- the JS layer can also be called the JavaScript layer.
- the bridge layer can be understood as an intermediate layer, which is used to connect the system layer and the JS layer.
- the bridge layer can encapsulate the capabilities of the system layer into a unified application programming interface (Application Programming Interface) that is directly called by the JS layer.
- the system layer, the bridge layer, and the JS layer in the embodiments of the present application can be understood as a piece of code.
- the system layer can be a piece of program code written in assembly language
- the bridge layer can be a piece of program code written in C ++
- the bridge layer can also be called the C ++ layer
- the JS layer can be a piece of program code written in Java.
- the engine isolation method of the present application can be applied to different game platforms, and the system types of different game platforms may be different.
- the system of some game platforms is an Android system
- the system of some game platforms is an IOS system.
- the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer.
- the corresponding JS engine of the system layer is V8; when the system type of the system layer is IOS system, the corresponding JS engine of the system layer is JavaScriptCore.
- the JS engine can be understood as a program written by code. For example, V8 is written in C / C ++.
- the JS engine parses JS code, which can be understood as a piece of code to parse another piece of code.
- the execution process of the engine isolation method of the present application may correspond to a piece of program code. This piece of program code can be run on the Android system or the IOS system, and can be compatible with different types of systems.
- the engine isolation method of the present application can determine the JS engine that parses the game code according to the system type of the system layer that runs on the application platform. For game developers, they only need to write a set of game code, which can be used on different game platforms, reducing the workload of game developers, and then reducing the cost of game development.
- the system type of the system layer of the application platform is Android system
- using V8 in Android system can make full use of the built-in engine capabilities of Android system to improve the performance of JS code running on V8.
- the system type of the system layer of the application platform is an IOS system
- the use of JavaScriptCore in the IOS system can make full use of the built-in engine capabilities of the IOS system to improve the performance of JS code running on the JavaScriptCore.
- the JS engine in the embodiment of the present application is different from the JS engine developed by a general browser developer. Because the browser needs to do many other things besides analyzing the game code, such as parsing pages, rendering pages, cookie management, history, etc., the JS engine developed by browser developers is more complicated and needs more functions .
- the JS engine in the embodiment of the present application is a JS engine specially developed for parsing game code, and may also be called a JS game-specific engine.
- the JS game-specific engine is a specially designed engine for game code parsing. Compared with the JS engine developed by the browser developer, the JS game-specific engine strips out some functions (such as cookie management functions) in the browser that are not related to the game.
- the bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer.
- the game code of the first game may be a JS code.
- the bridge layer calls V8 to process the game code of the first game running in the JS layer.
- the bridge layer calls JavaScriptCore to process the game code of the first game running in the JS layer.
- the bridging layer exposes the encapsulated system capability to the JS layer, and the encapsulated system capability is provided for the JS layer to call.
- the bridging layer may encapsulate system capabilities that can be used by games in the system layer, and provide the encapsulated capabilities for the JS layer to call.
- the bridge layer can inject the system capabilities into the JS engine, and the JS engine can provide the JS layer with the system capabilities injected in the JS engine when executing the JS code in the game.
- the system capabilities of the system layer may be all the capabilities that can be used by the mini-game.
- system capabilities can be the ability to access memory.
- they will not be encapsulated or injected into the JS engine.
- the encapsulated system capability may exist in the form of an Application Programming Interface (Application Programming Interface).
- the mini-game can directly utilize the underlying capabilities of the system through the bridge layer, thereby improving the running performance of the mini-game.
- the system capability includes at least one of a graphics drawing capability, a sensor calling capability, a file downloading capability, a file uploading capability, a payment capability, a short message reading capability, an address book access capability, and a camera calling capability.
- the encapsulated graphics drawing capability can be Open Graphics Library (Open Graphics Library, OpenGL).
- OpenGL is a professional graphics program interface with cross programming language and cross platform programming interface specifications. It is a low-level graphics library that is easy to call.
- the sensor calling capability may specifically include a calling capability of an infrared proximity sensor, a calling capability of a light sensor (also referred to as an ambient light sensor), a calling capability of a gravity sensor, a calling capability of a three-axis acceleration sensor, a calling capability of a three-axis gyroscope, and the like.
- the JS layer is isolated from the system layer by adding a bridge layer.
- the bridge layer can encapsulate the system capabilities of the system layer, and the encapsulated system capabilities can be called by the JS layer to avoid the JS layer directly interacting with the system layer.
- the JS layer does not need to adapt to the system layer.
- the game code of the first game running in the JS layer does not need to adapt to a different type of system.
- the game code of the first game only needs to be adapted to the bridge layer, which can reduce the Game development costs.
- adding a bridge layer can ensure the security of the system layer.
- FIG. 3 is a schematic flowchart of another engine isolation method disclosed in an embodiment of the present application. As shown in FIG. 3, the engine isolation method includes the following steps.
- the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer.
- the bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer.
- the bridging layer exposes the encapsulated system capability to the JS layer, and the encapsulated system capability is provided for the JS layer to call.
- steps 301 to 303 in this embodiment of the present application reference may be made to steps 101 to 103 shown in FIG. 1, and details are not described herein again.
- the bridge layer converts the first system event into a first JS event, and generates a first JS event processing function corresponding to the first JS event.
- the JS layer calls the first JS event processing function to process the first JS event.
- the first system event may be an event triggered by a system layer.
- a touch event is generated, and the system layer can detect the touch event.
- the following uses the first system event as a touch event for illustration.
- the system layer passes the detected touch event to the bridge layer for processing.
- the bridge layer converts the touch event into a JS touch event that the JS layer can recognize, and generates a JS touch event processing function corresponding to the JS touch event.
- the JS layer can directly call the JS touch.
- the event handler executes the JS touch event.
- the system layer, the bridge layer, and the JS layer can be understood as a piece of program code, and are program codes written in different programming languages.
- the system layer can be a piece of program code written in assembly language
- the bridge layer can be a piece of program code written in C ++ language
- the JS layer can be a piece of program code written in Java language.
- the bridge layer serves as an intermediate layer, and can convert the assembly language code of the touch event into JS code that can be recognized by the JS layer.
- the steps of converting the first system event into the first JS event and generating the first JS event processing function corresponding to the first JS event are avoided at the system layer, which reduces the burden on the system layer and improves the response speed of the touch event. Improved gaming experience.
- the JS layer can initialize the game business, add event listeners, and register the touch event processing function, so as to call the JS touch event processing function of the bridge layer to execute the JS touch event.
- the bridge layer in the embodiment of the present application serves as a bridge between the JS layer and the system layer.
- the bridge layer can convert events detected by the system layer into JS touch event processing functions that can be directly called by the JS layer, which is convenient for the JS layer to process and reduce JS. Difficulty of developing game code to run at layers.
- the JS layer is isolated from the system layer by adding a bridge layer.
- the bridge layer can encapsulate the system capabilities of the system layer, and the encapsulated system capabilities can be called by the JS layer to avoid the JS layer directly interacting with the system layer.
- the JS layer does not need to adapt to the system layer.
- the game code of the first game running in the JS layer does not need to adapt to a different type of system.
- the game code of the first game only needs to be adapted to the bridge layer, which can reduce the Game development costs.
- adding a bridge layer can ensure the security of the system layer.
- the bridging layer can convert the events detected by the system layer into S touch event processing functions that can be directly called by the JS layer, which is convenient for the JS layer to process and reduces the difficulty of developing game code for the JS layer.
- FIG. 4 is a schematic flowchart of another engine isolation method disclosed in the embodiment of the present application. As shown in FIG. 4, the engine isolation method includes the following steps.
- the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer.
- the bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer.
- the bridging layer exposes the encapsulated system capability to the JS layer, and the encapsulated system capability is provided for the JS layer to call.
- steps 401 to 403 in this embodiment of the present application reference may be made to steps 101 to 103 shown in FIG. 1, and details are not described herein again.
- the bridge layer adapts to the system layer to perform the corresponding upgrade.
- the bridge layer when the JS engine of the system layer is upgraded, the bridge layer needs to be adapted to the system layer for corresponding upgrade, so that the bridge layer can be adapted to the system layer.
- the JS layer there is no need to upgrade, the JS layer does not need to adapt to the system layer, and the game code of the first game running in the JS layer does not need to adapt to the underlying system layer, which can reduce game development costs.
- the embodiment of the present application may further include the following steps:
- the bridging layer encapsulates the updated ability of the system layer to obtain the updated system ability after the package, and the updated system ability after the package is called by the JS layer.
- the bridging layer encapsulates the updated ability of the system layer to obtain the encapsulated updated system ability, and the encapsulated updated system ability is called by the JS layer.
- the JS layer there is no need to adapt to the system layer, and the game code of the first game running in the JS layer does not need to adapt to the underlying system layer, which can reduce game development costs.
- the JS layer is isolated from the system layer by adding a bridge layer.
- the bridge layer can encapsulate the system capabilities of the system layer, and the encapsulated system capabilities can be called by the JS layer to avoid the JS layer directly interacting with the system layer.
- the JS layer does not need to adapt to the system layer.
- the game code of the first game running in the JS layer does not need to adapt to a different type of system.
- the game code of the first game only needs to be adapted to the bridge layer, which can reduce the Game development costs.
- the first game can take advantage of the underlying capabilities of the system, improving the performance of small games.
- FIG. 5 is a schematic flowchart of another engine isolation method disclosed in an embodiment of the present application. As shown in FIG. 5, the engine isolation method includes the following steps.
- the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer.
- the bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer.
- the bridging layer exposes the encapsulated system capabilities to the JS layer, and the encapsulated system capabilities are provided for the JS layer to call.
- steps 501 to 503 in the embodiment of the present application reference may be made to steps 501 to 503 shown in FIG. 1, and details are not described herein again.
- the bridge layer obtains a system capability call permission set of the first game.
- the bridge layer performs a permission authentication operation for the system capability beyond the system capability call permission set.
- the system capability calling authority of different types of games is generally different.
- gravity-sensing games have the ability to call gravity sensors; games with friends ranking have the ability to upload files and access contacts.
- games with friends ranking have the ability to upload files and access contacts.
- strong privacy such as address book access ability, SMS reading ability, camera calling ability, etc.
- the system capability call permissions of different types of games are generally different.
- the bridging layer may obtain a system capability call permission set of the first game when the first game runs on the game platform for the first time.
- the user's operation for the first game requires the ability to call the system capabilities of the first game other than the permission set to be realized, the user's opinion can be sought to determine whether to run the first game.
- a capability other than the system capability call permission set of the game is added to the system capability call permission set of the first game.
- the bridging layer performing a permission authentication operation for a system capability beyond the system capability call permission set may include the following steps:
- a user touch operation is received to determine whether the authority authentication operation is passed.
- real-time system capability permission authentication can be performed when the system capability used by the game exceeds its calling authority, and there is no need to re-set the system capability permission after exiting the game to avoid interrupting the game for a long time. This can improve the user gaming experience.
- FIG. 6 is a schematic flowchart of another engine isolation method disclosed in the embodiment of the present application. As shown in FIG. 6, the engine isolation method includes the following steps.
- the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer.
- the bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer.
- the bridging layer exposes the encapsulated system capability to the JS layer, and the encapsulated system capability is provided for the JS layer to call.
- steps 601 to 603 in this embodiment of the present application reference may be made to steps 601 to 603 shown in FIG. 1, and details are not described herein again.
- the bridge layer obtains the first game. And the priority of the second game, and confirm the highest priority game among the first and second games, and prioritize the packaged first system capability to the highest priority game among the first and second games.
- the bridge layer may determine to prioritize the first system capability to the game with the highest priority among the first game and the second game according to the priorities of the two games.
- the scenario where two games are running on the game platform at the same time may be a split-screen multi-tasking scenario.
- the priorities of the first game and the second game may be determined based on the running information of the first game and the second game on the game platform, user evaluation information, the calling frequency of the first system capability, and the like.
- the bridge layer obtains the priorities of the first game and the second game, which may specifically include the following steps:
- the bridge layer receives the running information of the first game on the game platform and the running information of the second game on the game platform sent by the JS layer, and determines the first based on the running information of the first game on the game platform and the running information of the second game on the game platform. The priority of the game and the priority of the second game.
- the running information of the game on the game platform may include information such as the cumulative online duration of the game on the game platform, the activity of the game on the game platform, and the ranking of the game on the game platform.
- the first system capability may be used for the second game.
- the priority of the two games is used to prioritize the system capability to the game with the highest priority among the two games.
- a system error occurs when a conflict occurs.
- the mobile terminal includes a hardware structure and / or a software module corresponding to each function.
- the present invention can be implemented in the form of hardware or a combination of hardware and computer software by combining the units and algorithm steps of each example described in the embodiments disclosed herein. Whether a certain function is performed by hardware or computer software-driven hardware depends on the specific application of the technical solution and design constraints. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation should not be considered outside the scope of the present invention.
- the embodiments of the present application may divide the functional units of the mobile terminal according to the foregoing method examples.
- each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit.
- the above integrated unit may be implemented in the form of hardware or in the form of software functional unit. It should be noted that the division of the units in the embodiments of the present application is schematic, and is only a logical function division. There may be another division manner in actual implementation.
- FIG. 7 is a schematic structural diagram of an engine isolation device disclosed in an embodiment of the present application.
- the engine isolation device 700 is applied to a game platform.
- the game platform runs on a mobile terminal.
- the game platform includes a system layer, a bridge layer, and a JS layer.
- the bridge layer encapsulates the system capabilities of the system layer.
- the bridge layer connects the system layer and the JS layer, such as
- the engine isolation device 700 includes a determining unit 701 and a processing unit 702, where:
- a determining unit 701 configured to determine a JS engine corresponding to the system layer according to the system type of the system layer when the first game runs on the game platform;
- a processing unit 702 configured to call a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer;
- the processing unit 702 is further configured to expose the encapsulated system capability to the JS layer, and the encapsulated system capability is provided for the JS layer to call.
- the engine isolation device 700 further includes a conversion unit 703 and a generation unit 704, where:
- a conversion unit 703, configured to convert the first system event into a first JS event when the system layer detects the first system event
- the generating unit 704 is configured to generate a first JS event processing function corresponding to the first JS event; the JS layer is configured to call the first JS event processing function to process the first JS event.
- the engine isolation device 700 further includes an adaptation unit 705, where:
- the adapting unit 705 is configured to perform a corresponding upgrade when the JS engine corresponding to the system layer is upgraded.
- the processing unit 702 is further configured to encapsulate the updated capability of the system layer when the system layer is capable of updating, to obtain the encapsulated updated system capability, and the encapsulated updated system capability is available for the JS layer to call.
- the engine isolation device 700 further includes an obtaining unit 706;
- An obtaining unit 706, configured to obtain a system capability call permission set of the first game
- the processing unit 702 is further configured to execute a permission authentication operation for a system capability beyond the system capability call permission set when the first game receives a call of the system capability beyond the system capability call permission set;
- the processing unit 702 is further configured to add a system capability beyond the system capability call permission set to the system capability call permission set of the first game after a permission authentication operation that exceeds the system capability call permission set passes.
- the obtaining unit 706 is further configured to: when the first game and the second game run on the game platform at the same time, if the first game and the second game running on the JS layer simultaneously encapsulate the first system capability of the bridge layer Make a call to obtain the priority of the first game and the second game;
- the processing unit 702 is further configured to confirm the game with the highest priority among the first game and the second game, and prioritize the packaged first system capability to the game with the highest priority among the first game and the second game.
- the obtaining unit 706 obtains the priorities of the first game and the second game, specifically:
- the obtaining unit 706 receives the running information of the first game on the game platform and the running information of the second game on the game platform and sends the JS layer to determine the first game based on the running information of the first game on the game platform and the running information of the second game on the game platform. The priority of the first game and the priority of the second game.
- the bridging layer can encapsulate the system capabilities of the system layer.
- the encapsulated system capabilities can be called by the JS layer to avoid the JS layer directly from the system.
- the JS layer does not need to adapt to the system layer.
- the game code of the first game running in the JS layer does not need to adapt to a different type of system.
- the game code of the first game only needs to adapt to the bridge layer. , Which can reduce game development costs.
- adding a bridge layer can ensure the security of the system layer.
- FIG. 8 is a schematic structural diagram of a mobile terminal disclosed in an embodiment of the present application.
- the mobile terminal 800 includes a processor 801 and a memory 802.
- the mobile terminal 800 may further include a bus 803.
- the processor 801 and the memory 802 may be connected to each other through a bus 803, and the bus 803 may be a peripheral component and Connected to a standard (Peripheral Component Interconnect (PCI) bus or extended industry standard architecture (EISA) bus, etc.
- PCI Peripheral Component Interconnect
- EISA extended industry standard architecture
- the bus 803 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 8, but it does not mean that there is only one bus or one type of bus.
- the mobile terminal 800 may further include an input-output device 804, and the input-output device 804 may include a display screen, such as a liquid crystal display screen.
- the memory 802 is configured to store one or more programs containing instructions; the processor 801 is configured to call the instructions stored in the memory 802 to execute some or all of the method steps in the foregoing FIG. 1 to FIG. 6.
- the bridging layer can encapsulate the system capabilities of the system layer.
- the encapsulated system capabilities can be called by the JS layer to avoid the JS layer directly from the system layer.
- the JS layer does not need to adapt to the system layer.
- the game code of the first game running in the JS layer does not need to adapt to a different type of system.
- the game code of the first game only needs to adapt to the bridge layer. This can reduce game development costs.
- adding a bridge layer can ensure the security of the system layer.
- the mobile terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), and a vehicle-mounted computer. Taking the mobile terminal as a mobile phone as an example:
- FIG. 9 is a block diagram showing a partial structure of a mobile phone related to a mobile terminal according to an embodiment of the present application.
- the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, and a processor 980 , And power supply 990 and other components.
- RF radio frequency
- the RF circuit 910 can be used for receiving and transmitting information.
- the RF circuit 910 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.
- the RF circuit 910 can also communicate with a network and other devices through wireless communication.
- the above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division Multiple Access) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), etc.
- GSM Global System of Mobile
- GPRS General Packet Radio Service
- CDMA Code Division Multiple Access
- WCDMA Wideband Code Division Multiple Access
- LTE Long Term Evolution
- E-mail Short Messaging Service
- the memory 920 may be used to store software programs and modules.
- the processor 980 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 920.
- the memory 920 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile phone, and the like.
- the memory 920 may include a high-speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage device.
- the input unit 930 may be used to receive inputted numeric or character information, and generate key signal inputs related to user settings and function control of the mobile phone.
- the input unit 930 may include a fingerprint recognition module 931 and other input devices 932.
- the fingerprint identification module 931 can collect fingerprint data on the user.
- the input unit 930 may also include other input devices 932.
- the other input devices 932 may include, but are not limited to, one or more of a touch screen, 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 940 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 940 may include a display screen 941.
- the display screen 941 may be configured by using a liquid crystal display (Liquid Crystal Display, LCD), an organic or inorganic light emitting diode (Organic Light-Emitting Diode, OLED) and the like.
- LCD Liquid Crystal Display
- OLED Organic Light-Emitting Diode
- the mobile phone may further include at least one sensor 950, such as a light sensor, a motion sensor, a pressure sensor, a temperature sensor, and other sensors.
- the light sensor may include an ambient light sensor (also referred to as a light sensor) and a proximity sensor.
- the ambient light sensor may adjust the brightness of the backlight of the mobile phone according to the brightness of the ambient light, and then adjust the brightness of the display screen 941.
- the proximity sensor may When the mobile phone is moved to the ear, the display 941 and / or the backlight are turned off.
- the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes), and can detect the magnitude and direction of gravity when it is stationary.
- the mobile phone can be used to identify the attitude of mobile phones (such as horizontal and vertical screen switching, magnetic force) Calibration of the meter), vibration recognition related functions (such as pedometer, tap), etc.
- the mobile phone can also be equipped with gyroscope, barometer, hygrometer, thermometer, infrared sensor and other sensors, will not repeat them here.
- the audio circuit 960, the speaker 961, and the microphone 962 can provide an audio interface between the user and the mobile phone.
- the audio circuit 960 may transmit the received electrical data converted electrical signals to a speaker 961, which is converted into a sound signal for playback; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, and the audio circuit 960 After receiving, it is converted into audio data, and then processed by the audio data playback processor 980, and then sent to, for example, another mobile phone via the RF circuit 910, or the audio data is played to the memory 920 for further processing.
- WiFi is a short-range wireless transmission technology.
- the mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 970. It provides users with wireless broadband Internet access.
- FIG. 9 shows the WiFi module 970, it can be understood that it does not belong to the necessary configuration of the mobile phone, and can be omitted as needed without changing the essence of the invention.
- the processor 980 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone.
- the processor 980 runs or executes software programs and / or modules stored in the memory 920 and calls data stored in the memory 920 to execute Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole.
- the processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, etc.
- the modem processor mainly handles wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 980.
- the mobile phone also includes a power supply 990 (such as a battery) for supplying power to various components.
- a power supply 990 (such as a battery) for supplying power to various components.
- the power supply can be logically connected to the processor 980 through the power management system, so as to implement functions such as managing charging, discharging, and power consumption management through the power management system.
- the mobile phone may further include a camera 9100, which is used to capture images and videos, and transmit the captured images and videos to the processor 980 for processing.
- a camera 9100 which is used to capture images and videos, and transmit the captured images and videos to the processor 980 for processing.
- the mobile phone can also have a Bluetooth module, etc., which is not repeated here.
- each step and method flow can be implemented based on the structure of the mobile phone.
- An embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute a part of any one of the engine isolation methods described in the foregoing method embodiments. Or all steps.
- An embodiment of the present application further provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the operations described in the foregoing method embodiments. Part or all of the steps for any one engine isolation method.
- the disclosed device may be implemented in other ways.
- the device embodiments described above are only schematic.
- the division of the unit is only a logical function division.
- multiple units or components may be combined or may be combined. Integration into another system, or some features can be ignored or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical or other forms.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit.
- the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
- the integrated unit When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable memory.
- the technical solution of the present invention essentially or part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory.
- a computer device which may be a personal computer, a server, or a network device, etc.
- the foregoing memories include: U disks, Read-Only Memory (ROM), Random Access Memory (RAM), mobile hard disks, magnetic disks, or optical disks and other media that can store program codes.
- the program may be stored in a computer-readable memory, and the memory may include a flash disk.
- ROM Read-only memory
- RAM Random Access Memory
- magnetic disks or optical disks etc.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
- Telephonic Communication Services (AREA)
Abstract
Disclosed are an engine isolation method, a related device, and a computer-readable storage medium. The engine isolation method is applied in a game platform. The game platform runs on a mobile terminal and comprises a system layer, a bridging layer, and a JS layer. The bridging layer connects the system layer to the JS layer, and encapsulates the system capability of the system layer. The method comprises: when a first game runs on a game platform, the bridging layer determines a JS engine corresponding to the system layer according to the system type thereof; the bridging layer invokes the JS engine corresponding to the system layer to process a game code of the first game running in the JS layer; the bridging layer exposes the encapsulated system capability for invoking by the JS layer. According to embodiments of the present application, the bridging layer is added to isolate the JS layer from the system layer and prevent the JS layer from directly interacting with the system layer, thereby reducing game development costs.
Description
本发明涉及移动终端技术领域,具体涉及一种引擎隔离方法、移动终端以及计算机可读存储介质。The present invention relates to the technical field of mobile terminals, and in particular, to an engine isolation method, a mobile terminal, and a computer-readable storage medium.
基于浏览器环境开发的小游戏,比如H5游戏(HTML5 game),由于具有无需下载,直接在线玩的优点,在手机等移动终端上得到了广泛的应用。Small games developed based on the browser environment, such as H5 games (HTML5 games), are widely used on mobile terminals such as mobile phones because they have the advantage of not downloading and playing online directly.
目前,游戏开发者开发游戏代码时,是基于浏览器内核来开发的。H5游戏在移动终端上运行时,受浏览器开发环境的限制,需要使用浏览器内核对游戏中的JS文件进行解析和执行。游戏在移动终端运行过程中,一般会用到JS层和系统层,JS层直接调用系统层的能力来实现游戏的功能。如果系统层有更新,JS层也会做相应的更新,相应的游戏代码需要重新更改,增加游戏开发成本。At present, game developers develop game code based on the browser kernel. When the H5 game runs on a mobile terminal, it is limited by the browser development environment. It is necessary to use the browser kernel to parse and execute the JS file in the game. When the game is running on a mobile terminal, the JS layer and the system layer are generally used. The JS layer directly calls the system layer's capabilities to implement the game's functions. If the system layer is updated, the JS layer will also be updated accordingly, and the corresponding game code needs to be changed again, increasing the game development cost.
发明内容Summary of the Invention
本申请实施例提供了一种引擎隔离方法、相关设备以及计算机可读存储介质,根据系统类型选择不同的JS引擎,可以充分利用系统内置的引擎能力,降低游戏开发成本。The embodiments of the present application provide an engine isolation method, related equipment, and a computer-readable storage medium. Selecting different JS engines according to the system type can make full use of the built-in engine capabilities and reduce the cost of game development.
本申请实施例第一方面提供一种引擎隔离方法,所述引擎隔离方法应用于游戏平台,所述游戏平台运行在移动终端上,所述游戏平台包括系统层、桥接层和JS层,所述桥接层连接所述系统层与所述JS层,所述桥接层封装有所述系统层的系统能力,所述方法包括:The first aspect of the embodiments of the present application provides an engine isolation method. The engine isolation method is applied to a game platform that runs on a mobile terminal. The game platform includes a system layer, a bridge layer, and a JS layer. A bridge layer connects the system layer and the JS layer, the bridge layer encapsulates the system capabilities of the system layer, and the method includes:
当第一游戏在所述游戏平台上运行时,所述桥接层根据所述系统层的系统类型确定所述系统层对应的JS引擎;When the first game runs on the game platform, the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer;
所述桥接层调用与所述系统层对应的JS引擎对运行在所述JS层的所述第一游戏的游戏代码进行处理;The bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer;
所述桥接层向所述JS层暴露封装后的系统能力,所述封装后的系统能力供所述JS层调用。The bridging layer exposes the encapsulated system capability to the JS layer, and the encapsulated system capability is available for the JS layer to call.
本申请实施例第二方面提供一种引擎隔离装置,所述引擎隔离装置应用于游戏平台,所述游戏平台运行在移动终端上,所述游戏平台包括系统层、桥接层和JS层,所述桥接层连接所述系统层与所述JS层,所述桥接层封装有所述系统层的系统能力,所述引擎隔离装置包括确定单元以及处理单元,其中:The second aspect of the embodiments of the present application provides an engine isolation device. The engine isolation device is applied to a game platform. The game platform runs on a mobile terminal. The game platform includes a system layer, a bridge layer, and a JS layer. The bridge layer connects the system layer and the JS layer. The bridge layer encapsulates the system capabilities of the system layer. The engine isolation device includes a determination unit and a processing unit, where:
所述确定单元,用于当第一游戏在所述游戏平台上运行时,根据所述系统层的系统类型确定所述系统层对应的JS引擎;The determining unit is configured to determine a JS engine corresponding to the system layer according to a system type of the system layer when a first game runs on the game platform;
所述处理单元,用于调用与所述系统层对应的JS引擎对运行在所述JS层的所述第一游戏的游戏代码进行处理;The processing unit is configured to call a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer;
所述处理单元,还用于向所述JS层暴露封装后的系统能力,所述封装后的系统能力供所述JS层调用。The processing unit is further configured to expose the encapsulated system capability to the JS layer, and the encapsulated system capability is for the JS layer to call.
本申请实施例第三方面提供一种移动终端,包括处理器以及存储器,所述存储器用于存储一个或多个程序,所述一个或多个程序被配置成由所述处理器执行,所述程序包括用于执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。A third aspect of the embodiments of the present application provides a mobile terminal, including a processor and a memory, where the memory is configured to store one or more programs, and the one or more programs are configured to be executed by the processor. The program includes steps for performing some or all of the steps as described in any method in the first aspect of the embodiments of the present application.
本申请实施例第四方面提供一种计算机可读存储介质,所述计算机可读存储介质用于存储电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium is used to store a computer program for electronic data exchange, wherein the computer program causes a computer to execute the first aspect of the embodiment of the present application Some or all of the steps described in either method.
本申请实施例第五方面提供一种计算机程序产品,所述计算机程序产品包括存储了计 算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如本申请实施例第一方面任一方法中所描述的部分或全部步骤。A fifth aspect of the embodiments of the present application provides a computer program product. The computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the program as described in the first embodiment of the present application. Some or all of the steps described in any method in one aspect.
本申请实施例中,当第一游戏在游戏平台上运行时,桥接层根据系统层的系统类型确定系统层对应的JS引擎;桥接层调用与系统层对应的JS引擎对运行在JS层的第一游戏的游戏代码进行处理,桥接层向JS层暴露封装后的系统能力,封装后的系统能力供JS层调用。本申请实施例可以增加桥接层将JS层与系统层进行隔离,桥接层可以封装系统层的系统能力,封装后的系统能力可以供JS层调用,避免JS层直接与系统层进行交互,JS层无需与系统层进行适配,在JS层运行的第一游戏的游戏代码无需适配不同的类型的系统,进而可以降低游戏开发成本。In the embodiment of the present application, when the first game runs on the game platform, the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer; the bridge layer calls the JS engine corresponding to the system layer to run the The game code of a game is processed, the bridge layer exposes the encapsulated system capabilities to the JS layer, and the encapsulated system capabilities are called by the JS layer. The embodiment of the present application can add a bridge layer to isolate the JS layer from the system layer. The bridge layer can encapsulate the system capabilities of the system layer, and the encapsulated system capabilities can be used by the JS layer to avoid the JS layer directly interacting with the system layer. There is no need to adapt to the system layer, and the game code of the first game running in the JS layer does not need to adapt to a different type of system, which can reduce the game development cost.
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present application or the prior art more clearly, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without paying creative labor.
图1是本申请实施例公开的一种引擎隔离方法的流程示意图;FIG. 1 is a schematic flowchart of an engine isolation method disclosed in an embodiment of the present application;
图2是本申请实施例公开的一种系统层、桥接层和JS层的分布示意图;2 is a schematic diagram of distribution of a system layer, a bridge layer, and a JS layer disclosed in an embodiment of the present application;
图3是本申请实施例公开的另一种引擎隔离方法的流程示意图;3 is a schematic flowchart of another engine isolation method disclosed in an embodiment of the present application;
图4是本申请实施例公开的另一种引擎隔离方法的流程示意图;4 is a schematic flowchart of another engine isolation method disclosed in an embodiment of the present application;
图5是本申请实施例公开的另一种引擎隔离方法的流程示意图;5 is a schematic flowchart of another engine isolation method disclosed in an embodiment of the present application;
图6是本申请实施例公开的另一种引擎隔离方法的流程示意图;6 is a schematic flowchart of another engine isolation method disclosed in an embodiment of the present application;
图7是本申请实施例公开的一种引擎隔离装置的结构示意图;7 is a schematic structural diagram of an engine isolation device disclosed in an embodiment of the present application;
图8是本申请实施例公开的一种移动终端的结构示意图;8 is a schematic structural diagram of a mobile terminal disclosed in an embodiment of the present application;
图9是本申请实施例公开的又一种移动终端的结构示意图。FIG. 9 is a schematic structural diagram of still another mobile terminal disclosed in an embodiment of the present application.
为了使本技术领域的人员更好地理解本发明方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。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 will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only It is a part of the embodiments of the present invention, but not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second", and the like in the description and claims of the present invention and the above-mentioned drawings are used to distinguish different objects and are not used to describe a specific order. Furthermore, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device containing a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes Other steps or units inherent to these processes, methods, products or equipment.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本发明的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference to "an embodiment" herein means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of this phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they independent or alternative embodiments that are mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
本申请实施例所涉及到的移动终端可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。为方便描述,上面提到的设备统称为移动终端。The mobile terminals involved in the embodiments of the present application may include various handheld devices with wireless communication functions, vehicle-mounted devices, wearable devices, computing devices, or other processing devices connected to a wireless modem, and various forms of user equipment (User Equipment (UE), mobile station (MS), terminal device (terminal), and so on. For ease of description, the devices mentioned above are collectively referred to as mobile terminals.
下面对本申请实施例进行详细介绍。The embodiments of the present application are described in detail below.
请参阅图1,图1是本申请实施例公开的一种引擎隔离方法的流程示意图,如图1所示,该引擎隔离方法包括如下步骤。Please refer to FIG. 1. FIG. 1 is a schematic flowchart of an engine isolation method disclosed in an embodiment of the present application. As shown in FIG. 1, the engine isolation method includes the following steps.
101,当第一游戏在游戏平台上运行时,桥接层根据系统层的系统类型确定系统层对应的JS引擎。101. When the first game runs on the game platform, the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer.
本申请实施例中,游戏平台是用来运行游戏应用的软件模块,可以运行在手机等移动终端上。游戏平台包括系统层、桥接层和JS(JavaScript)层。如图2所示,系统层可以理解为底层,负责提供与移动终端底层相关的系统能力,比如,访问存储器的能力、打电话的能力等。第一游戏可以是基于浏览器环境开发的小游戏,比如H5游戏(HTML5 game)。JS层可以理解为上层,负责运行小游戏,小游戏的游戏代码可以在JS层运行,JS层也可以称为JavaScript层。桥接层可以理解为中间层,用于连接系统层和JS层,桥接层可以将系统层的能力进行封装,封装成统一的供JS层直接调用的应用程序编程接口(Application Programming Interface,API)。本申请实施例中的系统层、桥接层和JS层都可以理解为一段代码。比如,系统层可以是采用汇编语言编写的一段程序代码;桥接层可以是采用C++语言编写的一段程序代码,桥接层也可以称为C++层;JS层可以是采用Java语言编写的一段程序代码。In the embodiment of the present application, the game platform is a software module for running a game application, and can be run on a mobile terminal such as a mobile phone. The game platform includes a system layer, a bridge layer, and a JS (JavaScript) layer. As shown in FIG. 2, the system layer can be understood as the bottom layer and is responsible for providing system capabilities related to the bottom layer of the mobile terminal, such as the ability to access memory and the ability to make calls. The first game may be a small game developed based on a browser environment, such as an H5 game (HTML5 game). The JS layer can be understood as the upper layer, which is responsible for running the small game. The game code of the small game can be run in the JS layer. The JS layer can also be called the JavaScript layer. The bridge layer can be understood as an intermediate layer, which is used to connect the system layer and the JS layer. The bridge layer can encapsulate the capabilities of the system layer into a unified application programming interface (Application Programming Interface) that is directly called by the JS layer. The system layer, the bridge layer, and the JS layer in the embodiments of the present application can be understood as a piece of code. For example, the system layer can be a piece of program code written in assembly language; the bridge layer can be a piece of program code written in C ++; the bridge layer can also be called the C ++ layer; and the JS layer can be a piece of program code written in Java.
本申请的引擎隔离方法可以应用于不同游戏平台,不同的游戏平台的系统类型可能不同,比如,有些游戏平台的系统为安卓(Android)系统,有些游戏平台的系统为IOS系统。桥接层根据系统层的系统类型确定系统层对应的JS引擎。比如,当系统层的系统类型为Android系统时,系统层对应的JS引擎为V8;当系统层的系统类型为IOS系统时,系统层对应的JS引擎为JavaScriptCore。JS引擎可以理解为一段程序,由代码编写而成。比如V8就是用C/C++写的。JS引擎解析JS代码,可以理解为一段代码来解析另一段代码。本申请的引擎隔离方法的执行流程可以对应一段程序代码,这段程序代码即可以在Android系统上运行,也可以在IOS系统上运行,可以兼容不同类型的系统。本申请的引擎隔离方法可以根据其运行在应用平台的系统层的系统类型来确定解析游戏代码的JS引擎。对于游戏开发者而言,只需编写一套游戏代码,即可在不同的游戏平台上使用,降低游戏开发者的工作量,进而降低游戏开发成本。The engine isolation method of the present application can be applied to different game platforms, and the system types of different game platforms may be different. For example, the system of some game platforms is an Android system, and the system of some game platforms is an IOS system. The bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer. For example, when the system type of the system layer is Android system, the corresponding JS engine of the system layer is V8; when the system type of the system layer is IOS system, the corresponding JS engine of the system layer is JavaScriptCore. The JS engine can be understood as a program written by code. For example, V8 is written in C / C ++. The JS engine parses JS code, which can be understood as a piece of code to parse another piece of code. The execution process of the engine isolation method of the present application may correspond to a piece of program code. This piece of program code can be run on the Android system or the IOS system, and can be compatible with different types of systems. The engine isolation method of the present application can determine the JS engine that parses the game code according to the system type of the system layer that runs on the application platform. For game developers, they only need to write a set of game code, which can be used on different game platforms, reducing the workload of game developers, and then reducing the cost of game development.
其中,应用平台的系统层的系统类型为Android系统时,Android系统中使用V8可以充分利用Android系统内置的引擎能力,提高JS代码在V8上运行的性能。应用平台的系统层的系统类型为IOS系统时,IOS系统中使用JavaScriptCore可以充分利用IOS系统内置的引擎能力,提高JS代码在JavaScriptCore上运行的性能。Among them, when the system type of the system layer of the application platform is Android system, using V8 in Android system can make full use of the built-in engine capabilities of Android system to improve the performance of JS code running on V8. When the system type of the system layer of the application platform is an IOS system, the use of JavaScriptCore in the IOS system can make full use of the built-in engine capabilities of the IOS system to improve the performance of JS code running on the JavaScriptCore.
需要说明的是,本申请实施例中的JS引擎与一般的浏览器开发商开发的JS引擎不同。由于浏览器除了解析游戏代码,还要做很多其他的事情,比如解析页面、渲染页面、Cookie管理、历史记录等等,因此浏览器开发商开发的JS引擎更为复杂,需要实现的功能更多。本申请实施例中的JS引擎是专门为解析游戏代码而开发的JS引擎,也可以称为JS游戏专用引擎。JS游戏专用引擎是专门设计的用于游戏代码解析的引擎。JS游戏专用引擎与浏览器开发商开发的JS引擎相比,其剥离了浏览器中与游戏不相关的一些功能(比如,Cookie管理功能)。It should be noted that the JS engine in the embodiment of the present application is different from the JS engine developed by a general browser developer. Because the browser needs to do many other things besides analyzing the game code, such as parsing pages, rendering pages, cookie management, history, etc., the JS engine developed by browser developers is more complicated and needs more functions . The JS engine in the embodiment of the present application is a JS engine specially developed for parsing game code, and may also be called a JS game-specific engine. The JS game-specific engine is a specially designed engine for game code parsing. Compared with the JS engine developed by the browser developer, the JS game-specific engine strips out some functions (such as cookie management functions) in the browser that are not related to the game.
102,桥接层调用与系统层对应的JS引擎对运行在JS层的第一游戏的游戏代码进行处理。102. The bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer.
本申请实施例中,第一游戏的游戏代码可以是JS代码。比如,如果系统层的系统类型为Android系统,桥接层调用V8对对运行在JS层的第一游戏的游戏代码进行处理。如果系统层的系统类型为IOS系统,桥接层调用JavaScriptCore对对运行在JS层的第一游戏的游戏代码进行处理。In the embodiment of the present application, the game code of the first game may be a JS code. For example, if the system type of the system layer is Android system, the bridge layer calls V8 to process the game code of the first game running in the JS layer. If the system type of the system layer is an IOS system, the bridge layer calls JavaScriptCore to process the game code of the first game running in the JS layer.
103,桥接层向JS层暴露封装后的系统能力,该封装后的系统能力供JS层调用。103. The bridging layer exposes the encapsulated system capability to the JS layer, and the encapsulated system capability is provided for the JS layer to call.
本申请实施例中,桥接层可以对系统层中游戏能够用到的系统能力进行封装,并将封装后的能力供JS层调用。具体的,桥接层可以将系统能力注入到JS引擎,JS引擎在执行游戏中的JS代码时可以为JS层提供JS引擎中注入的系统能力。本申请实施例中,系统层的系统能力可以是小游戏能够用到的所有能力。比如,系统能力可以是访问存储器的能力。对于小游戏不会用到的系统能力,则不会进行封装,也不会注入到JS引擎。In the embodiment of the present application, the bridging layer may encapsulate system capabilities that can be used by games in the system layer, and provide the encapsulated capabilities for the JS layer to call. Specifically, the bridge layer can inject the system capabilities into the JS engine, and the JS engine can provide the JS layer with the system capabilities injected in the JS engine when executing the JS code in the game. In the embodiment of the present application, the system capabilities of the system layer may be all the capabilities that can be used by the mini-game. For example, system capabilities can be the ability to access memory. For system capabilities that are not used in mini-games, they will not be encapsulated or injected into the JS engine.
其中,封装后的系统能力可以以应用程序编程接口(Application Programming Interface,API)的形式存在。Among them, the encapsulated system capability may exist in the form of an Application Programming Interface (Application Programming Interface).
本申请实施例中,小游戏可以通过桥接层直接利用系统的底层能力,提高了小游戏的运行性能。In the embodiment of the present application, the mini-game can directly utilize the underlying capabilities of the system through the bridge layer, thereby improving the running performance of the mini-game.
可选的,系统能力包括图形绘制能力、传感器调用能力、文件下载能力、文件上传能力、支付能力、短信读取能力、通讯录访问能力、摄像头调用能力中的至少一种。Optionally, the system capability includes at least one of a graphics drawing capability, a sensor calling capability, a file downloading capability, a file uploading capability, a payment capability, a short message reading capability, an address book access capability, and a camera calling capability.
比如,封装后的图形绘制能力可以为开放图形库(Open Graphics Library,OpenGL),OpenGL一个跨编程语言、跨平台的编程接口规格的专业的图形程序接口,是一个调用方便的底层图形库。传感器调用能力具体可以包括红外接近传感器的调用能力、光线传感器(也可称为环境光传感器)的调用能力、重力传感器的调用能力、三轴加速度传感器、三轴陀螺仪的调用能力等等。For example, the encapsulated graphics drawing capability can be Open Graphics Library (Open Graphics Library, OpenGL). OpenGL is a professional graphics program interface with cross programming language and cross platform programming interface specifications. It is a low-level graphics library that is easy to call. The sensor calling capability may specifically include a calling capability of an infrared proximity sensor, a calling capability of a light sensor (also referred to as an ambient light sensor), a calling capability of a gravity sensor, a calling capability of a three-axis acceleration sensor, a calling capability of a three-axis gyroscope, and the like.
本申请实施例中,通过增加桥接层将JS层与系统层进行隔离,桥接层可以封装系统层的系统能力,封装后的系统能力可以供JS层调用,避免JS层直接与系统层进行交互,JS层无需与系统层进行适配,在JS层运行的第一游戏的游戏代码无需适配不同的类型的系统,第一游戏的游戏代码只需与桥接层进行适配即可,进而可以降低游戏开发成本。同时,由于JS层不直接与系统层进行交互,增加桥接层可以保证系统层的安全。In the embodiment of the present application, the JS layer is isolated from the system layer by adding a bridge layer. The bridge layer can encapsulate the system capabilities of the system layer, and the encapsulated system capabilities can be called by the JS layer to avoid the JS layer directly interacting with the system layer. The JS layer does not need to adapt to the system layer. The game code of the first game running in the JS layer does not need to adapt to a different type of system. The game code of the first game only needs to be adapted to the bridge layer, which can reduce the Game development costs. At the same time, since the JS layer does not directly interact with the system layer, adding a bridge layer can ensure the security of the system layer.
请参阅图3,图3是本申请实施例公开的另一种引擎隔离方法的流程示意图,如图3所示,该引擎隔离方法包括如下步骤。Please refer to FIG. 3, which is a schematic flowchart of another engine isolation method disclosed in an embodiment of the present application. As shown in FIG. 3, the engine isolation method includes the following steps.
301,当第一游戏在游戏平台上运行时,桥接层根据系统层的系统类型确定系统层对应的JS引擎。301. When the first game runs on the game platform, the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer.
302,桥接层调用与系统层对应的JS引擎对运行在JS层的第一游戏的游戏代码进行处理。302. The bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer.
303,桥接层向JS层暴露封装后的系统能力,该封装后的系统能力供JS层调用。303. The bridging layer exposes the encapsulated system capability to the JS layer, and the encapsulated system capability is provided for the JS layer to call.
本申请实施例中的步骤301至步骤303可以参见图1所示的步骤101至步骤103,此处不再赘述。For steps 301 to 303 in this embodiment of the present application, reference may be made to steps 101 to 103 shown in FIG. 1, and details are not described herein again.
304,当系统层检测到第一系统事件时,桥接层将第一系统事件转换为第一JS事件,生成与第一JS事件对应的第一JS事件处理函数。304. When the system layer detects the first system event, the bridge layer converts the first system event into a first JS event, and generates a first JS event processing function corresponding to the first JS event.
305,JS层调用第一JS事件处理函数对第一JS事件进行处理。305. The JS layer calls the first JS event processing function to process the first JS event.
本申请实施例中,第一系统事件可以是系统层触发产生的事件。比如,在第一游戏运行过程中,用户触摸了移动终端的显示屏,则产生了触摸事件,系统层可以检测到触摸事件。下面以第一系统事件为触摸事件为例进行说明。系统层将检测到的触摸事件交给桥接层处理,桥接层将触摸事件转换为JS层可以识别的JS触摸事件,生成与JS触摸事件对应的JS触摸事件处理函数,JS层可以直接调用JS触摸事件处理函数执行JS触摸事件。In the embodiment of the present application, the first system event may be an event triggered by a system layer. For example, during the first game running, when the user touches the display screen of the mobile terminal, a touch event is generated, and the system layer can detect the touch event. The following uses the first system event as a touch event for illustration. The system layer passes the detected touch event to the bridge layer for processing. The bridge layer converts the touch event into a JS touch event that the JS layer can recognize, and generates a JS touch event processing function corresponding to the JS touch event. The JS layer can directly call the JS touch. The event handler executes the JS touch event.
具体的,系统层、桥接层、JS层都可以理解为一段程序代码,并且是不同的编程语言编写的程序代码。比如,系统层可以是采用汇编语言编写的一段程序代码;桥接层可以是采用C++语言编写的一段程序代码;JS层可以是采用Java语言编写的一段程序代码。系统层将检测到的触摸事件交给桥接层处理时,由于系统层是采用汇编语言编写的,触摸事件对应的是一段汇编语言代码,JS层显然无法直接对触摸事件进行处理,则此时桥接层将触 摸事件转换为JS层可以识别的JS触摸事件,并生成对应的JS事件处理函数。每一个JS事件最终都转换为一个或多个JS函数,JS层可以直接调用JS函数进行处理。Specifically, the system layer, the bridge layer, and the JS layer can be understood as a piece of program code, and are program codes written in different programming languages. For example, the system layer can be a piece of program code written in assembly language; the bridge layer can be a piece of program code written in C ++ language; the JS layer can be a piece of program code written in Java language. When the system layer sends the detected touch event to the bridge layer for processing, since the system layer is written in assembly language, and the touch event corresponds to a piece of assembly language code, the JS layer obviously cannot directly handle the touch event. The layer converts the touch event into a JS touch event that can be recognized by the JS layer, and generates a corresponding JS event processing function. Each JS event is eventually converted into one or more JS functions, and the JS layer can directly call JS functions for processing.
其中,桥接层作为中间层,可以将触摸事件的汇编语言代码转换为JS层可以识别的JS代码。避免了系统层执行将第一系统事件转换为第一JS事件,生成与第一JS事件对应的第一JS事件处理函数的步骤,减轻了系统层的负担,提高了触摸事件的响应速度,进而提高了游戏体验。Among them, the bridge layer serves as an intermediate layer, and can convert the assembly language code of the touch event into JS code that can be recognized by the JS layer. The steps of converting the first system event into the first JS event and generating the first JS event processing function corresponding to the first JS event are avoided at the system layer, which reduces the burden on the system layer and improves the response speed of the touch event. Improved gaming experience.
其中,JS层在调用JS触摸事件处理函数之前,可以进行游戏业务初始化、添加事件监听器、注册触摸事件处理函数,以便调用桥接层的JS触摸事件处理函数执行JS触摸事件。本申请实施例中的桥接层作为JS层与系统层之间的桥梁,桥接层可以将系统层检测的事件转换为JS层可以直接调用的JS触摸事件处理函数,便于JS层进行处理,降低JS层运行的游戏代码开发的难度。Among them, before calling the JS touch event processing function, the JS layer can initialize the game business, add event listeners, and register the touch event processing function, so as to call the JS touch event processing function of the bridge layer to execute the JS touch event. The bridge layer in the embodiment of the present application serves as a bridge between the JS layer and the system layer. The bridge layer can convert events detected by the system layer into JS touch event processing functions that can be directly called by the JS layer, which is convenient for the JS layer to process and reduce JS. Difficulty of developing game code to run at layers.
本申请实施例中,通过增加桥接层将JS层与系统层进行隔离,桥接层可以封装系统层的系统能力,封装后的系统能力可以供JS层调用,避免JS层直接与系统层进行交互,JS层无需与系统层进行适配,在JS层运行的第一游戏的游戏代码无需适配不同的类型的系统,第一游戏的游戏代码只需与桥接层进行适配即可,进而可以降低游戏开发成本。同时,由于JS层不直接与系统层进行交互,增加桥接层可以保证系统层的安全。桥接层可以将系统层检测的事件转换为JS层可以直接调用的S触摸事件处理函数,便于JS层进行处理,降低JS层运行的游戏代码开发的难度。In the embodiment of the present application, the JS layer is isolated from the system layer by adding a bridge layer. The bridge layer can encapsulate the system capabilities of the system layer, and the encapsulated system capabilities can be called by the JS layer to avoid the JS layer directly interacting with the system layer. The JS layer does not need to adapt to the system layer. The game code of the first game running in the JS layer does not need to adapt to a different type of system. The game code of the first game only needs to be adapted to the bridge layer, which can reduce the Game development costs. At the same time, since the JS layer does not directly interact with the system layer, adding a bridge layer can ensure the security of the system layer. The bridging layer can convert the events detected by the system layer into S touch event processing functions that can be directly called by the JS layer, which is convenient for the JS layer to process and reduces the difficulty of developing game code for the JS layer.
请参阅图4,图4是本申请实施例公开的另一种引擎隔离方法的流程示意图,如图4所示,该引擎隔离方法包括如下步骤。Please refer to FIG. 4. FIG. 4 is a schematic flowchart of another engine isolation method disclosed in the embodiment of the present application. As shown in FIG. 4, the engine isolation method includes the following steps.
401,当第一游戏在游戏平台上运行时,桥接层根据系统层的系统类型确定系统层对应的JS引擎。401. When the first game runs on the game platform, the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer.
402,桥接层调用与系统层对应的JS引擎对运行在JS层的第一游戏的游戏代码进行处理。402. The bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer.
403,桥接层向JS层暴露封装后的系统能力,该封装后的系统能力供JS层调用。403. The bridging layer exposes the encapsulated system capability to the JS layer, and the encapsulated system capability is provided for the JS layer to call.
本申请实施例中的步骤401至步骤403可以参见图1所示的步骤101至步骤103,此处不再赘述。For steps 401 to 403 in this embodiment of the present application, reference may be made to steps 101 to 103 shown in FIG. 1, and details are not described herein again.
404,当系统层对应的JS引擎升级时,桥接层适配系统层进行相应的升级。404. When the JS engine corresponding to the system layer is upgraded, the bridge layer adapts to the system layer to perform the corresponding upgrade.
本申请实施例中,当系统层的JS引擎升级时,桥接层需要适配系统层进行相应的升级,以使桥接层能够与系统层进行适配。而对于JS层,则无需进行升级,JS层无需与系统层进行适配,在JS层运行的第一游戏的游戏代码无需适配底层的系统层,进而可以降低游戏开发成本。In the embodiment of the present application, when the JS engine of the system layer is upgraded, the bridge layer needs to be adapted to the system layer for corresponding upgrade, so that the bridge layer can be adapted to the system layer. For the JS layer, there is no need to upgrade, the JS layer does not need to adapt to the system layer, and the game code of the first game running in the JS layer does not need to adapt to the underlying system layer, which can reduce game development costs.
可选的,本申请实施例还可以包括如下步骤:Optionally, the embodiment of the present application may further include the following steps:
当系统层有能力更新时,桥接层将系统层更新的能力进行封装,得到封装后的更新的系统能力,封装后的更新的系统能力供JS层调用。When the system layer is capable of updating, the bridging layer encapsulates the updated ability of the system layer to obtain the updated system ability after the package, and the updated system ability after the package is called by the JS layer.
本申请实施例中,当系统层有能力更新时,桥接层将系统层更新的能力进行封装,得到封装后的更新的系统能力,封装后的更新的系统能力供JS层调用。对于JS层而言,则无需与系统层进行适配,在JS层运行的第一游戏的游戏代码无需适配底层的系统层,进而可以降低游戏开发成本。In the embodiment of the present application, when the system layer is capable of updating, the bridging layer encapsulates the updated ability of the system layer to obtain the encapsulated updated system ability, and the encapsulated updated system ability is called by the JS layer. For the JS layer, there is no need to adapt to the system layer, and the game code of the first game running in the JS layer does not need to adapt to the underlying system layer, which can reduce game development costs.
本申请实施例中,通过增加桥接层将JS层与系统层进行隔离,桥接层可以封装系统层的系统能力,封装后的系统能力可以供JS层调用,避免JS层直接与系统层进行交互,JS层无需与系统层进行适配,在JS层运行的第一游戏的游戏代码无需适配不同的类型的系统,第一游戏的游戏代码只需与桥接层进行适配即可,进而可以降低游戏开发成本。同时,第 一游戏可以利用到系统的底层能力,提高了小游戏的运行性能。In the embodiment of the present application, the JS layer is isolated from the system layer by adding a bridge layer. The bridge layer can encapsulate the system capabilities of the system layer, and the encapsulated system capabilities can be called by the JS layer to avoid the JS layer directly interacting with the system layer. The JS layer does not need to adapt to the system layer. The game code of the first game running in the JS layer does not need to adapt to a different type of system. The game code of the first game only needs to be adapted to the bridge layer, which can reduce the Game development costs. At the same time, the first game can take advantage of the underlying capabilities of the system, improving the performance of small games.
请参阅图5,图5是本申请实施例公开的另一种引擎隔离方法的流程示意图,如图5所示,该引擎隔离方法包括如下步骤。Please refer to FIG. 5, which is a schematic flowchart of another engine isolation method disclosed in an embodiment of the present application. As shown in FIG. 5, the engine isolation method includes the following steps.
501,当第一游戏在游戏平台上运行时,桥接层根据系统层的系统类型确定系统层对应的JS引擎。501. When the first game runs on the game platform, the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer.
502,桥接层调用与系统层对应的JS引擎对运行在JS层的第一游戏的游戏代码进行处理。502. The bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer.
503,桥接层向JS层暴露封装后的系统能力,该封装后的系统能力供JS层调用。503. The bridging layer exposes the encapsulated system capabilities to the JS layer, and the encapsulated system capabilities are provided for the JS layer to call.
本申请实施例中的步骤501至步骤503可以参见图1所示的步骤501至步骤503,此处不再赘述。For steps 501 to 503 in the embodiment of the present application, reference may be made to steps 501 to 503 shown in FIG. 1, and details are not described herein again.
504,桥接层获取第一游戏的系统能力调用权限集合。504. The bridge layer obtains a system capability call permission set of the first game.
505,当接收到第一游戏对超出系统能力调用权限集合之外的系统能力进行调用时,桥接层执行针对超出系统能力调用权限集合之外的系统能力的权限认证操作。505. When the first game receives a call to a system capability beyond the system capability call permission set, the bridge layer performs a permission authentication operation for the system capability beyond the system capability call permission set.
506,当超出系统能力调用权限集合之外的系统能力的权限认证操作通过后,将超出系统能力调用权限集合之外的系统能力加入第一游戏的系统能力调用权限集合。506. After the authority authentication operation exceeding the system capability calling permission set passes, the system capability exceeding the system capability calling permission set is added to the system capability calling permission set of the first game.
本申请实施例中,不同类型的游戏的系统能力调用权限一般不相同。比如,重力感应类游戏具有调用重力传感器的能力;具有好友排行功能的游戏具有文件上传能力与通讯录访问能力。一般而言,对于一些隐私性较强的系统能力(比如,通讯录访问能力、短信读取能力、摄像头调用能力等),当游戏在游戏平台上初次运行时,一般会咨询用户的意见,用户可以选择是否赋予该游戏这些系统能力。因此,不同类型的游戏的系统能力调用权限一般不相同。In the embodiments of the present application, the system capability calling authority of different types of games is generally different. For example, gravity-sensing games have the ability to call gravity sensors; games with friends ranking have the ability to upload files and access contacts. Generally speaking, for some systems with strong privacy (such as address book access ability, SMS reading ability, camera calling ability, etc.), when the game is first run on the game platform, the user's opinion is generally consulted. The user You can choose whether to give the game these system capabilities. Therefore, the system capability call permissions of different types of games are generally different.
其中,桥接层可以在第一游戏初次在游戏平台上运行时获取第一游戏的系统能力调用权限集合。The bridging layer may obtain a system capability call permission set of the first game when the first game runs on the game platform for the first time.
当用户在第一游戏运行过程中,如果用户针对第一游戏的操作需要调用第一游戏的系统能力调用权限集合之外的能力才能够实现,则可以征求用户的意见决定是否运行将该第一游戏的系统能力调用权限集合之外的能力加入第一游戏的系统能力调用权限集合。When the user is running the first game, if the user's operation for the first game requires the ability to call the system capabilities of the first game other than the permission set to be realized, the user's opinion can be sought to determine whether to run the first game. A capability other than the system capability call permission set of the game is added to the system capability call permission set of the first game.
具体的,桥接层执行针对超出系统能力调用权限集合之外的系统能力的权限认证操作可以包括如下步骤:Specifically, the bridging layer performing a permission authentication operation for a system capability beyond the system capability call permission set may include the following steps:
验证用户身份信息;Verify user identity information;
输出该超出系统能力调用权限集合之外的系统能力的调用优点与调用缺点;Output the advantages and disadvantages of calling the system capabilities beyond the system capability calling permission set;
接收用户触摸操作以确定是否通过权限认证操作。A user touch operation is received to determine whether the authority authentication operation is passed.
本申请实施例中,对于小游戏,可以在其使用的系统能力超出其调用权限时,进行实时系统能力权限认证,无需在退出游戏后再重新进行系统能力权限设置,避免长时间打断游戏,从而可以提高用户游戏体验。In the embodiment of the present application, for a small game, real-time system capability permission authentication can be performed when the system capability used by the game exceeds its calling authority, and there is no need to re-set the system capability permission after exiting the game to avoid interrupting the game for a long time. This can improve the user gaming experience.
请参阅图6,图6是本申请实施例公开的另一种引擎隔离方法的流程示意图,如图6所示,该引擎隔离方法包括如下步骤。Please refer to FIG. 6. FIG. 6 is a schematic flowchart of another engine isolation method disclosed in the embodiment of the present application. As shown in FIG. 6, the engine isolation method includes the following steps.
601,当第一游戏在游戏平台上运行时,桥接层根据系统层的系统类型确定系统层对应的JS引擎。601. When the first game runs on the game platform, the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer.
602,桥接层调用与系统层对应的JS引擎对运行在JS层的第一游戏的游戏代码进行处理。602. The bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer.
603,桥接层向JS层暴露封装后的系统能力,该封装后的系统能力供JS层调用。603. The bridging layer exposes the encapsulated system capability to the JS layer, and the encapsulated system capability is provided for the JS layer to call.
本申请实施例中的步骤601至步骤603可以参见图1所示的步骤601至步骤603,此处不再赘述。For steps 601 to 603 in this embodiment of the present application, reference may be made to steps 601 to 603 shown in FIG. 1, and details are not described herein again.
604,当第一游戏和第二游戏同时在游戏平台上运行时,若运行在JS层的第一游戏和 第二游戏同时对桥接层封装的第一系统能力进行调用,桥接层获取第一游戏和第二游戏的优先级,并确认第一游戏和第二游戏中优先级最高的游戏,并将封装的第一系统能力优先给第一游戏和第二游戏中优先级最高的游戏使用。604. When the first game and the second game run on the game platform at the same time, if the first game and the second game running on the JS layer call the first system capability encapsulated by the bridge layer at the same time, the bridge layer obtains the first game. And the priority of the second game, and confirm the highest priority game among the first and second games, and prioritize the packaged first system capability to the highest priority game among the first and second games.
本申请实施例中,当两个游戏同时在游戏平台上运行时,如果两个游戏同时对同一系统能力进行调用,则会出现冲突。此时,桥接层可以根据这两个游戏的优先级来确定将第一系统能力优先给第一游戏和第二游戏中优先级最高的游戏使用。In the embodiment of the present application, when two games are running on a game platform at the same time, if two games call the same system capability at the same time, a conflict will occur. At this time, the bridge layer may determine to prioritize the first system capability to the game with the highest priority among the first game and the second game according to the priorities of the two games.
其中,两个游戏同时在游戏平台上运行的场景可以是分屏多任务场景。比如,两个游戏同时对系统支付能力进行调用时,为了保证支付的安全性,同一时间仅允许两个游戏中的一个进行系统支付能力调用。第一游戏和第二游戏的优先级可以基于第一游戏和第二游戏在游戏平台的运行信息、用户评价信息、第一系统能力的调用频次等进行确定。Among them, the scenario where two games are running on the game platform at the same time may be a split-screen multi-tasking scenario. For example, when two games call the system payment capability at the same time, in order to ensure the security of payment, only one of the two games is allowed to call the system payment capability at the same time. The priorities of the first game and the second game may be determined based on the running information of the first game and the second game on the game platform, user evaluation information, the calling frequency of the first system capability, and the like.
可选的,桥接层获取第一游戏和第二游戏的优先级,具体可以包括如下步骤:Optionally, the bridge layer obtains the priorities of the first game and the second game, which may specifically include the following steps:
桥接层接收JS层发送的第一游戏在游戏平台的运行信息以及第二游戏在游戏平台的运行信息,基于第一游戏在游戏平台的运行信息以及第二游戏在游戏平台的运行信息确定第一游戏的优先级和第二游戏的优先级。The bridge layer receives the running information of the first game on the game platform and the running information of the second game on the game platform sent by the JS layer, and determines the first based on the running information of the first game on the game platform and the running information of the second game on the game platform. The priority of the game and the priority of the second game.
其中,游戏在游戏平台的运行信息可以包括该游戏在游戏平台的累计上线时长、该游戏在游戏平台的活跃度、该游戏在游戏平台的排行榜等信息。一般而言,累计上线时长越长、活跃度越高、热度排行榜越靠前的游戏的优先级越高。The running information of the game on the game platform may include information such as the cumulative online duration of the game on the game platform, the activity of the game on the game platform, and the ranking of the game on the game platform. Generally speaking, the longer the cumulative online time, the higher the activity, and the higher the popularity of the game, the higher the priority.
比如,如果第一游戏的优先级高于第二游戏的优先级,则可以在将封装的第一系统能力给第一游戏使用完之后,将该第一系统能力给第二游戏使用。For example, if the priority of the first game is higher than the priority of the second game, after the packaged first system capability is used for the first game, the first system capability may be used for the second game.
本申请实施例可以在两个游戏同时对同一系统能力进行调用出现冲突时,通过两个游戏的优先级来将该系统能力优先给两个游戏中优先级最高的游戏使用,解决了在两个游戏同时对同一系统能力进行调用出现冲突时出现系统错误的问题。In the embodiment of the present application, when two games call conflicts on the same system capability at the same time, the priority of the two games is used to prioritize the system capability to the game with the highest priority among the two games. When the game calls the same system capability at the same time, a system error occurs when a conflict occurs.
上述主要从方法侧执行过程的角度对本申请实施例的方案进行了介绍。可以理解的是,移动终端为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本发明能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。The above mainly introduces the solution of the embodiment of the present application from the perspective of the method-side execution process. It can be understood that, in order to realize the above functions, the mobile terminal includes a hardware structure and / or a software module corresponding to each function. Those skilled in the art should easily realize that the present invention can be implemented in the form of hardware or a combination of hardware and computer software by combining the units and algorithm steps of each example described in the embodiments disclosed herein. Whether a certain function is performed by hardware or computer software-driven hardware depends on the specific application of the technical solution and design constraints. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation should not be considered outside the scope of the present invention.
本申请实施例可以根据上述方法示例对移动终端进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个处理单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。The embodiments of the present application may divide the functional units of the mobile terminal according to the foregoing method examples. For example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit. It should be noted that the division of the units in the embodiments of the present application is schematic, and is only a logical function division. There may be another division manner in actual implementation.
请参阅图7,图7是本申请实施例公开的一种引擎隔离装置的结构示意图。该引擎隔离装置700应用于游戏平台,游戏平台运行在移动终端上,游戏平台包括系统层、桥接层和JS层,桥接层封装有系统层的系统能力,桥接层连接系统层与JS层,如图7所示,该引擎隔离装置700包括确定单元701以及处理单元702,其中:Please refer to FIG. 7, which is a schematic structural diagram of an engine isolation device disclosed in an embodiment of the present application. The engine isolation device 700 is applied to a game platform. The game platform runs on a mobile terminal. The game platform includes a system layer, a bridge layer, and a JS layer. The bridge layer encapsulates the system capabilities of the system layer. The bridge layer connects the system layer and the JS layer, such as As shown in FIG. 7, the engine isolation device 700 includes a determining unit 701 and a processing unit 702, where:
确定单元701,用于当第一游戏在游戏平台上运行时,根据系统层的系统类型确定系统层对应的JS引擎;A determining unit 701, configured to determine a JS engine corresponding to the system layer according to the system type of the system layer when the first game runs on the game platform;
处理单元702,用于调用与系统层对应的JS引擎对运行在JS层的第一游戏的游戏代码进行处理;A processing unit 702, configured to call a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer;
处理单元702,还用于向JS层暴露封装后的系统能力,封装后的系统能力供JS层调用。The processing unit 702 is further configured to expose the encapsulated system capability to the JS layer, and the encapsulated system capability is provided for the JS layer to call.
可选的,该引擎隔离装置700还包括转换单元703和生成单元704,其中:Optionally, the engine isolation device 700 further includes a conversion unit 703 and a generation unit 704, where:
转换单元703,用于当系统层检测到第一系统事件时,将第一系统事件转换为第一JS事件;A conversion unit 703, configured to convert the first system event into a first JS event when the system layer detects the first system event;
生成单元704,用于生成与第一JS事件对应的第一JS事件处理函数;JS层用于调用第一JS事件处理函数对第一JS事件进行处理。The generating unit 704 is configured to generate a first JS event processing function corresponding to the first JS event; the JS layer is configured to call the first JS event processing function to process the first JS event.
可选的,该引擎隔离装置700还包括适配单元705,其中:Optionally, the engine isolation device 700 further includes an adaptation unit 705, where:
适配单元705,用于当系统层对应的JS引擎升级时,适配系统层进行相应的升级。The adapting unit 705 is configured to perform a corresponding upgrade when the JS engine corresponding to the system layer is upgraded.
可选的,处理单元702,还用于当系统层有能力更新时,将系统层更新的能力进行封装,得到封装后的更新的系统能力,封装后的更新的系统能力供JS层调用。Optionally, the processing unit 702 is further configured to encapsulate the updated capability of the system layer when the system layer is capable of updating, to obtain the encapsulated updated system capability, and the encapsulated updated system capability is available for the JS layer to call.
可选的,该引擎隔离装置700还包括获取单元706;Optionally, the engine isolation device 700 further includes an obtaining unit 706;
获取单元706,用于获取第一游戏的系统能力调用权限集合;An obtaining unit 706, configured to obtain a system capability call permission set of the first game;
处理单元702,还用于当接收到第一游戏对超出系统能力调用权限集合之外的系统能力进行调用时,执行针对超出系统能力调用权限集合之外的系统能力的权限认证操作;The processing unit 702 is further configured to execute a permission authentication operation for a system capability beyond the system capability call permission set when the first game receives a call of the system capability beyond the system capability call permission set;
处理单元702,还用于当超出系统能力调用权限集合之外的系统能力的权限认证操作通过后,将超出系统能力调用权限集合之外的系统能力加入第一游戏的系统能力调用权限集合。The processing unit 702 is further configured to add a system capability beyond the system capability call permission set to the system capability call permission set of the first game after a permission authentication operation that exceeds the system capability call permission set passes.
可选的,获取单元706,还用于当第一游戏和第二游戏同时在游戏平台上运行时,如果运行在JS层的第一游戏和第二游戏同时对桥接层封装的第一系统能力进行调用,获取第一游戏和第二游戏的优先级;Optionally, the obtaining unit 706 is further configured to: when the first game and the second game run on the game platform at the same time, if the first game and the second game running on the JS layer simultaneously encapsulate the first system capability of the bridge layer Make a call to obtain the priority of the first game and the second game;
处理单元702,还用于确认第一游戏和第二游戏中优先级最高的游戏,并将封装的第一系统能力优先给第一游戏和第二游戏中优先级最高的游戏使用。The processing unit 702 is further configured to confirm the game with the highest priority among the first game and the second game, and prioritize the packaged first system capability to the game with the highest priority among the first game and the second game.
可选的,获取单元706获取第一游戏和第二游戏的优先级,具体为:Optionally, the obtaining unit 706 obtains the priorities of the first game and the second game, specifically:
获取单元706接收JS层发送的第一游戏在游戏平台的运行信息以及第二游戏在游戏平台的运行信息,基于第一游戏在游戏平台的运行信息以及第二游戏在游戏平台的运行信息确定第一游戏的优先级和第二游戏的优先级。The obtaining unit 706 receives the running information of the first game on the game platform and the running information of the second game on the game platform and sends the JS layer to determine the first game based on the running information of the first game on the game platform and the running information of the second game on the game platform. The priority of the first game and the priority of the second game.
实施图7所示的引擎隔离装置,通过增加桥接层将JS层与系统层进行隔离,桥接层可以封装系统层的系统能力,封装后的系统能力可以供JS层调用,避免JS层直接与系统层进行交互,JS层无需与系统层进行适配,在JS层运行的第一游戏的游戏代码无需适配不同的类型的系统,第一游戏的游戏代码只需与桥接层进行适配即可,进而可以降低游戏开发成本。同时,由于JS层不直接与系统层进行交互,增加桥接层可以保证系统层的安全。Implement the engine isolation device shown in Figure 7 to isolate the JS layer from the system layer by adding a bridging layer. The bridging layer can encapsulate the system capabilities of the system layer. The encapsulated system capabilities can be called by the JS layer to avoid the JS layer directly from the system. The JS layer does not need to adapt to the system layer. The game code of the first game running in the JS layer does not need to adapt to a different type of system. The game code of the first game only needs to adapt to the bridge layer. , Which can reduce game development costs. At the same time, since the JS layer does not directly interact with the system layer, adding a bridge layer can ensure the security of the system layer.
请参阅图8,图8是本申请实施例公开的一种移动终端的结构示意图。如图8所示,该移动终端800包括处理器801和存储器802,其中,移动终端800还可以包括总线803,处理器801和存储器802可以通过总线803相互连接,总线803可以是外设部件互连标准(Peripheral Component Interconnect,简称PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,简称EISA)总线等。总线803可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。其中,移动终端800还可以包括输入输出设备804,输入输出设备804可以包括显示屏,例如液晶显示屏。存储器802用于存储包含指令的一个或多个程序;处理器801用于调用存储在存储器802中的指令执行上述图1至图6中的部分或全部方法步骤。Please refer to FIG. 8, which is a schematic structural diagram of a mobile terminal disclosed in an embodiment of the present application. As shown in FIG. 8, the mobile terminal 800 includes a processor 801 and a memory 802. The mobile terminal 800 may further include a bus 803. The processor 801 and the memory 802 may be connected to each other through a bus 803, and the bus 803 may be a peripheral component and Connected to a standard (Peripheral Component Interconnect (PCI) bus or extended industry standard architecture (EISA) bus, etc. The bus 803 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 8, but it does not mean that there is only one bus or one type of bus. The mobile terminal 800 may further include an input-output device 804, and the input-output device 804 may include a display screen, such as a liquid crystal display screen. The memory 802 is configured to store one or more programs containing instructions; the processor 801 is configured to call the instructions stored in the memory 802 to execute some or all of the method steps in the foregoing FIG. 1 to FIG. 6.
实施图8所示的移动终端,通过增加桥接层将JS层与系统层进行隔离,桥接层可以封装系统层的系统能力,封装后的系统能力可以供JS层调用,避免JS层直接与系统层进行交互,JS层无需与系统层进行适配,在JS层运行的第一游戏的游戏代码无需适配不同的类型的系统,第一游戏的游戏代码只需与桥接层进行适配即可,进而可以降低游戏开发成本。同时,由于JS层不直接与系统层进行交互,增加桥接层可以保证系统层的安全。Implement the mobile terminal shown in Figure 8 to isolate the JS layer from the system layer by adding a bridging layer. The bridging layer can encapsulate the system capabilities of the system layer. The encapsulated system capabilities can be called by the JS layer to avoid the JS layer directly from the system layer. For interaction, the JS layer does not need to adapt to the system layer. The game code of the first game running in the JS layer does not need to adapt to a different type of system. The game code of the first game only needs to adapt to the bridge layer. This can reduce game development costs. At the same time, since the JS layer does not directly interact with the system layer, adding a bridge layer can ensure the security of the system layer.
本申请实施例还提供了另一种移动终端,如图9所示,为了便于说明,仅示出了与本 申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该移动终端可以为包括手机、平板电脑、PDA(Personal Digital Assistant,个人数字助理)、POS(Point of Sales,销售终端)、车载电脑等任意终端设备,以移动终端为手机为例:This embodiment of the present application also provides another mobile terminal. As shown in FIG. 9, for convenience of explanation, only relevant parts of the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the method of the embodiment of the present application. section. The mobile terminal may be any terminal device including a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), and a vehicle-mounted computer. Taking the mobile terminal as a mobile phone as an example:
图9示出的是与本申请实施例提供的移动终端相关的手机的部分结构的框图。参考图9,手机包括:射频(Radio Frequency,RF)电路910、存储器920、输入单元930、显示单元940、传感器950、音频电路960、无线保真(Wireless Fidelity,WiFi)模块970、处理器980、以及电源990等部件。本领域技术人员可以理解,图9中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。FIG. 9 is a block diagram showing a partial structure of a mobile phone related to a mobile terminal according to an embodiment of the present application. Referring to FIG. 9, the mobile phone includes: a radio frequency (RF) circuit 910, a memory 920, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a wireless fidelity (WiFi) module 970, and a processor 980 , And power supply 990 and other components. Those skilled in the art can understand that the structure of the mobile phone shown in FIG. 9 does not constitute a limitation on the mobile phone, and may include more or fewer parts than those shown in the figure, or combine some parts, or arrange different parts.
下面结合图9对手机的各个构成部件进行具体的介绍:The following describes each component of the mobile phone in detail with reference to FIG. 9:
RF电路910可用于信息的接收和发送。通常,RF电路910包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路910还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。The RF circuit 910 can be used for receiving and transmitting information. Generally, the RF circuit 910 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, the RF circuit 910 can also communicate with a network and other devices through wireless communication. The above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (Code Division Multiple Access) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Messaging Service (SMS), etc.
存储器920可用于存储软件程序以及模块,处理器980通过运行存储在存储器920的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器920可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据手机的使用所创建的数据等。此外,存储器920可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 920 may be used to store software programs and modules. The processor 980 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 920. The memory 920 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile phone, and the like. In addition, the memory 920 may include a high-speed random access memory, and may further include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage device.
输入单元930可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元930可包括指纹识别模组931以及其他输入设备932。指纹识别模组931,可采集用户在其上的指纹数据。除了指纹识别模组931,输入单元930还可以包括其他输入设备932。具体地,其他输入设备932可以包括但不限于触控屏、物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。The input unit 930 may be used to receive inputted numeric or character information, and generate key signal inputs related to user settings and function control of the mobile phone. Specifically, the input unit 930 may include a fingerprint recognition module 931 and other input devices 932. The fingerprint identification module 931 can collect fingerprint data on the user. In addition to the fingerprint recognition module 931, the input unit 930 may also include other input devices 932. Specifically, the other input devices 932 may include, but are not limited to, one or more of a touch screen, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
显示单元940可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元940可包括显示屏941,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机或无机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示屏941。The display unit 940 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 940 may include a display screen 941. Optionally, the display screen 941 may be configured by using a liquid crystal display (Liquid Crystal Display, LCD), an organic or inorganic light emitting diode (Organic Light-Emitting Diode, OLED) and the like.
手机还可包括至少一种传感器950,比如光传感器、运动传感器、压力传感器、温度传感器以及其他传感器。具体地,光传感器可包括环境光传感器(也称为光线传感器)及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节手机的背光亮度,进而调节显示屏941的亮度,接近传感器可在手机移动到耳边时,关闭显示屏941和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。The mobile phone may further include at least one sensor 950, such as a light sensor, a motion sensor, a pressure sensor, a temperature sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor (also referred to as a light sensor) and a proximity sensor. The ambient light sensor may adjust the brightness of the backlight of the mobile phone according to the brightness of the ambient light, and then adjust the brightness of the display screen 941. The proximity sensor may When the mobile phone is moved to the ear, the display 941 and / or the backlight are turned off. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three axes), and can detect the magnitude and direction of gravity when it is stationary. It can be used to identify the attitude of mobile phones (such as horizontal and vertical screen switching, magnetic force) Calibration of the meter), vibration recognition related functions (such as pedometer, tap), etc. As for the mobile phone can also be equipped with gyroscope, barometer, hygrometer, thermometer, infrared sensor and other sensors, will not repeat them here.
音频电路960、扬声器961,传声器962可提供用户与手机之间的音频接口。音频电路960可将接收到的音频数据转换后的电信号,传输到扬声器961,由扬声器961转换为声音 信号播放;另一方面,传声器962将收集的声音信号转换为电信号,由音频电路960接收后转换为音频数据,再将音频数据播放处理器980处理后,经RF电路910以发送给比如另一手机,或者将音频数据播放至存储器920以便进一步处理。The audio circuit 960, the speaker 961, and the microphone 962 can provide an audio interface between the user and the mobile phone. The audio circuit 960 may transmit the received electrical data converted electrical signals to a speaker 961, which is converted into a sound signal for playback; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, and the audio circuit 960 After receiving, it is converted into audio data, and then processed by the audio data playback processor 980, and then sent to, for example, another mobile phone via the RF circuit 910, or the audio data is played to the memory 920 for further processing.
WiFi属于短距离无线传输技术,手机通过WiFi模块970可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图9示出了WiFi模块970,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 970. It provides users with wireless broadband Internet access. Although FIG. 9 shows the WiFi module 970, it can be understood that it does not belong to the necessary configuration of the mobile phone, and can be omitted as needed without changing the essence of the invention.
处理器980是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器920内的软件程序和/或模块,以及调用存储在存储器920内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器980可包括一个或多个处理单元;优选的,处理器980可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器980中。The processor 980 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. The processor 980 runs or executes software programs and / or modules stored in the memory 920 and calls data stored in the memory 920 to execute Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole. Optionally, the processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and an application program, etc. The modem processor mainly handles wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 980.
手机还包括给各个部件供电的电源990(比如电池),优选的,电源可以通过电源管理系统与处理器980逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The mobile phone also includes a power supply 990 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 980 through the power management system, so as to implement functions such as managing charging, discharging, and power consumption management through the power management system.
手机还可以包括摄像头9100,摄像头9100用于拍摄图像与视频,并将拍摄的图像和视频传输到处理器980进行处理。The mobile phone may further include a camera 9100, which is used to capture images and videos, and transmit the captured images and videos to the processor 980 for processing.
手机还可以蓝牙模块等,在此不再赘述。The mobile phone can also have a Bluetooth module, etc., which is not repeated here.
前述图1~图6所示的实施例中,各步骤方法流程可以基于该手机的结构实现。In the foregoing embodiments shown in FIG. 1 to FIG. 6, each step and method flow can be implemented based on the structure of the mobile phone.
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任何一种引擎隔离方法的部分或全部步骤。An embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes a computer to execute a part of any one of the engine isolation methods described in the foregoing method embodiments. Or all steps.
本申请实施例还提供一种计算机程序产品,所述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,所述计算机程序可操作来使计算机执行如上述方法实施例中记载的任何一种引擎隔离方法的部分或全部步骤。An embodiment of the present application further provides a computer program product, the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to perform the operations described in the foregoing method embodiments. Part or all of the steps for any one engine isolation method.
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明并不受所描述的动作顺序的限制,因为依据本发明,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本发明所必须的。It should be noted that, for the foregoing method embodiments, for simplicity of description, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action order. Because according to the present invention, certain steps may be performed in another order or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above embodiments, the description of each embodiment has its own emphasis. For a part that is not described in detail in one embodiment, reference may be made to related descriptions in other embodiments.
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed device may be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner. For example, multiple units or components may be combined or may be combined. Integration into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be electrical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既 可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention essentially or part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory, Several instructions are included to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in various embodiments of the present invention. The foregoing memories include: U disks, Read-Only Memory (ROM), Random Access Memory (RAM), mobile hard disks, magnetic disks, or optical disks and other media that can store program codes.
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。A person of ordinary skill in the art may understand that all or part of the steps in the various methods of the foregoing embodiments may be completed by a program instructing related hardware. The program may be stored in a computer-readable memory, and the memory may include a flash disk. , Read-only memory (English: Read-Only Memory, referred to as ROM), random access device (English: Random Access Memory, referred to as RAM), magnetic disks or optical disks, etc.
以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。The embodiments of the present application have been described in detail above. Specific examples have been used herein to explain the principles and implementation of the present invention. The descriptions of the above embodiments are only used to help understand the method of the present invention and its core ideas; meanwhile, for Those of ordinary skill in the art may change the specific implementation and application scope according to the idea of the present invention. In summary, the content of this specification should not be construed as a limitation on the present invention.
Claims (20)
- 一种引擎隔离方法,其特征在于,所述引擎隔离方法应用于游戏平台,所述游戏平台运行在移动终端上,所述游戏平台包括系统层、桥接层和JS层,所述桥接层连接所述系统层与所述JS层,所述桥接层封装有所述系统层的系统能力,所述方法包括:An engine isolation method, characterized in that the engine isolation method is applied to a game platform, the game platform runs on a mobile terminal, the game platform includes a system layer, a bridge layer, and a JS layer, and the bridge layer is connected to an office The system layer and the JS layer, the bridge layer encapsulates the system capabilities of the system layer, and the method includes:当第一游戏在所述游戏平台上运行时,所述桥接层根据所述系统层的系统类型确定所述系统层对应的JS引擎;When the first game runs on the game platform, the bridge layer determines the JS engine corresponding to the system layer according to the system type of the system layer;所述桥接层调用与所述系统层对应的JS引擎对运行在所述JS层的所述第一游戏的游戏代码进行处理;The bridge layer calls a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer;所述桥接层向所述JS层暴露封装后的系统能力,所述封装后的系统能力供所述JS层调用。The bridging layer exposes the encapsulated system capability to the JS layer, and the encapsulated system capability is available for the JS layer to call.
- 根据权利要求1所述的方法,其特征在于,所述方法包括:The method according to claim 1, wherein the method comprises:当所述系统层检测到第一系统事件时,所述桥接层将所述第一系统事件转换为第一JS事件,生成与所述第一JS事件对应的第一JS事件处理函数;所述JS层用于调用所述第一JS事件处理函数对所述第一JS事件进行处理。When the system layer detects a first system event, the bridging layer converts the first system event into a first JS event, and generates a first JS event processing function corresponding to the first JS event; the The JS layer is configured to call the first JS event processing function to process the first JS event.
- 根据权利要求1或2所述的方法,其特征在于,所述方法包括:The method according to claim 1 or 2, wherein the method comprises:当所述系统层对应的JS引擎升级时,所述桥接层适配所述系统层进行相应的升级。When the JS engine corresponding to the system layer is upgraded, the bridging layer adapts to the system layer for corresponding upgrade.
- 根据权利要求1-3任一项所述的方法,其特征在于,所述方法包括:The method according to any one of claims 1-3, wherein the method comprises:当所述系统层有能力更新时,所述桥接层将所述系统层更新的能力进行封装,得到封装后的更新的系统能力,所述封装后的更新的系统能力供所述JS层调用。When the system layer is capable of updating, the bridging layer encapsulates the updated ability of the system layer to obtain the updated system ability after the package, and the encapsulated updated system ability is for the JS layer to call.
- 根据权利要求1-4任一项所述的方法,其特征在于,所述方法包括:The method according to any one of claims 1-4, wherein the method comprises:所述桥接层获取所述第一游戏的系统能力调用权限集合;Acquiring, by the bridge layer, a system capability call permission set of the first game;当接收到所述第一游戏对超出所述系统能力调用权限集合之外的系统能力进行调用时,所述桥接层执行针对所述超出所述系统能力调用权限集合之外的系统能力的权限认证操作;When receiving the first game calling a system capability beyond the system capability call permission set, the bridging layer performs permission authentication for the system capability beyond the system capability call permission set operating;当所述超出所述系统能力调用权限集合之外的系统能力的权限认证操作通过后,将所述超出所述系统能力调用权限集合之外的系统能力加入所述第一游戏的系统能力调用权限集合。After the permission verification operation of the system capabilities beyond the system capability calling permission set is passed, adding the system capabilities beyond the system capability calling permission set to the system capability calling permission of the first game set.
- 根据权利要求1-4任一项所述的方法,其特征在于,所述方法包括:The method according to any one of claims 1-4, wherein the method comprises:当所述第一游戏和第二游戏同时在所述游戏平台上运行时,若运行在所述JS层的第一游戏和所述第二游戏同时对所述桥接层封装的第一系统能力进行调用,所述桥接层获取所述第一游戏和所述第二游戏的优先级,并确认所述第一游戏和所述第二游戏中优先级最高的游戏,并将所述封装的第一系统能力优先给所述第一游戏和所述第二游戏中优先级最高的游戏使用。When the first game and the second game run on the game platform at the same time, if the first game and the second game running on the JS layer simultaneously perform the first system capabilities encapsulated by the bridge layer When called, the bridge layer obtains the priorities of the first game and the second game, and confirms the game with the highest priority among the first game and the second game, and copies the encapsulated first The system capability is given priority to the game with the highest priority among the first game and the second game.
- 根据权利要求6所述的方法,其特征在于,所述桥接层获取所述第一游戏和所述第二游戏的优先级,包括:The method according to claim 6, wherein the obtaining, by the bridge layer, the priorities of the first game and the second game comprises:所述桥接层接收所述JS层发送的所述第一游戏在所述游戏平台的运行信息以及所述第二游戏在所述游戏平台的运行信息,基于所述第一游戏在所述游戏平台的运行信息以及所 述第二游戏在所述游戏平台的运行信息确定所述第一游戏的优先级和所述第二游戏的优先级。The bridge layer receives the running information of the first game on the game platform and the running information of the second game on the game platform sent by the JS layer, based on the first game on the game platform. And the running information of the second game on the game platform determine the priority of the first game and the priority of the second game.
- 根据权利要求5所述的方法,其特征在于,所述桥接层执行针对所述超出所述系统能力调用权限集合之外的系统能力的权限认证操作,包括:The method according to claim 5, wherein the bridging layer executes a permission authentication operation for the system capabilities beyond the system capability call permission set, comprising:验证用户身份信息;Verify user identity information;输出所述超出系统能力调用权限集合之外的系统能力的调用优点与调用缺点;Output the calling advantages and calling disadvantages of the system capabilities beyond the system capability calling permission set;接收用户触摸操作以确定是否通过权限认证操作。A user touch operation is received to determine whether the authority authentication operation is passed.
- 根据权利要求1所述的方法,其特征在于,所述系统能力包括图形绘制能力、传感器调用能力、文件下载能力、文件上传能力、支付能力、短信读取能力、通讯录访问能力、摄像头调用能力中的至少一种。The method according to claim 1, wherein the system capabilities include graphics drawing capabilities, sensor calling capabilities, file downloading capabilities, file uploading capabilities, payment capabilities, SMS reading capabilities, address book access capabilities, and camera calling capabilities At least one of.
- 一种引擎隔离装置,其特征在于,所述引擎隔离装置应用于游戏平台,所述游戏平台运行在移动终端上,所述游戏平台包括系统层、桥接层和JS层,所述桥接层连接所述系统层与所述JS层,所述桥接层封装有所述系统层的系统能力,所述引擎隔离装置包括确定单元以及处理单元,其中:An engine isolation device is characterized in that the engine isolation device is applied to a game platform, the game platform runs on a mobile terminal, the game platform includes a system layer, a bridge layer, and a JS layer, and the bridge layer is connected to an office The system layer and the JS layer, the bridge layer encapsulates the system capabilities of the system layer, and the engine isolation device includes a determination unit and a processing unit, wherein:所述确定单元,用于当第一游戏在所述游戏平台上运行时,根据所述系统层的系统类型确定所述系统层对应的JS引擎;The determining unit is configured to determine a JS engine corresponding to the system layer according to a system type of the system layer when a first game runs on the game platform;所述处理单元,用于调用与所述系统层对应的JS引擎对运行在所述JS层的所述第一游戏的游戏代码进行处理;The processing unit is configured to call a JS engine corresponding to the system layer to process the game code of the first game running in the JS layer;所述处理单元,还用于向所述JS层暴露封装后的系统能力,所述封装后的系统能力供所述JS层调用。The processing unit is further configured to expose the encapsulated system capability to the JS layer, and the encapsulated system capability is for the JS layer to call.
- 根据权利要求10所述的装置,其特征在于,所述引擎隔离装置还包括转换单元和生成单元,其中:The device according to claim 10, wherein the engine isolation device further comprises a conversion unit and a generation unit, wherein:所述转换单元,用于当所述系统层检测到第一系统事件时,将所述第一系统事件转换为第一JS事件;The conversion unit is configured to convert the first system event into a first JS event when the system layer detects a first system event;所述生成单元,用于生成与所述第一JS事件对应的第一JS事件处理函数;所述JS层用于调用所述第一JS事件处理函数对所述第一JS事件进行处理。The generating unit is configured to generate a first JS event processing function corresponding to the first JS event; the JS layer is configured to call the first JS event processing function to process the first JS event.
- 根据权利要求10或11所述的装置,其特征在于,所述引擎隔离装置还包括适配单元,其中:The device according to claim 10 or 11, wherein the engine isolation device further comprises an adaptation unit, wherein:所述适配单元,用于当所述系统层对应的JS引擎升级时,适配所述系统层进行相应的升级。The adapting unit is adapted to adapt the system layer for a corresponding upgrade when the JS engine corresponding to the system layer is upgraded.
- 根据权利要求10-12任一项所述的装置,其特征在于,The device according to any one of claims 10-12, wherein:所述处理单元,还用于当所述系统层有能力更新时,将所述系统层更新的能力进行封装,得到封装后的更新的系统能力,所述封装后的更新的系统能力供所述JS层调用。The processing unit is further configured to encapsulate the updated capability of the system layer when the system layer has the capability to update, to obtain the encapsulated updated system capability, and the encapsulated updated system capability is provided for the JS layer call.
- 根据权利要求13所述的装置,其特征在于,所述引擎隔离装置还包括获取单元,其中:The device according to claim 13, wherein the engine isolation device further comprises an obtaining unit, wherein:所述获取单元,用于获取所述第一游戏的系统能力调用权限集合;The obtaining unit is configured to obtain a system capability call permission set of the first game;所述处理单元,还用于当接收到所述第一游戏对超出所述系统能力调用权限集合之外 的系统能力进行调用时,执行针对所述超出所述系统能力调用权限集合之外的系统能力的权限认证操作;The processing unit is further configured to, when the first game receives a call to a system capability beyond the system capability call permission set, execute the system for the system beyond the system capability call permission set. Competence authorization operation;所述处理单元,还用于当所述超出所述系统能力调用权限集合之外的系统能力的权限认证操作通过后,将所述超出所述系统能力调用权限集合之外的系统能力加入所述第一游戏的系统能力调用权限集合。The processing unit is further configured to add the system capability beyond the system capability call permission set to the system capability after the authority authentication operation of the system capability beyond the system capability call permission set passes. The system capabilities of the first game call permission sets.
- 根据权利要求14所述的装置,其特征在于,The device according to claim 14, wherein:所述获取单元,还用于当所述第一游戏和第二游戏同时在所述游戏平台上运行时,如果运行在所述JS层的第一游戏和所述第二游戏同时对所述桥接层封装的第一系统能力进行调用,获取所述第一游戏和所述第二游戏的优先级;The obtaining unit is further configured to, when the first game and the second game are running on the game platform at the same time, if the first game and the second game running on the JS layer are simultaneously connected to the bridge, The first system capability encapsulated in the layer is called to obtain the priorities of the first game and the second game;所述处理单元,还用于确认所述第一游戏和所述第二游戏中优先级最高的游戏,并将所述封装的第一系统能力优先给所述第一游戏和所述第二游戏中优先级最高的游戏使用。The processing unit is further configured to confirm a game with the highest priority among the first game and the second game, and prioritize the packaged first system capability to the first game and the second game. The highest priority game to use.
- 根据权利要求15所述的装置,其特征在于,所述获取单元获取所述第一游戏和所述第二游戏的优先级,具体为:The device according to claim 15, wherein the obtaining unit obtains the priorities of the first game and the second game, specifically:所述获取单元接收所述JS层发送的所述第一游戏在所述游戏平台的运行信息以及所述第二游戏在所述游戏平台的运行信息,基于所述第一游戏在所述游戏平台的运行信息以及所述第二游戏在所述游戏平台的运行信息确定所述第一游戏的优先级和所述第二游戏的优先级。The acquiring unit receives the running information of the first game on the game platform and the running information of the second game on the game platform sent by the JS layer, based on the first game on the game platform. And the running information of the second game on the game platform determine the priority of the first game and the priority of the second game.
- 根据权利要求14所述的装置,其特征在于,所述处理单元执行针对所述超出所述系统能力调用权限集合之外的系统能力的权限认证操作,具体为:The apparatus according to claim 14, wherein the processing unit executes a permission authentication operation for the system capability beyond the system capability call permission set, specifically:所述处理单元验证用户身份信息,输出所述超出系统能力调用权限集合之外的系统能力的调用优点与调用缺点,接收用户触摸操作以确定是否通过权限认证操作。The processing unit verifies user identity information, outputs the calling advantages and calling disadvantages of the system capabilities beyond the system capability calling permission set, and receives a user touch operation to determine whether to pass a permission authentication operation.
- 根据权利要求10所述的装置,其特征在于,所述系统能力包括图形绘制能力、传感器调用能力、文件下载能力、文件上传能力、支付能力、短信读取能力、通讯录访问能力、摄像头调用能力中的至少一种。The device according to claim 10, wherein the system capabilities include graphics drawing capabilities, sensor calling capabilities, file downloading capabilities, file uploading capabilities, payment capabilities, SMS reading capabilities, address book access capabilities, and camera calling capabilities At least one of.
- 一种移动终端,其特征在于,包括处理器以及存储器,所述存储器用于存储一个或多个程序,所述一个或多个程序被配置成由所述处理器执行,所述程序包括用于执行如权利要求1-9任一项所述的方法。A mobile terminal includes a processor and a memory, where the memory is used to store one or more programs, the one or more programs are configured to be executed by the processor, and the programs include The method according to any one of claims 1-9 is performed.
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质用于存储电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-9任一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium is used to store a computer program for electronic data exchange, wherein the computer program causes a computer to execute the computer program according to any one of claims 1-9. method.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811102003.0 | 2018-09-20 | ||
CN201811102003.0A CN109254793B (en) | 2018-09-20 | 2018-09-20 | Engine isolation method, related device and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020057234A1 true WO2020057234A1 (en) | 2020-03-26 |
Family
ID=65048054
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/095120 WO2020057234A1 (en) | 2018-09-20 | 2019-07-08 | Engine isolation method, related device, and computer-readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109254793B (en) |
WO (1) | WO2020057234A1 (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109254793B (en) * | 2018-09-20 | 2022-02-15 | Oppo广东移动通信有限公司 | Engine isolation method, related device and computer readable storage medium |
CN110543370B (en) * | 2019-08-07 | 2022-07-08 | 江苏艾佳家居用品有限公司 | Method for rewriting UE4 rendering engine bottom layer and communication mechanism thereof |
CN113360200A (en) * | 2020-03-05 | 2021-09-07 | 北京沃东天骏信息技术有限公司 | Method and device for running target program embedded page |
CN113037814B (en) * | 2021-02-25 | 2022-11-25 | 平安壹钱包电子商务有限公司 | Web container injection implementation method and device, computer equipment and storage medium |
CN113625997B (en) * | 2021-07-20 | 2024-03-12 | 青岛小鸟看看科技有限公司 | XR software development architecture, application method and electronic equipment |
CN116966539A (en) * | 2023-07-25 | 2023-10-31 | 广州三七极梦网络技术有限公司 | Game processing method, device, equipment and storage medium based on elastic design |
CN117762391B (en) * | 2024-02-22 | 2024-06-25 | 欢乐互娱(上海)科技股份有限公司 | Service logic code operation method for multiple platforms |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110289419A1 (en) * | 2010-05-18 | 2011-11-24 | Yu Chi Sum Sam | Browser integration for a content system |
CN103425491A (en) * | 2013-07-30 | 2013-12-04 | 广州市动景计算机科技有限公司 | Game engine |
CN104572042A (en) * | 2013-10-15 | 2015-04-29 | 航天信息股份有限公司 | Cross-platform middleware device of mobile terminal equipment and implementation method of cross-platform middleware device of mobile terminal equipment |
CN106502809A (en) * | 2016-11-08 | 2017-03-15 | 深圳天珑无线科技有限公司 | A kind of multi-platform application program adaptation method, device and terminal unit |
CN107908426A (en) * | 2017-12-21 | 2018-04-13 | 江苏国泰新点软件有限公司 | Design method, device, mobile terminal and the storage medium of cross-platform program |
CN109254793A (en) * | 2018-09-20 | 2019-01-22 | Oppo广东移动通信有限公司 | Engine partition method, relevant device and computer readable storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130045803A1 (en) * | 2011-08-21 | 2013-02-21 | Digital Harmony Games, Inc. | Cross-platform gaming between multiple devices of multiple types |
US8621439B2 (en) * | 2011-09-06 | 2013-12-31 | Microsoft Corporation | Modern application tracing |
CN103970966B (en) * | 2014-05-27 | 2018-01-16 | 武汉兆图科技有限公司 | A kind of construction method of 3 d rendering engine across embedded platform |
CN104503752A (en) * | 2014-12-17 | 2015-04-08 | 青岛海信电器股份有限公司 | Method and device for controlling webpage to call system functions in intelligent equipment |
CN107092473B (en) * | 2016-10-31 | 2020-12-08 | 北京星选科技有限公司 | Desktop application development method and device |
CN106512396A (en) * | 2016-12-06 | 2017-03-22 | 网易(杭州)网络有限公司 | Interactive processing method and device in game and server system |
CN106997433A (en) * | 2017-03-22 | 2017-08-01 | 西安电子科技大学 | A kind of Android system authority management method |
-
2018
- 2018-09-20 CN CN201811102003.0A patent/CN109254793B/en active Active
-
2019
- 2019-07-08 WO PCT/CN2019/095120 patent/WO2020057234A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110289419A1 (en) * | 2010-05-18 | 2011-11-24 | Yu Chi Sum Sam | Browser integration for a content system |
CN103425491A (en) * | 2013-07-30 | 2013-12-04 | 广州市动景计算机科技有限公司 | Game engine |
CN104572042A (en) * | 2013-10-15 | 2015-04-29 | 航天信息股份有限公司 | Cross-platform middleware device of mobile terminal equipment and implementation method of cross-platform middleware device of mobile terminal equipment |
CN106502809A (en) * | 2016-11-08 | 2017-03-15 | 深圳天珑无线科技有限公司 | A kind of multi-platform application program adaptation method, device and terminal unit |
CN107908426A (en) * | 2017-12-21 | 2018-04-13 | 江苏国泰新点软件有限公司 | Design method, device, mobile terminal and the storage medium of cross-platform program |
CN109254793A (en) * | 2018-09-20 | 2019-01-22 | Oppo广东移动通信有限公司 | Engine partition method, relevant device and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109254793B (en) | 2022-02-15 |
CN109254793A (en) | 2019-01-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020057234A1 (en) | Engine isolation method, related device, and computer-readable storage medium | |
CN109395372B (en) | Method, system and electronic equipment for realizing remote control of computer game by gamepad | |
WO2017215649A1 (en) | Sound effect adjustment method and user terminal | |
US10678942B2 (en) | Information processing method and related products | |
CN108156508B (en) | Barrage information processing method and device, mobile terminal, server and system | |
CN108475304B (en) | Method and device for associating application program and biological characteristics and mobile terminal | |
CN112245903B (en) | Network state indication method, operating system, device and storage medium in cloud application | |
CN108920220B (en) | Function calling method, device and terminal | |
WO2019041280A1 (en) | Application resource recommendation method and related device | |
WO2020057231A1 (en) | Engine adaptation method, related device and computer-readable storage medium | |
WO2017193496A1 (en) | Application data processing method and apparatus, and terminal device | |
WO2015027856A1 (en) | Information feedback method, apparatus, and terminal | |
CN111371676B (en) | Customer service function access method and related device | |
CN106406924B (en) | Control method and device for starting and quitting picture of application program and mobile terminal | |
WO2020052307A1 (en) | Permission configuration method and related product | |
CN111600931A (en) | Information sharing method and electronic equipment | |
WO2018161543A1 (en) | Method and device for controlling fingerprint processing resources | |
WO2017054585A1 (en) | Network access method, device, and system | |
US20150178667A1 (en) | Method, apparatus, and communication system of updating user data | |
WO2019041285A1 (en) | Associative word recommendation method, mobile terminal, and computer readable storage medium | |
US11520841B2 (en) | Information recommendation method, terminal device, and server | |
WO2020057276A1 (en) | Method for game adaption, terminal, and computer-readable storage medium | |
WO2018119630A1 (en) | Interaction method, and terminal | |
CN110677456A (en) | Resource allocation method and equipment | |
CN109902484B (en) | Processing method of associated application and terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19861692 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19861692 Country of ref document: EP Kind code of ref document: A1 |