Server and multi-level data processing method
By setting hierarchical relationships in the task queue, automatically associating and executing hierarchical related tasks, the problem of low generation efficiency of smart TV media resource recommendation pages is solved, and the generation efficiency of the media resource recommendation interface is significantly improved.
Patent Information
- Application Number
- CN202111241537.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-25
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-10-25
AI Technical Summary
When the existing technology generates a smart TV media resource recommendation page, the large number of tasks in the task queue results in low processing efficiency, resulting in low efficiency in generating the media resource recommendation page.
By setting a hierarchical relationship in the task queue, automatically associate and execute the target task and tasks lower than the target task, mark or remove the executed tasks, thereby optimizing the processing order and efficiency of the task queue.
It improves the execution speed of tasks in the task queue, significantly improves the efficiency of generating media resource recommendation interfaces, and reduces the time required to generate media resource recommendation pages.
Smart Images

Figure CN113986575B
Abstract
Description
Technical Field
[0001] The present application relates to the field of display technology, and in particular to a server and a method for processing multi-level data. Background Art
[0002] To facilitate users to find their favorite media by category, nowadays, the media recommendation page of smart TVs is usually equipped with multiple roughly classified navigation bar controls such as "TV series" control, "movie" control, "children" control, "education" control, etc. Each navigation bar control can correspond to multiple subdivided sidebar controls, such as "first grade" control, "second grade" control, etc. Each sidebar control can correspond to some sidebar controls for displaying media. Users can switch the type of media they want to watch by switching the navigation bar control and the sidebar control.
[0003] In order to generate the above-mentioned media resource recommendation page with navigation bar controls, sidebar controls and column controls, it is necessary to select some media resources for each column control, and then add the media resource information of these media resources to the above-mentioned navigation bar controls, sidebar controls and column resource controls to generate multiple data tables, and then integrate these multiple data tables into one data table to generate the interface data of the media resource recommendation page. In the related art, when integrating multiple data tables, a task queue is usually established, and each data table is processed one by one as a task. However, when the number of tasks contained in the task queue is large, this will cause the task queue to take a long time to process, making the generation efficiency of the media resource recommendation page low. Summary of the invention
[0004] In order to solve the technical problem of low efficiency in generating a media resource recommendation page, the present application provides a server and a multi-level data processing method.
[0005] In a first aspect, the present application provides a server, which is configured to:
[0006] Scanning a task queue, and determining an unexecuted task as a target task, wherein the task queue includes a plurality of tasks, and a hierarchical relationship is set between data of the plurality of tasks;
[0007] If the target task is not a task of the lowest level, execute the target task, and after the target task is executed, remove the target task and tasks associated with the target task that are lower in level than the target task from the task queue or mark them as executed;
[0008] If the target task is a task of the lowest level, execute the target task, and after the target task is executed, remove the target task from the task queue or mark it as executed;
[0009] Continue to process the unexecuted tasks in the task queue according to the processing method for the target task;
[0010] When there is no unexecuted task in the task queue, interface data of an interface corresponding to the task queue is generated according to the execution results of all tasks.
[0011] In some embodiments, the server is further configured to:
[0012] If the target task is not a task of the lowest level, during the execution of the target task, according to the hierarchical relationship of the target task, a task associated with the target task and having a lower level than the target task is obtained from the task queue.
[0013] In some embodiments, obtaining, in the task queue, a task associated with the target task and having a lower level than the target task includes:
[0014] Obtain in the task queue a task whose entry time is earlier than the time when the target task starts to be executed, and whose level of association with the target task is lower than that of the target task.
[0015] In some embodiments, obtaining, in the task queue, a task associated with the target task and having a lower level than the target task includes:
[0016] If the target task is a task corresponding to a navigation bar control, obtaining in the task queue a task corresponding to a sidebar control associated with the navigation bar control and a task corresponding to a column control associated with the sidebar control;
[0017] If the target task is a task corresponding to a sidebar control, the target task and the task corresponding to a column control associated with the sidebar control are obtained from the task queue.
[0018] In some embodiments, determining an unexecuted task as a target task includes:
[0019] The task that was queued last and has not been executed is determined as the target task.
[0020] In some embodiments, continuing to process the unexecuted tasks in the task queue according to the processing method for the target task includes:
[0021] The tasks in the task queue that were entered earlier than the target task continue to be processed according to the processing method for the target task and the order of the time of entering the queue from late to early.
[0022] In a second aspect, the present application provides a method for processing multi-level data, the method comprising:
[0023] Scanning a task queue, and determining an unexecuted task as a target task, wherein the task queue includes a plurality of tasks, and a hierarchical relationship is set between data of the plurality of tasks;
[0024] If the target task is not a task of the lowest level, execute the target task, and after the target task is executed, remove the target task and tasks associated with the target task that are lower in level than the target task from the task queue or mark them as executed;
[0025] If the target task is a task of the lowest level, execute the target task, and after the target task is executed, remove the target task from the task queue or mark it as executed;
[0026] Continue to process the unexecuted tasks in the task queue according to the processing method for the target task;
[0027] When there is no unexecuted task in the task queue, interface data of an interface corresponding to the task queue is generated according to the execution results of all tasks.
[0028] In some embodiments, the method further comprises:
[0029] If the target task is not a task of the lowest level, during the execution of the target task, according to the hierarchical relationship of the target task, a task associated with the target task and having a lower level than the target task is obtained from the task queue.
[0030] The server and multi-level data processing method provided by the embodiment of the present application have the following beneficial effects:
[0031] The embodiment of the present application automatically associates tasks that have a hierarchical relationship with the current task when setting tasks with a hierarchical relationship in the execution task queue, so that after executing one task, multiple associated tasks can be marked as executed or removed from the task queue, thereby improving the execution speed of tasks in the task queue and greatly improving the generation efficiency of the media resource recommendation interface. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0033] Figure 1 An operation scenario between a display device and a control apparatus according to some embodiments is shown;
[0034] Figure 2 A schematic diagram showing a media asset recommendation page according to some embodiments;
[0035] Figure 3 A schematic diagram showing a media asset recommendation page according to some embodiments;
[0036] Figure 4 A schematic diagram of a process of generating a media resource recommendation page according to some embodiments is shown;
[0037] Figure 5 A schematic flow chart of a method for processing multi-level data according to some embodiments is exemplarily shown in FIG.
[0038] Figure 6 A schematic diagram of a task queue according to some embodiments is exemplarily shown in FIG.
[0039] Figure 7 A schematic flow chart of a method for processing multi-level data according to some embodiments is exemplarily shown in FIG.
[0040] Figure 8 exemplarily shows a task processing diagram of a task queue according to some embodiments;
[0041] Fig. 9 exemplarily shows a task processing diagram of a task queue according to some embodiments;
[0042] Fig.10 exemplarily shows a task processing diagram of a task queue according to some embodiments;
[0043] Fig.11 Schematic diagram of task processing of a task queue according to some embodiments is exemplarily shown in FIG. DETAILED DESCRIPTION
[0044] In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0045] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their common and usual meanings.
[0046] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.
[0047] The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.
[0048] The display device provided in the embodiments of the present application may have various implementation forms, for example, it may be a television, a smart television, a laser projection device, a monitor, an electronic bulletin board, an electronic table, etc. Figure 1 This is a specific implementation of the display device of the present application.
[0049] Figure 1 FIG. 1 is a schematic diagram of an operation scenario between a display device and a control device according to an embodiment. Figure 1 As shown, the user can operate the display device 200 through the smart device 300 or the control apparatus 100 .
[0050] In some embodiments, the control device 100 may be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-range communication methods, and the display device 200 is controlled wirelessly or wired. The user may control the display device 200 by inputting user commands through buttons on the remote controller, voice input, control panel input, etc.
[0051] In some embodiments, a smart device 300 (such as a mobile terminal, a tablet computer, a computer, a laptop computer, etc.) may also be used to control the display device 200. For example, the display device 200 is controlled using an application running on the smart device.
[0052] In some embodiments, the display device may not use the above-mentioned smart device or control device to receive instructions, but may receive user control through touch or gestures.
[0053] In some embodiments, the display device 200 can also be controlled in a manner other than the control device 100 and the smart device 300. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the display device 200, or the user's voice command control can be received through a voice control device set outside the display device 200.
[0054] In some embodiments, the display device 200 also communicates data with the server 400. The display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks. The server 400 may provide various content and interactions to the display device 200. The server 400 may be one cluster or multiple clusters, and may include one or more types of servers.
[0055] In some embodiments, after the display device is started, it can directly enter the interface of the preset video-on-demand program.
[0056] In some embodiments, after the display device is started, it can directly enter the display interface of the last selected signal source, or the signal source selection interface, where the signal source can be a preset video on demand program, or at least one of an HDMI interface, a live TV interface, etc. After the user selects a different signal source, the display can display and present the content obtained from different signal sources.
[0057] In some embodiments, the interface of the video-on-demand program may be as follows: Figure 2 As shown in , it at least includes a navigation bar 510 and a content display area located below the navigation bar 510.
[0058] The navigation bar 510 may be provided with a plurality of navigation bar controls. Figure 2 The following navigation bar controls are included: "VIP" control, "Footprint" control, "News" control, "Education" control, "Movies and TV" control, "Children" control, "Shopping" control, "Game" control and "Application" control.
[0059] The content display area can display the content corresponding to the navigation bar control selected in the navigation bar. For example, the content display area has multiple media asset controls, and the media asset controls can display a media asset poster and a media asset title.
[0060] In some embodiments, the content display area may include a sidebar 520 and controls located on one side of the sidebar 520 .
[0061] See also Figure 2 , the sidebar 520 may be provided with a plurality of sidebar controls. Figure 2 The following sidebar controls are included: "Featured" control, "Knowledge" control, "Interactive Classroom" control, "Customization" control, "Fitness" control, "First Grade" control and "Second Grade" control.
[0062] The controls located on one side of the sidebar 520 may include column controls, and each column control may include one control or multiple controls, such as a media asset control, an advertisement control, and the like. Figure 2The following column controls are included: Column 1 controls include two media asset controls, namely "Media Asset 1" control and "Media Asset 2" control; Column 2 controls include four media asset controls, namely "Media Asset 3" control, "Media Asset 4" control, "Media Asset 5" control and "Media Asset 6" control; Column 3 controls include one advertisement control, namely "Advertisement 1" control.
[0063] In some embodiments, the column controls located on one side of the sidebar 520 may also include operation controls such as "History", "My Favorites" and "Open VIP".
[0064] In some embodiments, Figure 2 In the interface shown, the following hierarchical relationship is set between the navigation bar control, the sidebar control and the column control: navigation bar control - sidebar control - column control, that is, there are multiple sidebar controls under the navigation bar control, and each sidebar control has multiple column controls under it. According to this hierarchical relationship, the sidebar control in the content display area will change with the navigation bar control selected in the navigation bar, and the control in the content display area will change with the navigation bar control selected in the navigation bar, and will also change with the sidebar control selected in the sidebar.
[0065] In some embodiments, Figure 2 The interface shown may be referred to as a media resource recommendation interface, the interface data of which is pre-generated by a server and then sent to a display device for display after the display device enters a video-on-demand program.
[0066] Figure 2 Includes a large number of controls to generate Figure 2 The method of the interface shown is relatively complex. To facilitate the description of the method of generating a media resource recommendation page on the server, Figure 3 FIG. 1 is a schematic diagram showing a media asset recommendation page according to some embodiments. Figure 3 In a media resource recommendation page, the navigation bar is only provided with "Education" control and "Movie" control, and the sidebar corresponding to the "Education" control is only provided with "First Grade" control and "Second Grade" control, wherein the "First Grade" control corresponds to three column controls, including "Media Resource 7" control, "Media Resource 8" control and "Advertisement 2" control respectively, and the media resource controls corresponding to the "Second Grade" control include "Media Resource 9" control (not shown), and the sidebar corresponding to the "Movie" control is provided with a "Free" control (not shown), and the number of column controls corresponding to the "Free" control is 0.
[0067] The following generates a server Figure 3 The method of the interface shown is introduced, and the server generates Figure 2 The methods of the interface shown or other hierarchical interfaces can be adaptively adjusted with reference to this method.
[0068] See also Figure 4 , is a schematic diagram of a process of generating a media resource recommendation page according to some embodiments. Figure 4 As shown, for a media resource recommendation interface, an operator can arrange columns, wherein each column corresponds to a column control. Different columns can be arranged by different operators to improve arrangement efficiency. Arranging columns may refer to arranging the content of the column, for example, the ID of the media resource or advertisement corresponding to the column control.
[0069] After the operator arranges the columns, he can write each column into the data table separately to obtain N data tables, namely Data Table 1, Data Table 2, ... Data Table N, where N is greater than or equal to 2. In some embodiments, the operator can obtain partial or all information of the media asset or advertisement in the database, such as media asset posters, media asset titles, media asset playback addresses, etc., based on the ID of the media asset or advertisement corresponding to each column determined when arranging the columns. It should be noted that Data Table 1, Data Table 2, ... Data Table N are tables that are related in content. For example, Data Table 1 and Data Table 2 are both data tables corresponding to the "first grade" control, and these two data tables are related.
[0070] Each data table contains all the information of a column, such as the corresponding media asset ID, playback address, media asset poster, media asset title, sidebar control identifier, navigation bar control identifier and other information. The sidebar control identifier is the identifier of the sidebar control corresponding to the column, and the navigation bar control identifier is the identifier of the sidebar control corresponding to the column.
[0071] Although some data tables are related in content, these data tables may be operated separately and have no connection in form. In order to facilitate the management of the data in these data tables, these data tables need to be summarized.
[0072] After generating multiple data tables, you can generate and publish tasks. After the task is executed, you can integrate the data of multiple data tables into one data table to obtain a data table with a single structure, which can be called a data summary table. The single structure means that the data summary table is one table, not multiple tables.
[0073] exist Figure 4 After obtaining the data summary table, the data summary table can be integrated with the arrangement data of the media resource recommendation page to obtain the interface data of the media resource recommendation page. After the interface data is sent to the display device, the display device can generate the media resource recommendation page according to the interface data.
[0074] In some embodiments, the editing data may include the size, position, control type and control identifier of various controls on the media recommendation page, wherein the control type may include control types such as navigation bar control type, sidebar control type and media control type, and the control identifier is the identity identifier of the control, which may be a control ID.
[0075] In some embodiments, Figure 4 The obtained data summary table can be called the content data of the media recommendation page. The content data may include display data, response data and control identification of various controls on the media recommendation page, wherein the display data may include pictures and titles, and the response data may include interface data or interface URL that jumps to the corresponding interface after the control is triggered.
[0076] In some embodiments, each control identifier may be set with a hierarchical relationship, for example, a hierarchical relationship is: control identifier 1 - control identifier 2 - control identifier 3, indicating that the parent control of the control corresponding to control identifier 2 is the control corresponding to control identifier 1, and the child control of the control corresponding to control identifier 2 is the control corresponding to control identifier 3. The hierarchical relationship may be pre-stored on the server.
[0077] It can be seen that after the task is released, the efficiency of task execution has an important impact on the efficiency of generating interface data of the media resource recommendation page. In order to improve the efficiency of generating interface data of the media resource recommendation page, the embodiment of the present application provides a multi-level data processing method.
[0078] See also Figure 5 , the multi-level data processing method may include the following steps:
[0079] Step S101: Scan the task queue and determine an unexecuted task as a target task, wherein the task queue includes a plurality of tasks, and a hierarchical relationship is set between data of the plurality of tasks.
[0080] In some embodiments, the task queue can be based on Figure 4 Multiple data tables are generated. According to each control identifier in the data table, a task can be generated in turn to form a task queue.
[0081] In some embodiments, for a task queue, tasks in the queue are processed as a whole according to the "first in, first out" rule, where "as a whole" means that when or after processing an unexecuted task, the associated tasks queued before the task will no longer be processed, that is, in the entire task queue, except for tasks that are not processed, the order of processed tasks is advanced sequentially according to the "first in, first out" rule.
[0082] In some embodiments, scanning the task queue means scanning unexecuted tasks from the beginning of the queue, stopping scanning after scanning an unexecuted target task, confirming the task as the target task, and executing the task. After executing the task or after executing it, the task queue can be scanned again.
[0083] In some embodiments, the scanning task queue may also be a one-time scan of all unexecuted tasks in the task queue. After one task is executed, the task queue may be scanned again.
[0084] In some embodiments, a hierarchical relationship is set between multiple tasks in the task queue, and the hierarchical relationship can be determined by the hierarchical relationship between controls. For example, for a hierarchical relationship: navigation bar control 1 - sidebar control 1 - column control 1, the tasks corresponding to these three controls are navigation task 1, sidebar task 1, and column task 1, respectively, and the hierarchical relationship of these three tasks is: navigation task 1 - sidebar task 1 - column task 1; for a hierarchical relationship: navigation bar control 10 - sidebar control 10 - column control 10, the tasks corresponding to these three controls are navigation task 10, sidebar task 10, and column task 10, respectively, and the hierarchical relationship of these three tasks is: navigation task 10 - sidebar task 10 - column task 10. Among them, navigation task 1 is the task of the upper level of sidebar task 1, column task 1 is the task of the lower level of sidebar task 1, navigation task 10 is the task of the upper level of sidebar task 10, and column task 10 is the task of the lower level of sidebar task 10.
[0085] Step S102: If the target task is not a task at the lowest level, execute the target task. After the target task is executed, remove the target task and tasks associated with the target task at a level lower than the target task from the task queue or mark them as executed.
[0086] In some embodiments, after a target task in the task queue is obtained, a control ID and a control type may be obtained from the information of the task. The control type may be a navigation bar control, a sidebar control, or a column control.
[0087] In some embodiments, the server is configured to automatically scan the next level of tasks of the target task in the target queue when starting to execute a target task or after execution. If the next level of tasks is scanned, the server continues to scan the next level of tasks of the next level.
[0088] In some embodiments, tasks of one level include the content of tasks of the next level by default, so that when a task is executed, the content of its next level of tasks is also executed by default. For example, if the target task is task 1, the tasks of the next level after task 1 in the task queue include task 2, and the tasks of the next level after task 2 in the task queue include task 3. After task 1 is executed, tasks 2 and 3 are also executed. Therefore, tasks 2 and 3 can be removed from the task queue or marked as executed, wherein the removal action and marking action can be set during the execution of task 1 or after the execution is completed. If set during the execution process, the execution efficiency of the task queue can be improved. Of course, this requires the computing power support of the server.
[0089] In some embodiments, the server may not store the hierarchical relationship between tasks, but only store the hierarchical relationship between controls, and the hierarchical relationship between tasks may be determined based on the hierarchical relationship between controls. The server may search for controls that are hierarchically below the control in the hierarchical relationship stored on the server according to the ID of the control. Among them, according to the hierarchical relationship between controls, the first-level control is the navigation bar control, the second-level control is the sidebar control, and the third-level control is the column control. According to the hierarchical relationship, the next-level control of the control corresponding to the target task is obtained, and then the tasks corresponding to these obtained controls are obtained in the task queue. Of course, if there are more levels of controls, such as a fourth-level control, the fourth-level control is also obtained, that is, the tasks corresponding to all levels of associated controls are obtained.
[0090] In some embodiments, the control ID of any level can be directly searched in the hierarchical relationship stored in the server for controls above or below the control. Therefore, controls of all levels corresponding to the control ID can be obtained according to the hierarchical relationship stored in the server, and then tasks corresponding to these obtained controls can be obtained in the task queue.
[0091] In some embodiments, executing a task means storing the data corresponding to the task separately according to the hierarchical relationship stored in the server.
[0092] In some embodiments, since the triggering of tasks is generated in the order arranged by the operation module, it is possible that tasks corresponding to functions at different levels of the same business unit are generated in the task queue. However, due to the nature of the functions themselves (for example, the education navigation includes the first-grade sidebar, and the first-grade sidebar includes column 1 under the first-grade sidebar), in the tasks at the same time in the queue, the upper-level tasks of a functional module in the same business include the task logic of the lower-level tasks of the functional module in the business. For example, the upper-level task logic of the education navigation functional module includes: the task logic of the first-grade sidebar tasks, the task logic of the second-grade sidebar tasks, and other task logics. The upper-level task logic of the first-grade sidebar functional module includes: the task logic of column 1 tasks under the first-grade sidebar, the task logic of column 2 tasks under the first-grade sidebar, the task logic of column 3 tasks under the first-grade sidebar, and other task logics. The upper-level task logic of the second-grade sidebar functional module includes: the task logic of column 1 tasks under the second-grade sidebar, and other task logics. The upper-level task logic of the movie navigation module includes the task logic of the free sidebar task and other task logics. As long as the upper-level task logic is executed, the lower-level task logic will also be executed accordingly during the execution of the upper-level task logic, and there is no need to execute it again.
[0093] Step S103: If the target task is a task at the lowest level, execute the target task. After the target task is executed, remove the target task from the task queue or mark it as executed.
[0094] In some embodiments, if the target team is a task at the lowest level, the task will not have a task at the next level in the task queue. Therefore, after the target task is executed, the target task can be removed from the task queue or marked as executed.
[0095] Step S104: Continue to process the unexecuted tasks in the task queue according to the processing method for the target task.
[0096] In some embodiments, after executing a target task, the task queue continues to be scanned.
[0097] In some embodiments, after the first task is executed and all associated tasks at a level lower than the task are removed from the task queue or marked as completed, the latest unexecuted task in the task queue may be scanned.
[0098] Step S105: when there is no unexecuted task in the task queue, interface data of the interface corresponding to the task queue is generated according to the execution results of all tasks.
[0099] In some embodiments, when there are no unexecuted tasks in the task queue, the execution results of all tasks can be obtained when generating interface data of the interface corresponding to the task queue based on the execution results of all tasks, and integrated with the editing data of the media resource recommendation page to generate interface data of the interface corresponding to the task queue.
[0100] Depend on Figure 5 It can be seen that the multi-level data processing method provided in the embodiment of the present application can speed up the processing speed of the task queue by selecting multiple related tasks in one task queue at one time.
[0101] To further describe the method for processing multi-level data of a media resource recommendation page, a specific task queue is taken as an example to further introduce the method for processing multi-level data provided in the embodiment of the present application.
[0102] See also Figure 6 , a corresponding Figure 3 The task queue includes the following nine tasks: "Education Navigation" task, "First Grade Sidebar" task, "Second Grade Sidebar" task, "Movie Navigation" task, "First Grade Sidebar Column 1" task, "First Grade Sidebar Column 2" task, "First Grade Sidebar Column 3" task, "Second Grade Sidebar Column 1" task and "Free Sidebar" task. Among them, the first task to enter the task queue is the "Education Navigation" task, and the last task to enter the task queue is the "Free Sidebar" task.
[0103] It should be noted that in actual implementation, new tasks may be added to the queue during the execution of the task queue. Figure 2 When the task queue is initialized, the task queue is initialized as Figure 6 As shown, during the execution of the task queue, a new task enters the task queue. The new task may be the next level task of the executed task in the task queue, such as the next level task of the "second grade sidebar" task, which corresponds to the "media asset 9" control. It may also be the next level task of the new navigation task, such as the next level task of the "children's navigation" task, where the "children's navigation" task corresponds to Figure 2 The "Children" control in the navigation bar.
[0104] In some embodiments, tasks in a queue may be represented by a control identifier-control type. Figure 6 The tasks in can be as follows: Control ID1-Control Type a, Control ID2-Control Type b, Control ID3-Control Type b, Control ID4-Control Type a, Control ID5-Control Type c, Control ID6-Control Type b, Control ID7-Control Type c, Control ID8-Control Type c, Control ID9-Control Type b.
[0105] Among them, control type a represents a navigation bar control, control type b represents a sidebar control, and control type c represents a column control.
[0106] The control corresponding to control ID1 is the "Education" control in the navigation bar, the control corresponding to control ID2 is the "First Grade" control, the control corresponding to control ID3 is the "Second Grade" control, the control corresponding to control ID4 is the "Movie" control in the navigation bar, the control corresponding to control ID5 is the "Media Assets 7" control, the control corresponding to control ID6 is the "Media Assets 8" control, the control corresponding to control ID7 is the "Advertising" control, the control corresponding to control ID8 is the "Media Assets 9" control, and the control corresponding to control ID9 is the "Free" control.
[0107] For the task queue shown in 6, a multi-level data processing method can be found in Figure 7 , including the following steps:
[0108] Step S201: Scan the task queue.
[0109] In some embodiments, each task in the task queue is provided with a status mark, and the status mark has two forms, one indicating execution and the other indicating non-execution. When the task queue is just processed, the status mark of each task in the task queue is non-execution.
[0110] Step S202: Take out the first task in the task queue.
[0111] In some embodiments, the first task refers to the first task that enters the task queue. Figure 6 In the queue shown, the first task is the "Education Navigation" task, which is the target task that needs to be executed.
[0112] Step S203: Execute the first task.
[0113] In some embodiments, after the target task is retrieved, the start time of the target task execution may be recorded, and the target task execution may be started at that time. In some embodiments, after the target task is retrieved, the execution may be started directly, and the start time of the execution may be recorded. Figure 8 The first task executed is the "Education Navigation" task.
[0114] In some embodiments, the execution process of a target task is:
[0115] If the target task is not a task of the lowest level, the data of the controls corresponding to the target task and the data of the controls at the next level are filled into a blank data table according to the data table corresponding to the target task. After all tasks in the task queue have been processed, the blank data table becomes a data summary table. Alternatively, the data of the controls corresponding to the target task and the data of the controls at the next level are filled into an old data summary table. After all tasks in the task queue have been processed, the old data summary table becomes a new data summary table.
[0116] If the next-level control has a next-level control, update the data of the next-level control of the next-level control, and so on. If the target task is a task at the lowest level, update the data of the control corresponding to the target task only according to the data table corresponding to the target task.
[0117] For example, for the "Education Navigation" task, the data table contains a control name: "Course", then the control name is written into the data summary table to update the control name from "Education" to "Course"; according to the data table corresponding to the next-level control, the data of the next-level control is updated. For example, for the "Education" control, the data of the "First Grade Sidebar" control, the "Second Grade Sidebar" control, the "First Grade Sidebar Column 1" control, the "First Grade Sidebar Column 2" control, the "First Grade Sidebar Column 3" control, and the "Second Grade Sidebar Column 1" control are updated to Figure 4 The data in the corresponding data tables.
[0118] for Figure 6 In the queue shown, the "Education Navigation" task is set to a gray background after execution, indicating that the processing of the task has been completed, and other tasks are set to a white background, indicating that they are not processed. Among them, the processing of a task includes executing it and then marking it as completed, or not executing it and directly marking it as completed.
[0119] Step S204: parsing the sidebar data list under the first task.
[0120] In some embodiments, the sidebar list can be obtained according to the hierarchical relationship, wherein the hierarchical relationship of the sidebar controls corresponding to each navigation bar control is stored in the form of a sidebar data list, and of course, it can also be stored in other forms, for example, in the form of a tree diagram.
[0121] Step S205: Query the task queue according to the sidebar data list.
[0122] In some embodiments, after obtaining the sidebar data list corresponding to the navigation bar control, the control IDs of multiple sidebar controls can be obtained from the sidebar data list, and the sidebar tasks corresponding to these control IDs can be searched in the task queue.
[0123] Step S206: Acquire a sidebar task whose entry time is before the execution start time of the first task and whose level is one level below the first task.
[0124] In some embodiments, Figure 6 In the example, when the first task starts to be executed, the sidebar tasks corresponding to the "Education Navigation" task that has been queued include: "First Grade Sidebar" task and "Second Grade Sidebar" task.
[0125] Step S207: parsing the column data list under each sidebar.
[0126] In some embodiments, after the sidebar data list is obtained in step S204, the column control corresponding to each sidebar control can be obtained according to the hierarchical relationship, wherein the column control corresponding to each sidebar control is stored in the form of a column data list.
[0127] Step S208: Query the task queue according to the column data list.
[0128] In some embodiments, after obtaining the column data list corresponding to the sidebar control, the control IDs of multiple column controls can be obtained from the column data list, and the column tasks corresponding to these control IDs can be searched in the task queue.
[0129] Step S209: Obtaining a column task whose entry time is before the execution start time of the first task and whose level is the next level of the queried sidebar task.
[0130] In some embodiments, Figure 6 In the example, when the first task starts to be executed, the column tasks corresponding to the "First Grade Sidebar" task that has been queued include: "First Grade Sidebar Column 1" task, "First Grade Sidebar Column 2" task, and "First Grade Sidebar Column 3" task. The column tasks corresponding to the "Second Grade Sidebar" task that has been queued include: "Second Grade Sidebar Column 1" task.
[0131] Step S210: Mark the acquired sidebar tasks and column tasks as completed in the task queue.
[0132] In some embodiments, the sidebar tasks and column tasks queried in the previous step can be marked as completed in the task queue. The marking method can be to set the status mark to executed. The specific method can be to set the task in the task queue to a gray background color, and the tasks with a status mark of not executed have a white or default theme color in the task queue, such as blue.
[0133] See also Fig. 9 The level corresponding to the "Education Navigation" task is lower than this task, and the tasks that were queued before the start of this task are: "First Grade Sidebar", "First Grade Sidebar Column 1" task, "First Grade Sidebar Column 2" task, "First Grade Sidebar Column 3" task, "Second Grade Sidebar" task, and "Second Grade Sidebar Column 1" task. These tasks are all set to a gray background color, indicating that they have been processed.
[0134] In some embodiments, the status flag may not be set and the task may be directly removed from the task queue.
[0135] Step S211: Continue scanning the task queue and start executing from the next unfinished task.
[0136] According to the above-mentioned method for processing the hierarchical relationship, in some embodiments, for Figure 6 The task queue shown can be automatically associated when executing the first task, the "Education Navigation" task Fig. 9 Mark the "First Grade Sidebar Task", "Second Grade Sidebar Task", "First Grade Sidebar Column 1" Task, "First Grade Sidebar Column 2" Task, First Grade Sidebar Column 3" Task, "Second Grade Sidebar Column 1" Task as completed. Continue scanning the task queue, see Fig.10 , you can scan the "Movie Navigation" task. When executing this task, the task is marked as gray after completion. Scan the tasks associated with this task queue and get the "Free Sidebar" task. Mark the "Free Sidebar" task as completed, see Fig.11 At this time, all tasks in the task queue have been executed.
[0137] In some embodiments, for Figure 6 In the task queue shown, after executing the task corresponding to the "Education" control, the task corresponding to the "Movie" control and the associated tasks, the remaining tasks in the task queue are automatically marked as completed. Only two tasks need to be executed to complete the task processing of the entire task queue. After completing the task processing, the interface data of the media resource recommendation page can be generated according to the obtained data summary table.
[0138] It can be seen that for Figure 6The task queue shown, according to the multi-level data processing method provided in the embodiment of the present application, only needs to perform task processing twice to complete the execution of all tasks in the task queue. Assuming that the time for executing a task is one minute, it only takes two minutes to complete the execution of the tasks in the task queue. If the method of executing one task at a time is followed, it takes nine minutes to complete the execution of the tasks in the task queue. It can be seen that the present application significantly improves the execution efficiency of the task queue, thereby improving the generation efficiency of the media resource recommendation interface.
[0139] It can be seen from the above embodiments that the embodiments of the present application automatically associate tasks that have a hierarchical relationship with the current task when setting tasks with a hierarchical relationship in the execution task queue, so that after executing a task, multiple associated tasks can be marked as executed or removed from the task queue, thereby improving the execution speed of tasks in the task queue and greatly improving the generation efficiency of the media resource recommendation interface.
[0140] Since the above embodiments are all described by citing and combining with other embodiments, different embodiments have the same parts, and the same and similar parts between the embodiments in this specification can be referred to each other. No further detailed description is given here.
[0141] It should be noted that, in this specification, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a circuit structure, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such circuit structure, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the circuit structure, article or device including the element.
[0142] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the disclosure of the invention herein. The present application is intended to cover any modification, use or adaptation of the present invention, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the content of the claims.
[0143] The above implementation modes of the present application do not constitute a limitation on the protection scope of the present application.
Claims
1. A server, characterized in that: The server is configured to: Generate multiple data tables, and generate tasks corresponding to each control identifier in turn according to the control identifier in the data table to generate queue tasks; wherein each control identifier corresponds to one task; Scan the task queue, and determine an unexecuted task as a target task, wherein the task queue includes multiple tasks, and a hierarchical relationship is set between the data of the multiple tasks, and the hierarchical relationship is determined based on the hierarchical relationship of the controls on the media asset recommendation page, and the controls include multiple navigation bar controls, sidebar controls, and column controls, and the level of the navigation bar control is higher than the level of the sidebar control, and the level of the sidebar control is higher than the level of the column control; If the target task is not a task of the lowest level, execute the target task based on the data table of the target task, and after the target task is executed, remove the target task and the tasks associated with the target task at a level lower than the target task from the task queue or mark them as executed, the task logic of the target task including the task logic of the lower-level tasks, and the lower-level tasks are the tasks associated with the target task at a level lower than the target task; If the target task is a task of the lowest level, execute the target task based on the data table of the target task, and after the target task is executed, remove the target task from the task queue or mark it as executed; If the target task is not a task of the lowest level, during the execution of the target task, according to the hierarchical relationship of the target task, a task associated with the target task and having a lower level than the target task is obtained and executed in the task queue; Continue to process the unexecuted tasks in the task queue according to the processing method for the target task; When there is no unexecuted task in the task queue, generating interface data of the interface corresponding to the task queue according to the execution results of all tasks; After all tasks in the task queue are processed, the data from multiple data tables are integrated into one data table.
2. The server according to claim 1, characterized in that: Acquiring, in the task queue, a task associated with the target task and having a lower level than the target task, comprising: Obtain in the task queue a task whose entry time is earlier than the time when the target task starts to be executed, and whose level associated with the target task is lower than that of the target task.
3. The server according to claim 1, characterized in that: Acquiring, in the task queue, a task associated with the target task and having a lower level than the target task, comprising: If the target task is a task corresponding to a navigation bar control, obtaining in the task queue a task corresponding to a sidebar control associated with the navigation bar control and a task corresponding to a column control associated with the sidebar control; If the target task is a task corresponding to a sidebar control, the target task and the task corresponding to a column control associated with the sidebar control are obtained from the task queue.
4. The server according to claim 1, characterized in that: Identify an unexecuted task as a target task, including: The task that was queued last and has not been executed is determined as the target task.
5. The server according to claim 4, characterized in that: Continuing to process the unexecuted tasks in the task queue according to the processing method for the target task, including: The tasks in the task queue that were entered earlier than the target task are continuously processed according to the processing method for the target task and the order of the time of entering the queue from late to early.
6. A method for processing multi-level data, characterized in that: include: Generate multiple data tables, and generate tasks corresponding to each control identifier in turn according to the control identifier in the data table to generate queue tasks; wherein each control identifier corresponds to one task; Scan the task queue, and determine an unexecuted task as a target task, wherein the task queue includes multiple tasks, and a hierarchical relationship is set between the data of the multiple tasks, and the hierarchical relationship is determined based on the hierarchical relationship of the controls on the media asset recommendation page, and the controls include multiple navigation bar controls, sidebar controls, and column controls, and the level of the navigation bar control is higher than the level of the sidebar control, and the level of the sidebar control is higher than the level of the column control; If the target task is not a task of the lowest level, execute the target task based on the data table of the target task, and after the target task is executed, remove the target task and the tasks associated with the target task at a level lower than the target task from the task queue or mark them as executed, the task logic of the target task including the task logic of the lower-level tasks, and the lower-level tasks are the tasks associated with the target task at a level lower than the target task; If the target task is a task of the lowest level, execute the target task based on the data table of the target task, and after the target task is executed, remove the target task from the task queue or mark it as executed; If the target task is not a task of the lowest level, during the execution of the target task, according to the hierarchical relationship of the target task, a task associated with the target task and having a lower level than the target task is obtained and executed in the task queue; Continue to process the unexecuted tasks in the task queue according to the processing method for the target task; When there is no unexecuted task in the task queue, generating interface data of the interface corresponding to the task queue according to the execution results of all tasks; After all tasks in the task queue are processed, the data from multiple data tables are integrated into one data table.
7. The method for processing multi-level data according to claim 6, characterized in that: Acquiring, in the task queue, a task associated with the target task and having a lower level than the target task, comprising: Obtain in the task queue a task whose entry time is earlier than the time when the target task starts to be executed, and whose level associated with the target task is lower than that of the target task.
8. The method for processing multi-level data according to claim 6, characterized in that: Acquiring, in the task queue, a task associated with the target task and having a lower level than the target task, comprising: If the target task is a task corresponding to a navigation bar control, obtaining in the task queue a task corresponding to a sidebar control associated with the navigation bar control and a task corresponding to a column control associated with the sidebar control; If the target task is a task corresponding to the sidebar control, a task corresponding to the column control associated with the sidebar control is obtained in the task queue.
