CN112947817A - Intelligent equipment page switching method and device - Google Patents

Intelligent equipment page switching method and device Download PDF

Info

Publication number
CN112947817A
CN112947817A CN202110154796.6A CN202110154796A CN112947817A CN 112947817 A CN112947817 A CN 112947817A CN 202110154796 A CN202110154796 A CN 202110154796A CN 112947817 A CN112947817 A CN 112947817A
Authority
CN
China
Prior art keywords
menu
animation frame
menu item
frame index
current
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
CN202110154796.6A
Other languages
Chinese (zh)
Other versions
CN112947817B (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.)
Honorsun Xiamen Data Co ltd
Original Assignee
Honorsun Xiamen Data 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 Honorsun Xiamen Data Co ltd filed Critical Honorsun Xiamen Data Co ltd
Priority to CN202110154796.6A priority Critical patent/CN112947817B/en
Publication of CN112947817A publication Critical patent/CN112947817A/en
Application granted granted Critical
Publication of CN112947817B publication Critical patent/CN112947817B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • G06F3/0482Interaction with lists of selectable items, e.g. menus
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention discloses a method, a medium, equipment and a device for switching pages of intelligent equipment, wherein the method comprises the following steps: acquiring preset menu item materials, and analyzing to acquire parameters corresponding to the menu item materials; acquiring a current menu item, and calculating a current menu animation frame index according to the current menu item and parameters; when a page switching instruction is obtained, acquiring the corresponding task number according to the page switching instruction, sequentially accumulating the current menu item to acquire the next menu animation frame index after each accumulation of the current menu animation frame indexes, stopping until the number of times corresponding to the task number is accumulated, and taking the next menu animation frame index acquired after stopping as a target menu animation frame index; calculating all animation frame information from the current menu animation frame index to the target menu animation frame index, and switching the page from the current menu item to the target menu item according to all animation frame information; thereby greatly improving the stability of page switching.

Description

