Calendar updating method and device

By calculating the calendar data source in advance and updating it when an action is triggered, the lag problem during calendar display is solved and the user experience is improved.

CN113779049BActive Publication Date: 2024-10-18BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202010579371.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-23
Publication Date
2024-10-18
Estimated Expiration
2040-06-23

AI Technical Summary

Technical Problem

The existing technology is prone to page freezes when displaying calendars from complex data sources, resulting in poor user experience.

Method used

By calculating current data sources and new data sources in advance, and using triggered actions to update the calendar, real-time calculations are avoided during display and lags are reduced.

Benefits of technology

Pre-calculate new data sources before detecting trigger actions, and use them to update the calendar to avoid lags in calendar display and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113779049B_ABST
    Figure CN113779049B_ABST
Patent Text Reader

Abstract

The present invention discloses a calendar updating method and device, and relates to the field of computer technology. A specific implementation of the method includes: determining a current data source; displaying a calendar according to the current data source; determining a newly added data source according to the current data source; if a trigger action is detected, determining the newly added data source as an updated current data source, updating the calendar according to the updated current data source, and executing the step: determining a newly added data source according to the current data source. This implementation can reduce the occurrence of page freezes and improve user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a calendar updating method and device. Background Art

[0002] The calendar can exist as an independent client or embedded in other clients. Some dates in the calendar are often bound to some data sources, such as itinerary information, holiday information, memo information, etc.

[0003] The prior art uses real-time calculation to determine the data source corresponding to the currently displayed calendar. For example, if the calendar for April is currently displayed, the data source corresponding to April is calculated while the calendar is being displayed.

[0004] However, if the data source is complex, the existing technology is prone to display page freezes, resulting in a poor user experience. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a calendar update method and device, which can reduce the occurrence of page freezes and improve user experience.

[0006] In a first aspect, an embodiment of the present invention provides a calendar updating method, comprising:

[0007] Determine the current data source;

[0008] Displaying a calendar based on the current data source;

[0009] Determine a new data source according to the current data source;

[0010] If a trigger action is detected, the newly added data source is determined to be an updated current data source, the calendar is updated according to the updated current data source, and the step of determining a newly added data source according to the current data source is performed.

[0011] Optionally,

[0012] The determining of the current data source includes:

[0013] When it is detected that the embedded client is started, the data source of the specified duration is determined to be the current data source.

[0014] Optionally,

[0015] The newly added data source includes: a first data source and a last data source;

[0016] The determining, according to the current data source, a new data source includes:

[0017] Determine the start time and end time of the current data source;

[0018] Determining the first data source according to the start time of the current data source;

[0019] The tail data source is determined according to the termination time of the current data source.

[0020] Optionally,

[0021] The determining the first data source according to the start time of the current data source includes:

[0022] Use the start time of the current data source as the end time of the current time period and execute:

[0023] Determine the start time of the current time period according to the end time of the current time period and the preset duration;

[0024] Calculate the data source of the current time period;

[0025] Increase the number of calculations by 1;

[0026] Determine whether the number of calculations is equal to a preset number threshold; if so, determine that the data sources of each time period calculated for the number threshold constitute the first data source; otherwise, use the start time of the current time period as the updated end time of the current time period and execute: determine the start time of the current time period based on the end time of the current time period and the preset duration.

[0027] Optionally,

[0028] After calculating the data source of the current time period and before adding 1 to the number of calculations, the method further includes:

[0029] The data source of the current time period is stored in a preset total data source dictionary in the form of a dictionary.

[0030] Optionally,

[0031] The triggering action includes: the calendar stops sliding.

[0032] Optionally,

[0033] The updating of the calendar according to the updated current data source comprises:

[0034] Determine the length of the calendar slide down according to the trigger action;

[0035] Turn off sliding animation;

[0036] Slide the calendar up by the length of the downward slide;

[0037] The calendar is refreshed according to the first data source.

[0038] In a second aspect, an embodiment of the present invention provides a calendar updating device, including:

