Data processing method, device, computer readable storage medium and computer equipment
By receiving the refresh command in the TV operating system and managing the refresh operation according to the interface status, the stuck problem when the TV interface is refreshed is solved, and the display efficiency and user experience are improved.
Patent Information
- Application Number
- CN202210031372.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-12
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2042-01-12
AI Technical Summary
When the existing TV operating system refreshes the main interface, it is easy to cause incoherent user operations and stuck interface display, resulting in low display efficiency.
By receiving the refresh command, the refresh type is determined based on the target main interface data, and the refresh command is suspended when the current interface status is responding, and the refresh operation is performed until the interface is idle, thereby realizing a main interface refresh that is imperceptible to the user.
It improves the display consistency and efficiency of the TV interface, avoids lagging during the refresh process, and improves the user experience.
Smart Images

Figure CN114489892B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data processing method, apparatus, computer-readable storage medium and computer equipment. Background Art
[0002] With the development of communication technology, smart TVs have become a common household product, and watching TV programs has become the main way for many people to relax.
[0003] Currently, the TV operating systems on the market all refresh the entire main interface directly after the TV's main interface is started. This refresh mechanism can easily cause the main interface to suddenly refresh when the user is operating or browsing the TV's main interface, resulting in discontinuous user operations and interface display freezes, poor display effects of the TV interface, and thus low display efficiency of the TV. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, an apparatus, a computer-readable storage medium, and a computer device, which can improve data processing efficiency and thereby improve the display efficiency of a television interface.
[0005] The present application provides a data processing method, including:
[0006] Receiving a refresh instruction, wherein the refresh instruction includes target main interface data;
[0007] Determine the main interface refresh type according to the target main interface data;
[0008] When the main interface refresh type is a global refresh type, obtaining the interface type of the current interface;
[0009] When the interface type of the current interface is the main interface type, detecting the interface state of the current interface;
[0010] When it is detected that the interface state of the current interface is in a responsive state, the refresh instruction is suspended until the interface state of the current interface is in an idle state, and then the refresh instruction is executed.
[0011] Accordingly, an embodiment of the present application provides a data processing device, including:
[0012] A receiving unit, used for receiving a refresh instruction, wherein the refresh instruction includes target main interface data;
[0013] A refresh type determination unit, used to determine the main interface refresh type according to the target main interface data;
[0014] An acquisition unit, used for acquiring the interface type of the current interface when the refresh type of the main interface is a global refresh type;
[0015] A detection unit, used for detecting the interface state of the current interface when the interface type of the current interface is the main interface type;
[0016] The first execution unit is used to suspend the refresh instruction when it is detected that the interface state of the current interface is in a response state, and execute the refresh instruction when the interface state of the current interface is in an idle state.
[0017] In one embodiment, the refresh type determination unit includes:
[0018] A parsing subunit, used for parsing the target main interface data;
[0019] A comparison subunit, used to compare the parsed target main interface data with the interface data of the current interface;
[0020] The first determining subunit is used to determine the main interface refresh type according to the comparison result.
[0021] In one embodiment, the acquisition unit includes:
[0022] Get subunit, used to get interface information of the current interface;
[0023] The determination subunit is used to determine the interface type of the current interface according to the interface information.
[0024] In one embodiment, the first execution unit includes:
[0025] An idle state determining unit, configured to determine that the interface state of the current interface is in an idle state when it is detected that the current interface has not received a preset operation instruction for more than a preset time period;
[0026] The execution subunit is used to execute a global refresh operation of the main interface according to the refresh instruction.
[0027] In one embodiment, the data processing device further includes:
[0028] The second execution unit is used to execute a global refresh operation of the main interface according to the refresh instruction when it is detected that the interface state of the current interface is switched from the main interface to the secondary interface.
[0029] In one embodiment, the data processing device further includes:
[0030] a target content area determining unit, configured to determine a target content area according to the target interface data when the interface refresh type is a partial refresh type;
[0031] The replacement unit is used to maintain the current interface layout and replace the resources of the target content area based on the target interface data.
[0032] In one embodiment, the data processing device further includes:
[0033] The third execution unit is used to execute a global refresh operation of the main interface according to the refresh instruction when the interface type of the current interface is a non-main interface type.
[0034] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the steps in any data processing method provided in the embodiment of the present application.
[0035] In addition, an embodiment of the present application also provides a computer device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the data processing method provided in the embodiment of the present application.
[0036] The embodiment of the present application also provides a computer program product or a computer program, wherein the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in the data processing method provided in the embodiment of the present application.
[0037] The embodiment of the present application receives a refresh instruction; determines the refresh type of the main interface according to the target main interface data; when the refresh type of the main interface is a global refresh type, obtains the interface type of the current interface; when the interface type of the current interface is the main interface type, detects the interface state of the current interface; when it is detected that the interface state of the current interface is in a responsive state, suspends the refresh instruction until the interface state of the current interface is in an idle state, and then executes the refresh instruction. In this way, the refresh type of the main interface is determined by the target main interface data, and different refresh strategies are executed according to the refresh type of the main interface. When the refresh type of the main interface is a global refresh type and the interface type of the current interface is the main interface type, the interface state of the current interface is detected, and the refresh instruction is executed when the interface state of the current interface is in an idle state. Compared with the refresh mechanism of directly performing forced refresh in the prior art, the main interface refresh operation without user perception is realized, the continuity of the TV interface display is improved, the data processing efficiency is improved, and the display efficiency of the interface is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0039] Figure 1 This is a schematic diagram of an implementation scenario of a data processing method provided in an embodiment of the present application;
[0040] Figure 2 It is a flowchart of a data processing method provided in an embodiment of the present application;
[0041] Figure 3 It is a specific flow chart of a data processing method provided in an embodiment of the present application;
[0042] Figure 4 is another flow chart of a data processing method provided by an embodiment of the present application;
[0043] Figure 5 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;
[0044] Figure 6 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0046] The embodiments of the present application provide a data processing method, device, computer-readable storage medium and computer equipment. The data processing device can be integrated in a computer equipment, and the computer equipment can be a server or a terminal.
[0047] In order to better illustrate the embodiments of the present application, please refer to the following terms for reference:
[0048] Launcher: Also known as the desktop launcher in the Android system, the desktop user interface (UserInterface, UI) of the Android system is collectively referred to as Launcher. Launcher is one of the main program components in the Android system. If there is no Launcher in the Android system, the Android desktop cannot be started.
[0049] See also Figure 1 , taking the data processing device integrated into the server as an example, Figure 1 The present invention is a schematic diagram of an implementation scenario of the data processing method provided in an embodiment of the present application, including a server A and a terminal B, wherein server A can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0050] Terminal B can be a smart TV, smart phone, tablet computer, laptop computer, desktop computer or any other computer device capable of data processing, but is not limited thereto. Terminal B can receive a refresh instruction; determine the main interface refresh type according to the target main interface data; when the main interface refresh type is a global refresh type, obtain the interface type of the current interface; when the interface type of the current interface is the main interface type, detect the interface state of the current interface; when it is detected that the interface state of the current interface is in a responsive state, suspend the refresh instruction until the interface state of the current interface is in an idle state, and then execute the refresh instruction.
[0051] Terminal B and server A may be directly or indirectly connected via wired or wireless communication, and server A may obtain data uploaded by terminal B to perform corresponding data processing operations, which is not limited in this application.
[0052] It should be noted that Figure 1 The implementation environment scenario diagram of the data processing method shown is only an example. The implementation environment scenario of the data processing method described in the embodiment of the present application is to more clearly illustrate the technical solution of the embodiment of the present application, and does not constitute a limitation on the technical solution provided by the embodiment of the present application. It is known to those skilled in the art that with the evolution of data processing and the emergence of new business scenarios, the technical solution provided by the present application is also applicable to similar technical problems.
[0053] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0054] This embodiment will be described from the perspective of a data processing device. The data processing device may be integrated into a computer device. The computer device may be a terminal, and this application does not limit this.
[0055] See also Figure 2 , Figure 2: is a flow chart of a data processing method provided in an embodiment of the present application. The data processing method comprises:
[0056] In step 101, a refresh instruction is received.
[0057] Specifically, a refresh instruction for the main interface may be received, the refresh instruction including target main interface data. The target main interface data is the layout data to be updated corresponding to the current main interface, and the refresh instruction may update the current layout data of the main interface to the layout data corresponding to the target main interface data. Optionally, when the main interface needs to be refreshed, the server may send a refresh instruction to the terminal, so that the terminal may refresh the main interface based on the refresh instruction and the target main interface data carried by the refresh instruction.
[0058] In one embodiment, a refresh instruction for the main interface sent by the server may be received, and then corresponding target main interface data may be acquired.
[0059] In step 102, the main interface refresh type is determined according to the target main interface data.
[0060] Among them, the main interface refresh type can include a local refresh type and a global refresh type. The local refresh type can be a refresh type in which the overall page layout of the current main interface does not change, and only the local layout of the main interface is refreshed. The global refresh type can be a refresh type in which the data in all interfaces of the current main interface is refreshed.
[0061] Specifically, the target main interface data can be parsed to obtain the main interface layout data to be updated, and then the parsed main interface layout data to be updated can be compared with the layout data of the current main interface, and the main interface refresh type can be determined according to the comparison result. Among them, the main interface refresh type can be determined according to the number of corresponding classification (Tab) modules in the main interface layout data to be updated and the current main interface layout data, the display type (DisplayType) of each data on the content area (Block) of different categories, and the change of each data on the content area.
[0062] For example, when it is detected that the main interface layout data to be updated does not change the overall page layout of the current main interface, and only one or more content areas in the main interface need to be replaced, the refresh type of this main interface can be determined as a local refresh type. When the main interface is partially refreshed, the minimum refresh range can be determined by the difference between the main interface layout data to be updated and the current main interface layout data, so as to perform a refresh of the local minimum refresh coefficient to reduce resource consumption and occupation, thereby improving refresh efficiency. For example, assuming that the data of content area a and content area b in the main interface have changed, and the data of content area c has not changed, wherein the picture 1 displayed in content area a becomes picture 2, and the video 1 displayed in content area b becomes video 2, then the data in content area a and content area b can be refreshed according to the target main interface data, and the content area c is not refreshed.
[0063] When it is detected that the size of each Tab module in the main interface in the main interface layout data to be updated has changed relative to the size or number of each Tab module in the layout data of the current main interface, or the number of content areas or the display type of data in the content area has changed, it is necessary to change the overall page layout of the main interface. At this time, the refresh type of this main interface is a global refresh type. For example, it can be assumed that the number of content areas in a certain Tab in the current main interface is 8, and the number of content areas in the Tab in the main interface in the main interface layout data to be updated is 10. At this time, the overall page layout of the main interface needs to be updated. Therefore, it can be determined that the current main interface refresh type is a global refresh type. For another example, it can be assumed that the DisplayType in the content area d in the current main interface specifies that the data type displayed in the content area d is video, and the DisplayType of the content area d in the main interface layout data to be updated specifies that the data type displayed in the content area d is picture. At this time, it is necessary to update the overall page layout of the main interface, and it can be determined that the current main interface refresh type is a global refresh type.
[0064] In step 103, when the main interface refresh type is a global refresh type, the interface type of the current interface is obtained.
[0065] Among them, when the refresh type of the main interface is the global refresh type, in order to realize the refresh task of the main interface without the user's perception, the interface type of the current interface can be obtained first, and whether the current interface is the main interface can be determined according to the interface type of the current interface, and then the refresh method can be determined according to the judgment result. Optionally, the interface information of the current interface can be obtained first, wherein the interface information can include other information such as the interface name of the current interface. Specifically, the interface information of the current interface can be obtained through Android's method of obtaining the top page (Activity), that is, the current interface. For example, the interface information of the current interface can be obtained through the instruction of obtaining the package name of the currently running application (getTopPackageActivtiy), or the interface information of the current interface can be directly obtained through instructions such as the top interface acquisition instruction (getTopActivtiy).
[0066] After obtaining the interface information of the current interface, the interface type of the current interface can be determined according to the interface information. Specifically, the interface name of the current interface can be obtained according to the interface information of the current interface, and the interface name of the current interface can be compared with the interface name of the main interface. When the interface name of the current interface is the same as the interface name of the main interface, it can be determined that the interface type of the current interface is the main interface type; when the interface name of the current interface is different from the interface name of the main interface, it can be determined that the interface type of the current interface is a non-main interface type.
[0067] In step 104, when the interface type of the current interface is the main interface type, the interface state of the current interface is detected.
[0068] Among them, when the interface type of the current interface is the main interface type, in order to realize the task of refreshing the main interface without the user's perception, the interface state of the current interface can be detected, and how to refresh the main interface can be determined according to the interface state of the current interface, so that the main interface refresh can be performed without the user's perception.
[0069] In step 105, when it is detected that the interface state of the current interface is in a responsive state, the refresh instruction is suspended until the interface state of the current interface is in an idle state, and then the refresh instruction is executed.
[0070] Among them, the response state can be a state triggered by the user performing a control operation on the main interface, for example, the user can perform a touch screen operation on the main interface, or control the main interface by clicking the mouse, or the user can control the main interface by a remote control, etc. The idle state can be a state when the user does not control the main interface within a preset time period. In the idle state, the user may not be viewing the main interface.
[0071] Specifically, when it is detected that the interface state of the current interface is in a responsive state, for example, when a dispatchKeyEvent instruction triggered by the user is received, the refresh instruction can be suspended until it is detected that the interface state of the current interface is in an idle state, and then the refresh instruction is executed to complete the refresh operation of the main interface.
[0072] In one embodiment, when the interface type of the current interface is a non-main interface type, since the main interface is in a hidden state at this time, the user cannot see the main interface, that is, cannot perceive the refresh of the main interface. Therefore, the main interface can be refreshed according to the refresh instruction at this time.
[0073] As can be seen from the above, the present application receives a refresh instruction; determines the main interface refresh type according to the target main interface data; when the main interface refresh type is a global refresh type, obtains the interface type of the current interface; when the interface type of the current interface is the main interface type, detects the interface state of the current interface; when it is detected that the interface state of the current interface is in a responsive state, suspends the refresh instruction until the interface state of the current interface is in an idle state, and then executes the refresh instruction. In this way, the main interface refresh type is determined by the target main interface data, and different refresh strategies are executed according to the refresh type of the main interface. When the refresh type of the main interface is a global refresh type and the interface type of the current interface is the main interface type, the interface state of the current interface is detected, and the refresh instruction is executed when the interface state of the current interface is in an idle state. Compared with the refresh mechanism of directly forcing a refresh in the prior art, the main interface refresh operation without user perception is realized, the continuity of the TV interface display is improved, the data processing efficiency is improved, and the display efficiency of the interface is thereby improved.
[0074] According to the method described in the above embodiment, the following is further described in detail with examples.
[0075] In this embodiment, the data processing device is specifically integrated in a terminal as an example for specific description. Figure 3 , Figure 3 A specific flow chart of a data processing method provided in an embodiment of the present application.
[0076] To better describe the embodiments of this application, please refer to Figure 3 and Figure 4 .like Figure 4 As shown, Figure 4 This is another flow chart of the data processing method provided in the embodiment of the present application. The specific process is as follows:
[0077] In step 201, the terminal receives a refresh instruction and parses the target main interface data.
[0078] The refresh instruction may include target main interface data. Specifically, the terminal may receive a refresh instruction for the main interface, and then obtain and parse the target main interface data according to the refresh instruction.
[0079] In one embodiment, the terminal may be a smart TV, and the terminal may implement a non-perceptual refresh mechanism of the main interface through an Android desktop launcher.
[0080] In step 202, the terminal compares the parsed target main interface data with the interface data of the current interface, and determines the main interface refresh type according to the comparison result.
[0081] Specifically, after parsing the target main interface data, the terminal can compare the parsed target main interface data, that is, the parsed main interface layout data to be updated with the layout data of the current main interface, and determine the main interface refresh type according to the comparison result. Among them, the main interface refresh type can be determined according to the classification and quantity of each Tab module corresponding to the main interface layout data to be updated and the current main interface layout data, the display type of each data in the content area of different categories, and the change of each data in the content area.
[0082] For example, when it is detected that the main interface layout data to be updated does not change the overall page layout of the current main interface, and only one or more content areas in the main interface need to be replaced, the refresh type of this main interface can be determined as a local refresh type. When the main interface is partially refreshed, the minimum refresh range can be determined by the difference between the main interface layout data to be updated and the current main interface layout data, so as to perform a refresh of the local minimum refresh coefficient to reduce resource consumption and occupation, thereby improving refresh efficiency. For example, assuming that the data of content area a and content area b in the main interface have changed, and the data of content area c has not changed, wherein the picture 1 displayed in content area a becomes picture 2, and the video 1 displayed in content area b becomes video 2, then the data in content area a and content area b can be refreshed according to the target main interface data, and the content area c is not refreshed.
[0083] When it is detected that the number of each Tab module in the main interface in the main interface layout data to be updated has changed relative to the size or number of each Tab module in the current main interface layout data, or the number of content areas or the display type of data in the content areas has changed, it is necessary to change the overall page layout of the main interface. At this time, the refresh type of this main interface is a global refresh type. For example, it can be assumed that the number of content areas in the current main interface is 8, and the number of content areas in the main interface in the main interface layout data to be updated is 10. At this time, the overall page layout of the main interface needs to be updated. Therefore, it can be determined that the current main interface refresh type is a global refresh type.
[0084] For another example, it can be assumed that the DisplayType in content area d in the current main interface specifies that the data type displayed in content area d is video, and the DisplayType of content area d in the main interface layout data to be updated specifies that the data type displayed in content area d is picture. At this time, the terminal needs to update the overall page layout of the main interface, and it can be determined that the current main interface refresh type is a global refresh type.
[0085] In step 203, when the interface refresh type is a partial refresh type, the terminal determines a target content area according to the target interface data, maintains the current interface layout, and replaces resources in the target content area based on the target interface data.
[0086] Among them, when the interface refresh type is a partial refresh type, the terminal can partially refresh the area that needs to be refreshed in the main interface according to the difference between the target interface data and the interface data of the current main interface. Specifically, the terminal can determine the target content area according to the target interface data, and can maintain the current interface layout at the same time, and replace the resources of the target content area through the dataChanged command of the target content area based on the target interface data. For example, assuming that the data displayed in the content area (Block) e in the target interface data is picture 2, and the data displayed in the content area f is video 1, and the data displayed in the content area e in the interface data of the current main interface is picture 1, and the data displayed in the content area f is video 1, then it can be detected that there is a difference between the target interface data and the interface data of the current main interface in content area e, while other data are the same, so it is only necessary to partially refresh the data of content area e according to the data corresponding to picture 2 in content area e in the parsed target interface data.
[0087] In step 204, when the main interface refresh type is a global refresh type, the terminal obtains interface information of the current interface, and determines the interface type of the current interface according to the interface information.
[0088] Among them, when the main interface refresh type is the global refresh type, in order to realize the refresh task of the main interface without the user's perception, the terminal can first determine whether the current interface is the main interface, and then determine the refresh method based on the judgment result. First, the interface information of the current interface can be obtained first. Specifically, the interface information of the current interface can be obtained according to instructions such as getTopPackageActivtiy.
[0089] In one embodiment, after obtaining the interface information of the current interface, the terminal can obtain the interface name of the current interface based on the interface information of the current interface, and match the interface name of the current interface with the interface name of the main interface to determine the interface type of the current interface.
[0090] Specifically, when the interface name of the current interface is the same as the interface name of the main interface, the terminal can determine that the current interface is the main interface. When the interface name of the current interface is different from the interface name of the main interface, the terminal can determine that the current interface is a non-main interface, that is, the interface type of the current interface is a non-main interface type.
[0091] In step 205, when the interface type of the current interface is a non-main interface type, the terminal executes a global refresh operation of the main interface according to the refresh instruction.
[0092] Among them, when the interface type of the current interface is a non-main interface type, since the main interface is in a hidden state at this time, the user cannot see the main interface, that is, cannot perceive the refresh of the main interface. Therefore, at this time, the terminal can execute a global refresh operation of the main interface according to the refresh instruction to complete the refresh task of the main interface.
[0093] In step 206, when the interface type of the current interface is the main interface type, the terminal detects the interface state of the current interface, and when it is detected that the interface state of the current interface is in a responsive state, the refresh instruction is suspended.
[0094] Among them, when the interface type of the current interface is the main interface type, in order to realize the refresh task of the main interface without the user's perception, the terminal can detect the interface status of the current interface. When it is detected that the interface status of the current interface is in a responsive state, the user may be performing control operations on the main interface. If the refresh task of the main interface is performed at this time, it is very likely to cause the interface to be stuck and cause discontinuous user operations. Therefore, in order to improve the efficiency of interface display, the refresh instruction can be suspended first to delay the refresh task.
[0095] When it is detected that the interface state of the current interface is in an idle state, at this time, the user does not perform any control operation on the main interface. Therefore, the terminal can directly perform a refresh operation on the main interface according to the refresh instruction to complete the refresh task of the main interface.
[0096] In step 207, when it is detected that the current interface has not received a preset operation instruction for more than a preset time period, the terminal determines that the interface state of the current interface is in an idle state at this time, and executes a global refresh operation of the main interface according to the refresh instruction.
[0097] Specifically, when the terminal detects that the current interface has not received a preset operation instruction for more than a preset time period, the terminal can determine that the interface state of the current interface is in an idle state at this time, and then can perform a global refresh operation of the main interface according to the refresh instruction, wherein the preset operation instruction can be a dispatchKeyEvent instruction, and the dispatchKeyEvent instruction can be triggered by the user by pressing a button on the remote control. The preset time period can be a preset time interval, such as ten minutes, or one hour, etc. The specific value range can be selected according to actual conditions and is not limited here. Assuming that the preset time period is ten minutes, when the terminal detects that the current interface has not received a preset operation instruction for more than ten minutes, it can indicate that the user is not controlling the main interface or the user is not browsing the main interface at this time. Therefore, the terminal can determine that the interface state of the current interface is in an idle state at this time, and perform a global refresh operation of the main interface through notifyDataChanged according to the refresh instruction.
[0098] In step 208, when it is detected that the interface state of the current interface is switched from the main interface to the secondary interface, the terminal executes a global refresh operation of the main interface according to the refresh instruction.
[0099] Among them, when it is detected that the interface state of the current interface switches from the main interface to the secondary interface, at this time, the terminal displays the secondary interface (also called the secondary page), the main interface is blocked by the secondary interface, and the interface state of the main interface is in the blocked (Onstop) state, and the user cannot see the main interface. At this time, the terminal can perform a global refresh operation of the main interface through notifyDataChanged according to the refresh instruction. Among them, the terminal can jump to the page by the user clicking on the poster in the main interface, so as to enter the secondary interface.
[0100] As can be seen from the above, the embodiment of the present application receives a refresh instruction through the terminal, and parses the target main interface data; the terminal compares the parsed target main interface data with the interface data of the current interface, and determines the main interface refresh type according to the comparison result; when the interface refresh type is a local refresh type, the terminal determines the target content area according to the target interface data, maintains the current interface layout, and replaces the resources of the target content area based on the target interface data; when the main interface refresh type is a global refresh type, the terminal obtains the interface information of the current interface, and determines the interface type of the current interface according to the interface information; when the interface type of the current interface is a non-main interface type, The terminal executes a global refresh operation of the main interface according to the refresh instruction; when the interface type of the current interface is the main interface type, the terminal detects the interface status of the current interface, and when it is detected that the interface status of the current interface is in a responsive state, the refresh instruction is suspended; when it is detected that the current interface has not received a preset operation instruction for more than a preset time period, the terminal determines that the interface status of the current interface is in an idle state at this time, and executes a global refresh operation of the main interface through notifyDataChanged according to the refresh instruction; when it is detected that the interface status of the current interface switches from the main interface to the secondary interface, the terminal executes a global refresh operation of the main interface according to the refresh instruction. In this way, the main interface refresh type is judged by the target main interface data, and different refresh strategies are executed according to the refresh type of the main interface. When the refresh type of the main interface is a global refresh type, local resource replacement is directly performed on the area that needs to be updated. When the refresh type of the main interface is a global refresh type and the interface type of the current interface is the main interface type, the interface state of the current interface is detected, and a full-interface refresh operation is performed when the interface state of the current interface is in an idle state or enters the secondary interface. Compared with the refresh mechanism of directly performing forced refresh in the prior art, a main interface refresh operation is realized without user perception, thereby improving the continuity of the TV interface display, improving data processing efficiency, and thereby improving the interface display efficiency.
[0101] In order to better implement the above method, an embodiment of the present invention further provides a data processing device, which can be integrated in a computer device, and the computer device can be a terminal.
[0102] For example, Figure 5 As shown, it is a structural schematic diagram of a data processing device provided in an embodiment of the present application, and the data processing device may include a receiving unit 301, a refresh type determination unit 302, an acquisition unit 303, a detection unit 304 and a first execution unit 305, as follows:
[0103] The receiving unit 301 is used to receive a refresh instruction, where the refresh instruction includes target main interface data;
[0104] A refresh type determining unit 302 is used to determine a main interface refresh type according to the target main interface data;
[0105] The acquisition unit 303 is used to acquire the interface type of the current interface when the refresh type of the main interface is a global refresh type;
[0106] A detection unit 304, configured to detect an interface state of the current interface when the interface type of the current interface is a main interface type;
[0107] The first execution unit 305 is used to suspend the refresh instruction when it is detected that the interface state of the current interface is in a response state, and execute the refresh instruction when the interface state of the current interface is in an idle state.
[0108] In one embodiment, the refresh type determination unit 302 includes:
[0109] The parsing subunit is used to parse the target main interface data;
[0110] A comparison subunit, used to compare the parsed target main interface data with the interface data of the current interface;
[0111] The first determining subunit is used to determine the main interface refresh type according to the comparison result.
[0112] In one embodiment, the acquisition unit 303 includes:
[0113] Get subunit, used to get interface information of the current interface;
[0114] The determination subunit is used to determine the interface type of the current interface according to the interface information.
[0115] In one embodiment, the first execution unit 305 includes:
[0116] An idle state determination unit, configured to determine that the interface state of the current interface is in an idle state when it is detected that the current interface has not received a preset operation instruction for more than a preset time period;
[0117] The execution subunit is used to execute a global refresh operation of the main interface according to the refresh instruction.
[0118] In one embodiment, the data processing device further includes:
[0119] The second execution unit is used to execute a global refresh operation of the main interface according to the refresh instruction when it is detected that the interface state of the current interface is switched from the main interface to the secondary interface.
[0120] In one embodiment, the data processing device further includes:
[0121] A target content area determination unit, configured to determine a target content area according to the target interface data when the interface refresh type is a partial refresh type;
[0122] The replacement unit is used to maintain the current interface layout and replace the resources of the target content area based on the target interface data.
[0123] In one embodiment, the data processing device further includes:
[0124] The third execution unit is used to execute a global refresh operation of the main interface according to the refresh instruction when the interface type of the current interface is a non-main interface type.
[0125] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
[0126] As can be seen from the above, the embodiment of the present application receives the refresh instruction through the receiving unit 301; the refresh type determination unit 302 determines the main interface refresh type according to the target main interface data; the acquisition unit 303 acquires the interface type of the current interface when the main interface refresh type is the global refresh type; the detection unit 304 detects the interface state of the current interface when the interface type of the current interface is the main interface type; the first execution unit 305 suspends the refresh instruction when it detects that the interface state of the current interface is in the response state, and executes the refresh instruction until the interface state of the current interface is in the idle state. In this way, the main interface refresh type is determined by the target main interface data, and different refresh strategies are executed according to the refresh type of the main interface. When the refresh type of the main interface is the global refresh type and the interface type of the current interface is the main interface type, the interface state of the current interface is detected, and the refresh instruction is executed when the interface state of the current interface is in the idle state. Compared with the refresh mechanism of directly forcing the refresh in the prior art, the main interface refresh operation without user perception is realized, the continuity of the TV interface display is improved, the data processing efficiency is improved, and the display efficiency of the interface is improved.
[0127] The present application also provides a computer device, such as Figure 6 As shown, it shows a schematic diagram of the structure of a computer device involved in an embodiment of the present application, and the computer device may be a terminal. Specifically:
[0128] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that Figure 6The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0129] The processor 401 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 402 and calling data stored in the memory 402, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0130] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0131] The computer device also includes a power supply 403 for supplying power to various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0132] The computer device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0133] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, as follows:
[0134] Receive a refresh instruction; determine the main interface refresh type according to the target main interface data; when the main interface refresh type is a global refresh type, obtain the interface type of the current interface; when the interface type of the current interface is the main interface type, detect the interface state of the current interface; when it is detected that the interface state of the current interface is in a responsive state, suspend the refresh instruction until the interface state of the current interface is in an idle state, and then execute the refresh instruction.
[0135] The specific implementation of each of the above operations can be found in the previous embodiments, which will not be described in detail here. It should be noted that the computer device provided in the embodiment of the present application and the data processing method in the above embodiment belong to the same concept, and its specific implementation process is detailed in the above method embodiment, which will not be described in detail here.
[0136] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0137] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any data processing method provided in the embodiment of the present application. For example, the instructions can execute the following steps:
[0138] Receive a refresh instruction; determine the main interface refresh type according to the target main interface data; when the main interface refresh type is a global refresh type, obtain the interface type of the current interface; when the interface type of the current interface is the main interface type, detect the interface state of the current interface; when it is detected that the interface state of the current interface is in a responsive state, suspend the refresh instruction until the interface state of the current interface is in an idle state, and then execute the refresh instruction.
[0139] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0140] Since the instructions stored in the computer-readable storage medium can execute the steps in any data processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any data processing method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0141] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various optional implementations provided in the above embodiments.
[0142] The above is a detailed introduction to a data processing method, device, computer-readable storage medium and computer equipment provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data processing method, characterized in that: include: Receiving a refresh instruction, wherein the refresh instruction includes target main interface data; Determine the main interface refresh type according to the target main interface data; When the main interface refresh type is a global refresh type, obtaining the interface type of the current interface; When the interface type of the current interface is a non-main interface type, it is determined that the main interface is in a hidden state, and an imperceptible global refresh operation of the main interface is performed according to the refresh instruction; When the interface type of the current interface is the main interface type, detecting the interface state of the current interface; When it is detected that the interface state of the current interface is in a responsive state, the refresh instruction is suspended until the interface state of the current interface is in an idle state, and then the refresh instruction is executed to perform an imperceptible global refresh operation on the current interface.
2. The data processing method according to claim 1, characterized in that: The determining the main interface refresh type according to the target main interface data includes: Parsing the target main interface data; Compare the parsed target main interface data with the interface data of the current interface; Determine the main interface refresh type based on the comparison results.
3. The data processing method according to claim 1, characterized in that: The method of obtaining the interface type of the current interface includes: Get the interface information of the current interface; The interface type of the current interface is determined according to the interface information.
4. The data processing method according to any one of claims 1 to 3, characterized in that: The step of executing the refresh instruction until the interface state of the current interface is in an idle state comprises: When it is detected that the current interface has not received a preset operation instruction for more than a preset time period, determining that the interface state of the current interface is in an idle state at this time; A global refresh operation of the main interface is executed according to the refresh instruction.
5. The data processing method according to claim 4, characterized in that: When the interface type of the current interface is the main interface type, after detecting the interface state of the current interface, the method further includes: When it is detected that the interface state of the current interface is switched from the main interface to the secondary interface, a global refresh operation of the main interface is performed according to the refresh instruction.
6. The data processing method according to claim 1, characterized in that: The method further comprises: When the interface refresh type is a partial refresh type, determining a target content area according to the target main interface data; The current interface layout is maintained, and resources of the target content area are replaced based on the target main interface data.
7. A data processing device, characterized in that: include: A receiving unit, used for receiving a refresh instruction, wherein the refresh instruction includes target main interface data; A refresh type determination unit, used to determine a main interface refresh type according to the target main interface data; An acquisition unit, used for acquiring interface information of the current interface when the refresh type of the main interface is a global refresh type; An interface type determination unit, used to determine the interface type of the current interface according to the interface information, and when the interface type of the current interface is a non-main interface type, it is determined that the main interface is in a hidden state, and an imperceptible global refresh operation of the main interface is performed according to the refresh instruction; A detection unit, used for detecting the interface state of the current interface when the interface type of the current interface is the main interface type; The first execution unit is used to suspend the refresh instruction when it is detected that the interface state of the current interface is in a responsive state, and execute the refresh instruction until the interface state of the current interface is in an idle state, so as to perform an imperceptible global refresh operation on the current interface.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the data processing method according to any one of claims 1 to 6.
9. A computer device, characterized in that: It comprises a memory and a processor; the memory stores an application program, and the processor is used to run the application program in the memory to execute the steps in the data processing method according to any one of claims 1 to 6.
