CN114443182A - Interface switching method, storage medium and terminal equipment - Google Patents

Interface switching method, storage medium and terminal equipment Download PDF

Info

Publication number
CN114443182A
CN114443182A CN202011187567.6A CN202011187567A CN114443182A CN 114443182 A CN114443182 A CN 114443182A CN 202011187567 A CN202011187567 A CN 202011187567A CN 114443182 A CN114443182 A CN 114443182A
Authority
CN
China
Prior art keywords
face
interface
data
target
display
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
CN202011187567.6A
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.)
Shenzhen TCL Digital Technology Co Ltd
Original Assignee
Shenzhen TCL Digital 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 Shenzhen TCL Digital Technology Co Ltd filed Critical Shenzhen TCL Digital Technology Co Ltd
Priority to CN202011187567.6A priority Critical patent/CN114443182A/en
Publication of CN114443182A publication Critical patent/CN114443182A/en
Pending legal-status Critical Current

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/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • 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/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials

Abstract

The invention discloses an interface switching method, a storage medium and a terminal device, wherein the method comprises the steps of collecting an environment image when the current interface is a target interface; performing face recognition on the environment image to generate face information; determining a target interface mode type corresponding to the face information according to the face information; and switching the current display interface to the display interface corresponding to the target interface mode type. The invention can switch the display interface according to the face information of the current user, thereby meeting the requirements of different types of users on the display interface.

Description

