CN112527432A - Method and device for determining target client interface, storage medium and electronic device - Google Patents

Method and device for determining target client interface, storage medium and electronic device Download PDF

Info

Publication number
CN112527432A
CN112527432A CN202011419169.2A CN202011419169A CN112527432A CN 112527432 A CN112527432 A CN 112527432A CN 202011419169 A CN202011419169 A CN 202011419169A CN 112527432 A CN112527432 A CN 112527432A
Authority
CN
China
Prior art keywords
screen type
target
client
screen
component
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.)
Granted
Application number
CN202011419169.2A
Other languages
Chinese (zh)
Other versions
CN112527432B (en
Inventor
陈正烽
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202011419169.2A priority Critical patent/CN112527432B/en
Publication of CN112527432A publication Critical patent/CN112527432A/en
Application granted granted Critical
Publication of CN112527432B publication Critical patent/CN112527432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • 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/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • 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)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Digital Computer Display Output (AREA)

Abstract

The invention discloses a method and a device for determining a target client interface, a storage medium and an electronic device. Wherein, the method comprises the following steps: in the event that a client is detected to be launched, determining a screen type displayed by a page of the client, wherein the screen type includes at least one of: touch screen, non-touch screen; and loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client interface. By adopting the technical scheme, the problem that the client side in the related art cannot be compatible with two operation modes, namely the touch screen and the non-touch screen, is solved, and the same client side page can support the two operation modes, namely the touch screen and the non-touch screen.

Description