Intelligent equipment page switching method and device
Technical Field
The present invention relates to the field of page switching processing technologies, and in particular, to a method for switching pages of an intelligent device, a computer-readable storage medium, a computer device, and an apparatus for switching pages of an intelligent device.
Background
Among the correlation technique, the smart machine that has full liquid crystal instrument is when using, in order to improve the science and technology of instrument interface design and feel, generally need optimize menu switching effect, in order to increase the dynamic effect that is rich in intuition nature and science and technology and feels strong, current dynamic switching effect is the coordinate through the code control menu item usually, the size, the color value, realization such as rotation angle, because design platform and operation platform's difference, be difficult to realize the uniformity of design and realization, and need specific code to realize dynamic switching effect, other menu designs of incompatible use, can't guarantee software reusability, influence instrument software stability.
Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the art described above. Therefore, one object of the present invention is to provide a method for switching pages of an intelligent device, which achieves a dynamic menu switching effect according to a frame index by presetting menu item materials, does not need to modify software codes, has low cost and is reusable, thereby greatly improving the stability of page switching.
A second object of the invention is to propose a computer-readable storage medium.
A third object of the invention is to propose a computer device.
The fourth purpose of the invention is to provide a page switching device for intelligent equipment.
In order to achieve the above object, an embodiment of a first aspect of the present invention provides a method for switching a page of an intelligent device, including the following steps: acquiring preset menu item materials, and analyzing the menu item materials to acquire parameters corresponding to the menu item materials; acquiring a current menu item, and calculating a current menu animation frame index according to the current menu item and the parameters; when a page switching instruction is acquired, acquiring the corresponding task number according to the page switching instruction, sequentially accumulating the current menu item to acquire the next menu animation frame index after each accumulation of the current menu animation frame index, stopping until the number of times corresponding to the task number is accumulated, and taking the next menu animation frame index acquired after stopping as a target menu animation frame index; and calculating all animation frame information from the current menu animation frame index to the target menu animation frame index according to the current menu animation frame index, the next menu animation frame index after each accumulation, the target menu animation frame index and the parameters, and switching the page from the current menu item to the target menu item according to all animation frame information.
According to the intelligent equipment page switching method, firstly, preset menu item materials are obtained, and the menu item materials are analyzed to obtain parameters corresponding to the menu item materials; then, obtaining a current menu item, and calculating a current menu animation frame index according to the current menu item and parameters; then, when a page switching instruction is obtained, obtaining the corresponding task number according to the page switching instruction, sequentially accumulating the current menu item to obtain the next menu animation frame index after each accumulation of the current menu animation frame index, stopping until the number of times corresponding to the task number is accumulated, and taking the next menu animation frame index obtained after stopping as the target menu animation frame index; finally, calculating all animation frame information from the current menu animation frame index to the target menu animation frame index according to the current menu animation frame index, the next menu animation frame index after each accumulation, the target menu animation frame index and the parameters, and switching the page from the current menu item to the target menu item according to all animation frame information; thereby greatly improving the stability of page switching.
In addition, the method for switching pages of the intelligent device provided by the above embodiment of the present invention may further have the following additional technical features:
optionally, the menu item material is preset according to the following steps: acquiring the total number of menu items and the width of menu materials of each menu item; acquiring a switching effect between every two adjacent menu items, and animating every menu item according to the switching effect between every two adjacent menu items to acquire the number of animation frames, the width of every animation frame and the height of every animation frame corresponding to every menu item; and performing determinant storage on animation frame numbers corresponding to each menu item according to the sequence of each menu item to generate menu item materials, and taking the total number of the menu items, the width of the menu material of each menu item, the animation frame number corresponding to each menu item, the width of each animation frame and the height of each animation frame as parameters of the menu item materials, wherein the animation frame numbers corresponding to each menu item are equal.
Optionally, the current menu animation frame index is calculated according to the following formula:
Ci=(i-1)Fi
wherein, CiIndicating the current menu item frame index, i indicates the ith menu item, FiAnd showing the animation frame number corresponding to the ith menu item.
Optionally, sequentially performing accumulation processing on the current menu item to obtain a next menu animation frame index after each accumulation of the current menu animation frame indexes, including: judging whether the page switching instruction is a first page switching instruction or a second page switching instruction; if the page switching instruction is a first page switching instruction, adding one to the current menu item, and judging whether the added current menu item is less than or equal to the total number of the menu items; if yes, the next menu animation frame index is the animation frame number corresponding to the next menu item after the current menu item with one added is subtracted by one; if not, the next menu animation frame index is the 0 th frame, and the frame is displayed circularly; if the page switching instruction is a second page switching instruction, subtracting one from the current menu item, and judging whether the current menu item after subtracting one is greater than 0 or equal to 0; if the index is larger than 0, the animation frame index of the next menu is that the current menu item after being reduced by one is firstly reduced by one and then multiplied by the animation frame number corresponding to the next menu item; if the number is equal to 0, the animation frame index of the next menu is the animation frame number corresponding to the next menu item after the total number of the menu items is reduced by one.
Optionally, all animation frame information from the current menu animation frame index to the target menu animation frame index is calculated according to the following formula:
the line of the frame index is the frame index/(menu material width/animation frame width);
frame index (frame index row menu material width/animation frame width)
The x coordinate of the animation frame is the width of the animation frame and the column of the frame index;
animation frame y coordinate is animation frame height frame index line.
In order to achieve the above object, a second embodiment of the present invention provides a computer-readable storage medium, on which a smart device page switching program is stored, where the smart device page switching program, when executed by a processor, implements the smart device page switching method as described above.
According to the computer-readable storage medium of the embodiment of the invention, the intelligent device page switching program is stored, so that the processor can realize the intelligent device page switching method when executing the intelligent device page switching program; thereby greatly improving the stability of page switching.
In order to achieve the above object, a third embodiment of the present invention provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method for switching pages of the smart device as described above is implemented.
According to the computer equipment provided by the embodiment of the invention, the intelligent equipment page switching program is stored through the memory, so that the intelligent equipment page switching method is realized when the processor executes the intelligent equipment page switching program stored in the memory; thereby greatly improving the stability of page switching.
In order to achieve the above object, a fourth aspect of the present invention provides an apparatus for switching pages of an intelligent device, including: the acquisition module is used for acquiring preset menu item materials and analyzing the menu item materials to acquire parameters corresponding to the menu item materials; the first calculation module is used for acquiring a current menu item and calculating a current menu animation frame index according to the current menu item and the parameters; the second calculation module is used for acquiring the corresponding task number according to the page switching instruction when the page switching instruction is acquired, sequentially accumulating the current menu item to acquire the next menu animation frame index accumulated each time of the current menu animation frame index, stopping until the number of times corresponding to the task number is accumulated, and taking the next menu animation frame index acquired after stopping as the target menu animation frame index; and the switching module is used for calculating all animation frame information from the current menu animation frame index to the target menu animation frame index according to the current menu animation frame index, the next menu animation frame index after each accumulation, the target menu animation frame index and the parameters, and switching a page from the current menu item to the target menu item according to all animation frame information.
According to the intelligent equipment page switching device provided by the embodiment of the invention, the preset menu item materials are obtained through the setting obtaining module, and the menu item materials are analyzed to obtain the parameters corresponding to the menu item materials; the first calculation module is used for acquiring a current menu item and calculating a current menu animation frame index according to the current menu item and parameters; the second calculation module is used for acquiring the corresponding task number according to the page switching instruction when the page switching instruction is acquired, sequentially accumulating the current menu item to acquire the next menu animation frame index after each accumulation of the current menu animation frame index until the number of times corresponding to the task number is accumulated, and taking the next menu animation frame index acquired after the stop as the target menu animation frame index; the switching module is used for calculating all animation frame information from the current menu animation frame index to the target menu animation frame index according to the current menu animation frame index, the next menu animation frame index after each accumulation, the target menu animation frame index and the parameters, and switching the page from the current menu item to the target menu item according to all animation frame information; thereby greatly improving the stability of page switching.
In addition, the device for switching pages of an intelligent device provided by the above embodiment of the present invention may further have the following additional technical features:
optionally, the obtaining preset menu item materials further includes: the setting module is used for acquiring the total number of menu items and the width of a menu material of each menu item; the animation production module is used for acquiring the switching effect between every two adjacent menu items and carrying out animation production on each menu item according to the switching effect between every two adjacent menu items so as to acquire the number of animation frames, the width of each animation frame and the height of each animation frame corresponding to each menu item; and the storage module is used for performing determinant storage on the animation frame number corresponding to each menu item according to the sequence of each menu item so as to generate a menu item material, and taking the total number of the menu items, the width of the menu material of each menu item, the animation frame number corresponding to each menu item, the width of each animation frame and the height of each animation frame as parameters of the menu item material, wherein the animation frame numbers corresponding to each menu item are equal.
Optionally, the second computing module is further configured to: judging whether the page switching instruction is a first page switching instruction or a second page switching instruction; if the page switching instruction is a first page switching instruction, adding one to the current menu item, and judging whether the added current menu item is less than or equal to the total number of the menu items; if yes, the next menu animation frame index is the animation frame number corresponding to the next menu item after the current menu item with one added is subtracted by one; if not, the next menu animation frame index is the 0 th frame, and the frame is displayed circularly; if the page switching instruction is a second page switching instruction, subtracting one from the current menu item, and judging whether the current menu item after subtracting one is greater than 0 or equal to 0; if the index is larger than 0, the animation frame index of the next menu is that the current menu item after being reduced by one is firstly reduced by one and then multiplied by the animation frame number corresponding to the next menu item; if the number is equal to 0, the animation frame index of the next menu is the animation frame number corresponding to the next menu item after the total number of the menu items is reduced by one.
Drawings
Fig. 1 is a schematic flowchart of a method for switching pages of an intelligent device according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a process for setting menu item material according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of a page switching apparatus of an intelligent device according to an embodiment of the present invention;
fig. 4 is a block diagram of a page switching apparatus of an intelligent device according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative and intended to be illustrative of the invention and are not to be construed as limiting the invention.
In the related art, when the conventional all-liquid crystal instrument performs dynamic menu switching, the following steps are generally performed: firstly, a UI designer designs materials and dynamic effect definitions of menu items, secondly, the menu item materials are displayed in a liquid crystal display in sequence, thirdly, the menu items are judged to be switched up and down during key operation, according to the dynamic effect definitions provided by the UI designer, the switching of the dynamic effect is realized by controlling the coordinates, the size, the color value, the rotating angle and the like of the menu items through codes, and fourthly, an instrument menu is updated to the next menu item after the dynamic effect is switched; due to the difference between the design platform and the operation platform, the consistency between the design and the implementation is difficult to realize, a specific code is required to realize a dynamic switching effect, other menu designs cannot be compatible for use, the reusability of software cannot be ensured, and the stability of instrument software is influenced; therefore, according to the intelligent device page switching method provided by the embodiment of the invention, firstly, preset menu item materials are obtained, and the menu item materials are analyzed to obtain parameters corresponding to the menu item materials; then, obtaining a current menu item, and calculating a current menu animation frame index according to the current menu item and parameters; then, when a page switching instruction is obtained, obtaining the corresponding task number according to the page switching instruction, sequentially accumulating the current menu item to obtain the next menu animation frame index after each accumulation of the current menu animation frame index, stopping until the number of times corresponding to the task number is accumulated, and taking the next menu animation frame index obtained after stopping as the target menu animation frame index; finally, calculating all animation frame information from the current menu animation frame index to the target menu animation frame index according to the current menu animation frame index, the next menu animation frame index after each accumulation, the target menu animation frame index and the parameters, and switching the page from the current menu item to the target menu item according to all animation frame information; therefore, when the menu dynamic switching effect is carried out, the method can be used in the full-liquid crystal instrument only by making materials and dynamic switching definition according to specific rules in advance by an interface designer without modifying software codes, does not increase the dependence of a third party library, is compatible with the existing instrument software implementation scheme, does not relate to the modification of hardware, has low implementation cost, can be repeatedly used for subsequent UI design modification, and can be directly applied to various instrument platforms by adjusting the animation frame rate, thereby reducing the research and development cost.
In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Fig. 1 is a schematic flowchart of a method for switching a page of an intelligent device according to an embodiment of the present invention, and as shown in fig. 1, the method for switching a page of an intelligent device includes the following steps:
step 101, acquiring preset menu item materials, and analyzing the menu item materials to acquire parameters corresponding to the menu item materials.
As an embodiment, a schematic flow chart of setting menu item materials is shown in fig. 2, and specifically includes the following steps:
s201, acquiring the total number of menu items and the width of a menu material of each menu item.
It should be noted that, the total number of menu items and the image information corresponding to each menu item can be set by the UI designer in a user-defined manner according to the design requirement, and the menu material width of each menu item can be obtained through the image information corresponding to each menu item.
S202, acquiring the switching effect between each adjacent menu item, and performing animation production on each menu item according to the switching effect between each adjacent menu item to acquire the number of animation frames, the width of each animation frame and the height of each animation frame corresponding to each menu item.
That is, the UI designer can create each menu item switching effect according to the design requirements, create the switching effect of switching the last menu item to the first menu item, that is, the first frame image and the last frame image are kept consistent, so as to achieve the effect that the whole animation process is end-to-end, and save the frame number and the size of the single frame image of the whole animation process.
S203, performing determinant storage on the animation frame number corresponding to each menu item according to the sequence of each menu item to generate menu item materials, and taking the total number of the menu items, the width of the menu material of each menu item, the animation frame number corresponding to each menu item, the width of each animation frame and the height of each animation frame as parameters of the menu item materials, wherein the animation frame numbers corresponding to each menu item are equal.
That is, after the animation with the overall switching effect is completed, animation sequence frames are output through the tool and are sequentially arranged according to the specific number of rows and columns to generate menu item materials.
As an example, the menu animation sequence frames are arranged as shown in the following table one:
Figure BDA0002934232450000061
and 102, acquiring a current menu item, and calculating a current menu animation frame index according to the current menu item and the parameters.
As one embodiment, the current menu animation frame index is calculated according to the following formula:
Ci=(i-1)Fi
wherein, CiIndicating the current menu item frame index, i indicates the ith menu item, FiAnd showing the animation frame number corresponding to the ith menu item.
It should be noted that, when the device is powered on and the menu is initialized, the default menu item is the first item, and the 0 th frame of the menu material is the frame index of the current menu item.
Step 103, when a page switching instruction is obtained, obtaining the corresponding task number according to the page switching instruction, sequentially accumulating the current menu items to obtain the next menu animation frame index after each accumulation of the current menu animation frame index, stopping until the number of times corresponding to the task number is accumulated, and taking the next menu animation frame index obtained after stopping as the target menu animation frame index.
As an example, sequentially performing an accumulation process on a current menu item to obtain a next menu animation frame index after each accumulation of current menu animation frame indexes includes:
judging whether the page switching instruction is a first page switching instruction or a second page switching instruction;
if the page switching instruction is a first page switching instruction, adding one to the current menu item, and judging whether the added current menu item is less than or equal to the total number of the menu items;
if yes, the next menu animation frame index is the animation frame number corresponding to the next menu item after the current menu item with one added is subtracted by one;
if not, the next menu animation frame index is the 0 th frame, and the frame is displayed circularly;
if the page switching instruction is a second page switching instruction, subtracting one from the current menu item, and judging whether the current menu item after subtracting one is greater than 0 or equal to 0;
if the index is larger than 0, the animation frame index of the next menu is that the current menu item after being reduced by one is firstly reduced by one and then multiplied by the animation frame number corresponding to the next menu item;
if the number is equal to 0, the animation frame index of the next menu is the animation frame number corresponding to the next menu item after the total number of the menu items is reduced by one.
It should be noted that the page switching instruction is obtained by pressing a key by the user; that is, by capturing whether the key is pressed and the number of times the key is continuously pressed, and acquiring the page switching instruction when the key is pressed is captured, the number of times the key is continuously pressed is taken as the task number.
As a specific embodiment, the page switching instruction has two pressing modes, one is a down key and the other is an up key; when the detected pressing mode is a downward key, making the current menu item +1, and if the current menu item +1 is less than or equal to the total number of the menu items, the animation frame index of the next menu is (the current menu item +1-1) × the animation frame number corresponding to the next menu item; if the current menu item +1 is larger than the total number of menu items, the next menu animation frame index is set to be 0 th frame, namely, the display is circulated.
When the detected pressing mode is an upward key, making a current menu item-1, and if the current menu item-1 is greater than 0, the next menu animation frame index is (the current menu item-1-1) the animation frame number corresponding to the next menu item; if the current menu item-1 is equal to 0, the next menu animation frame index is (total number of menu items-1) the animation frame number corresponding to the next menu item; therefore, the updating of the current menu item to the next menu item is realized in a cycle in sequence.
As an example, assuming that the total number of menu items is 5, the current menu item is 4, the number of animation frames corresponding to each menu item is 20 frames, the detected pressing mode is a downward key, and the number of times of continuous pressing is 2; searching a next menu animation frame index of the current menu item, wherein the previous menu item is 4, so that 4+1 is less than or equal to 5, and the next menu animation frame index is (5-1) 20 is 80 frames; since the number of times of being continuously pressed is 2, the next menu animation frame index is continuously searched and is the target menu animation frame index, and since 5+1 ═ 6 is greater than the total number of menu items 5, the target menu animation frame index is frame 0.
And 104, calculating all animation frame information from the current menu animation frame index to the target menu animation frame index according to the current menu animation frame index, the next menu animation frame index after each accumulation, the target menu animation frame index and the parameters, and switching the page from the current menu item to the target menu item according to all the animation frame information.
As an example, all animation frame information from the current menu animation frame index to the target menu animation frame index is calculated according to the following formula:
the line of the frame index is the frame index/(menu material width/animation frame width);
frame index (frame index row menu material width/animation frame width)
The x coordinate of the animation frame is the width of the animation frame and the column of the frame index;
animation frame y coordinate is animation frame height frame index line.
It should be noted that the x coordinate of the animation frame, the y coordinate of the animation frame, the width of the animation frame and the height of the animation frame in the position of the menu material picture can be displayed by the cropping positioning technology.
Therefore, the frame index value is increased or decreased at regular time, and the menu material picture display area is updated at the same time, so that the dynamic switching effect is achieved.
In summary, according to the method for switching pages of an intelligent device in the embodiment of the present invention, firstly, preset menu item materials are obtained, and the menu item materials are analyzed to obtain parameters corresponding to the menu item materials; then, obtaining a current menu item, and calculating a current menu animation frame index according to the current menu item and parameters; then, when a page switching instruction is obtained, obtaining the corresponding task number according to the page switching instruction, sequentially accumulating the current menu item to obtain the next menu animation frame index after each accumulation of the current menu animation frame index, stopping until the number of times corresponding to the task number is accumulated, and taking the next menu animation frame index obtained after stopping as the target menu animation frame index; finally, calculating all animation frame information from the current menu animation frame index to the target menu animation frame index according to the current menu animation frame index, the next menu animation frame index after each accumulation, the target menu animation frame index and the parameters, and switching the page from the current menu item to the target menu item according to all animation frame information; thereby greatly improving the stability of page switching.
In order to implement the foregoing embodiment, an embodiment of the present invention further provides a computer-readable storage medium, on which an intelligent device page switching program is stored, where the intelligent device page switching program, when executed by a processor, implements the intelligent device page switching method as described above.
According to the computer-readable storage medium of the embodiment of the invention, the intelligent device page switching program is stored, so that the processor can realize the intelligent device page switching method when executing the intelligent device page switching program; thereby greatly improving the stability of page switching.
In order to implement the foregoing embodiments, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where when the processor executes the computer program, the method for switching pages of the smart device as described above is implemented.
According to the computer equipment provided by the embodiment of the invention, the intelligent equipment page switching program is stored through the memory, so that the intelligent equipment page switching method is realized when the processor executes the intelligent equipment page switching program stored in the memory; thereby greatly improving the stability of page switching.
In order to implement the foregoing embodiment, an embodiment of the present invention further provides an intelligent device page switching apparatus, as shown in fig. 3, where the intelligent device page switching apparatus includes: the device comprises an acquisition module 10, a first calculation module 20, a second calculation module 30 and a switching module 40.
The acquisition module 10 is configured to acquire preset menu item materials, and analyze the menu item materials to acquire parameters corresponding to the menu item materials;
the first calculating module 20 is configured to obtain a current menu item, and calculate a current menu animation frame index according to the current menu item and a parameter;
the second calculating module 30 is configured to, when a page switching instruction is obtained, obtain a corresponding task number according to the page switching instruction, sequentially accumulate current menu items to obtain a next menu animation frame index after each accumulation of the current menu animation frame indexes, stop until the number of times corresponding to the task number is accumulated, and use the next menu animation frame index obtained after the stop as a target menu animation frame index;
the switching module 40 is configured to calculate all animation frame information from the current menu animation frame index to the target menu animation frame index according to the current menu animation frame index, the next menu animation frame index after each accumulation, the target menu animation frame index, and the parameter, and switch the page from the current menu item to the target menu item according to all animation frame information.
In some embodiments, as shown in fig. 4, the obtaining preset menu item materials further includes: the setting module 11 is used for acquiring the total number of menu items and the width of a menu material of each menu item; the animation production module 12 is configured to obtain a switching effect between each two adjacent menu items, and perform animation production on each menu item according to the switching effect between each two adjacent menu items, so as to obtain an animation frame number, an animation frame width, and an animation frame height corresponding to each menu item; and the storage module 13 is configured to perform determinant storage on the animation frame number corresponding to each menu item according to the sorting of each menu item to generate a menu item material, and use the total number of the menu items, the width of the menu material of each menu item, the animation frame number corresponding to each menu item, the width of each animation frame, and the height of each animation frame as parameters of the menu item material, where the animation frame numbers corresponding to each menu item are all equal.
In some embodiments, the current menu animation frame index is calculated according to the following formula:
Ci=(i-1)Fi
wherein, CiIndicating the current menu item frame index, i indicates the ith menu item, FiAnd showing the animation frame number corresponding to the ith menu item.
In some embodiments, the second calculation module 30 is further configured to:
judging whether the page switching instruction is a first page switching instruction or a second page switching instruction;
if the page switching instruction is a first page switching instruction, adding one to the current menu item, and judging whether the added current menu item is less than or equal to the total number of the menu items;
if yes, the next menu animation frame index is the animation frame number corresponding to the next menu item after the current menu item with one added is subtracted by one;
if not, the next menu animation frame index is the 0 th frame, and the frame is displayed circularly;
if the page switching instruction is a second page switching instruction, subtracting one from the current menu item, and judging whether the current menu item after subtracting one is greater than 0 or equal to 0;
if the index is larger than 0, the animation frame index of the next menu is that the current menu item after being reduced by one is firstly reduced by one and then multiplied by the animation frame number corresponding to the next menu item;
if the number is equal to 0, the animation frame index of the next menu is the animation frame number corresponding to the next menu item after the total number of the menu items is reduced by one.
In some embodiments, all animation frame information from the current menu animation frame index to the target menu animation frame index is calculated according to the following formula:
the line of the frame index is the frame index/(menu material width/animation frame width);
frame index (frame index row menu material width/animation frame width)
The x coordinate of the animation frame is the width of the animation frame and the column of the frame index;
animation frame y coordinate is animation frame height frame index line.
It should be noted that the above description about the page switching method of the intelligent device in fig. 1 is also applicable to the page switching apparatus of the intelligent device, and is not repeated herein.
In summary, according to the page switching device of the intelligent device in the embodiment of the present invention, the setting acquisition module is configured to acquire preset menu item materials, and analyze the menu item materials to acquire parameters corresponding to the menu item materials; the first calculation module is used for acquiring a current menu item and calculating a current menu animation frame index according to the current menu item and parameters; the second calculation module is used for acquiring the corresponding task number according to the page switching instruction when the page switching instruction is acquired, sequentially accumulating the current menu item to acquire the next menu animation frame index after each accumulation of the current menu animation frame index until the number of times corresponding to the task number is accumulated, and taking the next menu animation frame index acquired after the stop as the target menu animation frame index; the switching module is used for calculating all animation frame information from the current menu animation frame index to the target menu animation frame index according to the current menu animation frame index, the next menu animation frame index after each accumulation, the target menu animation frame index and the parameters, and switching the page from the current menu item to the target menu item according to all animation frame information; thereby greatly improving the stability of page switching.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
In the description of the present invention, it is to be understood that the terms "first", "second" and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above should not be understood to necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (10)

