CN116795345A - Control method and device for engine control, computer equipment and storage medium - Google Patents

Control method and device for engine control, computer equipment and storage medium Download PDF

Info

Publication number
CN116795345A
CN116795345A CN202310751155.8A CN202310751155A CN116795345A CN 116795345 A CN116795345 A CN 116795345A CN 202310751155 A CN202310751155 A CN 202310751155A CN 116795345 A CN116795345 A CN 116795345A
Authority
CN
China
Prior art keywords
picture
engine control
attribute
host
screen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310751155.8A
Other languages
Chinese (zh)
Inventor
魏振果
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd filed Critical Beijing Zitiao Network Technology Co Ltd
Priority to CN202310751155.8A priority Critical patent/CN116795345A/en
Publication of CN116795345A publication Critical patent/CN116795345A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The disclosure discloses a control method and device of an engine control, computer equipment and a storage medium. Comprising the following steps: acquiring a page display instruction, wherein the page display instruction is used for determining a first picture to be displayed on a native interface; responding to the page display instruction, taking the first picture as a first host picture of the engine control, and determining a first picture attribute corresponding to the first host picture, wherein the first picture attribute comprises: a game attribute or a non-game attribute; acquiring a first display parameter corresponding to an engine control under a first picture attribute; and adding the engine control to the first host picture according to the first display parameter, and displaying the engine control on the primary interface. The method disclosed by the application realizes that when the display picture is sent to change, the host picture corresponding to the engine control is dynamically updated, so that the engine control is always displayed on the uppermost picture in the original interface, the engine control is always in an active state, and the efficiency of interactive services such as data communication, texture sharing and the like during game development is improved.

Description