Method and device for determining target client interface, storage medium and electronic device
Technical Field
The invention relates to the field of communication, in particular to a method and a device for determining a target client interface, a storage medium and an electronic device.
Background
With the rapid development of various intelligent technologies, various intelligent devices come out endlessly. Especially, smart phones and smart televisions are the most important and dependent. However, the two methods are different from the user interaction method, the former is a representative of the touch screen method, and the latter mainly uses the remote controller interaction method. The difference in the interaction mode causes the difference in the interface display, and if the difference is to be realized, the two devices need to be treated differently.
Aiming at the problem that the client cannot be compatible with two operation modes, namely a touch screen and a non-touch screen, in the related technology, an effective solution is not provided.
Disclosure of Invention
The embodiment of the invention provides a method and a device for determining a target client interface, a storage medium and an electronic device, and aims to solve the problem that the client interface in the related art cannot be compatible with two operation modes, namely a touch screen and a non-touch screen.
According to an embodiment of the present invention, there is provided a method for determining a target client interface, including: in the event that a client is detected to be launched, determining a screen type displayed by a page of the client, wherein the screen type includes at least one of: touch screen, non-touch screen; and loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client interface.
Optionally, determining the type of the screen displayed on the page of the client includes: acquiring a hardware set of target equipment where the client is located; determining whether the screen type of the hardware set is a target component from the hardware set; if so, determining that the screen type of the client page is a touch screen, and if not, determining that the screen type of the client page is a non-touch screen.
Optionally, loading a user interface resource corresponding to the screen type according to the screen type, and drawing a component corresponding to the screen type to obtain a target client interface, including: acquiring a hardware list currently running by the target equipment; and under the condition that the hardware list comprises the client side page, loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client side interface.
Optionally, before the user interface resource corresponding to the screen type is loaded according to the screen type and the component corresponding to the screen type is drawn to obtain the target client interface, the method further includes: loading a page layout of the target client, wherein the page layout comprises: various components packaged in the component library.
Optionally, after loading the page layout of the target client, the method further includes: judging whether the target assembly is focused or not under the condition that the screen type is a non-touch screen; under the condition that the target component is focused, drawing a focus corresponding to the target component, and adding the target component with the focus drawn into the page layout; and under the condition that the target component is not focused, determining that the target component is drawn completely, and adding the drawn target component into the page layout.
Optionally, after the user interface resource corresponding to the screen type is loaded according to the screen type and the component corresponding to the screen type is drawn to obtain the target client interface, the method further includes: receiving operation of a target object through the target client interface; and responding to the operation, and executing a response result corresponding to the screen type on the target client interface.
According to another embodiment of the present invention, there is also provided a target client interface determining apparatus, including: a determination module: in the event that a client is detected to be launched, determining a screen type displayed by a page of the client, wherein the screen type includes at least one of: touch screen, non-touch screen; an acquisition module: and loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client interface.
Optionally, the determining module includes: a second obtaining module: acquiring a hardware set of target equipment where the client is located; a second determination module: determining whether the screen type of the hardware set is a target touch component from the hardware set; if so, determining that the screen type of the client page is a touch screen, and if not, determining that the screen type of the client page is a non-touch screen.
According to a further embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to carry out the steps of any of the above-described method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
By the invention, in the case of detecting that the client is started, the screen type displayed by the page of the client is determined, wherein the screen type at least comprises one of the following types: touch screen, non-touch screen; and loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client interface, namely, loading the user interface resources corresponding to the screen type according to the screen type of a client page, and drawing the components corresponding to the screen type, so that the obtained target client interface can support a touch screen and a non-touch screen. By adopting the technical scheme, the problem that the client side in the related art cannot be compatible with two operation modes, namely the touch screen and the non-touch screen, is solved, and the same client side page can support the two operation modes, namely the touch screen and the non-touch screen.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a target client interface determining apparatus according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of determination of a target client interface according to an embodiment of the invention;
FIG. 3 is a flow diagram illustrating components of a method for determining a target client interface from creation to display in accordance with an alternative embodiment of the present invention;
FIG. 4 is a timing diagram of the interaction between an App, component library, and system native for a method of determination of a target client interface according to an embodiment of the present invention;
fig. 5 is a block diagram of a target client interface determining apparatus according to another alternative embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided by the embodiments of the present application may be executed in a client, or similar device. Taking the example of running on the client, fig. 1 is a block diagram of a hardware structure of the client of the method for determining a target client interface according to the embodiment of the present invention. As shown in fig. 1, the client may include one or more processors 102 (only one is shown in fig. 1), where the processors 102 may include, but are not limited to, a Microprocessor (MPU) or a Programmable Logic Device (PLD), and a memory 104 for storing data, and in an exemplary embodiment, the client may further include a transmission device 106 for communication function and an input/output device 108. It will be understood by those of ordinary skill in the art that the structure shown in fig. 1 is merely an illustration and is not intended to limit the structure of the client. For example, the client may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store a client program, for example, a software program and a module of application software, such as a computer program corresponding to the determination method of the clothes search algorithm in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to clients over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the client. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a method for determining a target client interface is provided, which is applied to the client, and fig. 2 is a flowchart of a method for determining a target client interface according to an embodiment of the present invention, where the flowchart includes the following steps:
step S202, under the condition that the client is detected to be started, determining the screen type displayed by the page of the client, wherein the screen type at least comprises one of the following: touch screen, non-touch screen;
and step S204, loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client interface.
By the invention, in the case of detecting that the client is started, the screen type displayed by the page of the client is determined, wherein the screen type at least comprises one of the following types: touch screen, non-touch screen; and loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client interface, namely, loading the user interface resources corresponding to the screen type according to the screen type of a client page, and drawing the components corresponding to the screen type, so that the obtained target client interface can support a touch screen and a non-touch screen. By adopting the technical scheme, the problem that the client side in the related art cannot be compatible with two operation modes, namely the touch screen and the non-touch screen, is solved, and the same client side page can support the two operation modes, namely the touch screen and the non-touch screen.
Determining the type of screen displayed by the page of the client in the case of detecting that the client is started can be implemented in various ways, and in an alternative embodiment: acquiring a hardware set of target equipment where the client is located; determining whether the screen type of the hardware set is a target component from the hardware set; if so, determining that the screen type of the client page is a touch screen, and if not, determining that the screen type of the client page is a non-touch screen.
It should be noted that the target component is a component corresponding to the touch screen. Acquiring a hardware set of target equipment where the client is located; determining whether a screen type of the hardware set is a target touch component from the hardware set. The method can specifically comprise the following steps:
step 1, searching a hardware set of a target device where the client is located, obtaining detailed parameters of the hardware of the target device where the client is located, and finding the device type of the hardware of the target device where the client is located from the detailed parameters of the hardware of the target device where the client is located, wherein the device type is Touch Screen, and the target device is Touch-supporting, namely a Touch Screen. If the device type is not Touch Screen, the target device is Touch-free, i.e., a non-Touch Screen.
And 2, searching a hardware list in which the target equipment where the client is located is currently running, and searching the equipment name of the target equipment in the hardware list. Where the device name is synaptics _ dfs is that touchable screens are really supported. The device type is Touch Screen, and the target device can be found in the hardware list, so that the target device can be confirmed to support Touch. And if the target equipment cannot be found in the hardware list, the target equipment does not support touch.
It should be noted that the above steps can be understood that if the device type is Touch Screen type, the target device is a Touch Screen. And if the target device is a touch screen and is in a currently running hardware list, the target device supports touch. For example, a smart phone first determines that the phone is in touch operation, and second determines that the phone is running in the power-on state. The mobile phone screen can be operated by touch at the moment when the two conditions are met. The target device may not be touch operable if any of the above conditions are not met.
The method comprises the following steps that different user interface resources corresponding to a touch screen and a non-touch screen are determined, after a screen type displayed on a page of a client is determined, the user interface resources corresponding to the screen type are loaded according to the screen type, components corresponding to the screen type are drawn, and a target client interface is obtained, and the method comprises the following steps: acquiring a hardware list currently running by the target equipment; and under the condition that the hardware list comprises the page to be displayed, loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client interface.
It should be noted that, a hardware list currently running in the target device is obtained; and under the condition that the hardware list comprises the client side page, loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client side interface. That is to say, the touch screen is different from the target client interface corresponding to the non-touch screen, and the client interface corresponding to the screen needs to be loaded after the screen type is determined. In the APP, the APP needs to rely on a component library as middleware in a project, the component library is initialized along with the start of an APP process, and an API interface is opened for the APP to call. When the component library is initialized, the current screen type needs to be judged according to internal logic, and the method mainly comprises two types: touch screen and non-touch screen, and then different UI resources are loaded according to the display styles of the two types of screens. And calling a system native interface to draw components with different styles. And when the user operates the App interface, redrawing the operated components according to the screen type and responding to logic processing.
Before the user interface resource corresponding to the screen type is loaded according to the screen type and the component corresponding to the screen type is drawn to obtain the target client interface, the method further comprises the following steps: loading a page layout of the target client, wherein the page layout comprises: various components packaged in the component library.
It should be noted that, the page layout of the target client is loaded, where the page layout includes: various components packaged in the component library. Component libraries mainly include two major categories: the screen judgment logic component and common necessary components such as a popup box, a text box, a message box and the like. The loading of the page layout of the target client may specifically be: and drawing the components and redrawing the components. The drawing of the component is the operation of drawing a picture, namely drawing the component on an interface; the component redrawing is special effect processing for realizing pressing and popping, for example, the effect of popping a dialog box when pressing; it should be noted that each time the APP is opened, the component is drawn, and although the result of each component drawing may be the same, the procedure of the component drawing is performed once.
After loading the page layout of the target client, the method further comprises: judging whether the target assembly is focused or not under the condition that the screen type is a non-touch screen; under the condition that the target component is focused, drawing a focus corresponding to the target component, and adding the target component with the focus drawn into the page layout; and under the condition that the target component is not focused, determining that the target component is drawn completely, and adding the drawn target component into the page layout.
It should be noted that, in the case that the screen type is a non-touch screen, whether the target component is focused is determined. When focusing is on a component, it may be shown that the component was selected, such as by framing. And under the condition that the target component is focused, drawing a focus corresponding to the target component. The drawing focus is used for processing the drawn component image, such as shading; and drawing a focus when focusing, and adding the component to the interface layout. And under the condition that the target component is not focused, determining that the target component is drawn completely, and adding the drawn target component into the page layout. That is, components are added directly to the interface layout when out of focus. Unfocused means that the component does not support drawing the focus, so the focus is not drawn anymore. And under the condition that the target component is unfocused, determining that the target component is drawn completely, and after determining that the drawn target component is the component library judgment screen type, drawing components in corresponding forms under the conditions of a touchable screen and a non-touchable screen respectively, wherein the specific flow is shown in fig. 3.
Loading user interface resources corresponding to the screen type according to the screen type, drawing components corresponding to the screen type, and obtaining a target client interface, wherein the method further comprises the following steps: receiving operation of a target object through the target client interface; and responding to the operation, and executing a response result corresponding to the screen type on the target client interface.
It should be noted that, the operation of the target object is received through the target client interface; and responding to the operation, and executing a response result corresponding to the screen type on the target client interface. And (5) operation after the interface loading is finished. The operation at this time may specifically be: pressed and ejected. In an alternative embodiment, after the user sees the interface, if a component on the interface is to be manipulated, for example: the user clicks on the screen or presses an enter key on the remote control. In fact, the two operations under the screen can be split into two steps: pressing and bouncing respectively correspond to: pressing the screen by the finger of the user, leaving the screen by the finger of the user, pressing the confirmation key of the remote controller by the finger of the user, and leaving the confirmation key of the remote controller by the finger of the user. The general flow of the user operating the assembly is:
calling the component to press a processing interface API, distinguishing the redrawing component according to the screen type stored in the component library and calling a system native interface in the component, and transmitting a redrawing result to an App layer. The App layer may also perform predefined press logic processing.
Calling an API (application program interface) of a component bounce processing interface, distinguishing redrawing components by calling a system native interface according to the screen types stored in the component library in the component, and transmitting a redrawing result to an App layer. The App layer may also perform predefined pop-up logic processing.
It should be noted that the pressing may specifically be that the user presses the screen with a finger or that the user presses a confirmation key of the remote controller with a finger; the pop-up may be embodied as the user's finger leaving the screen or the user's finger leaving a remote control confirmation key. After popping up, the user-side interface can present a dialog box, a text box and other effects required by the user.
In order to better understand the above technical solutions, an alternative embodiment of the present invention is further provided for explaining the above technical solutions.
In an alternative embodiment, fig. 3 is a flow chart of components of a method for determining a target client interface according to an alternative embodiment of the present invention from creation to display, as shown in fig. 3, including the following steps:
step S302: starting, initializing the component;
step S304: judging the screen type;
step S306: judging a non-touch screen;
step S308: drawing a non-touch form of the component;
step S310: judging a touchable screen;
step S312: drawing the components in a touchable form;
step S314: judging whether focusing is available at present;
step S316: judging the focus;
step S318: drawing a focus;
step S320: judging that the focus is not focused;
step S322: adding a component to a page layout;
step S324: and displaying the interface on a screen, and finishing.
It should be noted that, when the App needs to display a component in the component library on the screen, it first needs to call an API interface of the component library to create a corresponding component, and then differentiates and draws according to the screen type: if the screen is touchable, drawing the components in touchable form; after the drawing is completed, the components are added to the interface layout and finally displayed on the screen. If not, drawing the non-touch form component. Then judging whether the current focus is on: if not focused, the rendering is complete. Adding the components to the interface layout and finally displaying the components on a screen; if focus is to be focused, the focus is drawn. The component is then added to the interface layout and eventually displayed on the screen.
By the invention, in the case of detecting that the client is started, the screen type displayed by the page of the client is determined, wherein the screen type at least comprises one of the following types: touch screen, non-touch screen; and loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client interface. That is to say, according to the screen type of the client page, the user interface resource corresponding to the screen type is loaded correspondingly, and the component corresponding to the screen type is drawn, so that the obtained target client interface can support the touch screen and the non-touch screen. By adopting the technical scheme, the problem that the client side in the related art cannot be compatible with two operation modes, namely the touch screen and the non-touch screen, is solved, and the same client side page can support the two operation modes, namely the touch screen and the non-touch screen.
In an alternative embodiment, fig. 4 is a timing diagram of the interaction between App, component library and system native of a method for determining a target client interface according to an alternative embodiment of the present invention, as shown in fig. 4, including the following steps:
step S402, after the user opens the App, the App process starts to initialize;
step S404, the App calls the component library initialization API to start initializing the component library;
step S406, firstly, judging the screen type, which is mainly divided into two types: the device comprises a touch screen and a non-touch screen, and the judgment result is stored in the local App in a persistent mode;
step S408, initializing a component library;
step S410, initializing some necessary resources according to the screen type, and finally calling a system native interface to complete initialization;
step S412, the initialization of the component library is completed;
step S414: the App automatically opens an App default interface according to the setting of the App;
step S416, opening an APP default interface;
step S418, loading the page layout. The layout is defined not as a native component, but as various components packaged in a component library, so that the display and operation of two screens can be compatible;
step S420, calling API interfaces of the component library to create each component, wherein the components are all universal interfaces when being created and do not need to be treated differently according to screen types;
step S422, judging the screen type;
step S424: when the component is initialized, different UI resources can be loaded in a distinguished mode according to the screen types stored in the component library;
step S426, calling a system native interface drawing component, and finally transmitting a drawing result to an App layer to complete component creation;
in step S428, the component drawing is completed;
step S430, creating the component successfully;
step S432, creating the finished components, adding the components to the layout, and finally displaying the components on a screen;
step S434, displaying the component;
step S436, pressing operation;
step S438, calling the component to press the processing interface API;
step S440, judging the screen type;
step S442, calling a system native interface to distinguish redrawing components;
step S444, the component redrawing is finished;
step S446, the redrawn result is transmitted to an App layer;
at step 448, the App layer can also execute predefined press logic processing;
step S450, a bounce operation is carried out;
step S452, calling an API (application program interface) for component bounce processing;
step S454, judging the screen type;
step S456, calling a system native interface to distinguish redrawing components;
step S458, redrawing the component;
step S460, the redrawn result is transmitted to the App layer;
at step S462, the App layer may also perform predefined pop-up logic processing.
The steps realize the interaction among the App, the component library and the system primitive. The App needs to rely on a component library as a middleware in a project, the component library is initialized along with the starting of the App process, and an API interface is opened for the calling of the App. When the component library is initialized, the current screen type needs to be judged according to internal logic, and the method mainly comprises two types: touch screen and non-touch screen, and then different UI resources are loaded according to the display styles of the two types of screens. And calling a system native interface to draw components with different styles. And when the user operates the App interface, redrawing the operated components according to the screen type and responding to logic processing.
By the invention, in the case of detecting that the client is started, the screen type displayed by the page of the client is determined, wherein the screen type at least comprises one of the following types: touch screen, non-touch screen; and loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client interface, namely, loading the user interface resources corresponding to the screen type according to the screen type of a client page, and drawing the components corresponding to the screen type, so that the obtained target client interface can support a touch screen and a non-touch screen. By adopting the technical scheme, the problem that the client side in the related art cannot be compatible with two operation modes, namely the touch screen and the non-touch screen, is solved, and the same client side page can support the two operation modes, namely the touch screen and the non-touch screen.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be substantially embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g., a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the methods described in the embodiments of the present application.
In this embodiment, a device for determining a target client interface is further provided, where the device is used to implement the foregoing embodiments and preferred embodiments, and details are not repeated for what has been described. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
FIG. 5 is a block diagram of a target client interface determining apparatus according to an embodiment of the present invention; as shown in fig. 5, includes:
a determining module 50, configured to determine a screen type displayed on a page of a client if the client is detected to be started, where the screen type includes at least one of: touch screen, non-touch screen;
and the obtaining module 52 is configured to load a user interface resource corresponding to the screen type according to the screen type, and draw a component corresponding to the screen type to obtain a target client interface.
By the invention, in the case of detecting that the client is started, the screen type displayed by the page of the client is determined, wherein the screen type at least comprises one of the following types: touch screen, non-touch screen; and loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client interface, namely, loading the user interface resources corresponding to the screen type according to the screen type of a client page, and drawing the components corresponding to the screen type, so that the obtained target client interface can support a touch screen and a non-touch screen. By adopting the technical scheme, the problem that the client side in the related art cannot be compatible with two operation modes, namely the touch screen and the non-touch screen, is solved, and the same client side page can support the two operation modes, namely the touch screen and the non-touch screen.
Optionally, the determining module 50 is further configured to obtain a hardware set of a target device where the client is located; determining whether the screen type of the hardware set is a target touch component from the hardware set; if so, determining that the screen type of the client page is a touch screen, and if not, determining that the screen type of the client page is a non-touch screen.
Optionally, the determining module 50 is further configured to determine a screen type of a client page of the client: acquiring a hardware set of target equipment where the client is located; determining whether the screen type of the hardware set is a target touch component from the hardware set; if so, determining that the screen type of the client page is a touch screen, and if not, determining that the screen type of the client page is a non-touch screen.
It should be noted that, a hardware set of a target device where the client is located is obtained; determining whether a screen type of the hardware set is a target touch component from the hardware set. The method can be specifically as follows:
1. searching a hardware set of the target equipment where the client is located, obtaining detailed parameters of the hardware of the target equipment where the client is located, and finding the equipment type of the hardware of the target equipment where the client is located from the detailed parameters of the hardware of the target equipment where the client is located, wherein the equipment type is Touch Screen, and the target equipment is Touch-supporting, namely a Touch Screen. If the device type is not Touch Screen, the target device is Touch-free, i.e., a non-Touch Screen.
2. And searching a hardware list in which the target equipment where the client is located is currently running, and searching the equipment name of the target equipment in the hardware list. Where the device name is synaptics _ dfs is that touchable screens are really supported. The device type is Touch Screen, and the target device can be found in the hardware list, so that the target device can be confirmed to support Touch. And if the target equipment cannot be found in the hardware list, the target equipment does not support touch.
It should be noted that the above steps can be understood that if the device type is Touch Screen type, the target device is a Touch Screen. And if the target device is a touch screen and is in a currently running hardware list, the target device supports touch. For example, a smart phone first determines that the phone is in touch operation, and second determines that the phone is running in the power-on state. The mobile phone screen can be operated by touch at the moment when the two conditions are met. The target device may not be touch operable if any of the above conditions are not met.
Optionally, the obtaining module 52 is further configured to load a user interface resource corresponding to the screen type according to the screen type, and draw a component corresponding to the screen type, so as to obtain a target client interface: acquiring a hardware list currently running by the target equipment; and under the condition that the hardware list comprises the client side page, loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client side interface.
It should be noted that, a hardware list currently running in the target device is obtained; and under the condition that the hardware list comprises the client side page, loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client side interface. That is to say, the touch screen is different from the target client interface corresponding to the non-touch screen, and the client interface corresponding to the screen needs to be loaded after the screen type is determined. In the APP, the APP needs to rely on a component library as middleware in a project, the component library is initialized along with the start of an APP process, and an API interface is opened for the APP to call. When the component library is initialized, the current screen type needs to be judged according to internal logic, and the method mainly comprises two types: touch screen and non-touch screen, and then different UI resources are loaded according to the display styles of the two types of screens. And calling a system native interface to draw components with different styles. And when the user operates the App interface, redrawing the operated components according to the screen type and responding to logic processing.
Optionally, the obtaining module 52 is further configured to load a page layout of the target client, where the page layout is: various components packaged in the component library.
It should be noted that, the page layout of the target client is loaded, where the page layout includes: various components packaged in the component library. Component libraries mainly include two major categories: the screen judgment logic component and common necessary components such as a popup box, a text box, a message box and the like. The loading of the page layout of the target client may specifically be: and drawing the components and weighing the components. The drawing of the component is the operation of drawing a picture, namely drawing the component on an interface; the component redrawing is special effect processing for realizing pressing and popping, for example, the effect of popping a dialog box when pressing; it should be noted that each time the APP is opened, the component is drawn, and although the result of each component drawing may be the same, the procedure of the component drawing is performed once.
Optionally, the obtaining module 52 is further configured to determine whether the target component is focused or not when the screen type is a non-touch screen; under the condition that the target component is focused, drawing a focus corresponding to the target component, and adding the target component with the focus drawn into the page layout; and under the condition that the target component is not focused, determining that the target component is drawn completely, and adding the drawn target component into the page layout.
It should be noted that, in the case that the screen type is a non-touch screen, whether the target component is focused is determined. When focusing is on a component, it may be shown that the component was selected, such as by framing. And under the condition that the target component is focused, drawing a focus corresponding to the target component. The drawing focus is used for processing the drawn component image, such as shading; and drawing a focus when focusing, and adding the component to the interface layout. And under the condition that the target component is not focused, determining that the target component is drawn completely, and adding the drawn target component into the page layout. That is, components are added directly to the interface layout when out of focus. Unfocused means that the component does not support drawing the focus, so the focus is not drawn anymore. And under the condition that the target component is unfocused, determining that the target component is drawn completely, and after determining that the drawn target component is the component library judgment screen type, drawing components in corresponding forms under the conditions of a touchable screen and a non-touchable screen respectively, wherein the specific flow is shown in fig. 3.
Optionally, the obtaining module 52 is further configured to receive an operation of the target object through the target client interface; and responding to the operation, and executing a response result corresponding to the screen type on the target client interface.
It should be noted that, the operation of the target object is received through the target client interface; and responding to the operation, and executing a response result corresponding to the screen type on the target client interface. And (5) operation after the interface loading is finished. The operation at this time may specifically be: pressed and ejected. In an alternative embodiment, after the user sees the interface, if a component on the interface is to be manipulated, for example: the user clicks on the screen or presses an enter key on the remote control. In fact, the two operations under the screen can be split into two steps: pressing and bouncing respectively correspond to: pressing the screen by the finger of the user, leaving the screen by the finger of the user, pressing the confirmation key of the remote controller by the finger of the user, and leaving the confirmation key of the remote controller by the finger of the user. The general flow of the user operating the assembly is:
calling the component to press a processing interface API, distinguishing the redrawing component according to the screen type stored in the component library and calling a system native interface in the component, and transmitting a redrawing result to an App layer. The App layer may also perform predefined press logic processing.
Calling an API (application program interface) of a component bounce processing interface, distinguishing redrawing components by calling a system native interface according to the screen types stored in the component library in the component, and transmitting a redrawing result to an App layer. The App layer may also perform predefined pop-up logic processing.
It should be noted that the pressing may specifically be that the user presses the screen with a finger or that the user presses a confirmation key of the remote controller with a finger; the pop-up may be embodied as the user's finger leaving the screen or the user's finger leaving a remote control confirmation key. After popping up, the user-side interface can present a dialog box, a text box and other effects required by the user.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, in the case that the client is detected to be started, determining the screen type displayed by the page of the client, wherein the screen type at least comprises one of the following: touch screen, non-touch screen;
s2, loading the user interface resource corresponding to the screen type according to the screen type, and drawing the component corresponding to the screen type to obtain the target client interface.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, in the case that the client is detected to be started, determining the screen type displayed by the page of the client, wherein the screen type at least comprises one of the following: touch screen, non-touch screen;
s2, loading the user interface resource corresponding to the screen type according to the screen type, and drawing the component corresponding to the screen type to obtain the target client interface.
Optionally, in this option, the specific examples in this embodiment may refer to the examples described in the foregoing embodiment and optional implementation, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for determining a target client interface, comprising:
in the event that a client is detected to be launched, determining a screen type displayed by a page of the client, wherein the screen type includes at least one of: touch screen, non-touch screen;
and loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client interface.
2. The method of claim 1, wherein determining the type of screen displayed by the page of the client comprises:
acquiring a hardware set of target equipment where the client is located;
determining whether the screen type of the hardware set is a target touch component from the hardware set;
if so, determining that the screen type of the client page is a touch screen, and if not, determining that the screen type of the client page is a non-touch screen.
3. The method of claim 1, wherein loading a user interface resource corresponding to the screen type according to the screen type and drawing a component corresponding to the screen type to obtain a target client interface comprises:
acquiring a hardware list currently running by the target equipment;
and under the condition that the hardware list comprises the client side page, loading user interface resources corresponding to the screen type according to the screen type, and drawing components corresponding to the screen type to obtain a target client side interface.
4. The method of claim 1, wherein before loading the user interface resource corresponding to the screen type according to the screen type and drawing the component corresponding to the screen type to obtain the target client interface, the method further comprises:
loading a page layout of the target client, wherein the page layout comprises: various components packaged in the component library.
5. The method of claim 4, wherein after loading the page layout of the target client, the method further comprises:
judging whether the target assembly is focused or not under the condition that the screen type is a non-touch screen;
under the condition that the target component is focused, drawing a focus corresponding to the target component, and adding the target component with the focus drawn into the page layout;
and under the condition that the target component is not focused, determining that the target component is drawn completely, and adding the drawn target component into the page layout.
6. The method of claim 1, wherein after loading the user interface resource corresponding to the screen type according to the screen type and drawing the component corresponding to the screen type to obtain the target client interface, the method further comprises:
receiving operation of a target object through the target client interface;
and responding to the operation, and executing a response result corresponding to the screen type on the target client interface.
7. An apparatus for determining a target client interface, comprising:
a determining module, configured to determine a screen type displayed on a page of a client if the client is detected to be started, where the screen type includes at least one of: touch screen, non-touch screen;
and the acquisition module is used for loading the user interface resources corresponding to the screen type according to the screen type and drawing the components corresponding to the screen type to obtain the target client interface.
8. The apparatus according to claim 7, wherein the determining module is further configured to obtain a hardware set of a target device where the client is located; determining whether the screen type of the hardware set is a target touch component from the hardware set; if so, determining that the screen type of the client page is a touch screen, and if not, determining that the screen type of the client page is a non-touch screen.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 6.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 6 by means of the computer program.
CN202011419169.2A 2020-12-07 2020-12-07 Method and device for determining target client interface, storage medium and electronic device Active CN112527432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011419169.2A CN112527432B (en) 2020-12-07 2020-12-07 Method and device for determining target client interface, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011419169.2A CN112527432B (en) 2020-12-07 2020-12-07 Method and device for determining target client interface, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN112527432A true CN112527432A (en) 2021-03-19
CN112527432B CN112527432B (en) 2023-02-03