[0039] A determination module configured to determine a current data source; and determine a new data source based on the current data source;

[0040] A display module, configured to display a calendar according to the current data source;

[0041] The updating module is configured to determine that the newly added data source is an updated current data source if a triggering action is detected, update the calendar according to the updated current data source, and determine the newly added data source according to the current data source.

[0042] In a third aspect, an embodiment of the present invention provides an electronic device, including:

[0043] one or more processors;

[0044] a storage device for storing one or more programs,

[0045] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.

[0046] In a third aspect, an embodiment of the present invention provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method described in any of the above embodiments.

[0047] One embodiment of the above invention has the following advantages or beneficial effects: before detecting a trigger action, a new data source is pre-calculated, and the displayed calendar is updated using the new data source. This method calculates the data source corresponding to the calendar in advance before displaying the calendar, avoids freezes in the displayed calendar, and improves the user experience.

[0048] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0050] Figure 1 is a flow chart of a calendar updating method provided by an embodiment of the present invention;

[0051] Figure 2 is a flow chart of a calendar updating method provided by another embodiment of the present invention;

[0052] Figure 3is a schematic diagram of a calendar updating device provided by an embodiment of the present invention;

[0053] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0054] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0055] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0056] like Figure 1 As shown, an embodiment of the present invention provides a calendar updating method, including:

[0057] Step 101: Determine the current data source.

[0058] Before the initial calendar display, calculate the current data source in advance. In actual application scenarios, in order to avoid freezes in the calendar interface, the current data source is generally larger than the data source corresponding to the displayed calendar. For example, if the calendar for June is currently displayed, the current data source is the data source corresponding to February to August. However, the current data source is not larger than the preset data volume threshold, so as to reduce the usage of memory resources and save time in determining the data source.

[0059] Step 102: Display a calendar based on the current data source.

[0060] Step 103: Determine a new data source based on the current data source.

[0061] In an embodiment of the present invention, the newly added data source may include only the first data source, only the last data source, or both the first and last data sources. The first data source is determined by the start time of the current data source, and the last data source is determined by the end time of the current data source.

[0062] Step 104: when a trigger action is detected, the newly added data source is determined to be the updated current data source, the calendar is updated according to the updated current data source, and step 103 is executed.

[0063] If a trigger action is detected, the current data source is updated, that is, the newly added data source is used as the updated current data source.

[0064] Step 103 and step 104 may be performed asynchronously to improve calendar update efficiency.

[0065] Before detecting a trigger action, pre-calculate the new data source and use the new data source to update the displayed calendar. This method calculates the data source corresponding to the calendar in advance before displaying the calendar, avoids freezes in the displayed calendar, and improves the user experience.

[0066] In one embodiment of the present invention, determining the current data source includes:

[0067] When it is detected that the embedded client is started, the data source of the specified duration is determined to be the current data source.

[0068] If the calendar exists as an independent client, when the calendar client is started, the data source of the specified duration is determined as the current data source; if the calendar is embedded in other clients, when the embedded client is started, the data source of the specified duration is determined as the current data source. The client can be a mobile client or a web client.

[0069] The specified duration can be adjusted according to actual needs, for example, the specified duration can be half a year or a year. The time range corresponding to the current data source is determined by the specified duration and the time displayed on the current calendar. For example, when the current date is 2020.1.1, when it is detected that the embedded mobile application is started, the data source of 2019.7.1-2020.6.30 is determined as the current data source.

[0070] In one embodiment of the present invention, the newly added data source includes: a first data source and a last data source;

[0071] Determine new data sources based on the current data sources, including:

[0072] Determine the start time and end time of the current data source;

[0073] Determine the first data source according to the start time of the current data source;

[0074] Determine the tail data source based on the termination time of the current data source.

[0075] In an embodiment of the present invention, the first data source before the current data source and the last data source after the current data source are calculated in advance to meet the user's needs for viewing a calendar of a larger range and avoid freezes in the calendar interface when the user is viewing the calendar.