1. A method for switching pages of intelligent equipment is characterized by comprising the following steps:
acquiring preset menu item materials, and analyzing the menu item materials to acquire parameters corresponding to the menu item materials;
acquiring a current menu item, and calculating a current menu animation frame index according to the current menu item and the parameters;
when a page switching instruction is acquired, acquiring the corresponding task number according to the page switching instruction, sequentially accumulating the current menu item to acquire the next menu animation frame index after each accumulation of the current menu animation frame index, stopping until the number of times corresponding to the task number is accumulated, and taking the next menu animation frame index acquired after stopping as a target menu animation frame index;
and calculating all animation frame information from the current menu animation frame index to the target menu animation frame index according to the current menu animation frame index, the next menu animation frame index after each accumulation, the target menu animation frame index and the parameters, and switching the page from the current menu item to the target menu item according to all animation frame information.
2. The intelligent device page switching method according to claim 1, wherein menu item materials are preset according to the following steps:
acquiring the total number of menu items and the width of menu materials of each menu item;
acquiring a switching effect between every two adjacent menu items, and animating every menu item according to the switching effect between every two adjacent menu items to acquire the number of animation frames, the width of every animation frame and the height of every animation frame corresponding to every menu item;
and performing determinant storage on animation frame numbers corresponding to each menu item according to the sequence of each menu item to generate menu item materials, and taking the total number of the menu items, the width of the menu material of each menu item, the animation frame number corresponding to each menu item, the width of each animation frame and the height of each animation frame as parameters of the menu item materials, wherein the animation frame numbers corresponding to each menu item are equal.
3. The smart device page turning method of claim 2, wherein the current menu animation frame index is calculated according to the following formula:
Ci=(i-1)Fi
wherein, CiIndicating the current menu item frame index, i indicates the ith menu item, FiAnd showing the animation frame number corresponding to the ith menu item.
4. The method for switching pages of an intelligent device according to claim 2, wherein sequentially accumulating the current menu item to obtain a next menu animation frame index after each accumulation of the current menu animation frame indexes comprises:
judging whether the page switching instruction is a first page switching instruction or a second page switching instruction;
if the page switching instruction is a first page switching instruction, adding one to the current menu item, and judging whether the added current menu item is less than or equal to the total number of the menu items;
if yes, the next menu animation frame index is the animation frame number corresponding to the next menu item after the current menu item with one added is subtracted by one;
if not, the next menu animation frame index is the 0 th frame, and the frame is displayed circularly;
if the page switching instruction is a second page switching instruction, subtracting one from the current menu item, and judging whether the current menu item after subtracting one is greater than 0 or equal to 0;
if the index is larger than 0, the animation frame index of the next menu is that the current menu item after being reduced by one is firstly reduced by one and then multiplied by the animation frame number corresponding to the next menu item;
if the number is equal to 0, the animation frame index of the next menu is the animation frame number corresponding to the next menu item after the total number of the menu items is reduced by one.
5. The smart device page switching method of claim 4, wherein all animation frame information from the current menu animation frame index to the target menu animation frame index is calculated according to the following formula:
the line of the frame index is the frame index/(menu material width/animation frame width);
frame index (frame index row menu material width/animation frame width)
The x coordinate of the animation frame is the width of the animation frame and the column of the frame index;
animation frame y coordinate is animation frame height frame index line.
6. A computer-readable storage medium having stored thereon a smart device page switching program which, when executed by a processor, implements the smart device page switching method according to any one of claims 1 to 5.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor, when executing the program, implements the smart device page switching method of any of claims 1-5.
8. The utility model provides a smart machine page auto-change over device which characterized in that includes:
the acquisition module is used for acquiring preset menu item materials and analyzing the menu item materials to acquire parameters corresponding to the menu item materials;
the first calculation module is used for acquiring a current menu item and calculating a current menu animation frame index according to the current menu item and the parameters;
the second calculation module is used for acquiring the corresponding task number according to the page switching instruction when the page switching instruction is acquired, sequentially accumulating the current menu item to acquire the next menu animation frame index accumulated each time of the current menu animation frame index, stopping until the number of times corresponding to the task number is accumulated, and taking the next menu animation frame index acquired after stopping as the target menu animation frame index;
and the switching module is used for calculating all animation frame information from the current menu animation frame index to the target menu animation frame index according to the current menu animation frame index, the next menu animation frame index after each accumulation, the target menu animation frame index and the parameters, and switching a page from the current menu item to the target menu item according to all animation frame information.
9. The device for switching pages of intelligent equipment according to claim 8, wherein, when acquiring preset menu item materials, the device further comprises:
the setting module is used for acquiring the total number of menu items and the width of a menu material of each menu item;
the animation production module is used for acquiring the switching effect between every two adjacent menu items and carrying out animation production on each menu item according to the switching effect between every two adjacent menu items so as to acquire the number of animation frames, the width of each animation frame and the height of each animation frame corresponding to each menu item;
and the storage module is used for performing determinant storage on the animation frame number corresponding to each menu item according to the sequence of each menu item so as to generate a menu item material, and taking the total number of the menu items, the width of the menu material of each menu item, the animation frame number corresponding to each menu item, the width of each animation frame and the height of each animation frame as parameters of the menu item material, wherein the animation frame numbers corresponding to each menu item are equal.
10. The smart device page turning apparatus of claim 8, wherein the second computing module is further to:
judging whether the page switching instruction is a first page switching instruction or a second page switching instruction;
if the page switching instruction is a first page switching instruction, adding one to the current menu item, and judging whether the added current menu item is less than or equal to the total number of the menu items;
if yes, the next menu animation frame index is the animation frame number corresponding to the next menu item after the current menu item with one added is subtracted by one;
if not, the next menu animation frame index is the 0 th frame, and the frame is displayed circularly;
if the page switching instruction is a second page switching instruction, subtracting one from the current menu item, and judging whether the current menu item after subtracting one is greater than 0 or equal to 0;
if the index is larger than 0, the animation frame index of the next menu is that the current menu item after being reduced by one is firstly reduced by one and then multiplied by the animation frame number corresponding to the next menu item;
if the number is equal to 0, the animation frame index of the next menu is the animation frame number corresponding to the next menu item after the total number of the menu items is reduced by one.
CN202110154796.6A 2021-02-04 2021-02-04 Page switching method and device for intelligent equipment Active CN112947817B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110154796.6A CN112947817B (en) 2021-02-04 2021-02-04 Page switching method and device for intelligent equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110154796.6A CN112947817B (en) 2021-02-04 2021-02-04 Page switching method and device for intelligent equipment