Family

ID=74997961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011419169.2A Active CN112527432B (en) 2020-12-07 2020-12-07 Method and device for determining target client interface, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN112527432B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786543A (en) * 2014-12-26 2016-07-20 北京奇虎科技有限公司 Interface loading method and device
CN109346014A (en) * 2018-09-29 2019-02-15 歌尔科技有限公司 A kind of virtual reality device and its screen control method
CN110007778A (en) * 2017-12-04 2019-07-12 三星电子株式会社 The control method and computer readable recording medium of electronic device, electronic device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105786543A (en) * 2014-12-26 2016-07-20 北京奇虎科技有限公司 Interface loading method and device
CN110007778A (en) * 2017-12-04 2019-07-12 三星电子株式会社 The control method and computer readable recording medium of electronic device, electronic device
CN109346014A (en) * 2018-09-29 2019-02-15 歌尔科技有限公司 A kind of virtual reality device and its screen control method

Also Published As

Publication number Publication date
CN112527432B (en) 2023-02-03

Similar Documents

Publication Publication Date Title
CN106792188B (en) Data processing method, device and system for live broadcast page and storage medium
CN107276789B (en) Log uploading method and device and computer readable storage medium
CN111050199B (en) Display device and scheduling method of Bluetooth communication resources of display device
US20190335132A1 (en) Method for televison remote keypress response based on android operating system and televison thereof
US10228830B2 (en) Method for starting application program, terminal and non-transitory computer readable storage medium
CN106547451B (en) Multi-open application program method, multi-open application program device and terminal
CN110675872B (en) Voice interaction method based on multi-system display equipment and multi-system display equipment
CN105278950A (en) Method for performing video talk enhancement function and electric device having same
CN109284142A (en) File preloads method, apparatus, electronic equipment and computer readable storage medium
CN105740010A (en) Power-on method and terminal equipment
CN104951329A (en) Configuration and startup method of application templates and mobile terminal
CN108322834B (en) Television setting method, television and computer readable storage medium
CN105320616A (en) External device control method and device
CN111542031B (en) Display device and Bluetooth device pairing method
CN112463199A (en) System upgrading method and terminal
CN103648047A (en) Resource searching method and system of intelligent television
CN106775624B (en) Method and device for determining application display sequence
CN103079107A (en) Loading method for operating system of set top box and set top box
CN114816788A (en) Equipment control method and device, electronic equipment and storage medium
KR20080078112A (en) Apparatus and method for updating boot logo in portable terminal
CN106961620B (en) Smart television starting method, smart television and remote controller
CN105094576A (en) Switching method and device for application scenarios
CN112527432B (en) Method and device for determining target client interface, storage medium and electronic device
CN111290672A (en) Image display method and device, storage medium and terminal
CN106648743B (en) Terminal initialization method and device

Legal Events

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