[0076] In one embodiment of the present invention, determining the first data source according to the start time of the current data source includes:

[0077] Use the start time of the current data source as the end time of the current time period and execute:

[0078] Determine the start time of the current time period according to the end time of the current time period and the preset duration;

[0079] Calculate the data source for the current time period;

[0080] Increase the number of calculations by 1;

[0081] Determine whether the number of calculations is equal to the preset number threshold. If so, determine that the data sources of each time period calculated for the number threshold constitute the first data source. Otherwise, use the start time of the current time period as the updated end time of the current time period and execute: determine the start time of the current time period based on the end time of the current time period and the preset duration.

[0082] The embodiment of the present invention calculates the data source before the start time of the current time period according to a preset duration, controls the amount of calculated data through a number threshold, avoids excessive memory usage, and reduces device loss.

[0083] In one embodiment of the present invention, determining the tail data source according to the start time of the current data source includes:

[0084] Use the end time of the current data source as the start time of the current time period and execute:

[0085] Determine the end time of the current time period according to the start time of the current time period and the preset duration;

[0086] Calculate the data source for the current time period;

[0087] Increase the number of calculations by 1;

[0088] Determine whether the number of calculations is equal to the preset number threshold. If so, determine that the data sources of each time period calculated for the number threshold constitute the tail data source. Otherwise, use the end time of the current time period as the start time of the updated current time period and execute: determine the end time of the current time period based on the start time of the current time period and the preset duration.

[0089] The embodiment of the present invention calculates the data source after the end time of the current time period, so as to avoid the situation where the calendar freezes when the user checks the calendar at a certain time after the current time period, thereby improving the user experience.

[0090] In one embodiment of the present invention, after calculating the data source of the current time period and before adding 1 to the number of calculations, the method further includes:

[0091] The data source of the current time period is stored in the preset total data source dictionary in the form of a dictionary.

[0092] Considering that determining the current data source and updating the current data source can be performed asynchronously, and the data sources of multiple time periods may be calculated simultaneously, the embodiment of the present invention stores the data source of the current time period in the form of a dictionary to avoid repeated addition of data sources for the same time period, which may cause calendar display errors.

[0093] In an embodiment of the present invention, the triggering action includes: the calendar stops sliding.

[0094] According to the scrollViewDidEndDecelerating proxy method of the scrollview control, the embodiment of the present invention determines that the triggering action is that the calendar stops sliding. Triggering the update when the calendar stops sliding can reduce the user's perception of the update process and improve the user experience.

[0095] In one embodiment of the present invention, updating the calendar according to the updated current data source includes:

[0096] Determine the length of the calendar slide down according to the trigger action;

[0097] Turn off sliding animation;

[0098] Slide the calendar up by the length of the slide;

[0099] Refresh the calendar based on the primary data source.

[0100] The newly added data sources are divided into the first data source and the last data source. In the embodiment of the present invention, the process of updating the calendar according to the first data source is different from the process of updating the calendar according to the last data source. Updating the calendar according to the last data source includes: updating the current data source, wherein the last data source serves as the updated current data source; and updating the calendar according to the updated current data source. For the first data source, the update process will cause the calendar displayed on the interface to change (for example, sliding backward). In view of this, the embodiment of the present invention provides the above-mentioned implementation method, which can prevent the user from perceiving the update of the calendar and improve the user experience.

[0101] like Figure 2 As shown, the embodiment of the present invention takes the embedded calendar as an example to describe the calendar updating method in detail, and the method includes:

[0102] Step 201: When it is detected that the embedded application is started, a data source of a specified duration is determined as a current data source.

[0103] If the current time is 2018.10.1 and the specified duration is 6 months, the determined time range is 2018.7.1-2018.12.31. When the application is detected to be started, the data source of 2018.7.1-2018.12.31 is determined as the current data source.

[0104] The current data source is stored in curDataSource in the form of an array.