Interface switching method, storage medium and terminal equipment
Technical Field
The invention relates to a terminal interface, in particular to an interface switching method.
Background
With the rapid development of internet technology and intelligent terminal devices, smart devices such as smart phones and smart televisions have entered thousands of households. Meanwhile, the updating rate of the intelligent terminal devices is very fast, and the intelligent terminal devices are updated at intervals of one year or even several months. In addition to issuing new terminal devices, new systems are pushed out for the terminal devices issued before, so that aspects such as display interfaces and operation fluency are updated. When a user uses a terminal device, the used functions are more and more, and the content displayed on the interface is more and more abundant, for example, the selectable content displayed on the smart television is television programs, movies, live broadcasts and the like.
However, while the content of the interface display is becoming richer, not all users will use the interface content, especially users who are not familiar with the smart terminal, and they may even generate too much content to feel at all. Taking the smart television as an example, many elderly people and children are not aware of how to enter an interface for watching favorite programs, such as a movie playing interface, due to unfamiliarity with terminal equipment. In addition, different users have preferences of watching programs, if a user likes to watch a movie, but the entrance of the displayed movie interface is in the corner position, the user needs to adjust the focus to enter the movie interface, and inconvenience is brought to the user. Therefore, different user types have different requirements for interface display, and the current screen display is single, lacks humanization, and cannot meet the requirements of different types of users.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide an interface switching method for overcoming the defects in the prior art.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows:
when the current interface is a target interface, acquiring an environment image;
carrying out face recognition on the environment image to generate face information;
determining a target interface mode type corresponding to the face information according to the face information;
and switching the current display interface to the display interface corresponding to the target interface mode type.
The interface switching method comprises the steps that the face information comprises a face age type; the performing face recognition on the environment image to generate face information specifically includes:
if the environment image has a face image, extracting a face in the environment image to generate a target face image;
inputting the target face image into a pre-trained age detection model, and controlling the age detection model to carry out age detection on the target face image to obtain the face age corresponding to the target face image;
and determining the face age type corresponding to the target face image according to the face age.
The interface switching method, wherein if a face image exists in the environment image, extracting a face from the environment image and generating a target face image specifically includes:
if the face image exists in the environment image, inputting the environment image into a pre-trained face detection model, controlling the face detection model to extract the face in the environment image, and generating an initial face image;
judging whether a user corresponding to the initial face image watches the current interface or not;
and if so, taking the face image as a target face image.
The interface switching method, wherein the determining the face age type corresponding to the target face image according to the face age specifically includes:
determining a face age range corresponding to the target face image according to the face age;
and determining the face age type corresponding to the target face image according to the face age range.
The interface switching method comprises the following steps:
and when an age change instruction is detected, changing the numerical value of the age range of the human face according to the age change instruction.
The interface switching method, wherein before determining the target interface mode type corresponding to the face information according to the face information, further includes:
judging whether the number of the target face images is one or not;
if yes, determining the number of the face types to be one;
and if not, taking the number of the face age types as the number of the face types.
The interface switching method, wherein the determining the target interface mode type corresponding to the face information according to the face information includes:
judging whether the number of the human face types is one;
if the number of the face types is one, taking the mode type corresponding to the face age type as the target interface mode type according to a preset mode mapping relationship, wherein the mode mapping relationship is a mapping relationship between the mode type and each face age type;
if the number of the face types is not one, displaying an interface selection window, wherein the interface selection window comprises candidate mode types, and the candidate mode types are mode types corresponding to the face age types determined according to the mode mapping relation;
when a mode instruction for the interface selection window is detected, determining that a mode type corresponding to the mode instruction in the candidate mode types is the target interface mode type.
The interface switching method, wherein the switching the current display interface to the display interface corresponding to the target interface mode type specifically includes:
according to the type of the target interface mode, taking a corresponding display assembly in preset display assemblies as a target display assembly;
acquiring a display component in a display example corresponding to the current interface and taking the display component as the current display component;
comparing the current display assembly with the target display assembly, taking data of the target display assembly, which is different from the current display assembly, as switching data, and taking data of the target display assembly, which is the same as the current display assembly, as reserved data;
and keeping the reserved data unchanged, and switching the current interface according to the switching data.
The interface switching method, wherein the switching the current interface according to the switching data specifically includes:
according to the switching data, modifying the data in the display example corresponding to the current interface;
and rendering and outputting the modified display example to realize the switching of the current interface. The interface switching method comprises the steps that switching data comprise updating data, supplementary data and deleting data, wherein the updating data are element data, the component names of the target display component and the current display component are the same, the component elements of the target display component and the current display component are different, the supplementary data are component data, which do not exist in the current display component and exist in the target display component, and the deleting data are component data, which exist in the current display component and do not exist in the target display component.
The interface switching method, wherein the modifying the data in the display instance corresponding to the current interface according to the switching data specifically includes:
when the switching data is update data, replacing the element data to be updated in the display example with update element data, wherein the update element data is update data in the target assembly, and the element data to be updated is update data in the current display assembly;
when the switching data is a display component in the supplementary data, adding the supplementary data to a corresponding mounting point in the display instance according to the component type of the switching component;
when the switching data is a component element in the supplementary data, adding the switching data to a corresponding current display component in the display example according to a component name corresponding to the switching data;
and when the switching data is deletion data, deleting the deletion data in the display example.
The interface switching method comprises the step of enabling the data types of the component elements to comprise a display content type, a component coordinate type and a display effect type.
A computer readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps in the interface switching method as recited in any of the above.
A terminal device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the interface switching method as described in any one of the above.
Compared with the prior art, the invention provides an interface switching method, a storage medium and a terminal device, wherein the method monitors the current interface, acquires the current environment image when the current interface is the target interface, extracts the face information in the environment image, and can determine the corresponding target interface mode type according to the face information. If the type division is performed by age, the face information is generated based on the age of the face in the environment image, and the mode type can be divided into an old man mode, a young and old year mode and a child mode. After the user type of the current terminal equipment is determined, the current display interface can be switched, so that different display interfaces can be automatically switched according to the user type used currently, and the requirements of different users are met.
Drawings
Fig. 1 is a flowchart of an interface switching method provided in the present invention.
Fig. 2 is an interface display diagram of the interface switching method provided by the present invention, in which the mode type is a child mode.
Fig. 3 is an interface display diagram of the interface switching method according to the present invention, in which the mode type is the old man mode.
Fig. 4 is a flowchart of interface switching according to face information in the interface switching method provided by the present invention.
Fig. 5 shows the content displayed when the focus is located in the tv theater component when the mode type is the child mode in the interface switching method provided by the present invention.
Fig. 6 is a schematic structural diagram of a terminal device provided in the present invention.
Detailed Description
The present invention provides an interface switching method, a storage medium and a terminal device, and in order to make the objects, technical solutions and effects of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
The inventor researches and discovers that the intelligent terminal interface is complicated in content and complex in operation due to the fact that the installed software or the provided functions are excessive, however, each user cannot use all the functions, many components on the display interface are useless, and therefore the requirements of different types of users on the display interface are different. However, the current display interface is single, and the display interface cannot be switched according to different user types.
In order to solve the above problem, in the embodiment of the present invention, a current environment image is acquired based on a preset acquisition cycle; performing face recognition on the environment image to generate face information; and switching the current display interface according to the face information. The invention can switch the display interface according to the face information of the current user, thereby meeting the requirements of different types of users on the display interface.
For example, the embodiment of the invention can be applied to a scene of daily use of the smart television. When a user uses the smart television, based on a preset acquisition cycle, controlling a camera or a camera on the smart television to acquire a current environment image, then carrying out face recognition on the environment image so as to generate corresponding face information, such as face age, face gender, face quantity and the like, and then switching a current display interface according to different face information so that the switched interface can meet the requirements of different types of users.
It should be noted that the above application scenarios are only presented to facilitate understanding of the present invention, and the embodiments of the present invention are not limited in any way in this respect. Rather, embodiments of the present invention may be applied to any scenario where applicable. Such as a scene using a computer, cell phone, tablet.
The invention will be further explained by the description of the embodiments with reference to the drawings.
As shown in fig. 1, the present implementation provides an interface switching method, which may include the following steps:
and S10, when the current interface is the target interface, acquiring an environment image.
Specifically, the current interface refers to an interface currently displayed by the smart television, the target interface refers to an interface that needs to enter mode switching, and in an implementation manner of this embodiment, the target interface is a desktop of the smart television, that is, a selection interface displayed when the smart television is started, and of course, the target interface may also be other interfaces including a plurality of selectable controls, and in other devices, the target interface may be a main interface of the device or other interfaces set to a state that needs to enter mode switching. The interface displayed in the starting process of the intelligent television generally has two types, one type is a program interface, namely an interface for playing television programs, and the other type is a selection interface, wherein a user can select programs on the interface. When a user watches programs, the user is satisfied with the currently watched programs, and the interface does not need to be adjusted, so that interface switching is not needed, and the environment image does not need to be acquired. In this embodiment, a specific implementation scheme of a smart television running based on an android system is described, a Launcher (android system desktop Launcher) of an android platform is an open-source desktop platform Launcher, when a user selects a "menu" key on a remote controller, the user can jump to a selection interface, and before an original selection interface is displayed, the Launcher monitors an operation of returning to the selection interface, so that a current display interface is monitored, and whether the current display interface is the target interface can be determined.
And if so, acquiring the environment image. The environment image is an image obtained by immediately shooting the current environment. One acquisition period, such as 1 minute, may be preset. Camera is a class directly used by application layer software, and covers interfaces of operations such as starting, previewing, shooting and closing of a Camera or a Camera. When the smart television is started, the starting time of the smart television is used as an initial acquisition time, a Camera service in a camera framework of a system is called to control an image acquisition device on the smart television, such as a camera or a camera, to shoot a current environment, and a current environment image is acquired in the instant acquisition mode. The wider the visual angle of the camera and the camera is, the more beneficial to the subsequent generation of the face information. And after the environment image is collected, the environment image is used for generating subsequent face information, and the current environment image is collected every 1 minute.
Therefore, in the operation process of the intelligent television, interface switching can be performed in real time according to user changes in the environment, for example, a user changes from a child to a middle-aged person, and a display interface corresponding to the child user is switched to a display interface for the middle-aged person, so that the user is prevented from manually switching the display interfaces, and the user experience is improved.
And S20, carrying out face recognition on the environment image to generate face information.
Specifically, after the environment image is collected, the face recognition is performed on the environment image through a pre-trained face recognition model, so that the face information in the environment image can be extracted, and the type of the current user is determined. The face information comprises a plurality of types, such as gender, age, action and quantity.
The first step of face information extraction is face detection, that is, the position of a face is detected from the environmental picture, and currently, the face detection can be realized by adopting an algorithm based on machine learning or deep learning and a trained face detection model, for example, an image containing the face is taken as a training sample, and a face region is taken as a calibrated trained convolutional neural network. And after the face position is detected, extracting the face region to generate a face image. The number of the faces in the environment image can be directly obtained according to the number of the face images, and then the gender, age, action and the like in the environment image can be determined according to the face images.
In an implementation manner of this embodiment, the face information includes a number of face types and a face age type, and the process of generating the face information includes:
and A10, if the environment image has a face image, extracting the face in the environment image according to a preset face extraction rule to generate a target face image.
Specifically, the face extraction rule refers to a rule for extracting the environment image through a certain algorithm or a pre-trained model, and currently, commonly used rules include a face detection model based on deep learning, a face detection model based on OpenCV, and the like. The face extraction rule can be used for simply extracting the face in the environment image. If the environment image has a face image, a plurality of face images can be generated according to a preset face extraction rule; if the face images do not exist in the environment image, the face images cannot be extracted, namely the number of the face images is zero. The target face image is a face image used for face information extraction subsequently.
However, not all the face images obtained through simple extraction can be used for subsequent determination of the target interface mode type, so that the embodiment performs certain screening on the face images, for example, in the acquired environment images, a person just passes through the face images, but the person is not watching television, and therefore the determination of the target interface mode type is not required according to the face information of the person.
Further, the process of generating the target face image includes:
a11, if the environment image has a face image, inputting the environment image into a pre-trained face detection model, and controlling the face detection model to extract the face in the environment image to generate an initial face image.
Specifically, as described above, there are various face extraction rules commonly used at present, and this embodiment is briefly described by a face detection model based on OpenCV, where OpenCV is a cross-platform computer vision library and provides an interface in languages such as Python. If the environment image is a color image, firstly, the environment image is subjected to color conversion to generate a gray level image. And then, detecting the gray level image by using a Haar (Haar) feature classifier, and returning coordinates (x, y, w, h) of the face in the environment image, wherein x is an abscissa value in a coordinate system with an upper left vertex of the environment image as an origin, a horizontal direction as an x axis, and a vertical direction as a y axis, and y is an ordinate value in the coordinate system, and (x, y, w, h) is a rectangle created with the x and the y as starting points, namely, a face range in the environment image is a rectangle with an upper left coordinate of (x, y) and a lower right coordinate of (x + w, y + h). The Haar features are divided into edge features, linear features, central features and diagonal features, the features are combined to form a feature template, black and white rectangular frames are combined to form the feature template, and the feature value of the template is represented by black rectangular pixels and the sum of the subtracted white rectangular pixels in the feature template. The Haar feature classifier is a classifier combining Haar features and an AdaBoost algorithm in a Boosting algorithm, so that the region range of the human face, namely the coordinate values, can be determined according to the pixel values and the distribution of the gray level image. And extracting the face in the environment image according to the region range, thereby generating the initial face image.
And A12, judging whether the user corresponding to the initial face image watches the current interface.
Specifically, whether the face in the initial face image views the current interface is determined, and the determination method in this embodiment is determination by adopting a head pose estimation (headposesevaluation). The head posture estimation refers to acquiring the posture of the head through a face image, in the embodiment, two-dimensional face key point detection is firstly carried out on the initial face image to generate face key points, then key point matching is carried out on the face key points and a preset three-dimensional model to generate three-dimensional key points, then a conversion matrix between the two-dimensional key points and the three-dimensional key points is calculated, and finally Euler angles, namely a pitch angle, a yaw intersection and a roll angle, are solved according to the conversion matrix. And judging whether the face of the user corresponding to the initial face image faces the current screen or not according to the Euler angle, and further judging whether the user watches the display interface of the intelligent television or not.
And A13, if yes, taking the face image as a target face image.
Specifically, if the user corresponding to the initial face image is watching the display interface, it is indicated that the user has a high probability of using the smart television, and therefore the initial face image is used as the target face image; if not, the user does not watch the display interface, and therefore the user deletes the display interface. In the actual application process, it often happens that when the user a uses the smart television, the user B does other things beside the smart television, for example, plays a mobile phone, and if the face information of the user B is collected by a video camera or a camera of the smart television at this time, the interface may be switched to a completely non-corresponding interface, so that the interface switching fails, and the user experience is affected. Therefore, in the embodiment, the initial face image of the user who does not watch the display interface is deleted, so that the effectiveness of subsequently generated face information is improved, and the accuracy of switching the current display interface is ensured.
Therefore, in the process of extracting the face information, the face image of the user who is not watching the screen is filtered, and the screen is switched only for the user who is watching the screen, so that the accuracy of subsequently determining the target interface mode type is improved.
A20, inputting the target face image into a pre-trained age detection model, and controlling the age detection model to carry out age detection on the target face image to generate the face age.
Specifically, after the target face image is generated, an image module in Python may be called, and the target face image is saved according to the area range. On one hand, the target face image is input into a pre-trained age detection model, the age detection model is controlled, age detection is carried out on the target face image, and the face age is generated. The age detection mode is a trained model capable of performing age detection according to an input face image, in this embodiment, the age detection model includes an age detection model based on deep learning, such as an appearance model and a flexible model, and then extracts the face age in the target face image according to the age characteristics, and if the age characteristic extraction model is the appearance model, the age information is face geometric characteristics, face texture characteristics, skin color characteristics, and the like. And then, carrying out age estimation according to the age characteristics, wherein a common age estimation method comprises an age estimation method based on a classification model, a regression model and a mixed age estimation model, and different models have advantages and disadvantages and can be selected according to actual requirements. Alternatively, the number of face types may be generated based on the age of the face.
A30, determining the face age type corresponding to the target face image according to the face age.
Further, the process of generating the face age type includes:
and A31, determining a face age range corresponding to the target face image according to the face age.
An interface list is preset, wherein the interface list comprises a face age range, a face age type and an age mapping relation between the face age type and the face age range. Since the age ranges of different users are generally from 0 to 100, if each age value has a corresponding target display component, it will cause a lot of waste and will not bring great benefits, and therefore in this embodiment, the interface list includes different age ranges, such as 0 to 16 years, 17 to 60 years, and 61 to 100 years. And carrying out one-to-one correspondence on the age range and different face age types to generate an age mapping relation, wherein if the face age type corresponding to 0-16 years old is a child, 17-60 years old is a juvenile, and 61-100 years old is an old.
In an implementation manner of this embodiment, there is only one target face image, the face age obtained after the age detection is performed on the target face image is 7, and the corresponding face age range is 0 to 16 years old. In a second implementation manner of this embodiment, there are 3 target face images, and the face ages obtained after the age detection of the target face images are 7, 9, and 10, respectively, so that the corresponding face ages are all 0 to 16 years old. In a third implementation manner of this embodiment, there are 3 target face images, the face ages obtained after the age detection is performed on the target face images are 7, 9, and 65, the face ages corresponding to the first two digits are 0 to 16 years old, and the face age corresponding to the next digit is 61 to 100 years old.
And A32, determining the face age type corresponding to the target face image according to the face age range.
Specifically, according to the determined face age range and the age mapping relationship in the interface list, the face age type corresponding to the first implementation mode can be determined to be a child; the face age type corresponding to the second implementation mode is children; the face age types corresponding to the third implementation mode are children and old people respectively.
Further, the interface switching method further includes: and when an age change instruction is detected, changing the numerical value of the age range of the human face according to the age change instruction.
In an implementation manner of this embodiment, the smart television establishes a communication connection with a server. The background maintenance personnel can change the face age change range stored in the server according to the current user condition, if the age range of the child is changed from 0-16 to 0-12, after the change, the server packages the changed face age range and related information and pushes the face age range and related information to the smart television as an age change instruction. When the intelligent television is started, performing rough scanning detection on all received data, and when an age change instruction is detected, changing the age range of the face in the interface list according to information in the age change instruction, wherein the age range is changed from 0-16 years to 0-12 years.
In another implementation manner of this embodiment, the age change instruction is originated from a user. The smart television provides the age setting interface, and the user can be according to self condition, and if there is an old man at home, though only 55 years old, unfamiliar with the operation on intelligent interface, be fit for using the old man interface, the user can the age setting interface sets up the age range that the old man mode corresponds and is 50 ~ 100 years old, sets up the back of saving, generates promptly the age change instruction. And when the intelligent television detects the age change instruction, changing the age range of the face in the interface list into 50-100 years according to the age change instruction.
In the embodiment, the user can adjust the face age range according to the requirements of the user, so that the method is more flexible and can meet the requirements of different family users. In addition, for the convenience of the use of the user, before the smart television leaves a factory, the face age ranges under different mode types are set, and the user can directly use the smart television to switch the interface without additional setting.
And S30, determining the target interface mode type corresponding to the face information according to the face information.
Specifically, if the types are classified according to the ages of the users, the face information includes a face age type, and after the face information is generated, a corresponding mode type is selected from a preset child mode, an old man mode or a young man mode as a target interface mode type according to the face age type. If the types are classified according to the gender of the user, the face information is the face gender, and after the face information is generated, a corresponding mode type is selected from a preset female mode or a preset male mode as a target interface mode type according to the face gender. The division may also be by number of people, mode type single person mode, party mode, multi person mode, etc., and are not further recited herein. In order to determine the target interface mode type corresponding to the face information, mapping different face information and the corresponding mode type in advance to generate a face mapping relation.
It should be noted that the present embodiment is only divided in a single type, i.e. age, sex and number of people, but may also be divided in a combined manner, such as a combination of age and sex, a child corresponding to a certain model type with a woman, a teenager corresponding to another model type with a woman, etc.
In the first and second implementation manners mentioned in the above calculation of the number of the face types, the number of the face ages is 1, and the mode type corresponding to the face age type is directly used as the corresponding target interface mode type. However, in the third implementation, the number of the ages of the faces is 2, so that the type of the target interface mode which should be displayed currently cannot be accurately judged. In an implementation manner of this embodiment, when the number of the ages of the faces is too large, and the target interface mode type that should be selected cannot be determined, the determination may be performed according to the number of the target faces corresponding to each mode type. If the number of the target faces corresponding to the old man mode is 2, the type of the target interface mode is determined to be the old man mode.
Further, before step S30, the method further includes:
judging whether the number of the target face images is one or not;
if yes, determining the number of the face types to be one;
and if not, taking the number of the face age types as the number of the face types.
Specifically, after the target face image is generated, the target face image is used for generating a face age type and also used for generating the number of face types corresponding to the environment image. Firstly, judging whether the number of the target face images is one, if so, indicating that only one user currently watching television is available, and accordingly determining that the number of the face types corresponding to the environment images is one; if the number of the target face images is not one, it is indicated that a plurality of people watch television currently, and therefore the number of the face age types corresponding to the target face images is used as the number of the face types corresponding to the environment images, for example, three users watch television, and the face age types corresponding to the three users are all old people, so that the number of the face types is still one. In the above-described multiple implementation manners, the first implementation manner calculates the number of the face age types, and the number of the generated face types is 1; the second implementation mode calculates the number of the face types generated by the face age type to be 1; the third implementation calculates the number of face types generated by the number of face age types, and then is 2.
It should be noted that, although only the elderly, children and teenagers are described in the face age category in this embodiment, a plurality of different face age categories may be set according to different needs of users, for example, young people of about 20 years old and middle aged people of 40 years old have different preferences for watching programs, and focused program blocks are different, the young people enjoy movies, live broadcasts and short videos, while the middle aged people have little interest in live broadcasts, and a middle aged age category may be added, and the middle aged category corresponds to a middle aged mode in which live broadcast blocks in the young mode do not exist.
Further, determining the type of the target interface mode specifically includes:
and B10, judging whether the number of the face types is one.
Specifically, with the foregoing scheme, when the number of target faces corresponding to the face age type is the same, the corresponding target interface mode type cannot be determined, so in another implementation manner of this embodiment, it is determined whether the number of face types is one.
And B20, if the number of the face types is one, taking the pattern type corresponding to the face age type as the target interface pattern type according to a preset pattern mapping relationship, wherein the pattern mapping relationship is a mapping relationship between the pattern type and each face age type.
Specifically, if yes, directly according to the pattern mapping relationship, taking a pattern type corresponding to the face age type as the target interface pattern type. As described above in the first and second implementation manners in this embodiment, the number of face types is one, and the face age types are all children, so that according to the mode mapping relationship, a child mode is taken as a target interface mode type.
B30, if the number of the face types is not one, displaying an interface selection window, wherein the interface selection window comprises candidate mode types, and the candidate mode types are mode types corresponding to the face age types determined according to the mode mapping relation.
Specifically, if not, a preset dialog box (dialog) is popped up as an interface selection window. The interface selection window comprises a plurality of selection keys of candidate mode types, wherein the candidate mode types are determined according to the mode mapping relation and correspond to the face age type, for example, the candidate mode types determined according to the face age type comprise a child mode and a juvenile mode, and then the selection keys of the child mode and the juvenile mode are included in the selection window. And the user selects the mode type through a remote controller or a key on the intelligent television according to the self requirement, so that the mode instruction is sent. In this embodiment, the dialog boxes are radio boxes written with different mode types in sequence, and are respectively a child mode, a juvenile mode and an elderly mode from top to bottom.
B40, when a mode instruction for the interface selection window is detected, determining the mode type corresponding to the mode instruction in the candidate mode types as the target interface mode type.
Specifically, if the user wants to enter the child mode, the child mode is selected and confirmed through the remote controller or the up-down keys on the smart television, and a mode instruction is sent. When a mode instruction for the interface selection window is detected, the mode instruction can be analyzed, so that a focus coordinate containing a source of the mode instruction is obtained. And determining a selection key corresponding to the mode instruction, namely a selection key of a child mode according to the focus coordinate and the position coordinate corresponding to the selection key of each mode type in the dialog box, so as to determine that the mode type corresponding to the mode instruction is the child mode, and taking the child mode as the target interface mode type.
Therefore, the scheme also provides a specific method for switching different display interfaces according to the age of the user, and the face information is divided into the face age type and the face type number. If the number of the face types is one, the current user type is single, and therefore the switched target interface mode type is determined directly according to the face age type; if the number of the face types is not one, the current user types comprise a plurality of types, so that an interface selection window is displayed, and a user selects a mode type expected by the user according to the mode type on the interface display window so as to meet the conditions of a single user type and a non-single user type.
And S40, switching the current display interface to the display interface corresponding to the target interface mode type.
Specifically, a Launcher is preset to subscribe to a face information change Broadcast, as shown in fig. 4, a brief explanation is given with a face age type in the face information being a child and a number of face types being 1, and a camera service, when judging that the face information changes through collection and image processing, sends a Broadcast (Broadcast) to the Launcher and defines a Broadcast operation as "face information change", and since the face information adopted in this embodiment is mainly generated based on the age of the face, the Broadcast operation can be specifically defined as "com. ". And writing a keyword (key) and a corresponding numerical value into the broadcast content, wherein the keyword is an age (age), and the numerical value is a corresponding target interface mode type. If the corresponding target interface mode type is a child mode, the broadcast content is "intent. "and specifies the object" internal. setpage ("package name of main launcher") to receive the broadcast; ", and finally transmits the determined target interface mode type to the broadcast through the sendBroadcast () method. After the Launcher receives the broadcast, extracting a corresponding numerical value, namely "string ═ intent. getstring extra (" age "), according to the keyword; ", and then performs switching of the display interface according to the numerical value. If the current interface mode is child, the main Launcher informs a main activity (MainActivity) to switch the current interface to the target interface mode type, namely child mode.
In this embodiment, the value (value) corresponding to the keyword includes "old", "child", "young" and "option", and the corresponding face age types are respectively old, children and teenagers, where "option" indicates that there are various current face age types, so that the subsequent mode types cannot be determined directly according to the face age types. If the number of the face types is one, taking a value of 'under', 'child' or 'young' according to the face age and the face age range; and if the number of the face types is not one, taking the value 'option'. A mode type corresponding to the value 'option' can be preset, or a selection window is set, and when the main Launcher detects that the value is 'option', the main activity is informed to pop up the selection window or switch to the mode type corresponding to the 'option'. The selection window is popped up to facilitate the user to select a further mode, for example, a personal mode, a multi-person mode and a party mode are written on the selection window, and the user can select the mode according to the self requirement.
Further, the handover procedure includes:
and C10, according to the component mapping relation, taking the display component corresponding to the target interface mode type as a target display component.
And after the target interface mode type is determined, according to the component mapping relation between the mode type written in the interface list in advance and each display component, determining the corresponding display component and using the display component as the target display component. The display components are components displayed on a real interface, and taking the child mode shown in fig. 2 as an example, the display components in the child mode include a layout component, a history component, a child theater component, and a child movie component. The display component is used for displaying elements such as texts, pictures and hyperlinks, the layout component comprises a parent component container for bearing a plurality of components and is used for arranging and distributing styles so that the components are arranged according to a certain rule, and therefore webpage display rasterization is achieved. And the child theater component and the child movie component are connected with the video playing website so as to call and display information such as posters, names and the like of different programs or videos. The history component is used for storing log information of previous viewing records and displaying the log information in the form of images and texts. And if the target display type is a child mode, taking the layout component, the history record component, the child theater component and the child movie component as the target display component.
And C20, acquiring the display component in the display instance corresponding to the current interface and taking the display component as the current display component.
Specifically, the interface corresponding to the child mode shown in fig. 2 is taken as the current interface, and the interface corresponding to the senior mode shown in fig. 3 is taken as the interface after switching. And acquiring display components in a display example corresponding to the current interface, wherein the display components comprise a television recommendation component, a child theater component, a child movie component, a history component and a layout component, and taking the components as the current display components. The display example is an example document for output after rendering to display contents in the example document, such as an Html file, can be used as one display example, and multiple sub-examples can be included in one display example to mount components of different functions.
And C30, comparing the current component with the target display component, taking the data in the target display component different from the data in the current display component as switching data, and taking the same data in the target display component as the data in the current display component as reserved data.
Specifically, the display component invoked by the display interface of the child mode then compares the current display component with the target display component, and takes a different component as switching data. In this embodiment, the target components include a television recommendation component, a television theater component, a movie program component, and a history component. And then comparing the current display assembly with the target display assembly to determine switching data and reserved data in the current display assembly. The switching data includes update data, supplementary data and deletion data, wherein the update data is element data in which component names of the target display component and the current display component are the same and component elements are different, the supplementary data is component data which does not exist in the current display component and exists in the target display component, and the deletion data is component data which exists in the current display component and does not exist in the target display component.
For example, if the target display component does not include a live component and the current display component includes a live component, the live component is used as the deletion data, and the data to be deleted is deleted during the switching process. As shown in fig. 2 and 3, the layout component of the child mode is not much different from the layout component of the senior mode, and only the icon elements and the displayed text elements are different, so the icon elements and the text elements in the layout component of the senior mode are used as the supplementary data. And if the target display assembly comprises a live broadcast assembly and the current display assembly does not comprise the live broadcast assembly, taking the live broadcast assembly as an updating assembly, and loading the updating assembly when switching is carried out.
The reserved data is the same data in both the target display component and the current display component, such as component name, elements in the component.
And C40, keeping the reserved data unchanged, and switching the current interface according to the switching data.
Specifically, after the reserved data and the switching data are determined, the reserved data are kept unchanged in the corresponding display instance in the current interface, and the content displayed on the current interface is adjusted according to the updated data, the supplemented data and the deleted data in the switching data, so that the current interface is switched. The specific adjustment method can be as follows:
according to the switching data, modifying the data in the display example corresponding to the current interface;
and rendering and outputting the modified display example to realize the switching of the current interface.
Specifically, we will use the currently commonly used front-end framework of vue. In the front-end framework, each display interface can be used as a display instance. In this display example, a plurality of components are included, and each component describes a function of the component, and component elements such as a size of the component and a content of the component.
And when the switching data is update data, replacing the element data to be updated in the display example with update element data, wherein the update element data is update data in the target assembly, and the element data to be updated is update data in the current display assembly. In the above description, the television recommendation components are provided in different mode types in this embodiment, but the television recommendation components in different mode types have different component elements, for example, the recommended content included in the television recommendation component in the senior mode is the name, connection, poster, etc. of a television program screened for senior citizens, and the recommended content included in the television recommendation component in the teenage mode is screened for teenagers. Besides the component elements, the basic functions of the television recommendation components corresponding to different mode types are consistent, so that only the update element data corresponding to the target mode type is needed, the update data in the current display component is used as the element data to be updated, and the former replaces the latter.
And when the switching data is a display component in the supplementary data, adding the supplementary data to the corresponding mounting point in the display instance according to the component type of the switching component. Since the supplemental data includes display components and component elements for supplementation. The complement of both is different, when it is a display component, since the target display component has not appeared in the display instance before, and therefore it needs to be displayed later, and needs to be included in the display instance, in vue. For example, when the type of the target display component to be supplemented is a sub-component of a certain current display component, the target display component is hung at a hanging point of the current display component, so that subsequent calling display is realized.
And when the switching data is a component element in the supplementary data, adding the switching data to the corresponding current display component in the display example according to the component name corresponding to the switching data. When the switching data is a component element in the supplemental data, the component element can be directly added to the corresponding current display component. For example, a component element that needs to be supplemented is a certain recommended program, and therefore, the component element is directly added to the television recommendation component in the display instance.
And when the switching data is deletion data, deleting the deletion data in the display example.
Different operations are executed on different switching data, so that data in a display example can be modified, after the modification is completed, rendering and outputting are performed on the basis of the display example, namely the content displayed in the current display interface can be switched to the modified content, and the switching of the display interface is completed.
Further, the data types of the component elements may include a display content type, a component coordinate type, and a display effect type. Taking the television recommendation component as an example, the component elements of the content type in the display component may include posters, network links, names, etc. of different recommended programs. The component element of the component coordinate type is used for limiting the position of information such as posters, characters and the like in the display component, the display effect type is used for setting the type of the network connection, the font size of the name, the font color, the background interface and other elements with special effects, for example, the children mode can adopt a lovely style font, and the elder mode can adopt a larger font, so that the elder can see the content of the interface clearly.
Further, the target display component comprises a history component, wherein the history component comprises history information corresponding to different mode types.
In particular, some televisions currently already have a function of recording a history. But the history records are different greatly according to different user types. For example, children may watch mainly cartoons, children's oriented television shows, while the elderly mainly watch adult oriented television shows or movies. If the history records of the two are mixed together, it may be difficult for the user to find the previous watching history from the history records, for example, the time period when the child watches the television is generally in the evening after school, while the old people are generally in the daytime, and a large amount of old people history records are included between the history records of the child in the evening before and the history records of the child in the next day, so that the user is inconvenient to continue to watch the movie last time. Therefore, in this embodiment, the history information in the history component of the target component is history information in different mode types, so that the user can conveniently find his/her history.
In the switching process, the method keeps the same part of the current display interface and the interface to be switched, and switches according to different parts, so that less contents need to be deleted, added and loaded, and the screen switching speed is improved.
Based on the above interface switching method, the present invention further provides a terminal device, as shown in fig. 6, which includes at least one processor (processor) 20; a display screen 21; and a memory (memory)22, and may further include a communication interface (communication interface)23 and a bus 24. The processor 20, the display 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may call logic instructions in the memory 22 to perform the methods in the embodiments described above.
Furthermore, the logic instructions in the memory 22 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 22, which is a computer-readable storage medium, may be configured to store a software program, a computer-executable program, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 20 executes the functional application and data processing, i.e. implements the method in the above-described embodiments, by executing the software program, instructions or modules stored in the memory 22.
The memory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 22 may include a high speed random access memory and may also include a non-volatile memory. For example, various media that can store program codes, such as a usb disk, a removable hard disk, a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, may also be transient storage media.
In addition, the specific processes loaded and executed by the instruction processors in the storage medium and the terminal device are described in detail in the method, and are not stated herein.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (14)