Control method and device for engine control, computer equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a control method and device of an engine control, computer equipment and a storage medium.
Background
At present, many games are developed by adopting a Unity engine, and the Unity engine is mature and perfect in support of an Android platform. Some games can adopt a native+unity hybrid development mode, and after starting, a user enters a Native interface (Native interface) first, and the user can enter the game by clicking certain entries, and can also exit to return to the Native interface. In addition, in the native interface, texture ID taken to the Unit engine is sometimes required to be rendered through the view of the native interface in a texture sharing manner, for example, a certain dynamic picture in a game is shown in the native interface.
The Unity engine may cause the Unity engine to be in a suspended state when the carrier of the device is a UnityPlayer, once the UnityPlayer is invisible (i.e., the UnityPlayer is not displayed in the page) during design or use. Meanwhile, the UnityPlayer cannot be guaranteed to be in a visible state all the time, so that the efficiency of interactive services such as data communication and texture sharing during development is finally reduced.
Disclosure of Invention
In view of this, the embodiments of the present disclosure provide a control method, apparatus, computer device, and storage medium for an engine control, so as to solve the problem that the unityplay is unable to be in a visible state all the time, and reduce the efficiency of interactive services such as data communication and texture sharing during development.
In a first aspect, an embodiment of the present disclosure provides a method for controlling an engine control, where the method includes:
acquiring a page display instruction, wherein the page display instruction is used for determining a first picture to be displayed on a native interface;
responding to the page display instruction, taking the first picture as a first host picture of an engine control, and determining a first picture attribute corresponding to the first host picture, wherein the first picture attribute comprises: a game attribute or a non-game attribute;
acquiring a first display parameter corresponding to the engine control under the first picture attribute;
and adding the engine control to the first host picture according to the first display parameter, and displaying the engine control on the primary interface.
In a second aspect, an embodiment of the present disclosure provides a control apparatus for an engine control, including:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a page display instruction, wherein the page display instruction is used for determining a first picture to be displayed on a native interface;
the response module is used for responding to the page display instruction, taking the first picture as a first host picture of an engine control, and determining a first picture attribute corresponding to the first host picture, wherein the first picture attribute comprises: a game attribute or a non-game attribute;
the processing module is used for acquiring a first display parameter corresponding to the engine control under the first picture attribute;
and the execution module is used for adding the engine control to the first host picture according to the first display parameter and displaying the engine control on the primary interface.
In a third aspect, embodiments of the present disclosure provide a computer device comprising: the engine control device comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the engine control method according to the first aspect or any corresponding embodiment of the first aspect is executed.
In a fourth aspect, an embodiment of the present disclosure provides a computer readable storage medium, where computer instructions are stored on the computer readable storage medium, where the computer instructions are configured to cause a computer to execute a control method of an engine control according to the first aspect or any implementation manner corresponding to the first aspect.
The technical scheme provided by the embodiment of the disclosure has the following advantages: according to the method provided by the embodiment of the disclosure, the host relation between the current picture to be displayed and the engine control is established, and the engine control is displayed on the host picture by selecting corresponding display parameters according to picture attributes of different host pictures, so that when the display picture is changed, the host picture corresponding to the engine control is dynamically updated, the engine control is always displayed on the uppermost picture in the original interface, the engine control is always in an active state, and the efficiency of interactive services such as data communication and texture sharing during game development is improved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the prior art, the drawings that are required in the detailed description or the prior art will be briefly described, it will be apparent that the drawings in the following description are some embodiments of the present disclosure, and other drawings may be obtained according to the drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is a flow diagram of a method of controlling an engine control according to some embodiments of the present disclosure;
FIG. 2 is a schematic illustration of a change of engine controls upon screen switch according to some embodiments of the present disclosure;
FIG. 3 is a schematic illustration of a change of engine controls upon screen switch according to some embodiments of the present disclosure;
FIG. 4 is a display schematic of an engine control according to some embodiments of the present disclosure;
FIG. 5 is a flow diagram of a method of controlling an engine control according to some embodiments of the present disclosure;
FIG. 6 is a flow diagram of a method of controlling an engine control according to some embodiments of the present disclosure;
FIG. 7 is a block diagram of a control device of an engine control according to an embodiment of the present disclosure;
fig. 8 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. Based on the embodiments in this disclosure, all other embodiments that a person skilled in the art would obtain without making any inventive effort are within the scope of protection of this disclosure.
In accordance with the disclosed embodiments, there is provided an embodiment of a control method for an engine control, it being noted that the steps shown in the flowchart of the figures may be performed in a computer system, such as a set of computer executable instructions, and, although a logical sequence is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than what is shown herein.
In this embodiment, a control method of an engine control is provided, and fig. 1 is a flowchart of a control method of an engine control according to an embodiment of the disclosure, as shown in fig. 1, where the flowchart includes the following steps:
step S11, acquiring a page display instruction, wherein the page display instruction is used for determining a first picture to be displayed on a native interface.
The method provided by the embodiment of the disclosure is applied to intelligent equipment, wherein the intelligent equipment can be equipment for installing an Android system, for example: smart phones, tablet computers, etc. of Android systems. Specifically, the smart device may detect whether a page launch operation is currently triggered at the native interface, for example: it is detected whether there is currently a start request for a certain page (e.g., game interface, game selection interface, etc.) in the smart device. If a starting request exists currently, a page display instruction can be acquired based on the starting request, wherein the page display instruction is used for determining a first picture to be displayed on a Native interface, the Native interface is a Native interface, and the Native interface is a page which is based on a local operating system of the intelligent device and operates by using a Native program. The first screen is a certain software screen of the current request for starting the application software. The application software may be game software, office software, or the like.
Step S12, responding to the page display instruction, taking the first picture as a first host picture of the engine control, and determining a first picture attribute corresponding to the first host picture, wherein the first picture attribute comprises: game attributes or non-game attributes.
In the embodiment of the disclosure, the intelligent device firstly responds to a page display instruction, determines a first picture to be displayed currently by using the page display instruction, and takes the first picture as a first host picture of an engine control. The engine control is an engine control (UnityPlayer), and the engine control (UnityPlayer) has the function of directly viewing 3D content created by the Unity and the issued game.
It should be noted that the engine control (UnityPlayer) has two states, active (resume) and pause (pause). In the resume state of the engine control (UnityPlayer), the engine control renders normally, and the engine control Unity and the native interface can also communicate normally. When an engine control (UnityPlayer) is in the pause state, the engine control stops rendering, and the engine control Unity and the native interface pause communication. The following cases will trigger the engine control (UnityPlayer) to force into a pause state: (1) An engine control (UnityPlayer) is when a certain picture a becomes invisible (e.g., is overlaid by a newly started picture, or an application cuts to the background, etc.). (2) The engine control (UnityPlayer) is visible on screen a, but the engine control (UnityPlayer) is set to invisible. (3) The engine control (UnityPlayer) floats over all pictures in a separate window, such as a floating window, but the engine control (UnityPlayer) is set to be invisible.
Based on this, when the engine control (UnityPlayer) is not visible, the engine control stops rendering. In order to ensure that an engine control (UnityPlayer) is in an active state, the present disclosure uses a first screen as a first host screen of the engine control, and then establishes a host relationship between a screen to be displayed and the engine control, and when the screen is displayed, the engine control can be in a resume state all the time on the screen, so that the engine control can be rendered normally.
Specifically, the first screen is used as a first host screen of the engine control, and the method comprises the following steps of A1-A3:
and step A1, detecting whether an engine control exists in the original interface.
And step A2, under the condition that the engine control exists in the original interface, acquiring an original host picture mounted by the engine control.
And step A3, deleting the engine control from the original host picture, and taking the first picture as a first host picture corresponding to the engine control.
In the embodiment of the disclosure, the intelligent device first detects whether an engine control exists in the native interface, and if the engine control exists, the intelligent device indicates that the engine control is created. At the moment, the intelligent device can call the management program (UnityPlayer Holder) to acquire an original host picture mounted by the engine control, then delete the engine control from the original host picture through the plug-in management program, and take the first picture as a first host picture corresponding to the engine control. Therefore, by establishing the host relation between the first picture and the engine control, the engine control can be ensured to be displayed on the first host picture.
As an example, as shown in fig. 2, in the case where the engine control exists in the native interface, the original host screen activity_a on which the engine control is mounted is acquired, then the engine control is removed from the original host screen activity_a through the add-in manager (UnityPlayer Holder), then the engine control is added to the first screen activity_b, and the first screen activity_b is used as the first host screen of the engine control. As shown in fig. 3, when returning from the first screen activity_b to the original host screen activity_a, the engine control is removed from the first screen activity_b by the add-in manager (UnityPlayer Holder) and then added to the original host screen activity_a.
It should be noted that, as long as the page is started or changed on the native interface, the host page of the engine control is changed synchronously, so that the engine control is always in an active state, and the engine control can be guaranteed to render normally even if the host picture does not belong to the game picture.
In an embodiment of the present disclosure, the method further includes: and under the condition that the engine control does not exist in the original interface, creating the engine control, and taking the first picture as a first host picture corresponding to the engine control.
In the embodiment of the application, the process of creating the engine control can be: and calling a custom software development tool to obtain a configuration file. And analyzing and reconstructing the data in the configuration file by a custom software development tool to form adaptation data, and creating an engine control by using the adaptation data.
It should be noted that, when a new screen is started in the native interface, it is not necessary to create an engine control (unityplay) each time, if the native interface has created the engine control (unityplay), it is only necessary to find the original host screen of the engine control (unityplay), remove it from the original host screen, and then add it to the current host screen. For example: the first started picture is activity_a, and an engine control (UnityPlayer) is constructed to be added to the picture activity_a. When the picture started for the second time is picture activity_b, it can be determined that the original host picture of the engine control (UnityPlayer) is activity_a, at this time, the engine control is deleted from the original host picture activity_a, and picture activity_b is used as a new host picture corresponding to the engine control, so that the engine control is always in an active state.
Step S13, obtaining a first display parameter corresponding to the engine control under the first picture attribute.
In an embodiment of the present disclosure, obtaining a first display parameter corresponding to an engine control under a first screen attribute includes: acquiring a corresponding relation between preset picture attributes and display parameters; and determining a first display parameter corresponding to the first picture attribute based on the corresponding relation.
In an embodiment of the present disclosure, if the first screen attribute is a non-game attribute, the first display parameter of the engine control includes a first preset number of pixels, the first preset number being less than a number of pixels forming the page visualization. The first preset number of pixel points may be 1 pixel point.
It should be noted that, if the first screen attribute is a non-game attribute (i.e., the first screen is a non-game screen), in order to ensure that the use of the first screen by the operator is not affected, special processing needs to be performed on the engine control (unityplay) in visual effect, that is, the number of pixels smaller than that forming the page visualization is used as the display parameter. Therefore, the engine control (UnityPlayer) is invisible to an operator in the display process, and the engine control (UnityPlayer) is ensured to be in an active state.
For example: the size of the engine control (UnityPlayer) is set to be 1 pixel point or 2 pixel points, so that the engine control (UnityPlayer) can be ensured to be invisible to an operator (namely invisible to the naked eye) and to be in an active state and can be perceived by a native interface.
In an embodiment of the present disclosure, if the first screen attribute is a game attribute, the first display parameter of the engine control includes: and the second preset number of pixels is the number of pixels of the content view in the first host picture.
It should be noted that, if the first screen attribute is a game attribute (i.e., the first screen is a non-game screen), the engine control (UnityPlayer) may be directly filled into the content view of the first host screen, so as to implement full-screen display.
And S14, adding an engine control to the first host picture according to the first display parameter, and displaying the engine control on the primary interface.
In an embodiment of the present disclosure, adding an engine control to a first host screen according to a first display parameter includes: acquiring a content view of a first host picture under the condition that the first picture attribute is a non-game attribute; and displaying the engine control at the appointed position of the content view according to the first preset number of pixel points.
In the embodiment of the present disclosure, as shown in fig. 4, in the case that the first picture attribute is a non-game attribute, firstly, a CONTENT view of the first host picture is obtained, specifically, the CONTENT view is extracted from the first host picture by using the id_add_content, and then an engine control (UnityPlayer) is displayed at a designated position of the CONTENT view according to a first preset number of pixels, namely, by the CONTENT view. An engine control (UnityPlayer) is added to the content view, where (1, 1) is the width and height of the pixel point.
In an embodiment of the present disclosure, adding an engine control to a first host screen according to a first display parameter includes: and displaying the engine control on the content view of the first host picture according to the second preset number of pixel points under the condition that the first picture attribute is the game attribute.
In the embodiment of the present disclosure, when entering a game, a full screen game screen needs to be displayed, so when adding an engine control (UnityPlayer) to a host page Activity, the size needs to be full of full screen. Since the processing mode of the engine control (UnityPlayer) is special when entering the game, a separate GameActivity is used for processing. For the GameActivity, the engine control (UnityPlayer) is directly stuffed into the content view ContentView, i.e. the full-screen effect is achieved.
According to the method provided by the embodiment of the disclosure, the host relation between the current picture to be displayed and the engine control is established, and the engine control is displayed on the host picture by selecting corresponding display parameters according to picture attributes of different host pictures, so that when the display picture is changed, the host picture corresponding to the engine control is dynamically updated, the engine control is always displayed on the uppermost picture in the original interface, the engine control is always in an active state, and the efficiency of interactive services such as data communication and texture sharing during game development is improved. Especially when the picture attribute of the host picture is a non-game attribute, the engine control (UnityPlayer) is set to be the pixel point with the size of (1, 1), so that the engine control is invisible to an operator while the host picture is displayed, the use of the operator is not affected, and the engine control is ensured to be in an active state all the time.
As one example, the host screen change process of the engine control is as shown in fig. 5:
and step 1, determining a picture A which is currently started on a native interface.
Step 2, detecting whether an engine control exists in the original interface, and if not, executing the step 3; if so, step 4 is performed.
And 3, creating an engine control, and adding the created engine control to the picture A.
And step 4, judging whether the engine control has an original host picture, if not, executing step 5, and if so, executing step 6.
And 5, adding an engine control to the picture A.
And 6, removing the engine control from the original host picture, and taking the picture A as a host picture corresponding to the engine control.
In an embodiment of the present disclosure, after adding the engine control to the first host screen according to the first display parameter, as shown in fig. 6, the method further includes the steps of:
step S21, acquiring a page switching instruction.
In the embodiment of the disclosure, the smart device may detect whether a page switching operation acting on the native interface exists, for example: the page switch operation may be a request to exit the current game screen or jump to another screen of the current game, etc. In the case where the page switching operation is detected, a page switching instruction is generated based on the page switching operation.
Step S22, responding to the page switching instruction, and acquiring a second picture after the first picture is switched.
In the embodiment of the disclosure, the intelligent device acquires, through the page switching instruction, a second screen after the first screen is switched, where the second screen may be a screen of a new application or a screen of a current application (i.e., the second screen and the first screen belong to the same game, and the second screen may be directly jumped by the first screen).
Step S23, the second picture is used as a second host picture of the engine control, and a second picture attribute corresponding to the second host picture is determined.
In the embodiment of the disclosure, since the page is switched, the engine control needs to be deleted from the original host screen (the first screen), and the second screen is used as the second host screen of the engine control. And simultaneously determining a second picture attribute corresponding to the second host picture. It should be noted that, by determining the picture attribute corresponding to the second host picture, it is convenient to determine whether the display parameters of the engine control need to be changed later.
Step S24, under the condition that the first picture attribute is inconsistent with the second picture attribute, obtaining a second display parameter corresponding to the second picture attribute, and adding the engine control to the second host picture according to the second display parameter.
In an embodiment of the present disclosure, the case where the first screen attribute is inconsistent with the second screen attribute includes: the first picture attribute is a game attribute and the second picture attribute is a non-game attribute. Or, the first picture attribute is a non-game attribute, and the second picture attribute is a game attribute.
(1) If the first picture attribute is a game attribute and the second picture attribute is a non-game attribute, the operation of the current exit game picture is described, and the non-game picture is entered. At this time, the engine control needs to be changed from full-screen display to 1 pixel for display.
As one example, picture a is a game picture and picture B is a non-game picture. When the picture displayed on the original interface is a picture A and a picture B is required to be started currently, the execution sequence is as follows:
picture a onPause-picture B onCreate-picture B onStart-picture BonResume-picture A onWindowFocusChanged false (window lock failed) -picture B onWindowFocusChanged true (window lock correct) -picture a onStop (stop display).
In the above process, when the frame B onCreate stage is in, the original host frame of the engine control (UnityPlayer) is determined, and when the original host frame is the frame a, it is removed from the original host frame. The picture of picture B is then set as the new host picture and the engine control is added to the content view of the new host picture, set as 1 pixel. In this way, when a non-game screen is entered from a game screen, the engine control is displayed by 1 pixel, so that after exiting the game screen, the engine control can still be visible to the system, and the engine control is always in an active state.
(2) If the first picture attribute is a non-game attribute and the second picture attribute is a game attribute, the display of the engine control is required to be changed from 1 pixel point to full-screen display.
As one example, picture a is a game picture and picture B is a non-game picture. When the picture displayed on the original interface is a picture B and the return to the picture A is needed currently, the execution sequence is as follows:
picture B onPause-picture a onRestart-picture a onStart-picture a onResume-picture BonWindowFocusChanged false-picture A onWindowFocusChanged true-picture B onStop-picture B ondestrooy.
In the above procedure, when in the screen a onRestart phase, the original host screen of the engine control (UnityPlayer) is determined, and when the original host screen is the screen B, it is removed from the original host screen. The picture of picture a is then set as the new host picture and the engine control is added to the content view of the new host picture to be set as full screen display.
In the embodiment of the disclosure, the engine control (UnityPlayer) is ensured to be always in a visible state in the current top-level page by dynamically adjusting the corresponding host picture of the engine control (UnityPlayer) when the picture is switched back and forth.
In the embodiment of the disclosure, if the first picture attribute is consistent with the second picture attribute and both the first picture attribute and the second picture attribute are non-game attributes, the engine control is only required to be removed from the first picture, the host relationship between the engine control and the first picture is relieved, then the second picture is taken as the host picture of the engine control, and meanwhile, the engine control is displayed on the second picture in a mode of 1 pixel point. If the first picture attribute is consistent with the second picture attribute and both the first picture attribute and the second picture attribute are game attributes, only page skip is executed.
The method provided by the embodiment of the disclosure dynamically removes the engine control (UnityPlayer) from the original host page and adds the engine control (UnityPlayer) to the new host page, so that the engine control (UnityPlayer) is always in an active state. Meanwhile, aiming at different picture attributes, the engine control is displayed in different modes, for example: when entering the game, the engine control (UnityPlayer) is set to full screen, and when exiting the game, 1 pixel is restored. The method and the system realize the keep-alive of the engine control in the Native interface, and enable the engine control to be always in an active state, so that the efficiency of interaction such as data communication, texture sharing and the like during native+unity hybrid development can be ensured.
The embodiment also provides a control device for an engine control, which is used for implementing the above embodiment and the preferred implementation manner, and the description is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a control device for an engine control, as shown in fig. 7, including:
the obtaining module 41 is configured to obtain a page display instruction, where the page display instruction is used to determine a first picture to be displayed on the native interface;
the response module 42 is configured to respond to the page display instruction, take the first screen as a first host screen of the engine control, and determine a first screen attribute corresponding to the first host screen, where the first screen attribute includes: a game attribute or a non-game attribute;
the processing module 43 is configured to obtain a first display parameter corresponding to the engine control under the first picture attribute;
the execution module 44 is configured to add an engine control to the first host screen according to the first display parameter, and display the engine control on the native interface.
In the disclosed embodiment, the response module 42 is configured to detect whether an engine control exists in the native interface; under the condition that an engine control exists in the original interface, acquiring an original host picture mounted by the engine control; and deleting the engine control from the original host picture, and taking the first picture as a first host picture corresponding to the engine control.
In an embodiment of the present disclosure, the apparatus further includes: the creation module is used for creating the engine control and taking the first picture as a first host picture corresponding to the engine control under the condition that the engine control does not exist in the original interface.
In the disclosed embodiment, the processing module 43 is configured to include: acquiring a corresponding relation between preset picture attributes and display parameters; determining a first display parameter corresponding to the first picture attribute based on the corresponding relation; under the condition that the first picture attribute is a non-game attribute, the first display parameter of the engine control comprises a first preset number of pixel points, and the first preset number is smaller than the number of pixel points forming the page visualization; or, in the case that the first screen attribute is a game attribute, the first display parameter of the engine control includes: and the second preset number of pixels is the number of pixels of the content view in the first host picture.
In the embodiment of the present disclosure, the execution module 44 is configured to obtain a content view of the first host screen when the first screen attribute is a non-game attribute; and displaying the engine control at the appointed position of the content view according to the first preset number of pixel points.
In the embodiment of the present disclosure, the execution module 44 is configured to display the engine control in the content view of the first host screen according to the second preset number of pixels when the first screen attribute is the game attribute.
In an embodiment of the present disclosure, the apparatus further includes: the switching module is used for acquiring a page switching instruction; responding to the page switching instruction, and acquiring a second picture after the first picture is switched; taking the second picture as a second host picture of the engine control, and determining a second picture attribute corresponding to the second host picture; and under the condition that the first picture attribute is inconsistent with the second picture attribute, acquiring a second display parameter corresponding to the second picture attribute, and adding the engine control to a second host picture according to the second display parameter.
The control means of the engine control in this embodiment are presented in the form of functional units, here referred to as ASIC circuits, processors and memories executing one or more software or firmware programs, and/or other devices that can provide the above described functionality.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The embodiment of the disclosure also provides a computer device, which is provided with the control device of the engine control shown in the figure 7.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a computer device according to an alternative embodiment of the disclosure, as shown in fig. 8, the computer device includes: one or more processors 10, memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 10 is illustrated in fig. 8.
The processor 10 may be a central processor, a network processor, or a combination thereof. The processor 10 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 20 stores instructions executable by the at least one processor 10 to cause the at least one processor 10 to perform the methods shown in implementing the above embodiments.
The memory 20 may include a storage program area that may store an operating system, at least one application program required for functions, and a storage data area; the storage data area may store data created from the use of the computer device of the presentation of a sort of applet landing page, and the like. In addition, the memory 20 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 20 may optionally include memory located remotely from processor 10, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 20 may also comprise a combination of the above types of memories.
The computer device also includes a communication interface 30 for the computer device to communicate with other devices or communication networks.
The presently disclosed embodiments also provide a computer readable storage medium, and the methods described above according to the presently disclosed embodiments may be implemented in hardware, firmware, or as recordable storage medium, or as computer code downloaded over a network that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and is to be stored in a local storage medium, such that the methods described herein may be stored on such software processes on a storage medium using a general purpose computer, special purpose processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present disclosure have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the disclosure, and such modifications and variations are within the scope defined by the appended claims.