Publications (2)

Publication Number Publication Date
CN112947817A true CN112947817A (en) 2021-06-11
CN112947817B CN112947817B (en) 2023-06-09

Family

ID=76243854

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110154796.6A Active CN112947817B (en) 2021-02-04 2021-02-04 Page switching method and device for intelligent equipment

Country Status (1)

Country Link
CN (1) CN112947817B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101155276A (en) * 2006-09-28 2008-04-02 深圳Tcl新技术有限公司 Display device for function menu dynamic switch and its implementing method
CN101401130A (en) * 2006-03-10 2009-04-01 尼禄股份公司 Apparatus and method for providing a sequence of video frames, apparatus and method for providing a scene model, scene model, apparatus and method for creating a menu structure and computer program
US20110096090A1 (en) * 2009-10-28 2011-04-28 Wistron Corporation Display device and method for animating an on-screen display menu
WO2014075553A1 (en) * 2012-11-13 2014-05-22 Tencent Technology (Shenzhen) Company Limited Page switching method and apparatus
CN106792252A (en) * 2016-11-16 2017-05-31 深圳Tcl数字技术有限公司 Smart machine page switching method and device
CN108845777A (en) * 2018-06-11 2018-11-20 广州酷狗计算机科技有限公司 The method and apparatus for playing frame animation

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101401130A (en) * 2006-03-10 2009-04-01 尼禄股份公司 Apparatus and method for providing a sequence of video frames, apparatus and method for providing a scene model, scene model, apparatus and method for creating a menu structure and computer program
CN101155276A (en) * 2006-09-28 2008-04-02 深圳Tcl新技术有限公司 Display device for function menu dynamic switch and its implementing method
US20110096090A1 (en) * 2009-10-28 2011-04-28 Wistron Corporation Display device and method for animating an on-screen display menu
WO2014075553A1 (en) * 2012-11-13 2014-05-22 Tencent Technology (Shenzhen) Company Limited Page switching method and apparatus
CN106792252A (en) * 2016-11-16 2017-05-31 深圳Tcl数字技术有限公司 Smart machine page switching method and device
CN108845777A (en) * 2018-06-11 2018-11-20 广州酷狗计算机科技有限公司 The method and apparatus for playing frame animation

