Disclosure of Invention
The embodiment of the invention provides a method and a device for moving a focus in a program item display interface and a terminal device, which can solve the problem that the focus in the program item display interface can not be traced back, and improve user experience.
In a first aspect, a method for moving a focus in a program entry display interface is provided, where the program entry display interface includes a two-dimensional program menu arranged in channel and program playing time order, and the method includes:
receiving a first direction control instruction for instructing a focus to move in a channel arrangement direction when the focus is on a first program entry in a first channel;
controlling the focus to move to a second program item in a second channel, wherein the new focus position corresponding to the second program item is calculated according to the position of a predetermined reference coordinate program item;
receiving a first direction control instruction for instructing a focus to move in a channel arrangement direction when the focus is on the second program entry;
and controlling the focus to move to a third program item in a third channel, wherein the position of the new focus corresponding to the third program item is calculated according to the position of the reference coordinate program item.
Optionally, the method further includes:
when the focus is in the third program item, receiving a second direction control instruction for indicating the focus to move along the arrangement direction of the playing time;
controlling the focus to move to a fourth program entry in the third channel that is different from the third program entry, and updating the reference coordinate program entry to the fourth program entry;
receiving the first direction control instruction for instructing a focus to move in a channel arrangement direction when the focus is on the fourth program entry;
and controlling the focus to move to a fifth program item in a fourth channel, wherein the new focus position of the fifth program item is calculated according to the position of the updated reference coordinate program item.
Optionally, the new focus position corresponding to the second program entry is calculated according to the position of the program entry at the predetermined reference coordinate, and includes:
when the program end time of a second program entry in a second channel is determined to be between the program playing time and the program end time of the reference coordinate program entry, calculating an index value of the second program entry, and generating the new focus position, wherein the new focus position comprises the channel number of the second channel and the index value of the second program entry.
Optionally, the new focus position corresponding to the second program entry is calculated according to the position of the program entry at the predetermined reference coordinate, and includes:
when the program playing time of the program entry with the reference coordinate is determined to be between the program playing time and the program ending time of a second program entry in a second channel, calculating an index value of the second program entry, and generating the new focus position, wherein the new focus position comprises a channel number of the second channel and the index value of the second program entry.
Optionally, before receiving the direction control instruction for indicating the focus movement when the focus is on the first program entry in the first channel, the method further includes:
judging whether a program item with a predetermined reference coordinate exists or not;
if yes, receiving a direction control instruction for indicating the movement of the focus;
and if not, determining the first program item in the first channel where the focus is positioned as the reference coordinate program item.
In the above scheme, when the focus moves along the channel arrangement direction, a new focus position can be determined according to the position of the reference coordinate program entry, so that the focus moves by referring to the position of the same reference coordinate program entry every time when the focus moves between channels, and in the process of moving the focus, as the position of the reference program entry remains unchanged, the focus can be guaranteed to move to the same program entry when moving from the previous channel or the next channel of the current channel to the current channel, the problems that the focus moves to generate larger offset and the focus moves to be unable to trace back in the display interface of the program entry are solved, and user experience is improved.
In a second aspect, there is provided an apparatus for moving a focus in a program entry display interface including a two-dimensional program menu arranged in channel and program play time order, the apparatus comprising:
a receiving unit configured to receive a first direction control instruction for instructing a focus to move in a channel arrangement direction when the focus is on a first program entry in a first channel;
the processing unit is used for controlling the focus to move to a second program item in a second channel, and the position of the new focus corresponding to the second program item is calculated according to the position of a preset reference coordinate program item;
the receiving unit is further configured to receive a first direction control instruction for instructing a focus to move in a channel arrangement direction when the focus is on the second program item;
the processing unit is further configured to control the focus to move to a third program entry in a third channel, where a new focus position corresponding to the third program entry is calculated according to the position of the reference coordinate program entry.
Optionally, the method further includes:
the receiving unit is further configured to receive a second direction control instruction for instructing the focus to move along the program playing time arrangement direction when the focus is in the third program entry;
the processing unit is further configured to control the focus to move to a fourth program entry in the third channel that is different from the third program entry, and update the reference coordinate program entry to the fourth program entry.
Optionally, the processing unit is specifically configured to:
when the program end time of a second program entry in a second channel is determined to be between the program playing time and the program end time of the reference coordinate program entry, calculating an index value of the second program entry, and generating the new focus position, wherein the new focus position comprises the channel number of the second channel and the index value of the second program entry.
Optionally, the processing unit is specifically configured to:
when the program playing time of the program entry with the reference coordinate is determined to be between the program playing time and the program ending time of a second program entry in a second channel, calculating an index value of the second program entry, and generating the new focus position, wherein the new focus position comprises a channel number of the second channel and the index value of the second program entry.
Optionally, the method further includes: a judging unit for judging whether a predetermined reference coordinate program item exists;
if yes, receiving a direction control instruction for indicating the movement of the focus through the receiving unit;
and if not, determining the first program item in the first channel where the focus is located as the reference coordinate program item through the processing unit.
In a third aspect, a focus mobile device in a program entry display interface is provided, which includes a communication interface, a processor, a memory, and a bus; the memory is used for storing computer execution instructions, the processor is connected with the memory through the bus, and when the terminal device runs, the processor executes the computer execution instructions stored in the memory, so that the focus moving device in the program item display interface executes the method of the first aspect.
In a fourth aspect, there is provided a computer storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect.
In a fifth aspect, a terminal device is provided, which includes the focus moving apparatus in the program item display interface according to the second aspect or the third aspect.
It can be understood that any one of the terminal device, the focus moving apparatus in the program entry display interface, or the computer storage medium provided above is used to execute the method corresponding to the first aspect provided above, and therefore, the beneficial effects that can be achieved by the method according to the first aspect above and the beneficial effects of the solutions corresponding to the following specific embodiments may be referred to, and are not described herein again.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Currently, in an EPG (electronic program guide) function of a television, program entries are generally dynamically generated according to program time and content information. Because the start and end times of different programs of different channels are random, the position and length of the program entry corresponding to each program entry are randomly tiled (horizontally or column-wise tiling, wherein fig. 1 shows a horizontal tiling manner) in the whole time region, wherein each channel occupies one row in the display interface (corresponding to fig. 1, the channels are column-wise tiled when the time is horizontally tiled, i.e., the program entry corresponding to each channel occupies one row, or the channels are horizontally tiled when the time is vertically tiled, and the program entries of each channel occupy one column). Taking the time as horizontal tiling and the channel as column-wise tiling as an example, as shown in fig. 1, a display interface of program entries generally includes a two-dimensional program menu arranged in the order of channels and program playing time, where the program entry of each channel at least includes one program entry arranged according to time, where a start position of the program entry is used to indicate the program playing time, and an end position of the program entry is used to indicate the program ending time.
As shown in fig. 1, the display interface shows five channels (DC a-DC e), where each channel corresponds to one line (cable), and in the display interface, the program entries of each channel are displayed in a row, for example: program entries a0-a3 for DC a, program entries b0-b5 for DC b, program entries c0-c6 for DC c, program entries d0-d8 for DC d, program entries e0-e7 for DC e, wherein the program entries for each channel are arranged in chronological order, as shown in figure 1 for program entries between 3:00PM and 5:00PM, when the focus is at the position of a certain program entry, a Guide (Guide) of the program entry is shown on the display interface at the same time, which may include, for example, a channel identification for the program, and a broadcast time and profile, as shown, with focus on program entry a2, the channel identification of DCa is displayed on the upper left side of the display interface, the broadcast time of program item a2 is 29/34: 19PM-29/35:19PM is displayed on the upper side of the program item, and the content brief of program item a2 is displayed.
Since the random arrangement of the program entries is caused by the randomness of the program time duration in each channel, the program playing time and the program time duration corresponding to the program entries located in different channels are usually different, and thus, the program entries in the upper and lower channels are misaligned, as shown in fig. 1, for example, the end positions of a0 are not aligned with the end positions of b0 and c0, and further, the start positions of a1, b1 and c1 are also misaligned. Therefore, in moving the focus up and down, because of the problem of misplacement display of program items, there may be an offset after each movement, and after a plurality of offsets, the focus will be far from the initial focus position, and in extreme cases, the focus will eventually move to the page boundary.
Taking fig. 1 as an example, when the focus moves downward from a3 in the prior art, the focus is usually moved to b3 based on the program playing time on the left side of the program entry a 3; moving the focus to c3 with the program playing time on the left side of the program entry b3 as the reference when the focus moves downward from b 3; moving the focus to d3 based on the program playing time on the left side of the program entry c3 when the focus moves downward from c 3; when the focus moves downwards from d3, the focus is moved to e3 based on the program playing time on the left side of the program entry d 3; the path for moving the focus downward is a3-b3-c3-d3-e 3; at this time, if the focus moves upward from e3, the focus is moved to d1 based on the program playing time on the left side of the program entry e 3; the same reasoning again moves the focus upwards to c1, b0, a 0. Thus, the path for moving the focus upward is e3-d3-c1-b0-a0, and the position of the final focus cannot return to a 3. Therefore, the situation that the focus cannot be traced back can be seen when the reverse operation is carried out, and the user experience is influenced.
To solve the above problem, referring to fig. 2, an embodiment of the present application provides a method for moving a focus in a program entry display interface, including the following steps:
101. a focus movement instruction is received.
102. And when the focus is determined to be moved from the first program item of the current channel to another channel according to the focus moving instruction, calculating a new focus position according to the position of the program item of the predetermined reference coordinate.
Wherein the focal position may be identified by the channel number where the focal point is located and the index value of the program entry where the focal point is located in an embodiment of the present invention. Illustratively, a global variable channel Index (channel identifier) is recorded to store the channel number of the current focus (for example, the channels are tiled in the column direction, and the channel number may be the row number of the channel, or the channels are tiled in the horizontal direction, and the channel number may be the column number of the channel); recording a global variable program Index (program identifier) for storing a program Index value of a current focus; a global variable lastFocusProgram is recorded to hold the position as a reference coordinate program entry, which may include the channel number and program index value of the reference coordinate program entry.
Alternatively, as shown in fig. 1, when the focus moves up and down, the focus moving instruction indicates the focus moving instruction to determine to move the focus from the current channel to another channel; thus, the new focus position can be determined in two ways: in a first mode, when it is determined that the program end time of the second program entry of another channel is located between the program playing time and the program end time of the program entry of the reference coordinate, the index value of the second program entry is calculated, and the new focus position is generated, where the new focus position includes the channel number of the another channel and the index value of the second program entry. In a second mode, when the program playing time of the program entry with the reference coordinate is determined to be between the program playing time and the program ending time of the second program entry of the other channel, the index value of the second program entry is calculated, and the new focus position is generated, wherein the new focus position comprises the channel number of the other channel and the index value of the second program entry.
Specifically, the logic of the program code to calculate the new focus position is described as follows:
if all programs of another channel (target channel) are traversed, the programs can be traversed according to the time sequence
If the program end time of a certain program entry is in the time period between the program playing time and the program end time of the reference coordinate program entry, returning the index value of the program; or, if the program playing time of the reference coordinate program entry falls within the time period between the program playing time and the program ending time of a certain program, returning the index value of the program
The channel number channel Index may be automatically +1 or-1 depending on whether the moving direction is up or down, resulting in a channel number and an Index value, which may be set as a new focus position. The location lastFocusProgram of the reference coordinate program entry is not updated because the focus is moved up and down.
103. And moving the focus to a second program entry of another channel according to the new focus position, wherein the second program entry corresponds to the new focus position.
Illustratively, taking the example of moving the focus position at 3:50PM as follows, in the above manner, a1 is predetermined as a reference coordinate program entry, and since the program end time of b1 is located in the time period between the program broadcast time and the program end time of a1, when moving the focus from a1 down to another channel, the focus is moved to b1 according to the calculated focus position; since the program end time of c1 is in the time period between the program play time of a1 and the program end time, moving the focus from b1 down to another channel moves the focus to c1 according to the calculated focus position; since the program end time of d1, d2 is in the time period between the program play time of a1 and the program end time, and traversal is first facilitated to d1, moving the focus from c1 down to another channel moves the focus to d1 according to the calculated focus position; since the program end time of e3 is within the time period between the program play time of a1 and the program end time, moving the focus from d1 down to another channel moves the focus to e3 according to the calculated focus position; the moving path of the focus is: a1-b1-c1-d1-e 3.
Similarly, when the focus is moved up to another channel, since the program end time of d1 is in the time period between the program playing time of a1 and the program end time, when the focus is moved up from e3 to another channel, the focus is moved to d1 according to the calculated focus position; since the program end time of c1 is in the time period between the program play time of a1 and the program end time, moving the focus upward from d1 to another channel moves the focus to c1 according to the calculated focus position; since the program end time of b1 is within the time period between the program play time of a1 and the program end time, moving the focus downward from c1 moves the focus to b1 according to the calculated focus position; moving up again, moving the focus from b1 to a1, so when moving up to another channel, the path is: e3-d1-c1-b1-a 1.
Therefore, on one hand, when the focus moves up and down, the program in which the focus falls and the program in which the focus is initially located have no offset in the left-right direction, and the focus position can be guaranteed to be converged in the expected range of the user; on the other hand, the path of the focus moving upwards is opposite to the path of the focus moving downwards, namely the moving path of the focus is traceable, so that the user experience is improved.
In the above scheme, when the focus moves along the channel arrangement direction, a new focus position can be determined according to the position of the reference coordinate program entry, so that the focus moves by referring to the position of the same reference coordinate program entry every time the focus is moved, and in the process of moving the focus, because the position of the reference program entry remains unchanged, when the focus moves from the previous channel or the next channel of the current channel to the current channel, the focus can be guaranteed to move to the same program entry, the problems that the focus moves to generate larger offset and the focus moves to be unable to trace back in the display interface of the program entry are solved, and the user experience is improved.
In addition, before receiving the focus moving instruction, the method also comprises the steps of firstly judging whether a reference coordinate program item exists, and if the reference coordinate program item does not exist, determining an initial program item in the current channel where the focus is located as the reference coordinate program item. It is to be noted that if the initial program entry where the focus is located is a0, the location lastfocusprogam of the reference coordinate program entry includes the channel number DC a and the index value a0 of the program, which is obviously described above only with a0 as the initial program entry, and other program entries may also be used as the initial program entry, for example, c2 located at the center of the display interface is used as the initial program entry, which is not limited in the present invention.
In addition, the embodiment of the invention also discloses an updating mode of the reference coordinate program entry. Illustratively, when the focus is located at an initial program entry in the current channel (at which time the initial program entry is determined to be the reference coordinate program entry), it is determined to move the focus from the initial program entry of the current channel to a third program entry of the current channel according to the focus movement instruction, the position of the reference coordinate program entry is updated to the position of the third program entry.
For example, the current reference coordinate program entry is the program entry a0, when it is determined that the focus is moved to the right to the program entry a2 of the same channel, the position of the program entry a2 is updated to the position of the reference coordinate program entry, and the channel number DC a to which the program entry a2 belongs and the index value a2 of the program are saved in the lastFocusProgram in the global variable.
Specifically, the logic of the code program for the update method of the reference coordinate program entry is described as follows:
when the focus position is moved to the right on the same channel, the position of the next program entry to which the focus is moved is located by changing the index value of the program entry
The code logic for locating the position of the focal point by the channel number and index value is as follows:
determining the position of the focus according to the channel number of the program entry and the index value of the program entry
// taking the next program entry to which the focus is moved based on the target index value
// setting a new focus position based on the position of the next program entry
Update index value of program entry where focus is located
If the focus is moved left and right, the position of the program item where the focus is located after the movement is saved as the position of the program item with the reference coordinate
As shown in fig. 3, a program implementation logic of a method for moving a focus in a program entry display interface is provided, taking time as horizontal tiling and channels as column-wise tiling as an example, when a focus movement occurs, the following is specifically described as follows:
s1, judging whether a reference coordinate program item exists or not; if yes, go to step S3, otherwise go to step S2.
And S2, calculating a reference coordinate program item according to the program item with the focus.
S3, judging the moving direction of the focus, if the moving direction is left and right, turning to step S4, if the moving direction is up and down, turning to step S6.
And S4, directly moving the focus to another program item according to the program item of the current focus.
And S5, saving the position of the program item with the moved focus as the position of the reference coordinate program item.
S6, calculating a new focus position based on the position of the reference coordinate program entry.
And S7, moving the focus to a second program item of another channel according to the new focus position, wherein the second program item corresponds to the new focus position.
The algorithm flow is specifically as follows:
begin- > S1- > S2- > S3- > S4- > S5- > end
Begin- > S1- > S3- > S4- > S5- > end
Begin- > S1- > S2- > S3- > S5- > S6- > end
Begin- > S1- > S3- > S5- > S6- > end
Referring to fig. 4, there is provided a focus moving apparatus in a program entry display interface, applied to a display interface of program entries, where the display interface of program entries includes a two-dimensional program menu arranged in a channel and program playing time sequence, where each channel program entry includes at least one program entry arranged according to time, a starting position of the program entry is used for indicating a program playing time, and an ending position of the program entry is used for indicating a program ending time, and the focus moving apparatus in the program entry display interface includes:
a receiving unit 41 for receiving a focus movement instruction;
a processing unit 42, configured to calculate a new focus position according to a position of a reference coordinate program entry determined in advance when determining to move the focus from a first program entry of a current channel to another channel according to the focus movement instruction received by the receiving unit 41;
the processing unit 42 is further configured to move the focus to a second program entry of the other channel according to the new focus position, where the second program entry corresponds to the new focus position.
In an exemplary scheme, the processing unit 42 is specifically configured to, when it is determined that the program end time of the second program entry of the another channel is located between the program playing time and the program end time of the reference coordinate program entry, calculate an index value of the second program entry, and generate the new focus position, where the new focus position includes the channel number of the another channel and the index value of the second program entry.
In an exemplary scheme, the processing unit 42 is specifically configured to calculate an index value of a second program entry of the another channel when it is determined that the program playing time of the reference coordinate program entry is between the program playing time and the program ending time of the second program entry, and generate the new focal position, where the new focal position includes the channel number of the another channel and the index value of the second program entry.
In an exemplary scheme, the apparatus further includes a judging unit 43 for judging whether there is a predetermined reference coordinate program entry; if yes, receiving a focus moving instruction through the receiving unit 41; if not, the processing unit 42 determines the initial program entry where the focus is located as the reference coordinate program entry.
In an exemplary scheme, the processing unit 42 is further configured to update the position of the reference coordinate program entry to the position of a third program entry when determining to move the focus from the initial program entry of the current channel to the third program entry of the current channel according to the focus moving instruction.
All relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and the function thereof is not described herein again.
In the case of an integrated module, a focus moving apparatus in a program entry display interface includes: the device comprises a storage unit, a processing unit and an interface unit. The processing unit is configured to control and manage actions of the focus moving apparatus in the program entry display interface, for example, the processing unit is configured to support the focus moving apparatus in the program entry display interface to perform the process 102 and 103 in fig. 2. The interface unit is used to support the interaction of the focus mobile device with other devices in the program entry display interface, for example, to perform step 101. And the storage unit is used for storing the program codes and data of the focus moving device in the program item display interface.
For example, the processing unit is a processor, the storage unit is a memory, and the interface unit is a communication interface. The focus moving apparatus in the program entry display interface is shown in fig. 5, and includes a communication interface 501, a processor 502, a memory 503 and a bus 504, where the communication interface 501 and the processor 502 are connected to the memory 503 through the bus 504.
The processor 502 may be a general-purpose Central Processing Unit (CPU), a microprocessor, an Application-Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to control the execution of programs in accordance with the teachings of the present disclosure.
The Memory 503 may be a Read-Only Memory (ROM) or other type of static storage device that can store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that can store information and instructions, an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to these. The memory may be self-contained and coupled to the processor via a bus. The memory may also be integral to the processor.
The memory 503 is used for storing application program codes for executing the scheme of the application, and the processor 502 controls the execution. The communication interface 501 is used to obtain the content of other devices, for example, to execute step 101. The processor 502 is configured to execute application program code stored in the memory 503 to implement the methods described in the embodiments of the present application.
The embodiment of the invention provides terminal equipment which comprises the focus moving device in the program item display interface. Further, a computing storage medium (or media) is also provided, comprising instructions which, when executed, perform the operations of the method in the above embodiments.
Additionally, a computer program product is also provided, comprising the above-described computing storage medium (or media).
It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.