Method and system for displaying to-do data based on calendar view
By using a calendar-based method for displaying to-do data, combined with a table view and sorting algorithm, the problem of the inability to integrate lists and calendars in traditional to-do display modes is solved, enabling efficient and clear display and planning of tasks.
Patent Information
- Application Number
- CN202511896156.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-03-31
AI Technical Summary
Traditional to-do list display methods cannot effectively integrate the detail of a list with the time sequence of a calendar, resulting in low task management efficiency and making it difficult for users to clearly organize multi-day task data and time relationships.
The method of displaying to-do data based on calendar view is adopted. By constructing a table view and configuring a weekly date set view with odd rows, and combining sorting and filtering algorithms, multiple arrays organized by week are generated and displayed on the calendar view. It supports user selection and dynamic updates.
It enables a seamless display of to-do items in the calendar view, clearly showing the urgency and duration of tasks, improving the rationality of task scheduling and planning efficiency, and supporting high customization and flexible adjustment to adapt to complex task scenarios.
Smart Images

Figure CN121766264A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of front-end development technology, and more specifically, to a method and system for displaying to-do data based on a calendar view. Background Technology
[0002] In current task management practices, traditional display methods have significant limitations. While a simple to-do list clearly presents the details of daily tasks, it struggles to effectively organize multi-day task data, easily leading to information chaos. Furthermore, the list mode lacks an intuitive expression of the temporal relationships between long-term plans and tasks, making it difficult for users to clearly define time allocation and easily causing task delays or misjudgments of time consumption. On the other hand, while a simple calendar mode offers a clear timeline and a global view, it cannot support the detailed content display capabilities of the list mode, resulting in the hiding of key task information and reduced operational and retrieval efficiency. These two modes operate independently, failing to effectively integrate the detail of lists with the temporal advantages of calendars, thus hindering the overall effectiveness of task management. Therefore, an innovative display method is urgently needed to resolve these contradictions in a unified view, achieving effective coordination between macro-level task planning and micro-level management.
[0003] No effective solutions have yet been proposed to address the problems in the relevant technologies. Summary of the Invention
[0004] In view of the problems in the related technologies, the present invention proposes a method and system for displaying to-do data based on a calendar view, so as to overcome the above-mentioned technical problems existing in the existing related technologies.
[0005] Therefore, the specific technical solution adopted by the present invention is as follows: According to one aspect of the present invention, a method for displaying to-do data based on a calendar view is provided, comprising: Build a calendar view based on a table view, and configure the odd-numbered rows of the table view to display a collection view of weekly dates; Determine the start and end dates for the calendar view, and retrieve to-do items whose start time or duration falls between the start and end dates; Sort the pending task data and create multiple weekly arrays based on the sorting results to store the sorted pending task data; within each weekly array, create subarrays according to the maximum number of rows displayed per day; The sorted to-do list data is filled into the corresponding row subarray of the week according to its duration, and when the duration spans across weeks, it is continuously filled into the same row subarray of the subsequent weeks for display on the calendar view; Based on the user's selection of a date in the calendar view, expand and display the to-do list data for that date, and re-filter and populate the calendar view based on changes in the to-do list data.
[0006] Furthermore, building a calendar view based on a table view, and configuring the odd-numbered rows of the table view as a collection view displaying weekly dates, includes: Set the number of rows in the table view to twice the number of weeks displayed for each month; Place a collection view in the cells of the odd-numbered rows of the table view. The collection view contains seven cells to correspond to each day of the week. When a user clicks on a cell in the collection view, the row containing that cell is automatically moved to the top of the table view, and the next cell in the table view is expanded to display the to-do list data corresponding to the clicked date.
[0007] Furthermore, the pending task data is sorted, and multiple weekly organized arrays are created based on the sorting results to store the sorted pending task data, including: Input all pending task data, initialize the sorting algorithm parameters and maximum number of iterations, and create an empty array structure for organizing the data by week; Generate a random initial ordering scheme for the to-do list, calculate the overall evaluation score of the ordering scheme, set the taboo list and frequency record list to zero, and initialize the list used to record the optimal solution in the iteration. In each iteration, the currently obtained optimal sorting scheme of to-do items and its score are recorded in a list; When the list length reaches the memory requirement, the sorting schemes of all to-do items recorded in the list are filtered and compared to obtain the globally optimal sorting scheme for to-do items within the current memory period. If the maximum number of iterations is reached, the globally optimal to-do list data sorting scheme will be used as the sorting result to create multiple weekly organized arrays to store the sorted to-do list data. The current to-do list data ranking scheme is filtered using a filtering algorithm to generate several neighboring candidate to-do list data ranking schemes, and the evaluation score of each candidate to-do list data ranking scheme is calculated. Based on the taboo criterion, select the best to-do item data sorting scheme from the candidate schemes that is not taboo and does not exceed the frequency limit as the new current to-do item data sorting scheme, and determine whether it is better than the globally optimal to-do item data sorting scheme. If so, update the globally optimal to-do item data sorting scheme.
[0008] Furthermore, a filtering algorithm is used to filter the current to-do list data ranking schemes, generating several neighboring candidate to-do list data ranking schemes, and calculating the evaluation score for each candidate to-do list data ranking scheme, including: Initialize the parameters of the filtering algorithm and set the maximum number of iterations; randomly generate a set of sorting schemes for to-do items, calculate their evaluation scores, and perform preliminary sorting and filtering based on the scores; The optimal sorting scheme for the selected to-do items is stored in the candidate set, and a grid coordinate system is established based on the distribution of evaluation scores. Based on grid coordinates, a roulette wheel selection mechanism is used to select a reference scheme from the candidate set for each current pending item data sorting scheme. Based on the current to-do list data sorting scheme and the reference scheme, different strategies are used to generate two adjacent candidate to-do list data sorting schemes. Calculate and compare the evaluation scores of two adjacent candidate to-do list data ranking schemes, and select the candidate to-do list data with the highest score as the new to-do list data ranking scheme; Merge all updated new to-do list data sorting schemes with the candidate set, and calculate the evaluation score for each candidate to-do list data sorting scheme after the merger.
[0009] Furthermore, the optimal ranking scheme for the selected to-do items is stored in the candidate set, and a grid coordinate system is established based on the distribution of evaluation scores, including: The optimal ranking scheme of the pending items data obtained from the initial screening is stored in the candidate set, and the calculated evaluation score is recorded for each pending item data ranking scheme in the candidate set. Analyze the evaluation scores of all pending items in the candidate set, determine the overall distribution range of the evaluation scores, and divide the overall distribution range into multiple continuous grid intervals; Based on the evaluation score of each to-do item data sorting scheme, determine the grid interval to which each to-do item data sorting scheme belongs and establish grid coordinates.
[0010] Furthermore, the evaluation scores of the ranking schemes for all pending items in the candidate set are analyzed to determine the overall distribution range of the evaluation scores, and this overall distribution range is divided into multiple continuous grid intervals, including: Extract the evaluation score corresponding to the data sorting scheme of each to-do item in the candidate set to form an initial score dataset; Analyze all values in the score dataset to determine the minimum and maximum evaluation scores. The number of continuous grid intervals to be divided is determined based on the overall span between the minimum and maximum evaluation scores. Based on the overall span and the number of consecutive grid intervals, the overall distribution range of the evaluation scores is equally divided into multiple consecutive score intervals, each interval being a grid.
[0011] Furthermore, based on grid coordinates, a roulette wheel selection mechanism is used to select a reference scheme from the candidate set for each current pending item data sorting scheme, including: Calculate the probability weight of each grid being selected based on the evaluation score of the grid to which each to-do item data sorting scheme belongs in the candidate set; The probability weights of each grid are summed sequentially to construct a cumulative probability distribution from zero to one, with each grid corresponding to a unique probability interval; Generate a uniformly distributed random number between zero and one, and determine the selected target grid based on the cumulative probability interval into which the random number falls; From the selected target grid, randomly select a sorting scheme for the to-do items data and use it as a reference scheme for the current sorting scheme for the to-do items data.
[0012] Furthermore, the sorted to-do list data is populated into the corresponding row subarray for each week according to its duration, and when the duration spans multiple weeks, it is continuously populated into the same row subarray for subsequent weeks, for display in the calendar view, including: Starting from the start date of the current page's calendar view, based on the priority order of all to-do items, filter out the to-do item with the highest priority for that start date and fill it into the corresponding row subarray of the week in which its start date is located. Then, determine the filling length of this to-do item based on the length of all to-do items and complete the filling process. Once the population is complete, the data for the highest priority items that have not been marked as pending items will be re-filtered and populated starting from the first day after the completion date. If there is no available to-do data for the day, then blank to-do data for a duration of one day will be stored in the subarray of the corresponding week and row. When the first row of to-do items for each week is full, the highest priority to-do item data is retrieved from all remaining unmarked to-do items and stored in the second row of the starting week's subarray. This process is repeated until each row for each week from the start date to the end date is filled, and the to-do item data is then displayed on the calendar view. When the number of to-do items exceeds the due date of the current calendar view, switch to the next calendar view, update the data source and to-do item data based on the new start date to the due date, and re-execute the filtering and filling process according to the priority order of all to-do item data; When any to-do item data is updated, the filtering and population process is re-executed based on the updated to-do item data, starting from the start date of the current page's calendar view, to update the display on the calendar view.
[0013] Furthermore, starting from the start date of the current page's calendar view, based on the priority order of all to-do items, the to-do item with the highest priority for that start date is selected and populated into the corresponding row subarray of the week containing its start date. The population length for this to-do item is determined based on the length of all to-do items, and the population process is completed, including: Starting from the beginning date of the current page's calendar view, filter out the to-do item with the highest priority for that date based on the priority order of all to-do items; The selected to-do items are populated into the corresponding row subarray of the week in which their start date is located, and the to-do item is marked as used. Based on the duration of the to-do list data following the mark, determine the date range that needs to be filled; If the duration of the to-do item data after the mark exceeds the preset value, after filling the row subarray of the first week, continue to fill it into the same row subarray of the next week, and repeat the filling process until the duration is met or the due date of the current page calendar view is reached, and then the filling is completed.
[0014] According to another aspect of the present invention, a calendar-view-based to-do data display system is also provided, the system comprising: The interface building module is used to build a calendar view based on a table view and configure the odd-numbered rows of the table view to display a collection view of weekly dates; The data acquisition module is used to determine the start date and end date corresponding to the calendar view, and to acquire to-do items whose start time or duration falls within the period from the start date to the end date. The data organization module is used to sort the pending task data and create multiple weekly arrays based on the sorting results to store the sorted pending task data; within each weekly array, subarrays are created according to the maximum number of rows displayed per day. The layout display module is used to fill the sorted to-do list data into the corresponding row subarray of the corresponding week according to its duration, and continuously fill it into the same row subarray of the subsequent week when the duration spans across weeks, so as to display it on the calendar view; The interaction and update module is used to expand and display the to-do list data for a date selected by the user in the calendar view, and to re-filter and populate the calendar view based on changes in the to-do list data.
[0015] The beneficial effects of this invention are as follows: 1. This invention integrates list and calendar modes, allowing users to both view the overall schedule and clearly grasp the time distribution of various tasks using the calendar mode, and focus on specific dates to view detailed information about those days through convenient expansion operations. This achieves a seamless transition from macro to micro perspectives, effectively overcoming the challenge of displaying calendar data continuously across days. It supports the presentation of to-do items in a coherent and organized manner within the calendar, clearly revealing the temporal relationships and durations between tasks. Both the calendar interface and the expanded daily view clearly highlight key information such as the urgency and effective duration of to-do items, enabling users to quickly prioritize tasks and respond swiftly to urgent matters, efficiently arranging processing sequences. Furthermore, it boasts high customizability and excellent scalability, allowing users to flexibly set various display styles according to their needs, achieving personalized presentations, and flexibly adjust and expand functionality based on different application scenarios, comprehensively meeting diverse usage requirements.
[0016] 2. This invention uses a sorting algorithm to perform multi-objective global optimization sorting of tasks, quickly obtaining high-quality task arrangement schemes under complex time and priority constraints, providing a scientific and efficient data foundation for task layout in the calendar view, thereby improving the rationality of task scheduling and overall planning efficiency.
[0017] 3. This invention uses a screening algorithm to select candidate sorting schemes and selects a reference scheme based on the probabilistic roulette wheel method. It can achieve a balance between global exploration and local optimization, ensuring the diversity and stability of sorting schemes, and enhancing the adaptability and convergence efficiency of the algorithm in complex task scenarios. This enables the dynamic generation of task display layouts in the calendar view that are both logically reasonable and visually organized. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart of a method for displaying to-do data based on a calendar view according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a to-do data display system based on a calendar view according to an embodiment of the present invention.
[0020] In the picture: 1. Interface construction module; 2. Data acquisition module; 3. Data organization module; 4. Layout and display module; 5. Interaction and update module. Detailed Implementation
[0021] To further illustrate the various embodiments, the present invention provides accompanying drawings, which are part of the disclosure of the present invention. These drawings are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these drawings, those skilled in the art should be able to understand other possible implementation methods and the advantages of the present invention.
[0022] According to an embodiment of the present invention, a method and system for displaying to-do data based on a calendar view are provided.
[0023] The present invention will now be further described in conjunction with the accompanying drawings and specific embodiments, such as... Figure 1 As shown, the method for displaying to-do data based on a calendar view according to an embodiment of the present invention includes: S1. Build a calendar view based on a table view, and configure the odd-numbered rows of the table view to display a collection view of weekly dates; S2. Determine the start date and end date corresponding to the calendar view, and obtain the data of to-do items whose start time or duration falls within the period from the start date to the end date; S3. Sort the pending task data and create multiple weekly arrays based on the sorting results to store the sorted pending task data; among them, subarrays are created within the weekly array according to the maximum number of rows displayed per day; S4. Fill the sorted to-do list data into the corresponding row subarray of the corresponding week according to its duration, and continuously fill it into the same row subarray of the subsequent week when the duration spans across weeks, so as to display it on the calendar view; S5. Based on the user's selection of a date in the calendar view, expand and display the to-do list data for that date, and re-filter and populate the calendar view based on the changes in the to-do list data.
[0024] In this optional embodiment, constructing a calendar view based on a table view and configuring the odd-numbered rows of the table view as a collection view displaying weekly dates includes: Set the number of rows in the table view to twice the number of weeks displayed for each month; Place a collection view in the cells of the odd-numbered rows of the table view. The collection view contains seven cells to correspond to each day of the week. When a user clicks on a cell in the collection view, the row containing that cell is automatically moved to the top of the table view, and the next cell in the table view is expanded to display the to-do list data corresponding to the clicked date.
[0025] Specifically, a complete calendar view is built based on a UITableView. The number of rows in the UITableView is set to twice the number of weeks displayed per month. Odd-numbered rows display the days of the week, and each cell in that row contains a UICollectionView. The UICollectionView contains seven cells, each corresponding to a day of the week. When the user taps a cell in the UICollectionView, the application automatically moves the row containing that cell to the top of the UITableView and expands the next cell, which displays the to-do list data for the tapped date.
[0026] In this optional embodiment, sorting the to-do list data and creating multiple weekly organized arrays based on the sorting results to store the sorted to-do list data includes: Input all pending task data, initialize the sorting algorithm parameters and maximum number of iterations, and create an empty array structure for organizing the data by week; Generate a random initial ordering scheme for the to-do list, calculate the overall evaluation score of the ordering scheme, set the taboo list and frequency record list to zero, and initialize the list used to record the optimal solution in the iteration. In each iteration, the currently obtained optimal sorting scheme of to-do items and its score are recorded in a list; When the list length reaches the memory requirement, the sorting schemes of all to-do items recorded in the list are filtered and compared to obtain the globally optimal sorting scheme for to-do items within the current memory period. If the maximum number of iterations is reached, the globally optimal to-do list data sorting scheme will be used as the sorting result to create multiple weekly organized arrays to store the sorted to-do list data. The current to-do list data ranking scheme is filtered using a filtering algorithm to generate several neighboring candidate to-do list data ranking schemes, and the evaluation score of each candidate to-do list data ranking scheme is calculated. Based on the taboo criterion, select the best to-do item data sorting scheme from the candidate schemes that is not taboo and does not exceed the frequency limit as the new current to-do item data sorting scheme, and determine whether it is better than the globally optimal to-do item data sorting scheme. If so, update the globally optimal to-do item data sorting scheme.
[0027] Specifically, the sorting algorithm is a tabu search algorithm. In this invention, this algorithm is used to globally optimize and sort the data of tasks. Starting from a random initial sorting scheme, the algorithm generates several candidate schemes in each iteration using the current scheme, and selects the best scheme as the new current solution based on tabu criteria (tabu list and frequency limit). Simultaneously, a memory mechanism is used to save historically better solutions. After iterating to the maximum number of times, the resulting globally optimal sorting scheme is used as the final result to construct a weekly organized array, thus providing a high-quality data sorting foundation for the efficient and reasonable layout of the subsequent calendar view.
[0028] In this optional embodiment, a filtering algorithm is used to filter the current to-do list data sorting schemes, generating several neighboring candidate to-do list data sorting schemes, and calculating the evaluation score for each candidate to-do list data sorting scheme, including: Initialize the parameters of the filtering algorithm and set the maximum number of iterations; randomly generate a set of sorting schemes for to-do items, calculate their evaluation scores, and perform preliminary sorting and filtering based on the scores; The optimal sorting scheme for the selected to-do items is stored in the candidate set, and a grid coordinate system is established based on the distribution of evaluation scores. Based on grid coordinates, a roulette wheel selection mechanism is used to select a reference scheme from the candidate set for each current pending item data sorting scheme. Based on the current to-do list data sorting scheme and the reference scheme, different strategies are used to generate two adjacent candidate to-do list data sorting schemes. Calculate and compare the evaluation scores of two adjacent candidate to-do list data ranking schemes, and select the candidate to-do list data with the highest score as the new to-do list data ranking scheme; Merge all updated new to-do list data sorting schemes with the candidate set, and calculate the evaluation score for each candidate to-do list data sorting scheme after the merger.
[0029] Specifically, the selection algorithm is a multi-objective sandcat swarm algorithm. In this invention, this algorithm is used for refined selection and generation of ranking schemes. The algorithm stores the initially selected better schemes into a candidate set and establishes grid coordinates based on their evaluation score distribution to achieve solution set management. In the iteration, the algorithm selects reference schemes for the current scheme based on grid coordinates and a roulette wheel mechanism, and then generates new candidate schemes through strategy combinations, and updates the schemes by comparing dominance relationships. Finally, through merging and re-evaluation, the candidate set is continuously optimized, thereby providing high-quality and diverse candidate ranking schemes for subsequent processes.
[0030] In this optional embodiment, the optimal sorting scheme for the selected to-do items is stored in a candidate set, and a grid coordinate system is established based on the distribution of evaluation scores, including: The optimal ranking scheme of the pending items data obtained from the initial screening is stored in the candidate set, and the calculated evaluation score is recorded for each pending item data ranking scheme in the candidate set. Analyze the evaluation scores of all pending items in the candidate set, determine the overall distribution range of the evaluation scores, and divide the overall distribution range into multiple continuous grid intervals; Based on the evaluation score of each to-do item data sorting scheme, determine the grid interval to which each to-do item data sorting scheme belongs and establish grid coordinates.
[0031] In this optional embodiment, the evaluation scores of the ranking schemes for all pending items in the candidate set are analyzed to determine the overall distribution range of the evaluation scores, and this overall distribution range is divided into multiple continuous grid intervals, including: Extract the evaluation score corresponding to the data sorting scheme of each to-do item in the candidate set to form an initial score dataset; Analyze all values in the score dataset to determine the minimum and maximum evaluation scores. The number of continuous grid intervals to be divided is determined based on the overall span between the minimum and maximum evaluation scores. Based on the overall span and the number of consecutive grid intervals, the overall distribution range of the evaluation scores is equally divided into multiple consecutive score intervals, each interval being a grid.
[0032] In this optional embodiment, selecting a reference scheme from the candidate set for each current pending item data sorting scheme based on grid coordinates using a roulette wheel selection mechanism includes: Calculate the probability weight of each grid being selected based on the evaluation score of the grid to which each to-do item data sorting scheme belongs in the candidate set; The probability weights of each grid are summed sequentially to construct a cumulative probability distribution from zero to one, with each grid corresponding to a unique probability interval; Generate a uniformly distributed random number between zero and one, and determine the selected target grid based on the cumulative probability interval into which the random number falls; From the selected target grid, randomly select a sorting scheme for the to-do items data and use it as a reference scheme for the current sorting scheme for the to-do items data.
[0033] In this optional embodiment, the sorted to-do list data is filled into the corresponding row subarray of the corresponding week according to its duration, and when the duration spans across weeks, it is continuously filled into the same row subarray of subsequent weeks for display on the calendar view, including: Starting from the start date of the current page's calendar view, based on the priority order of all to-do items, filter out the to-do item with the highest priority for that start date and fill it into the corresponding row subarray of the week in which its start date is located. Then, determine the filling length of this to-do item based on the length of all to-do items and complete the filling process. Once the population is complete, the data for the highest priority items that have not been marked as pending items will be re-filtered and populated starting from the first day after the completion date. If there is no available to-do data for the day, then blank to-do data for a duration of one day will be stored in the subarray of the corresponding week and row. When the first row of to-do items for each week is full, the highest priority to-do item data is retrieved from all remaining unmarked to-do items and stored in the second row of the starting week's subarray. This process is repeated until each row for each week from the start date to the end date is filled, and the to-do item data is then displayed on the calendar view. When the number of to-do items exceeds the due date of the current calendar view, switch to the next calendar view, update the data source and to-do item data based on the new start date to the due date, and re-execute the filtering and filling process according to the priority order of all to-do item data; When any to-do item data is updated, the filtering and population process is re-executed based on the updated to-do item data, starting from the start date of the current page's calendar view, to update the display on the calendar view.
[0034] Specifically, taking a full-screen calendar view (i.e., calendar view) that displays data for 6 weeks with a maximum of 4 data entries per day as an example, we first need to create 6 arrays to store the sorted data to be displayed each week (i.e., to-do list data). Then, within each array, we create 4 more arrays to store the data displayed for each row. The data consists of each data entry returned by the interface whose start time or duration falls within the start date to end date in the page view; for example, each data entry whose start time or duration falls between April 30, 2025 and June 10, 2025. The data format can be message notifications from various business modules, various to-do list notifications and task notifications, and various notifications obtained from the interface. The model / fields of each data entry include the data name, length (if it exceeds 7 days, it will be recorded as 7 days), and background display color, etc.
[0035] Specifically, the data filling process includes: starting from the start date of the current page view, selecting the highest priority data from all data for the start date and filling it into the first row of the first week array (6 weeks in total, 4 rows in total). The model for each data entry includes the data name, length (if it exceeds 7 days, it is recorded as 7 days), and background color, etc. At the same time, the data entry in the original data is marked as used. The filling length of the data entry is determined based on its length, and the filling is completed. If the data length exceeds 7, after filling the first row of the first week array, the data continues to be filled into the same row of the next week (for example, for tasks from April 30 to May 20 (lasting 22 days), 22 / 7 = 3 remainder 1, so after filling the first row of the first week, the first rows of the second and third weeks and the first row of the first day of the fourth week are filled, and data is reselected from the first row of the second day of the fourth week for filling). This filling method is repeated until the data duration is met or the length exceeds the last day of the calendar on this page. Once the population is complete, the system starts again from the first day after the completion date, re-filtering the highest priority and unmarked data for population (using the same population method as described above). If no data is available for a given day, a blank data set for one day is stored in an array. When the first row of each week is filled, the highest priority data from the remaining unmarked data is retrieved and stored in the second row of the first week's array. This population method is repeated until each row of each week from the start date to the end date is populated, and the data is displayed on the full-screen calendar. If the populated data exceeds the end date (last day) of the current calendar page, the system switches to the next calendar page, updates the data source to each record returned by the API that includes the start time or duration falling within the latest current page view's start date to end date, and then filters the data according to this method, populating from the first row of the first week of the start date to the fourth row of the sixth week of the end date. If the data is updated (e.g., data fields are modified, such as duration, or data status is modified, task completion or deletion occurs), the system re-filters the data from the updated data source according to the population method and populates the first row of the start date to the fourth row of the end date on the current page.
[0036] In this optional embodiment, starting from the start date of the current page's calendar view, based on the priority order of all to-do items, the to-do item with the highest priority for that start date is selected and filled into the corresponding row subarray of the week containing its start date. The filling length of this to-do item is determined based on the length of all to-do items, and the filling process is completed as follows: Starting from the beginning date of the current page's calendar view, filter out the to-do item with the highest priority for that date based on the priority order of all to-do items; The selected to-do items are populated into the corresponding row subarray of the week in which their start date is located, and the to-do item is marked as used. Based on the duration of the to-do list data following the mark, determine the date range that needs to be filled; If the duration of the to-do item data after the mark exceeds the preset value, after filling the row subarray of the first week, continue to fill it into the same row subarray of the next week, and repeat the filling process until the duration is met or the due date of the current page calendar view is reached, and then the filling is completed.
[0037] According to another embodiment of the invention, such as Figure 2 As shown, a to-do data display system based on a calendar view is also provided, which includes: Interface building module 1 is used to build a calendar view based on a table view and configure the odd-numbered rows of the table view to display a collection view of weekly dates; Data acquisition module 2 is used to determine the start date and end date corresponding to the calendar view, and to acquire to-do data whose start time or duration falls within the period from the start date to the end date; Data organization module 3 is used to sort the pending task data and create multiple weekly arrays based on the sorting results to store the sorted pending task data; among them, subarrays are created within the weekly array according to the maximum number of rows displayed per day; The layout display module 4 is used to fill the sorted to-do items data into the corresponding row subarray of the corresponding week according to its duration, and continuously fill it into the same row subarray of the subsequent week when the duration spans across weeks, so as to display it on the calendar view; The interaction and update module 5 is used to expand and display the to-do list data for a date selected by the user in the calendar view, and to re-filter and populate the calendar view based on the changes in the to-do list data.
[0038] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for displaying to-do data based on a calendar view, characterized in that, include: Build a calendar view based on a table view, and configure the odd-numbered rows of the table view to display a collection view of weekly dates; Determine the start and end dates for the calendar view, and retrieve to-do items whose start time or duration falls between the start and end dates; Sort the pending task data and create multiple weekly arrays based on the sorting results to store the sorted pending task data; within each weekly array, create subarrays according to the maximum number of rows displayed per day; The sorted to-do list data is filled into the corresponding row subarray of the week according to its duration, and when the duration spans across weeks, it is continuously filled into the same row subarray of the subsequent weeks for display on the calendar view; Based on the user's selection of a date in the calendar view, expand and display the to-do list data for that date, and re-filter and populate the calendar view based on changes in the to-do list data.
2. The method for displaying to-do data based on a calendar view according to claim 1, characterized in that, The method of constructing a calendar view based on a table view and configuring the odd-numbered rows of the table view as a collection view displaying weekly dates includes: Set the number of rows in the table view to twice the number of weeks displayed for each month; Place a collection view in the cells of the odd-numbered rows of the table view. The collection view contains seven cells to correspond to each day of the week. When a user clicks on a cell in the collection view, the row containing that cell is automatically moved to the top of the table view, and the next cell in the table view is expanded to display the to-do list data corresponding to the clicked date.
3. The method for displaying to-do data based on a calendar view according to claim 1, characterized in that, The process of sorting the pending task data and creating multiple weekly-organized arrays based on the sorting results to store the sorted pending task data includes: Input all pending task data, initialize the sorting algorithm parameters and maximum number of iterations, and create an empty array structure for organizing the data by week; Generate a random initial ordering scheme for the to-do list, calculate the overall evaluation score of the ordering scheme, set the taboo list and frequency record list to zero, and initialize the list used to record the optimal solution in the iteration. In each iteration, the currently obtained optimal sorting scheme of to-do items and its score are recorded in a list; When the list length reaches the memory requirement, the sorting schemes of all to-do items recorded in the list are filtered and compared to obtain the globally optimal sorting scheme for to-do items within the current memory period. If the maximum number of iterations is reached, the globally optimal to-do list data sorting scheme will be used as the sorting result to create multiple weekly organized arrays to store the sorted to-do list data. The current to-do list data ranking scheme is filtered using a filtering algorithm to generate several neighboring candidate to-do list data ranking schemes, and the evaluation score of each candidate to-do list data ranking scheme is calculated. Based on the taboo criterion, select the best to-do item data sorting scheme from the candidate schemes that is not taboo and does not exceed the frequency limit as the new current to-do item data sorting scheme, and determine whether it is better than the globally optimal to-do item data sorting scheme. If so, update the globally optimal to-do item data sorting scheme.
4. The method for displaying to-do data based on a calendar view according to claim 3, characterized in that, The process of using a filtering algorithm to sort the current pending task data and generating several neighboring candidate pending task data sorting schemes, and calculating the evaluation score for each candidate pending task data sorting scheme includes: Initialize the parameters of the filtering algorithm and set the maximum number of iterations; randomly generate a set of sorting schemes for to-do items, calculate their evaluation scores, and perform preliminary sorting and filtering based on the scores; The optimal sorting scheme for the selected to-do items is stored in the candidate set, and a grid coordinate system is established based on the distribution of evaluation scores. Based on grid coordinates, a roulette wheel selection mechanism is used to select a reference scheme from the candidate set for each current pending item data sorting scheme. Based on the current to-do list data sorting scheme and the reference scheme, different strategies are used to generate two adjacent candidate to-do list data sorting schemes. Calculate and compare the evaluation scores of two adjacent candidate to-do list data ranking schemes, and select the candidate to-do list data with the highest score as the new to-do list data ranking scheme; Merge all updated new to-do list data sorting schemes with the candidate set, and calculate the evaluation score for each candidate to-do list data sorting scheme after the merger.
5. The method for displaying to-do data based on a calendar view according to claim 4, characterized in that, The step of storing the optimal sorting scheme of the selected to-do items into a candidate set and establishing grid coordinates based on the distribution of evaluation scores includes: The optimal ranking scheme of the pending items data obtained from the initial screening is stored in the candidate set, and the calculated evaluation score is recorded for each pending item data ranking scheme in the candidate set. Analyze the evaluation scores of all pending items in the candidate set, determine the overall distribution range of the evaluation scores, and divide the overall distribution range into multiple continuous grid intervals; Based on the evaluation score of each to-do item data sorting scheme, determine the grid interval to which each to-do item data sorting scheme belongs and establish grid coordinates.
6. The method for displaying to-do data based on a calendar view according to claim 5, characterized in that, The analysis examines the evaluation scores of all pending items in the candidate data ranking scheme, determines the overall distribution range of the evaluation scores, and divides this overall distribution range into multiple continuous grid intervals, including: Extract the evaluation score corresponding to the data sorting scheme of each to-do item in the candidate set to form an initial score dataset; Analyze all values in the score dataset to determine the minimum and maximum evaluation scores. The number of continuous grid intervals to be divided is determined based on the overall span between the minimum and maximum evaluation scores. Based on the overall span and the number of consecutive grid intervals, the overall distribution range of the evaluation scores is equally divided into multiple consecutive score intervals, each interval being a grid.
7. The method for displaying to-do data based on a calendar view according to claim 4, characterized in that, The step of selecting a reference scheme from the candidate set for each current pending item data sorting scheme based on grid coordinates and using a roulette wheel selection mechanism includes: Calculate the probability weight of each grid being selected based on the evaluation score of the grid to which each to-do item data sorting scheme belongs in the candidate set; The probability weights of each grid are summed sequentially to construct a cumulative probability distribution from zero to one, with each grid corresponding to a unique probability interval; Generate a uniformly distributed random number between zero and one, and determine the selected target grid based on the cumulative probability interval into which the random number falls; From the selected target grid, randomly select a sorting scheme for the to-do items data and use it as a reference scheme for the current sorting scheme for the to-do items data.
8. The method for displaying to-do data based on a calendar view according to claim 1, characterized in that, The step of filling the sorted to-do list data into the corresponding row subarray of the corresponding week according to its duration, and continuously filling it into the same row subarray of subsequent weeks when the duration spans multiple weeks, for display on the calendar view, includes: Starting from the start date of the current page's calendar view, based on the priority order of all to-do items, filter out the to-do item with the highest priority for that start date and fill it into the corresponding row subarray of the week in which its start date is located. Then, determine the filling length of this to-do item based on the length of all to-do items and complete the filling process. Once the population is complete, the data for the highest priority items that have not been marked as pending items will be re-filtered and populated starting from the first day after the completion date. If there is no available to-do data for the day, then blank to-do data for a duration of one day will be stored in the subarray of the corresponding week and row. When the first row of to-do items for each week is full, the highest priority to-do item data is retrieved from all remaining unmarked to-do items and stored in the second row of the starting week's subarray. This process is repeated until each row for each week from the start date to the end date is filled, and the to-do item data is then displayed on the calendar view. When the number of to-do items exceeds the due date of the current calendar view, switch to the next calendar view, update the data source and to-do item data based on the new start date to the due date, and re-execute the filtering and filling process according to the priority order of all to-do item data; When any to-do item data is updated, the filtering and population process is re-executed based on the updated to-do item data, starting from the start date of the current page's calendar view, to update the display on the calendar view.
9. The method for displaying to-do data based on a calendar view according to claim 8, characterized in that, Starting from the start date of the current page's calendar view, the process involves filtering out the to-do item with the highest priority based on the priority order of all to-do items and filling it into the corresponding row subarray of the week containing its start date. The process also includes determining the fill length for this to-do item based on the length of all to-do items and completing the filling process. Starting from the beginning date of the current page's calendar view, filter out the to-do item with the highest priority for that date based on the priority order of all to-do items; The selected to-do items are populated into the corresponding row subarray of the week in which their start date is located, and the to-do item is marked as used. Based on the duration of the to-do list data following the mark, determine the date range that needs to be filled; If the duration of the to-do item data after the mark exceeds the preset value, after filling the row subarray of the first week, continue to fill it into the same row subarray of the next week, and repeat the filling process until the duration is met or the due date of the current page calendar view is reached, and then the filling is completed.
10. A calendar-view-based to-do data display system, used to implement the calendar-view-based to-do data display method according to any one of claims 1-9, characterized in that, The system includes: The interface building module is used to build a calendar view based on a table view and configure the odd-numbered rows of the table view to display a collection view of weekly dates; The data acquisition module is used to determine the start date and end date corresponding to the calendar view, and to acquire to-do items whose start time or duration falls within the period from the start date to the end date. The data organization module is used to sort the pending task data and create multiple weekly arrays based on the sorting results to store the sorted pending task data; within each weekly array, subarrays are created according to the maximum number of rows displayed per day. The layout display module is used to fill the sorted to-do list data into the corresponding row subarray of the corresponding week according to its duration, and continuously fill it into the same row subarray of the subsequent week when the duration spans across weeks, so as to display it on the calendar view; The interaction and update module is used to expand and display the to-do list data for a date selected by the user in the calendar view, and to re-filter and populate the calendar view based on changes in the to-do list data.