[0105] Step 202: Display a calendar based on the current data source.

[0106] Display the current month calendar, that is, the October calendar.

[0107] Step 203: Determine the start time and end time of the current data source, and execute steps 204 and 205 respectively.

[0108] The start time of the current data source is 2018.7.1 and the end time is 2018.12.31.

[0109] Step 204: Determine the first data source according to the start time of the current data source, and execute step 206.

[0110] Use the start time of the current data source as the end time of the current time period and execute:

[0111] A1: Determine the start time of the current time period according to the end time of the current time period and the preset duration.

[0112] For the convenience of description, the embodiment of the present invention is described by taking only one calculation as an example.

[0113] The preset duration is 1 month, so the current time period is 2018.6.1-2018.6.30.

[0114] A2: Calculate the data source of the current time period.

[0115] Determine the data source for 2018.6.1-2018.6.30, for example, the Children's Day information corresponding to 6.1. Calculate the data source corresponding to each day in turn, and add the data sources of 6.1, 6.2, 6.3, etc. to the preset subDataSource, where the data source is stored in the subDataSource in the form of an array.

[0116] A3: Store the data source of the current time period in the form of a dictionary into the preset total data source dictionary.

[0117] According to the data sources of each day from 2018.6.1 to 2018.6.30 temporarily stored in subDataSource, determine the data source of June 2018. With "year-month" as the key and the data source as the value, store the data source of June 2018 in the form of a dictionary in totalDataSource (total data source dictionary).

[0118] A4: Increase the number of calculations by 1.

[0119] A5: Determine whether the number of calculations is equal to a preset number threshold. If yes, execute A6. Otherwise, execute A1 by taking the start time of the current time period as the end time of the updated current time period.

[0120] For example, if the number threshold is 6, the data source six months before the current data source is calculated.

[0121] A6: Determine the number of times the data source of each time period calculated by the threshold number of times constitutes the first data source.

[0122] The first data source includes the data sources from 2018.1 to 2018.6.

[0123] Step 205: Determine the tail data source according to the termination time of the current data source.

[0124] Use the end time of the current data source as the start time of the current time period and execute:

[0125] B1: Determine the end time of the current time period according to the start time of the current time period and the preset duration.

[0126] The current time period is 2019.1.1-2019.1.31.

[0127] B2: Calculates the data source for the current time period.

[0128] Determine the data source for 2019.1.1-2019.1.31, for example, the New Year's Day information corresponding to 1.1. Calculate the data source corresponding to each day in turn, and add the data sources of 1.1, 1.2, 1.3, etc. to the preset suffixDataSource, where the data source is stored in the form of an array in suffixDataSource. It should be noted that subDataSource is used to temporarily store the first data source, and suffixDataSource is used to temporarily store the last data source.

[0129] B3: Store the data source of the current time period in the form of a dictionary into the preset total data source dictionary.

[0130] Determine the data source for January 2019 based on the data sources of each day from 2019.1.1 to 2019.1.31 temporarily stored in suffixDataSource. Use "year-month" as the key and the data source as the value to store the data source for January 2019 in the form of a dictionary in totalDataSource (total data source dictionary).

[0131] B4: Increase the number of calculations by 1.

[0132] B5: Determine whether the number of calculations is equal to a preset number threshold. If yes, execute B6. Otherwise, execute B1 by taking the end time of the current time period as the start time of the updated current time period.

[0133] Calculates the data source six months after the current data source.

[0134] B6: Determine the data source of each time period calculated by the number of times threshold to constitute the tail data source.

[0135] The last data source includes the data sources from 2019.1 to 2019.6.

[0136] Step 204 and step 205 may be performed asynchronously.

[0137] Step 206: When the calendar stops sliding, determine that the newly added data source is the updated current data source, update the calendar according to the updated current data source, and execute steps 204 and 205 respectively; wherein the newly added data source includes: a first data source and a last data source.

[0138] For the primary data source:

[0139] Get the first data source from totalDataSource according to key;

[0140] Update the current data source in curDataSource according to the first data source obtained from totalDataSource;

[0141] Determine the length of the calendar slide;

[0142] Turn off sliding animation;

[0143] Slide the calendar up by the length of the slide;

[0144] Refresh the calendar based on the primary data source.

[0145] Specifically, starting from the key of 2018.6, the data source of 2018.1-2018.6 is obtained from totalDataSource, the current data source is updated to the data source of 2018.1-2018.6, the length of the calendar slide down is determined to be 2, the sliding animation is turned off, the calendar is slid up 2, and the calendar is refreshed to execute step 204. It should be noted that when sliding down, the date displayed on the calendar becomes smaller because data is added before the currently displayed date.

[0146] For the tail data source:

[0147] Get the tail data source from totalDataSource according to the key, update the current data source in curDataSource according to the tail data source obtained from totalDataSource, and refresh the calendar.

[0148] Specifically, starting from the key 2019.1, the data source of 2019.1-2019.6 is obtained from totalDataSource, the current data source is updated to the data source of 2019.1-2019.6, and the calendar is refreshed to execute step 205.

[0149] The embodiment of the present invention splits a huge data source into multiple parts for calculation. When the data source is large, it avoids jamming during calendar display, reduces the occupancy of local storage resources, reduces the size of the application package, and improves user experience.

[0150] like Figure 3 As shown, an embodiment of the present invention provides a calendar updating device, including:

[0151] The determination module 301 is configured to determine the current data source; and determine a new data source based on the current data source;

[0152] A display module 302 is configured to display a calendar according to a current data source;

[0153] The updating module 303 is configured to determine the newly added data source as the updated current data source if a triggering action is detected, update the calendar according to the updated current data source, and determine the newly added data source according to the current data source.

[0154] In one embodiment of the present invention, the determination module 301 is configured to determine that a data source of a specified duration is a current data source when it is detected that the embedded client is started.

[0155] In one embodiment of the present invention, a new data source is added, including: a first data source and a last data source; a determination module 301 is configured to determine the start time and end time of the current data source; the first data source is determined according to the start time of the current data source; and the last data source is determined according to the end time of the current data source.

[0156] In one embodiment of the present invention, the determination module 301 is configured to use the start time of the current data source as the end time of the current time period, and execute: determine the start time of the current time period based on the end time of the current time period and the preset duration; calculate the data source of the current time period; add 1 to the number of calculations; determine whether the number of calculations is equal to a preset number threshold, if so, determine that the data sources of each time period calculated for the number threshold constitute the first data source, otherwise, use the start time of the current time period as the updated end time of the current time period and execute: determine the start time of the current time period based on the end time of the current time period and the preset duration.

[0157] In one embodiment of the present invention, the determination module 301 is configured to store the data source of the current time period in a preset total data source dictionary in the form of a dictionary.

[0158] In one embodiment of the present invention, the triggering action includes: the calendar stops sliding.

[0159] In one embodiment of the present invention, the update module 303 is configured to determine the length of the calendar sliding down according to the trigger action; turn off the sliding animation; change the length of the calendar sliding up and down; and refresh the calendar according to the first data source.

[0160] An embodiment of the present invention provides an electronic device, including:

[0161] one or more processors;

[0162] a storage device for storing one or more programs,

[0163] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.

[0164] Figure 4 An exemplary system architecture 400 is shown to which the calendar updating method or calendar updating apparatus according to the embodiment of the present invention can be applied.

[0165] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0166] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 401, 402, 403, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0167] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0168] The server 405 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 401, 402, and 403. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.

[0169] It should be noted that the calendar updating method provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the calendar updating device is generally disposed in the server 405 .

[0170] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0171] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0172] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0173] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.

[0174] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.

[0175] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0176] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0177] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes a sending module, an acquisition module, a determination module, and a first processing module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the sending module may also be described as a "module for sending a picture acquisition request to the connected server."