1. An interface switching method, characterized in that the method comprises:
when the current interface is a target interface, acquiring an environment image;
carrying out face recognition on the environment image to generate face information;
determining a target interface mode type corresponding to the face information according to the face information;
and switching the current display interface to the display interface corresponding to the target interface mode type.
2. The interface switching method according to claim 1, wherein the face information includes a face age type; the performing face recognition on the environment image to generate face information specifically includes:
if the environment image has a face image, extracting the face in the environment image to generate a target face image;
inputting the target face image into a pre-trained age detection model, and controlling the age detection model to carry out age detection on the target face image to obtain the face age corresponding to the target face image;
and determining the face age type corresponding to the target face image according to the face age.
3. The interface switching method according to claim 2, wherein if a face image exists in the environment image, extracting a face from the environment image, and generating a target face image specifically includes:
if the face image exists in the environment image, inputting the environment image into a pre-trained face detection model, controlling the face detection model to extract the face in the environment image, and generating an initial face image;
judging whether a user corresponding to the initial face image watches the current interface or not;
and if so, taking the face image as a target face image.
4. The interface switching method according to claim 2, wherein the determining, according to the face age, a face age type corresponding to the target face image specifically includes:
determining a face age range corresponding to the target face image according to the face age;
and determining the face age type corresponding to the target face image according to the face age range.
5. The interface switching method according to claim 3, further comprising:
and when an age change instruction is detected, changing the numerical value of the age range of the human face according to the age change instruction.
6. The interface switching method according to claim 2, wherein before determining the target interface mode type corresponding to the face information according to the face information, the method further comprises:
judging whether the number of the target face images is one or not;
if yes, determining the number of the face types to be one;
and if not, taking the number of the face age types as the number of the face types.
7. The interface switching method according to claim 3, wherein the determining, according to the face information, a target interface mode type corresponding to the face information includes:
judging whether the number of the human face types is one;
if the number of the face types is one, taking the mode type corresponding to the face age type as the target interface mode type according to a preset mode mapping relationship, wherein the mode mapping relationship is a mapping relationship between the mode type and each face age type;
if the number of the face types is not one, displaying an interface selection window, wherein the interface selection window comprises candidate mode types, and the candidate mode types are mode types corresponding to the face age types determined according to the mode mapping relation;
when a mode instruction for the interface selection window is detected, determining that a mode type corresponding to the mode instruction in the candidate mode types is the target interface mode type.
8. The interface switching method according to any one of claims 1 to 7, wherein the switching the current display interface to the display interface corresponding to the target interface mode type specifically includes:
according to the type of the target interface mode, taking a corresponding display assembly in preset display assemblies as a target display assembly;
acquiring a display component in a display example corresponding to the current interface and taking the display component as the current display component;
comparing the current display assembly with the target display assembly, taking data of the target display assembly, which is different from the current display assembly, as switching data, and taking data of the target display assembly, which is the same as the current display assembly, as reserved data;
and keeping the reserved data unchanged, and switching the current interface according to the switching data.
9. The interface switching method according to claim 8, wherein the switching the current interface according to the switching data specifically includes:
according to the switching data, modifying the data in the display example corresponding to the current interface;
and rendering and outputting the modified display example to realize the switching of the current interface.
10. The interface switching method according to claim 9, wherein the switching data includes update data, supplementary data, and deletion data, wherein the update data is element data in which component names of the target display component and the current display component are the same and component elements are different, the supplementary data is a display component or a component element that does not exist in the current display component and exists in the target display component, and the deletion data is a display component or a component element that exists in the current display component and does not exist in the target display component.
11. The interface switching method according to claim 10, wherein the modifying the data in the display instance corresponding to the current interface according to the switching data specifically includes:
when the switching data is update data, replacing the element data to be updated in the display example with update element data, wherein the update element data is update data in the target assembly, and the element data to be updated is update data in the current display assembly;
when the switching data is a display component in the supplementary data, adding the supplementary data to a corresponding mounting point in the display instance according to the component type of the switching component;
when the switching data is a component element in the supplementary data, adding the switching data to a corresponding current display component in the display example according to a component name corresponding to the switching data;
and when the switching data is deletion data, deleting the deletion data in the display example.
12. The interface switching method according to claim 10, wherein the data types of the component elements include a display content type, a component coordinate type, and a display effect type.
13. A computer-readable storage medium storing one or more programs, the one or more programs being executable by one or more processors to implement the steps of the interface switching method according to any one of claims 1 to 12.
14. A terminal device, comprising: a processor, a memory, and a communication bus; the memory has stored thereon a computer readable program executable by the processor;
the communication bus realizes connection communication between the processor and the memory;
the processor, when executing the computer readable program, implements the steps in the interface switching method according to any one of claims 1 to 12.
CN202011187567.6A 2020-10-30 2020-10-30 Interface switching method, storage medium and terminal equipment Pending CN114443182A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011187567.6A CN114443182A (en) 2020-10-30 2020-10-30 Interface switching method, storage medium and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011187567.6A CN114443182A (en) 2020-10-30 2020-10-30 Interface switching method, storage medium and terminal equipment