Also Published As

Publication number Publication date
CN112947817B (en) 2023-06-09

Similar Documents

Publication Publication Date Title
CN102129693B (en) Image vision significance calculation method based on color histogram and global contrast
US8711152B2 (en) Animation control apparatus, animation control method, and non-transitory computer readable recording medium
JP4413844B2 (en) Image display control device
US8117204B2 (en) Video browser for navigating linear video on small display devices using a similarity-based navigation hierarchy of temporally ordered video keyframes with short navigation paths
US10313746B2 (en) Server, client and video processing method
CN104394422A (en) Video segmentation point acquisition method and device
US9131227B2 (en) Computing device with video analyzing function and video analyzing method
AU2008299578B2 (en) A system and method for capturing digital images
CN111462283B (en) Method, medium, device and apparatus for playing large number of same character animations
CN112037160B (en) Image processing method, device and equipment
US20110242107A1 (en) Information display apparatus and computer-readable medium
CN111158840B (en) Image carousel method and device
CN113592714A (en) Image amplification method, module and system
CN111462278B (en) Depth-based material sequencing rendering method, medium, equipment and device
CN112947817B (en) Page switching method and device for intelligent equipment
CN106998489A (en) A kind of focus is crossed the border searching method and device
CN104318236B (en) A kind of method and system for obtaining image local feature
CN111062924A (en) Image processing method, device, terminal and storage medium
JPH08137908A (en) Method and device for retrieving picture
CN110580274B (en) GIS data rendering method
CN114797109A (en) Object editing method and device, electronic equipment and storage medium
CN114048112A (en) Display method and device and electronic equipment
CN109101143B (en) Focus top setting method, storage medium, equipment and system suitable for page scrolling
CN109714389A (en) Exchange method, device and the storage medium of message polymerization are carried out based on block chain DApp
Qiu et al. Multi-operator image retargeting based on automatic quality assessment

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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Huang Shengli

Inventor after: Lin Xu

Inventor after: Zhang Jingfeng

Inventor after: Lin Epo

Inventor after: Gong Fei

Inventor after: Huang Jianfeng

Inventor before: Huang Shengli

Inventor before: Lin Epo

Inventor before: Gong Fei

Inventor before: Huang Jianfeng

Inventor before: Li Youqing

GR01 Patent grant
GR01 Patent grant