CN112947817B - Page switching method and device for intelligent equipment - Google Patents

Page switching method and device for intelligent equipment Download PDF

Info

Publication number
CN112947817B
CN112947817B CN202110154796.6A CN202110154796A CN112947817B CN 112947817 B CN112947817 B CN 112947817B CN 202110154796 A CN202110154796 A CN 202110154796A CN 112947817 B CN112947817 B CN 112947817B
Authority
CN
China
Prior art keywords
menu
animation frame
menu item
animation
frame index
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.)
Active
Application number
CN202110154796.6A
Other languages
Chinese (zh)
Other versions
CN112947817A (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 acquired, acquiring the corresponding task number according to the page switching instruction, sequentially accumulating the current menu items 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; calculating all animation frame information from the current menu animation frame index to the target menu animation frame index, and switching pages 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

Page switching method and device for intelligent equipment
Technical Field
The present invention relates to the field of page switching technologies, and in particular, to a method for switching pages of an intelligent device, a computer readable storage medium, a computer device, and a device for switching pages of an intelligent device.
Background
In the related art, when intelligent equipment with a full liquid crystal instrument is used, in order to improve the technological sense of instrument interface design, the menu switching effect is usually required to be optimized so as to increase the dynamic effect with high intuitiveness and technological sense, however, the existing dynamic switching effect is usually realized by controlling the coordinates, the size, the color value, the rotation angle and the like of menu items through codes, the consistency of design and realization is difficult to realize due to the difference of a design platform and an operation platform, the dynamic switching effect is required to be realized through specific codes, the menu switching effect cannot be compatible with other menu design and use, the software reusability cannot be ensured, and the stability of instrument software is influenced.
Disclosure of Invention
The present invention aims to solve at least to some extent one of the technical problems in the above-described technology. Therefore, an object of the present invention is to provide a method for switching pages of an intelligent device, which is capable of realizing dynamic switching of a menu according to frame indexes by presetting menu item materials, without modifying software codes, with low cost and multiplexing, thereby greatly improving the stability of page switching.
A second object of the present 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 an intelligent device page switching device.
In order to achieve the above objective, an embodiment of a first aspect of the present invention provides a method for switching pages 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 items 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 pages from the current menu item to the target menu item according to all animation frame information.
According to the intelligent equipment 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, acquiring 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 acquired, acquiring the corresponding task number according to the page switching instruction, sequentially accumulating the current menu items 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; 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 pages 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 intelligent device page switching method provided by the embodiment of the invention can also have the following additional technical characteristics:
Optionally, the menu item material is preset according to the following steps: acquiring the total number of menu items and the menu material width of each menu item; acquiring a switching effect between each adjacent menu item, and carrying out animation production on each menu item according to the switching effect between each adjacent menu item so as to acquire an animation frame number, an animation frame width and an animation frame height corresponding to each menu item; and storing the animation frame numbers corresponding to each menu item according to the ordering 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 numbers 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:
C i =(i-1)F i
wherein C is i Representing the current menu item frame index, i representing the ith menu item, F i And representing the number of animation frames corresponding to the ith menu item.
Optionally, the accumulating processing is sequentially performed on the current menu item to obtain a next menu animation frame index after each accumulation of the current menu animation frame index, 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 items, and judging whether the added current menu items are smaller than or equal to the total number of the menu items; if yes, the index of the animation frame of the next menu is that the current menu item after adding one is subtracted by one and then multiplied by the animation frame number corresponding to the next menu item; if not, the index of the next menu animation frame is the 0 th frame, so as to circularly display; if the page switching instruction is a second page switching instruction, subtracting one from the current menu item, and judging whether the subtracted current menu item is greater than 0 or equal to 0; if the menu animation frame index is larger than 0, the current menu item after the next menu animation frame index is subtracted by one and then multiplied by the animation frame number corresponding to the next menu item; if the number is equal to 0, the index of the animation frame of the next menu is that the total number of the menu items is subtracted by one and then multiplied by the number of animation frames corresponding to the next menu item.
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:
frame index line = frame index/(menu material width/animation frame width);
column of frame index = frame index- (row of frame index) menu material width/animation frame width
Animation frame x coordinate = animation frame width x frame index in the column;
animation frame y coordinate = animation frame height x frame index line.
To achieve the above object, a second aspect of the present invention provides a computer-readable storage medium having stored thereon a smart device page switching program which, when executed by a processor, implements a smart device page switching method as described above.
According to the computer readable storage medium, 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.
To achieve the above object, an embodiment of a third aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the above-mentioned intelligent device page switching method when executing the program.
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 processor realizes the intelligent equipment page switching method when executing the intelligent equipment page switching program stored on the memory; thereby greatly improving the stability of page switching.
To achieve the above object, an embodiment of a fourth aspect of the present invention provides an intelligent device page switching apparatus, 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 items 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 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 pages from the current menu item to the target menu item according to all animation frame information.
According to the intelligent equipment page switching device, 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 obtaining the current menu item and calculating the 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 items 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 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 pages 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 intelligent device page switching apparatus according to the above embodiment of the present invention may further have the following additional technical features:
optionally, the step of acquiring the preset menu item material further comprises: the setting module is used for obtaining the total number of menu items and the menu material width of each menu item; the animation production module is used for obtaining the switching effect between each adjacent menu item and carrying out animation production on each menu item according to the switching effect between each adjacent menu item so as to obtain the animation frame number, the animation frame width and the animation frame height corresponding to each menu item; the storage module is used for performing determinant storage on the animation frame numbers corresponding to each menu item according to the ordering of each menu item so as 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 numbers 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 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 items, and judging whether the added current menu items are smaller than or equal to the total number of the menu items; if yes, the index of the animation frame of the next menu is that the current menu item after adding one is subtracted by one and then multiplied by the animation frame number corresponding to the next menu item; if not, the index of the next menu animation frame is the 0 th frame, so as to circularly display; if the page switching instruction is a second page switching instruction, subtracting one from the current menu item, and judging whether the subtracted current menu item is greater than 0 or equal to 0; if the menu animation frame index is larger than 0, the current menu item after the next menu animation frame index is subtracted by one and then multiplied by the animation frame number corresponding to the next menu item; if the number is equal to 0, the index of the animation frame of the next menu is that the total number of the menu items is subtracted by one and then multiplied by the number of animation frames corresponding to the next menu item.
Drawings
FIG. 1 is a flow chart of a method for switching pages of an intelligent device according to an embodiment of the invention;
FIG. 2 is a flow diagram of setting menu item material according to one embodiment of the invention;
FIG. 3 is a block diagram of a smart device page switching apparatus according to an embodiment of the present invention;
fig. 4 is a block schematic diagram of a smart device page switching apparatus according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
In the related art, when the existing full-liquid crystal instrument performs dynamic menu switching, the full-liquid crystal instrument is generally: firstly, a UI designer designs materials and dynamic effect definitions of menu items, secondly, the materials of the menu items are displayed in a liquid crystal screen in sequence, thirdly, when a key is operated, the menu items are judged to be switched up and down, according to the dynamic effect definitions provided by the UI designer, the coordinates, the size, the color value, the rotation angle and the like of the menu items are controlled through codes to realize switching dynamic effects, and fourthly, after the instrument menu is switched to the next menu item, the instrument menu is updated; because of the difference between the design platform and the operation platform, the consistency of design and implementation is difficult to realize, a specific code is required to realize a dynamic switching effect, the design and the use of other menus cannot be compatible, the reusability of software cannot be ensured, and the stability of instrument software is influenced; firstly, acquiring preset menu item materials, and analyzing the menu item materials to acquire parameters corresponding to the menu item materials; then, acquiring 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 acquired, acquiring the corresponding task number according to the page switching instruction, sequentially accumulating the current menu items 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; 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 pages 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 all-liquid crystal instrument only by making materials and dynamic switching definition by an interface designer according to specific rules in advance 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 involve hardware modification, has low implementation cost, can be reused for subsequent UI design modification, and can be directly applied to various instrument platforms by adjusting animation frame rate, thereby reducing research and development cost.
In order that the above-described aspects may be better understood, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention may 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 above technical solutions, the following detailed description will refer to the accompanying drawings and specific embodiments.
Fig. 1 is a flow chart of a method for switching pages of an intelligent device according to an embodiment of the present invention, as shown in fig. 1, the method for switching pages of the 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 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 menu material width of each menu item.
It should be noted that, the total number of menu items and the image information corresponding to each menu item may be custom set by the UI designer according to the design requirement, and the menu material width of each menu item may be obtained through the image information corresponding to each menu item.
S202, acquiring a switching effect between each adjacent menu item, and carrying out animation production on each menu item according to the switching effect between each adjacent menu item so as to acquire an animation frame number, an animation frame width and an animation frame height corresponding to each menu item.
That is, the UI designer can make each menu item switching effect according to the design requirement, make the switching effect of the last menu item switching to the first menu item, that is, the first frame image and the last frame image keep consistent, realize the end-to-end effect of the whole animation process, and save the frame number and the size of the single frame image of the whole animation process.
S203, determinant storage is carried out on the animation frame numbers corresponding to each menu item according to the ordering of each menu item so as to generate menu item materials, and the total number of the menu items, the width of the menu material of each menu item, the animation frame numbers corresponding to each menu item, the width of each animation frame and the height of each animation frame are taken as parameters of the menu item materials, wherein the animation frame numbers corresponding to each menu item are equal.
That is, after the overall switching effect animation is completed, the animation sequence frames are output through the tool, and are sequentially arranged according to the specific number of rows and columns to generate the menu item materials.
As one example, the menu animation sequence frame arrangement is shown in Table one below:
Figure BDA0002934232450000061
step 102, obtaining the current menu item, and calculating the current menu animation frame index according to the current menu item and the parameters.
As one example, the current menu animation frame index is calculated according to the following formula:
C i =(i-1)F i
wherein C is i Representing the current menu item frame index, i representing the ith menu item, F i And representing the number of animation frames corresponding to the ith menu item.
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 current menu item frame index.
Step 103, when the page switching instruction is acquired, acquiring the corresponding task number according to the page switching instruction, sequentially accumulating the current menu items 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 the target menu animation frame index.
As an example, sequentially accumulating the current menu items to obtain a next menu animation frame index after each accumulation of the current menu animation frame index, 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, the current menu item is increased by one, and whether the added current menu item is smaller than or equal to the total number of the menu items is judged;
if yes, the index of the animation frame of the next menu is that the current menu item after adding one is subtracted by one and then multiplied by the animation frame number corresponding to the next menu item;
if not, the index of the next menu animation frame is the 0 th frame, so as to circularly display;
if the page switching instruction is a second page switching instruction, the current menu item is reduced by one, and whether the reduced current menu item is larger than 0 or equal to 0 is judged;
if the menu animation frame index is larger than 0, the current menu item after the next menu animation frame index is subtracted by one and then multiplied by the animation frame number corresponding to the next menu item;
if the number is equal to 0, the index of the animation frame of the next menu is that the total number of the menu items is subtracted by one and then multiplied by the number of animation frames corresponding to the next menu item.
It should be noted that, the page switching instruction is obtained by the user pressing a key; that is, by capturing whether a key is pressed and the number of times of being pressed continuously, and acquiring a page switching instruction when the key is pressed is captured, the number of times of being pressed continuously is taken as the number of tasks.
As a specific embodiment, the page switch instruction has two pressing modes, one is a downward key and the other is an upward key; when the detected pressing mode is a downward key, enabling the current menu item +1, and if the current menu item +1 is smaller than or equal to the total number of the menu items, enabling the index of the animation frame of the next menu to be (the current menu item +1-1) the number of animation frames corresponding to the next menu item; if the current menu item +1 is greater than the total number of menu items, the next menu animation frame index is set to the 0 th frame, i.e., the loop display.
When the detected pressing mode is an upward key, enabling the current menu item-1, and if the current menu item-1 is larger than 0, enabling the index of the animation frame of the next menu to be (the current menu item-1-1) the number of animation frames corresponding to the next menu item; if the current menu item-1 is equal to 0, the index of the animation frame of the next menu is (total number of menu items-1) the number of animation frames corresponding to the next menu item; thereby realizing the update of the current menu item to the next menu item in a circulating way.
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 manner is a down key, and the number of times of continuous pressing is 2; searching the index of the next menu animation frame of the current menu item, wherein 4+1=5 is less than or equal to the total number of the menu items 5 because the previous menu item is 4, and the index of the next menu animation frame is (5-1) ×20=80 frames; since the number of consecutive presses is 2, the search for the next menu animation frame index, which is the target menu animation frame index, is continued, and since 5+1=6 is greater than the total number of menu items of 5, the target menu animation frame index is the 0 th frame.
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 animation frame information.
As one 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:
Frame index line = frame index/(menu material width/animation frame width);
column of frame index = frame index- (row of frame index) menu material width/animation frame width
Animation frame x coordinate = animation frame width x frame index in the column;
animation frame y coordinate = animation frame height x frame index line.
It should be noted that, by clipping and positioning technology, 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 menu material picture position can be displayed.
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 the page of the intelligent device in the embodiment of the invention, firstly, the preset menu item materials are obtained, and the menu item materials are analyzed to obtain the parameters corresponding to the menu item materials; then, acquiring 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 acquired, acquiring the corresponding task number according to the page switching instruction, sequentially accumulating the current menu items 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; 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 pages 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 achieve the above embodiments, the embodiments of the present invention further provide a computer readable storage medium having stored thereon a smart device page switching program that, when executed by a processor, implements a smart device page switching method as described above.
According to the computer readable storage medium, 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 above embodiment, the embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the above-mentioned intelligent device page switching method when executing the program.
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 processor realizes the intelligent equipment page switching method when executing the intelligent equipment page switching program stored on the memory; thereby greatly improving the stability of page switching.
In order to implement the above embodiment, the 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 acquiring 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 calculation 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 parameters;
the second calculation module 30 is configured to, when a page switching instruction is acquired, acquire a corresponding task number according to the page switching instruction, sequentially perform accumulation processing on a current menu item to acquire a next menu animation frame index after each accumulation of the current menu animation frame index, stop until a number of times corresponding to the task number is accumulated, and use the next menu animation frame index acquired 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 parameters, 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, when acquiring the preset menu item material, the method further includes: a setting module 11, configured to obtain a total number of menu items and a menu material width of each menu item; the animation production module 12 is configured to obtain a switching effect between each adjacent menu item, and perform animation production on each menu item according to the switching effect between each adjacent menu item, so as to obtain an animation frame number, an animation frame width and an animation frame height corresponding to each menu item; the storage module 13 is configured to store the animation frame numbers corresponding to each menu item according to the ranking of each menu item, so as to generate a menu item material, and take the total number of menu items, the width of the menu material of each menu item, the animation frame numbers 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 equal.
In some embodiments, the current menu animation frame index is calculated according to the following formula:
C i =(i-1)F i
wherein C is i Representing the current menu item frame index, i representing the ith menu item, F i And representing the number of animation frames corresponding to the ith menu item.
In some embodiments, the second computing module 30 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, the current menu item is increased by one, and whether the added current menu item is smaller than or equal to the total number of the menu items is judged;
if yes, the index of the animation frame of the next menu is that the current menu item after adding one is subtracted by one and then multiplied by the animation frame number corresponding to the next menu item;
if not, the index of the next menu animation frame is the 0 th frame, so as to circularly display;
if the page switching instruction is a second page switching instruction, the current menu item is reduced by one, and whether the reduced current menu item is larger than 0 or equal to 0 is judged;
if the menu animation frame index is larger than 0, the current menu item after the next menu animation frame index is subtracted by one and then multiplied by the animation frame number corresponding to the next menu item;
if the number is equal to 0, the index of the animation frame of the next menu is that the total number of the menu items is subtracted by one and then multiplied by the number of animation frames corresponding to the next menu item.
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:
Frame index line = frame index/(menu material width/animation frame width);
column of frame index = frame index- (row of frame index) menu material width/animation frame width
Animation frame x coordinate = animation frame width x frame index in the column;
animation frame y coordinate = animation frame height x frame index line.
It should be noted that the above description about the method for switching pages of the smart device in fig. 1 is also applicable to the device for switching pages of the smart device, which is not described herein.
In summary, according to the intelligent device page switching apparatus of the embodiment of the present invention, the acquiring 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 obtaining the current menu item and calculating the 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 items 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 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 pages from the current menu item to the target menu item according to all animation frame information; thereby greatly improving the stability of page switching.
It will be appreciated by those skilled in the art that 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 use of the words first, second, third, etc. do not denote any order. 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. It is therefore intended that the following claims be interpreted as including the 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 modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
In the description of the present invention, it should 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 a relative importance or number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature. In the description of the present invention, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured," and the like are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communicated with the inside of two elements or the interaction relationship of the two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
In the present invention, unless expressly stated or limited otherwise, a first feature "up" or "down" a second feature may be the first and second features in direct contact, or the first and second features in indirect contact via an intervening medium. Moreover, a first feature being "above," "over" and "on" a second feature may be a first feature being directly above or obliquely above the second feature, or simply indicating that the first feature is level higher than the second feature. The first feature being "under", "below" and "beneath" the second feature may be the first feature being directly under or obliquely below the second feature, or simply indicating that the first feature is less level than the second feature.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means 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 present invention. In this specification, schematic representations of the above terms should not be understood as necessarily being directed 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, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.

Claims (7)

1. The intelligent equipment page switching method is characterized by comprising the following steps of:
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 items 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;
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 pages from the current menu item to the target menu item according to all animation frame information;
Wherein the menu item material is preset according to the following steps:
acquiring the total number of menu items and the menu material width of each menu item;
acquiring a switching effect between each adjacent menu item, and carrying out animation production on each menu item according to the switching effect between each adjacent menu item so as to acquire an animation frame number, an animation frame width and an animation frame height corresponding to each menu item;
performing determinant storage on the animation frame numbers corresponding to each menu item according to the ordering of each menu item so as 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 numbers 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;
wherein, calculate the current menu animation frame index according to the following formula:
C i =(i-1)F i
wherein C is i Representing the current menu item frame index, i representing the ith menu item, F i And representing the number of animation frames corresponding to the ith menu item.
2. The smart device page switching method of claim 1, wherein sequentially accumulating the current menu items to obtain a next menu animation frame index after each accumulation of the current menu animation frame index, 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 items, and judging whether the added current menu items are smaller than or equal to the total number of the menu items;
if yes, the index of the animation frame of the next menu is that the current menu item after adding one is subtracted by one and then multiplied by the animation frame number corresponding to the next menu item;
if not, the index of the next menu animation frame is the 0 th frame, so as to circularly display;
if the page switching instruction is a second page switching instruction, subtracting one from the current menu item, and judging whether the subtracted current menu item is greater than 0 or equal to 0;
if the menu animation frame index is larger than 0, the current menu item after the next menu animation frame index is subtracted by one and then multiplied by the animation frame number corresponding to the next menu item;
if the number is equal to 0, the index of the animation frame of the next menu is that the total number of the menu items is subtracted by one and then multiplied by the number of animation frames corresponding to the next menu item.
3. The smart device page switching method of claim 2, 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:
Frame index line = frame index/(menu material width/animation frame width);
column of frame index = frame index- (row of frame index) menu material width/animation frame width
Animation frame x coordinate = animation frame width x frame index in the column;
animation frame y coordinate = animation frame height x frame index line.
4. 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 of any of claims 1-3.
5. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the smart device page switching method of any of claims 1-3 when the program is executed by the processor.
6. An intelligent device page switching device, which is characterized by comprising:
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 items 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;
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 pages from the current menu item to the target menu item according to all animation frame information;
the method for acquiring the preset menu item materials further comprises the following steps:
the setting module is used for obtaining the total number of menu items and the menu material width of each menu item;
the animation production module is used for obtaining the switching effect between each adjacent menu item and carrying out animation production on each menu item according to the switching effect between each adjacent menu item so as to obtain the animation frame number, the animation frame width and the animation frame height corresponding to each menu item;
The storage module is used for performing determinant storage on the animation frame numbers corresponding to each menu item according to the ordering of each menu item so as to generate menu item materials, and taking the total number of the menu items, the menu material width of each menu item, the animation frame numbers corresponding to each menu item, the animation frame width and the animation frame height as parameters of the menu item materials, wherein the animation frame numbers corresponding to each menu item are equal;
wherein, calculate the current menu animation frame index according to the following formula:
C i =(i-1)F i
wherein C is i Representing the current menu item frame index, i representing the ith menu item, F i And representing the number of animation frames corresponding to the ith menu item.
7. The smart device page switching apparatus of claim 6 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 items, and judging whether the added current menu items are smaller than or equal to the total number of the menu items;
if yes, the index of the animation frame of the next menu is that the current menu item after adding one is subtracted by one and then multiplied by the animation frame number corresponding to the next menu item;
If not, the index of the next menu animation frame is the 0 th frame, so as to circularly display;
if the page switching instruction is a second page switching instruction, subtracting one from the current menu item, and judging whether the subtracted current menu item is greater than 0 or equal to 0;
if the menu animation frame index is larger than 0, the current menu item after the next menu animation frame index is subtracted by one and then multiplied by the animation frame number corresponding to the next menu item;
if the number is equal to 0, the index of the animation frame of the next menu is that the total number of the menu items is subtracted by one and then multiplied by the number of animation frames corresponding to the next menu item.
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 CN112947817A (en) 2021-06-11
CN112947817B true 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 (5)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI408958B (en) * 2009-10-28 2013-09-11 Wistron Corp Display device and method of dynamically displaying osd menu

Patent Citations (5)

* 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
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
CN112947817A (en) 2021-06-11

Similar Documents

Publication Publication Date Title
US8711152B2 (en) Animation control apparatus, animation control method, and non-transitory computer readable recording medium
US9131227B2 (en) Computing device with video analyzing function and video analyzing method
EP2565874B1 (en) Image editing apparatus, image editing method, and storage medium storing image editing control program
CN112037160B (en) Image processing method, device and equipment
GB2541582A (en) Hint based spot healing techniques
CN107608731A (en) A kind of picture loading method and device
CN109992266A (en) A kind for the treatment of method and apparatus of interface element
US20180174340A1 (en) Automatic Creation of Media Collages
KR20200038414A (en) Information processing apparatus, information processing method, non-transitory computer-readable storage medium
CN114071223A (en) Optical flow-based video interpolation frame generation method, storage medium and terminal equipment
CN112947817B (en) Page switching method and device for intelligent equipment
CN106708478B (en) Scroll view display method and apparatus
CN106998489A (en) A kind of focus is crossed the border searching method and device
CN111158840B (en) Image carousel method and device
CN112822394A (en) Display control method and device, electronic equipment and readable storage medium
CN105678696A (en) Image acquisition method and electronic equipment
CN108989704B (en) Image generation method and device and terminal equipment
CN107608589B (en) Video production method and mobile terminal
CN112698771B (en) Display control method, device, electronic equipment and storage medium
CN109101143B (en) Focus top setting method, storage medium, equipment and system suitable for page scrolling
CN112162805B (en) Screenshot method and device and electronic equipment
CN114302009A (en) Video processing method, video processing device, electronic equipment and medium
JP5957026B2 (en) Input region generation method, generation device, and generation program
CN113056724A (en) Page skipping method and device, storage medium and electronic equipment
CN112770099B (en) Multimedia playing method, device, terminal 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
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