Publications (1)

Publication Number Publication Date
CN114443182A true CN114443182A (en) 2022-05-06

Family

ID=81358448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011187567.6A Pending CN114443182A (en) 2020-10-30 2020-10-30 Interface switching method, storage medium and terminal equipment

Country Status (1)

Country Link
CN (1) CN114443182A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116271786A (en) * 2023-02-08 2023-06-23 广州市邦杰软件科技有限公司 Interface interaction control method and device of cartoon game machine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116271786A (en) * 2023-02-08 2023-06-23 广州市邦杰软件科技有限公司 Interface interaction control method and device of cartoon game machine
CN116271786B (en) * 2023-02-08 2023-10-13 广州市邦杰软件科技有限公司 Interface interaction control method and device of cartoon game machine

Similar Documents

Publication Publication Date Title
US11741328B2 (en) Dynamic embedding of machine-readable codes within video and digital media
US20190026563A1 (en) Actor/person centric auto thumbnail
US10354124B2 (en) Electronic apparatus and controlling method for improve the image quality preference of skin area
CN111612873A (en) GIF picture generation method and device and electronic equipment
US20140223474A1 (en) Interactive media systems
WO2022095757A1 (en) Image rendering method and apparatus
CN104661104A (en) Self-adaptive interface customization device and method based on multiple perception sources
US11367196B2 (en) Image processing method, apparatus, and storage medium
US11551392B2 (en) Graphic drawing method and apparatus, device, and storage medium
WO2021063096A1 (en) Video synthesis method, apparatus, electronic device, and storage medium
US11544814B2 (en) Method and system for displaying a video poster based on artificial intelligence
CN112235520A (en) Image processing method and device, electronic equipment and storage medium
US20230018502A1 (en) Display apparatus and method for person recognition and presentation
CN113645494A (en) Screen fusion method, display device, terminal device and server
US20230291978A1 (en) Subtitle processing method and apparatus of multimedia file, electronic device, and computer-readable storage medium
CN111556350B (en) Intelligent terminal and man-machine interaction method
WO2016082470A1 (en) Method for image processing, device and computer storage medium
WO2022078172A1 (en) Display device and content display method
CN114443182A (en) Interface switching method, storage medium and terminal equipment
CN113986407A (en) Cover generation method and device and computer storage medium
CN116954605A (en) Page generation method and device and electronic equipment
CN110662103B (en) Multimedia object reconstruction method and device, electronic equipment and readable storage medium
CN110225177B (en) Interface adjusting method, computer storage medium and terminal equipment
CN113891079A (en) Automatic teaching video generation method and device, computer equipment and storage medium
CN114003160A (en) Data visualization display method and device, computer equipment and storage medium

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