[0178] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device.

[0179] The computer-readable medium carries one or more programs. When the one or more programs are executed by a device, the device includes:

[0180] Determine the current data source;

[0181] Displaying a calendar based on the current data source;

[0182] Determine a new data source according to the current data source;

[0183] If a trigger action is detected, the newly added data source is determined to be an updated current data source, the calendar is updated according to the updated current data source, and the step of determining the newly added data source according to the current data source is performed.

[0184] According to the technical solution of the embodiment of the present invention, before the trigger action is detected, the newly added data source is pre-calculated, and the displayed calendar is updated using the newly added data source. This method calculates the data source corresponding to the calendar in advance before displaying the calendar, avoids freezes in the displayed calendar, and improves the user experience.

[0185] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A calendar updating method, characterized in that: include: Determine the current data source; Displaying a calendar based on the current data source; Determine a new data source according to the current data source; If a trigger action is detected, the newly added data source is determined to be an updated current data source, the calendar is updated according to the updated current data source, and the steps of: determining a newly added data source according to the current data source; The newly added data source includes: a first data source and a last data source; Determining a new data source according to the current data source includes: determining a start time and an end time of the current data source; determining the first data source according to the start time of the current data source; and determining the last data source according to the end time of the current data source; The determining the first data source according to the start time of the current data source includes: Taking the start time of the current data source as the end time of the current time period, executing: determining the start time of the current time period according to the end time of the current time period and the preset duration; calculating the data source of the current time period; adding 1 to the number of calculations; determining whether the number of calculations is equal to a preset number threshold, if so, determining that the data sources of each time period calculated for the number threshold constitute the first data source, otherwise, taking the start time of the current time period as the updated end time of the current time period, executing: determining the start time of the current time period according to the end time of the current time period and the preset duration.

2. The method according to claim 1, characterized in that Determine the current data source. This step includes: When it is detected that the embedded client is started, the data source of the specified duration is determined to be the current data source.

3. The method according to claim 1, characterized in that After calculating the data source of the current time period and before adding 1 to the number of calculations, the method further includes: The data source of the current time period is stored in a preset total data source dictionary in the form of a dictionary.

4. The method according to claim 1, characterized in that The triggering action includes: the calendar stops sliding.

5. The method according to any one of claims 1 to 4, characterized in that: The step of updating the calendar according to the updated current data source comprises: Determine the length of the calendar slide down according to the trigger action; Turn off sliding animation; Slide the calendar up by the length of the downward slide; The calendar is refreshed according to the first data source.

6. A calendar updating device, characterized in that: include: A determination module configured to determine a current data source; Determine a new data source according to the current data source; The newly added data source includes: a first data source and a last data source; Determining a new data source according to the current data source includes: determining a start time and an end time of the current data source; determining the first data source according to the start time of the current data source; and determining the last data source according to the end time of the current data source; The determining the first data source according to the start time of the current data source includes: Taking the start time of the current data source as the end time of the current time period, executing: determining the start time of the current time period according to the end time of the current time period and the preset duration; calculating the data source of the current time period; adding 1 to the number of calculations; determining whether the number of calculations is equal to a preset number threshold, if so, determining that the data sources of each time period calculated by the number threshold constitute the first data source, otherwise, taking the start time of the current time period as the updated end time of the current time period, executing: determining the start time of the current time period according to the end time of the current time period and the preset duration; a display module, configured to display a calendar according to the current data source; The updating module is configured to determine that the newly added data source is an updated current data source if a triggering action is detected, update the calendar according to the updated current data source, and determine the newly added data source according to the current data source.

7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.

8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Calendar supervision system and its supervision method

    CN101145224A

  • Device, system and method for calendar management

    CN102750605A

  • Electronic device and method of controlling an electronic device for calendar event updates

    EP1953688A1

  • Video publishing device, method, and computer program

    JP5052695B1

  • Method and apparatus for group coordination of calendar events

    US20120084286A1