Claims (11)

1. A method for controlling an engine control, the method comprising:
acquiring a page display instruction, wherein the page display instruction is used for determining a first picture to be displayed on a native interface;
responding to the page display instruction, taking the first picture as a first host picture of an engine control, and determining a first picture attribute corresponding to the first host picture, wherein the first picture attribute comprises: a game attribute or a non-game attribute;
acquiring a first display parameter corresponding to the engine control under the first picture attribute;
and adding the engine control to the first host picture according to the first display parameter, and displaying the engine control on the primary interface.
2. The method of claim 1, wherein the taking the first screen as the first host screen of an engine control comprises:
detecting whether the engine control exists in the native interface;
under the condition that the engine control exists in the original interface, acquiring an original host picture mounted by the engine control;
and deleting the engine control from the original host picture, and taking the first picture as a first host picture corresponding to the engine control.
3. The method according to claim 2, wherein the method further comprises:
and under the condition that the engine control does not exist in the native interface, creating the engine control, and taking the first picture as a first host picture corresponding to the engine control.
4. The method of claim 1, wherein the obtaining the first display parameter corresponding to the engine control under the first screen attribute comprises:
acquiring a corresponding relation between preset picture attributes and display parameters;
determining a first display parameter corresponding to the first picture attribute based on the corresponding relation, wherein the first display parameter of the engine control comprises a first preset number of pixel points, and the first preset number is smaller than the number of pixel points forming the page visualization under the condition that the first picture attribute is a non-game attribute;
or, in the case that the first screen attribute is a game attribute, the first display parameter of the engine control includes: and a second preset number of pixels, wherein the second preset number is the number of pixels of the content view in the first host picture.
5. The method of claim 4, wherein adding the engine control to the first host screen according to the first display parameter comprises:
acquiring a content view of the first host picture under the condition that the first picture attribute is a non-game attribute;
and displaying the engine control at the appointed position of the content view according to the first preset number of pixel points.
6. The method according to claim 4 or 5, wherein the first preset number is 1.
7. The method of claim 4, wherein adding the engine control to the first host screen according to the first display parameter comprises:
and displaying the engine control on the content view of the first host picture according to the second preset number of pixel points under the condition that the first picture attribute is the game attribute.
8. The method of claim 1, wherein after adding the engine control to the first host screen in accordance with the first display parameter, the method further comprises:
acquiring a page switching instruction;
responding to the page switching instruction, and acquiring a second picture after the first picture is switched;
taking the second picture as a second host picture of an engine control, and determining a second picture attribute corresponding to the second host picture;
and under the condition that the first picture attribute is inconsistent with the second picture attribute, acquiring a second display parameter corresponding to the second picture attribute, and adding the engine control to the second host picture according to the second display parameter.
9. A control device for an engine control, the device comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a page display instruction, wherein the page display instruction is used for determining a first picture to be displayed on a native interface;
the response module is used for responding to the page display instruction, taking the first picture as a first host picture of an engine control, and determining a first picture attribute corresponding to the first host picture, wherein the first picture attribute comprises: a game attribute or a non-game attribute;
the processing module is used for acquiring a first display parameter corresponding to the engine control under the first picture attribute;
and the execution module is used for adding the engine control to the first host picture according to the first display parameter and displaying the engine control on the primary interface.
10. A computer device, comprising:
a memory and a processor in communication with each other, the memory having stored therein computer instructions which, upon execution, cause the processor to perform the method of any of claims 1 to 8.
11. A computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1 to 8.
CN202310751155.8A 2023-06-25 2023-06-25 Control method and device for engine control, computer equipment and storage medium Pending CN116795345A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310751155.8A CN116795345A (en) 2023-06-25 2023-06-25 Control method and device for engine control, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310751155.8A CN116795345A (en) 2023-06-25 2023-06-25 Control method and device for engine control, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116795345A true CN116795345A (en) 2023-09-22

Family

ID=88049160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310751155.8A Pending CN116795345A (en) 2023-06-25 2023-06-25 Control method and device for engine control, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116795345A (en)

Similar Documents

Publication Publication Date Title
CN106155454B (en) Interface display method and device and electronic equipment
CN110047123B (en) Map rendering method, map rendering device, storage medium and computer program product
CN104252284A (en) File display method and device
CN112947969B (en) Page off-screen rendering method, device, equipment and readable medium
CN109361948B (en) Interface management method, intelligent terminal and readable storage medium
CN107045546B (en) Webpage processing method and device and intelligent terminal
CN105045592A (en) Picture display method and device
CN110990100A (en) Method and device for processing node object in game scene
CN110471700B (en) Graphic processing method, apparatus, storage medium and electronic device
CN112843680A (en) Picture display method and device, terminal equipment and storage medium
CN108062336A (en) Media information processing method and device
CN106990962B (en) Dynamic screen locking wallpaper switching method and device and terminal
CN116127420A (en) Watermark adding method and device, storage medium and electronic device
CN111400633A (en) Page resource loading method and device
CN111813466A (en) Watermark adding method, device, terminal equipment and computer storage medium
CN111589111B (en) Image processing method, device, equipment and storage medium
CN111242838B (en) Blurred image rendering method and device, storage medium and electronic device
CN111381925B (en) GUI fragment type rendering method and device based on dirty rectangle mechanism
CN116795345A (en) Control method and device for engine control, computer equipment and storage medium
CN116823608A (en) Page image stitching method and device, computer equipment and storage medium
CN114020396A (en) Display method of application program and data generation method of application program
CN110941464A (en) Light exposure method, device, system and storage medium
CN111773679B (en) Method and device for processing icons in game
CN114117274A (en) Data rendering method and device, computer equipment and storage medium
CN112948730A (en) Webpage data display method and device, storage medium and electronic equipment

Legal Events

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