CN113204400B - Schedule display space distribution method and device, storage medium and electronic equipment - Google Patents

Schedule display space distribution method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113204400B
CN113204400B CN202110488553.6A CN202110488553A CN113204400B CN 113204400 B CN113204400 B CN 113204400B CN 202110488553 A CN202110488553 A CN 202110488553A CN 113204400 B CN113204400 B CN 113204400B
Authority
CN
China
Prior art keywords
space
schedule
amount
display space
displayed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110488553.6A
Other languages
Chinese (zh)
Other versions
CN113204400A (en
Inventor
沈梦超
郭嘉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110488553.6A priority Critical patent/CN113204400B/en
Publication of CN113204400A publication Critical patent/CN113204400A/en
Application granted granted Critical
Publication of CN113204400B publication Critical patent/CN113204400B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09DRAILWAY OR LIKE TIME OR FARE TABLES; PERPETUAL CALENDARS
    • G09D3/00Perpetual calendars
    • G09D3/12Perpetual calendars electrically operated

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure relates to the field of terminal display, in particular to a schedule display space distribution method and device, a storage medium and electronic equipment. The schedule display space distribution method comprises the following steps: acquiring a schedule to be displayed and a schedule display space of a terminal; selecting a target display space based on the space amount of the schedule display space, and distributing the schedule to be displayed to the target display space; updating the space amount of the target display space according to the space amount of the target display space and the average space amount of the schedule display space; and repeating the distribution steps until corresponding target display spaces are distributed for all the schedules to be displayed so as to display the schedules to be displayed in the terminal according to the target display spaces. The schedule display space distribution method can solve the schedule display problem facing display area cracking and optimize the schedule display effect.

Description

Schedule display space distribution method and device, storage medium and electronic equipment
Technical Field
The disclosure relates to the field of terminal display, in particular to a schedule display space distribution method and device, a storage medium and electronic equipment.
Background
The schedule presentation function in the calendar plays an indispensable role for the schedule of the user. When the schedule is displayed in the conventional electronic calendar, large and complete display areas are provided for schedule display, and when a plurality of schedules starting at the same moment are displayed, only one complete display area needs to be evenly distributed. However, for a new calendar with a split display area, how to allocate a plurality of schedules starting at the same time into the split display area and simultaneously consider the display effect of each schedule is a problem to be solved urgently.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The invention aims to provide a schedule display space distribution method, a schedule display space distribution device, a storage medium and electronic equipment, and aims to solve the problem of schedule display facing display area cracking and optimize schedule display effect.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the disclosed embodiments, there is provided a method for allocating schedule display space, including: acquiring a schedule to be displayed and a schedule display space of a terminal; selecting a target display space based on the space amount of the schedule display space, and distributing the schedule to be displayed to the target display space; updating the space amount of the target display space according to the space amount of the target display space and the average space amount of the schedule display space; and repeating the distribution steps until corresponding target display spaces are distributed for all the schedules to be displayed so as to display the schedules to be displayed in the terminal according to the target display spaces.
According to some embodiments of the present disclosure, based on the foregoing scheme, the displaying the schedule to be displayed in the terminal according to the target display space includes: acquiring the number of the schedules to be displayed distributed in the target display space; calculating the distribution amount of the display space of the schedules to be displayed based on the initial space amount of the schedule display space and the number of the schedules to be displayed; and displaying the schedule to be displayed in the terminal according to the distribution amount of the display space.
According to some embodiments of the disclosure, based on the foregoing aspect, the method further comprises calculating the average amount of space, including: summing the space amount of the schedule display space to obtain a global space amount; calculating the average amount of space based on the amount of global space and the number of schedules to be displayed.
According to some embodiments of the present disclosure, based on the foregoing solution, the updating the space amount of the target exhibition space according to the space amount of the target exhibition space and the average space amount of the schedule exhibition space includes: determining the residual space amount of the target display space according to the space amount of the target display space and the average space amount of the schedule display space; updating the amount of remaining space to the amount of space of the target presentation space.
According to some embodiments of the present disclosure, based on the foregoing solution, the determining the remaining amount of space of the target display space according to the amount of space of the target display space and the average amount of space of the schedule display space includes: calculating the difference value between the space amount of the target display space and the average space amount of the schedule display space; when the difference value meets a first preset condition, determining the residual space amount according to the average space amount; or recording the residual space amount as a preset value when the difference value meets a second preset condition.
According to some embodiments of the present disclosure, based on the foregoing scheme, when there is one schedule to be displayed, the method further includes: selecting a target display space based on the space amount of the schedule display space; and displaying the schedule to be displayed in the terminal according to the target display space and the initial space amount of the target display space.
According to some embodiments of the present disclosure, based on the foregoing scheme, after the schedule to be displayed is displayed on the terminal according to the target display space, the method further includes: acquiring a preset complete display space of the schedule to be displayed; and when the complete display space is smaller than the distribution amount of the display space, the terminal generates a screen control of the schedule to be displayed so that a user can operate the screen control to view the complete display space.
According to a second aspect of the embodiments of the present disclosure, there is provided a schedule display space allocating apparatus including: the acquisition module is used for acquiring the schedule to be displayed and the schedule display space of the terminal; the distribution module is used for selecting a target display space based on the space amount of the schedule display space and distributing the schedule to be displayed to the target display space; the updating module is used for updating the space amount of the target display space according to the space amount of the target display space and the average space amount of the schedule display space; and the display module is used for repeating the distribution steps until corresponding target display spaces are distributed for all the schedules to be displayed so as to display the schedules to be displayed in the terminal according to the target display spaces.
According to a third aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing the schedule display space allocation method as in the above embodiments.
According to a fourth aspect of the embodiments of the present disclosure, there is provided an electronic apparatus, including: one or more processors; a storage device, configured to store one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the schedule display space allocation method in the above embodiment.
Exemplary embodiments of the present disclosure may have some or all of the following benefits:
in some embodiments of the present disclosure, when a display area is split, the average amount of schedule display space is taken into consideration as a parameter for allocation. Firstly, selecting a target display space for a schedule to be displayed from all the split schedule display spaces according to the space amount, and then updating the space amount of the target display space according to the average space amount so as to continue the distribution of the display space corresponding to the schedule to be displayed. According to the schedule display space distribution method provided by the disclosure, on one hand, the average space amount is used as the distributed space amount to update the space information, and a new solution is provided for the problem of space distribution of self-adaptive space adjustment of schedule display; on the other hand, space distribution is carried out according to the average space amount, so that the display spaces distributed by each schedule are mutually average and maximized, and the display effect of the schedules is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 is a schematic diagram of a calendar presentation of the prior art;
FIG. 2 is a flow chart schematically illustrating a method for allocating calendar display space according to an exemplary embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating the effect of allocating a to-be-displayed schedule to 1 time-schedule display space in an exemplary embodiment of the disclosure;
FIG. 4 is a schematic diagram illustrating the effect of allocating a to-be-displayed schedule to 2 time-schedule display spaces in an exemplary embodiment of the disclosure;
FIG. 5 is a schematic diagram illustrating an effect of allocating a to-be-displayed schedule to 3 time-schedule display spaces in an exemplary embodiment of the present disclosure;
FIG. 6 is a schematic diagram illustrating an effect of allocating a to-be-displayed schedule to 4 time-day-schedule display spaces in an exemplary embodiment of the present disclosure;
FIG. 7 is a schematic diagram illustrating the effect of allocating display space for 5 time schedules on a schedule to be displayed according to an exemplary embodiment of the present disclosure;
FIG. 8 is a schematic diagram illustrating the effect of allocating display space for 6 time schedules on a schedule to be displayed according to an exemplary embodiment of the present disclosure;
fig. 9 is a schematic diagram illustrating a composition of a schedule display space allocation apparatus according to an exemplary embodiment of the present disclosure;
FIG. 10 schematically illustrates a schematic diagram of a computer-readable storage medium in an exemplary embodiment of the disclosure;
fig. 11 schematically shows a structural diagram of a computer system of an electronic device in an exemplary embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
In order to maximize the display of schedules in a limited display area, a new calendar in which schedule cards can be displayed in an overlapping manner is provided. In the novel calendar, in order to ensure the effectiveness of the overlapping display of the schedule cards, a non-shielding area is set for each schedule card, so that when the schedules are arranged, the complete display area can be divided into a plurality of display areas.
Fig. 1 is a schematic diagram illustrating a schedule display in the prior art, and referring to fig. 1, schedules may be arranged in an overlapping manner, and after non-occlusion regions of six arranged schedules are removed from a display space, the remaining regions may be used for displaying subsequent schedules. In order to facilitate the subsequent arrangement of the schedules according to the starting time of the schedules, the display spaces are also formed into a space list according to time.
For example, referring to fig. 1, when n schedules with a start time of 10:00 are arranged, m regions 101 and 102 can be shown, and when n schedules with a start time of 10:15 are arranged, m regions 101, 102 and 103 can be shown, that is, the current remaining space list is shown in table 1:
table 1: current list of remaining space
Figure BDA0003051488010000051
Figure BDA0003051488010000061
Based on the above, the present disclosure provides a schedule display space allocation method, which is suitable for arranging n schedules to be displayed to m display spaces to perform schedule display, and simultaneously, the average maximization of the display space of each schedule is ensured.
Implementation details of the technical solution of the embodiments of the present disclosure are set forth in detail below.
Fig. 2 schematically illustrates a flowchart of a method for allocating a schedule display space in an exemplary embodiment of the present disclosure. As shown in fig. 2, the method for allocating schedule display space includes steps S1 to S4:
step S1, acquiring a schedule to be displayed and a schedule display space of the terminal;
step S2, selecting a target display space based on the space amount of the schedule display space, and distributing the schedule to be displayed to the target display space;
step S3, updating the space amount of the target display space according to the space amount of the target display space and the average space amount of the schedule display space;
and step S4, repeating the distribution steps until corresponding target display spaces are distributed for all the schedules to be displayed, so that the schedules to be displayed are displayed in the terminal according to the target display spaces.
In some embodiments of the present disclosure, when a display area is split, an average space amount of a schedule display space is taken into consideration as an allocation parameter. Firstly, selecting a target display space for a schedule to be displayed from all the split schedule display spaces according to the space amount, and then updating the space amount of the target display space according to the average space amount so as to continue the distribution of the display space corresponding to the schedule to be displayed. According to the schedule display space distribution method provided by the disclosure, on one hand, the average space amount is used as the distributed space amount to update the space information, and a new solution is provided for the problem of space distribution of self-adaptive space adjustment of schedule display; on the other hand, space distribution is carried out according to the average space amount, so that the display spaces distributed by each schedule are mutually average and maximized, and the display effect of the schedules is improved.
Hereinafter, each step of the schedule display space allocation method in the present exemplary embodiment will be described in more detail with reference to the drawings and examples.
And step S1, acquiring the schedule to be displayed and the schedule display space of the terminal.
Specifically, the schedule to be displayed and the schedule display space both correspond to a certain point in time in the calendar. All schedules to be displayed corresponding to a certain time can be obtained, n schedules are obtained in total and are recorded as n 1 、n 2 、…、n n I.e. the starting time of these schedules to be presented is the time of day. The current remaining space list corresponding to the time can be obtained, and as shown in table 1, schedule display spaces are determined according to the current remaining space list, and the total number of the schedule display spaces is m and is marked as m 1 、m 2 、…、m m
It should be noted that, unlike the occupied space of other known objects to be distributed, since the schedule can be adaptively adjusted according to the size and number of the display spaces when being arranged and displayed, after the schedule to be displayed is distributed to the target display space, the remaining space of the target display space cannot be updated according to the occupied space of the schedule to be displayed. Therefore, it is necessary to consider the average amount of space of the schedule display space as a parameter for allocation.
In one embodiment of the present disclosure, the method further comprises calculating the average amount of space, comprising: summing the space amount of the schedule display space to obtain a global space amount; calculating the average amount of space based on the amount of global space and the number of schedules to be displayed.
Each schedule display space has a corresponding space amount, and the space amount can be various measurement dimensions such as width and area. In one embodiment of the present disclosure, the amount of space is the width of the remaining space, denoted as S 1 、S 2 、…、S m
The space quantities of the m regions are summed to obtain a global space quantity S sum I.e. S sum =S 1 +S 2 +...+S m . Then, calculating an average space quantity S obtained by equally dividing the global space quantity into n schedules to be displayed in a cross-domain manner avg I.e. S avg =S sum /n。
Step S2, selecting a target display space based on the space amount of the schedule display space, and allocating the schedule to be displayed to the target display space.
In step S2, it is necessary to select a target display space from m schedule display spaces and a schedule to be displayed from n schedules to allocate the target display space to the schedule to be displayed.
In one embodiment of the present disclosure, when selecting the target display space, in order to improve the display effect of the schedule, the schedule display space with the largest amount of space may be preferentially selected for schedule display. Therefore, when matching the corresponding target display space for the schedule to be displayed, the maximum value S of the space amount can be selected j Corresponding schedule display space m j (j is more than or equal to 0 and less than or equal to m), namely, the first schedule to be displayed is placed in the display space with the largest space amount.
It should be noted that when the schedules to be displayed are arranged, the schedules may be randomly selected, or the schedules to be displayed may be arranged to obtain a schedule sequence, and then the schedule display space with the largest space amount in the current state is sequentially selected according to the schedule sequence. When determining the schedule sequence, since the start times of the schedules are all the same, the schedule sequence can be determined by the duration of the schedules, for example, the schedule sequence can be sorted from long to short according to the duration of the schedules, that is, the schedule sequence is arranged according to the end time of the schedules.
And step S3, updating the space amount of the target display space according to the space amount of the target display space and the average space amount of the schedule display space.
In an embodiment of the present disclosure, the updating the space amount of the target display space according to the space amount of the target display space and the average space amount of the schedule display space includes:
step S31, determining the residual space amount of the target display space according to the space amount of the target display space and the average space amount of the schedule display space;
step S32, updating the remaining space amount to the space amount of the target display space.
Specifically, in step S31, the determining the remaining amount of space of the target display space according to the amount of space of the target display space and the average amount of space of the schedule display space includes: calculating the difference value between the space amount of the target display space and the average space amount of the schedule display space; when the difference value meets a first preset condition, determining the residual space amount according to the average space amount; or recording the residual space amount as a preset value when the difference value meets a second preset condition.
The first preset condition means that the difference is a non-negative value, namely the difference is not less than 0, namely the target display space still has distributable display space, and the calculated difference is directly used as the residual space amount of the target display space for subsequent distribution; the second preset condition is that the difference is a negative value, that is, the difference is less than 0, and at this time, the target display space is not available for continuous allocation, so that the remaining space amount may be recorded as 0 to indicate that the target display space is not available for allocation, so as to improve the calculation efficiency, and certainly, the remaining space amount may also be recorded as a negative difference.
For example, based on the above description, the amount of space in the target display space is S j And the average space amount of the schedule display space is S avg Calculating S j -S avg A. Wherein, a has two conditions: the first is S j Greater than or equal to S avg When a is not negative, then S is j Is updated to S j A; second kind S j Less than S avg That is, a is a negative number, and since the space amount of the negative number is not available for redistribution, when a is a negative number, S can be uniformly assigned j And is noted as 0.
And step S4, repeating the distribution steps until corresponding target display spaces are distributed for all the schedules to be displayed, so that the schedules to be displayed are displayed in the terminal according to the target display spaces.
And repeating the distribution method, and selecting a target display space with the largest space amount for the next schedule to be displayed after updating the space amount of the target display space until distributing the corresponding target display space for all the schedules to be displayed.
In an embodiment of the present disclosure, the displaying the schedule to be displayed in the terminal according to the target display space includes:
step S41, acquiring the number of the schedules to be displayed distributed in the target display space;
step S42, calculating the distribution quantity of the display space of the schedule to be displayed based on the initial space quantity of the schedule display space and the quantity of the schedule to be displayed;
and step S43, displaying the schedule to be displayed in the terminal according to the distribution amount of the display space.
Specifically, after the schedule display space is allocated to each schedule to be displayed, the final display space allocation amount of each schedule to be displayed needs to be determined. At this time, the initial space amount of the schedule display space needs to be averagely allocated to the schedules to be displayed according to the number of the schedules to be displayed allocated to the same schedule display space, so as to calculate the display space allocation amount of each schedule to be displayed. And displaying the space allocation amount as a final self-adaptive adjustment result of the schedule, and displaying the schedule by the front end according to the space allocation amount.
In one embodiment of the present disclosure, when there is one schedule to be displayed, the method further includes: selecting a target display space based on the space amount of the schedule display space; and displaying the schedule to be displayed in the terminal according to the target display space and the initial space amount of the target display space.
Specifically, if there is only one schedule to be shown, the target showing space with the largest matching space amount is directly displayed, and the initial space amount of the target showing space is used as the space amount of the schedule to be shown for schedule showing.
Next, the above-mentioned calendar display space allocation method will be described with reference to specific application scenarios. It is known that there are 4 schedule display spaces corresponding to a certain time, and m is shown in reference to fig. 3-8 1 Amount of space S 1 =4,m 2 Amount of space S 2 =3,m 3 Amount of space S 3 =2,m 4 Amount of space S 4 1, so S sum =4+3+2+1=10。
Fig. 3 is a schematic diagram illustrating an effect of allocating a to-be-displayed schedule to 1 time schedule display space in an exemplary embodiment of the present disclosure. Since the schedule to be displayed is one, it is marked as n 1 Then directly select S with the largest space amount of schedule display space 1 With reference to fig. 3, the schedule is shown at m 1 In the region, the width is 4. The final exhibition of the space allocation effect is shown with reference to fig. 3.
Fig. 4 is a schematic diagram illustrating an effect of allocating a to-be-displayed schedule to 2 time-day-schedule display spaces in an exemplary embodiment of the present disclosure. 2 schedules are respectively marked as n 1 And n 2 Calculating S avg =10/2=5。
Step 1: is n 1 Selecting m with the largest space quantity 1
Step 2: update m 1 Is the amount of remaining space S 1 4-5-1, mixing 1 Is the amount of remaining space S 1 And recording as 0, the residual space of each updated target display space is respectively: m is 1 :S 1 =0,m 2 :S 2 =3,m 3 :S 3 =2,m 4 :S 4 =1;
Step 3: is n 2 Selecting m with the largest space quantity 2
Step 4: calculating n 1 And n 2 M of the display space 1 Is allocated with n 1 A schedule to be displayed, so n 1 The display space allocation amount of (1) is m 1 Initial space amount S 1 4. In the same way, m 2 Also only n is allocated 2 A schedule to be displayed, so n 2 The display space allocation amount of (1) is m 2 Initial space amount S 2 3. The final exhibition of the space allocation effect is shown with reference to fig. 4.
Fig. 5 is a schematic diagram illustrating an effect of allocating a to-be-displayed schedule to 3 time-schedule display spaces in an exemplary embodiment of the present disclosure. 3 schedules are respectively marked as n 1 、n 2 And n 3 Calculating S avg =10/3≈3.3。
Step 1: is n 1 Selecting m with the largest space quantity 1
Step 2: update m 1 Is the amount of remaining space S 1 4-3.3-0.7, and the remaining space of each target display space after updating is: m is 1 :S 1 =0.7,m 2 :S 2 =3,m 3 :S 3 =2,m 4 :S 4 =1;
Step 3: is n 2 Selecting m with the largest space quantity 2
Step 4: update m 2 S of the remaining space 2 3-3.3-0.3, and is marked as S 2 0, furtherThe residual space of each new target display space is respectively as follows: m is a unit of 1 :S 1 =0.7,m 2 :S 2 =0,m 3 :S 3 =2,m 4 :S 4 =1;
Step 5: is n 3 Selecting m with the largest space quantity 3
Step 6: calculating n 1 、n 2 And n 3 The display space allocation amounts of (a) are 4, 3, 2, respectively. The final exhibition of the space allocation effect is shown with reference to fig. 5.
Fig. 6 is a schematic diagram illustrating the effect of allocating a to-be-displayed schedule to 4 time-schedule display spaces in an exemplary embodiment of the disclosure. The 4 schedules are respectively marked as n 1 、n 2 、n 3 And n 4 Calculating S avg =10/4=2.5。
Step 1: is n 1 Selecting m with the largest space quantity 1
Step 2: update m 1 Is the amount of remaining space S 1 4-2.5-1.5, the remaining space of each target exhibition space after updating is: m is 1 :S 1 =1.5,m 2 :S 2 =3,m 3 :S 3 =2,m 4 :S 4 =1;
Step 3: is n 2 Selecting m with the largest space quantity 2
Step 4: update m 2 Is the amount of remaining space S 2 3-2.5-0.5, the remaining space of each target exhibition space after updating is: m is 1 :S 1 =1.5,m 2 :S 2 =0.5,m 3 :S 3 =2,m 4 :S 4 =1;
Step 5: is n 3 Selecting m with the largest space quantity 3
Step 6: update m 3 S of the remaining space 2 2-2.5-0.5, which is recorded as 0, and the remaining space of each target display space after updating is: m is 1 :S 1 =1.5,m 2 :S 2 =0.5,m 3 :S 3 =0,m 4 :S 4 =1;
Step 7: is n 4 Selecting m with the largest space quantity 1
Step 8: calculating n 1 、n 2 、n 3 And n 4 Due to m 1 In is distributed with n 1 And n 4 Then their exhibition space allocation is 4/2 ═ 1, n 1 、n 2 、n 3 And n 4 The display space allocation amounts of (a) are 2, 3, 2, respectively. The final exhibition of the space allocation effect is shown with reference to fig. 6.
Fig. 7 is a schematic diagram illustrating an effect of allocating a to-be-displayed schedule to 5 time-schedule display spaces in an exemplary embodiment of the present disclosure. The 5 schedules are respectively marked as n 1 、n 2 、n 3 、n 4 And n 5 Calculating S avg =10/5=2。
Step 1: is n 1 Selecting m with the largest space quantity 1
Step 2: update m 1 Is the amount of remaining space S 1 4-2, the remaining space of each updated target display space is: m is 1 :S 1 =2,m 2 :S 2 =3,m 3 :S 3 =2,m 4 :S 4 =1;
Step 3: is n 2 Selecting m with the largest space quantity 2
Step 4: update m 2 Is the amount of remaining space S 2 And 3-2-1, and the residual space of each target display space after updating is respectively as follows: m is 1 :S 1 =2,m 2 :S 2 =1,m 3 :S 3 =2,m 4 :S 4 =1;
Step 5: is n 3 Selecting m with the largest space quantity 1
Step 6: update m 1 Is the amount of remaining space S 1 2-0, and the remaining space of each updated target display space is: m is 1 :S 1 =0,m 2 :S 2 =1,m 3 :S 3 =2,m 4 :S 4 =1;
Step 7: is n 4 Selecting m with the largest space quantity 3
Step 8: update m 3 S of the remaining space 3 And 2-0, wherein the residual space of each updated target display space is respectively as follows: m is 1 :S 1 =0,m 2 :S 2 =1,m 3 :S 3 =0,m 4 :S 4 =1;
Step 9: is n 5 Selecting m with the largest space quantity 2
Step 10: calculating n 1 、n 2 、n 3 、n 4 And n 5 The display space allocation amounts of (a) are 2, 1.5, 2, 1.5, respectively. The final exhibition of the space allocation effect is shown with reference to fig. 7.
Fig. 8 is a schematic diagram illustrating the effect of allocating the display space for 6 time schedules on a schedule to be displayed in an exemplary embodiment of the present disclosure. The 6 schedules are respectively marked as n 1 、n 2 、n 3 、n 4 、n 5 And n 6 Calculating S avg =10/6=1.6。
Step 1: is n 1 Selecting m with the largest space quantity 1
Step 2: update m 1 Is the amount of remaining space S 1 4-1.6-2.4, and the remaining space of each target display space after updating is: m is 1 :S 1 =2.4,m 2 :S 2 =3,m 3 :S 3 =2,m 4 :S 4 =1;
Step 3: is n 2 Selecting m with the largest space quantity 2
Step 4: update m 2 Is the amount of remaining space S 2 3-1.6-1.4, the remaining space of each target exhibition space after updating is: m is 1 :S 1 =2.4,m 2 :S 2 =1.4,m 3 :S 3 =2,m 4 :S 4 =1;
Step 5: is n 3 Selecting m with the largest space quantity 1
Step 6: update m 1 Is the amount of remaining space S 1 2.4-1.6-0.8, and the remaining space of each target display space after updating is: m is 1 :S 1 =0.8,m 2 :S 2 =1.4,m 3 :S 3 =2,m 4 :S 4 =1;
Step 7: is n 4 Selecting m with the largest space quantity 3
Step 8: update m 3 Is the amount of remaining space S 3 2-1.6-0.4, the remaining space of each target exhibition space after updating is: m is 1 :S 1 =0.8,m 2 :S 2 =1.4,m 3 :S 3 =0.4,m 4 :S 4 =1;
Step 9: is n 5 Selecting m with the largest space quantity 2
Step 10: update m 2 Is the amount of remaining space S 2 1.4-1.6-0.2, and is noted as 0, and the remaining space of each target display space after updating is: m is a unit of 1 :S 1 =0.8,m 2 :S 2 =0,m 3 :S 3 =0.4,m 4 :S 4 =1;
Step 11: is n 6 Selecting m with the largest space quantity 4
Step 12: calculating n 1 、n 2 、n 3 、n 4 And n 5 The display space distribution amount of (2) is 2, 1.5, 2, 1.5 and 1. The final presentation space allocation effect is illustrated with reference to fig. 8.
It should be noted that fig. 3 to 8 are schematic diagrams illustrating the effect of schedule display space allocation, and only the display space allocation amount of each schedule, that is, the width of the schedule card, is determined, and when the schedule is displayed, the height of the schedule card needs to be displayed on the corresponding time axis according to the start time and the end time of the schedule, so as to perform the final schedule card display.
Based on the schedule display space distribution method, the problem of space distribution that the size of the space of the schedule to be displayed is unknown in advance can be solved, the method has universality, the distribution effect enables the distribution amount of the display space of each schedule to be displayed to be average and maximum, and the schedule display effect is improved.
In an embodiment of the disclosure, after the schedule to be displayed is displayed on the terminal according to the target display space, the method further includes: acquiring a preset complete display space of the schedule to be displayed; and when the complete display space is smaller than the distribution amount of the display space, the terminal generates a screen control of the schedule to be displayed so that a user can operate the screen control to view the complete display space.
Specifically, in order to ensure that the user can clearly and intuitively obtain the key information of the schedule during each schedule display, a complete display space is generally preset, for example, the width value of the schedule card is at least 20. Then, after the display space allocation amount is finally determined, the display space allocation amount obtained through allocation may be smaller than the preset complete display space, at this time, the schedule information is incompletely displayed, a control can be automatically generated, and when the user clicks the control, the complete display space of the schedule can be displayed so as to check the complete information of the schedule.
It should be noted that the allocation method provided by the present disclosure is also applicable to other object allocation scenarios in which the object resource to be allocated is unknown in advance, and the average resource amount calculated is referred to for allocation, so that the resource of each object to be allocated can be averaged and maximized, and the allocated resource structure is optimized. Such as advertisement presentation space allocation, time allocation, etc.
Fig. 9 schematically illustrates a composition diagram of a schedule display space allocation apparatus in an exemplary embodiment of the present disclosure, and as shown in fig. 9, the schedule display space allocation apparatus 900 may include an obtaining module 901, an allocating module 902, an updating module 903, and a displaying module 904. Wherein:
an obtaining module 901, configured to obtain a schedule to be displayed and a schedule display space of a terminal;
the allocating module 902 is configured to select a target display space based on the space amount of the schedule display space, and allocate the schedule to be displayed to the target display space;
an updating module 903, configured to update the space amount of the target display space according to the space amount of the target display space and the average space amount of the schedule display space;
and a display module 904, configured to repeat the allocation steps until corresponding target display spaces are allocated for all the schedules to be displayed, so as to display the schedules to be displayed in the terminal according to the target display spaces.
According to an exemplary embodiment of the present disclosure, the display module 904 is configured to obtain the number of the schedules to be displayed distributed in the target display space; calculating the distribution amount of the display space of the schedules to be displayed based on the initial space amount of the schedule display space and the number of the schedules to be displayed; and displaying the schedule to be displayed in the terminal according to the distribution amount of the display space.
According to an exemplary embodiment of the present disclosure, the schedule display space allocating apparatus 900 further includes a calculating module (not shown in the figure) for summing the space amount of the schedule display space to obtain a global space amount; calculating the average amount of space based on the amount of global space and the number of schedules to be displayed.
According to an exemplary embodiment of the present disclosure, the update module 903 includes a remaining unit for determining the remaining amount of space of the target display space according to the amount of space of the target display space and the average amount of space of the schedule display space; the updating unit is used for updating the residual space amount into the space amount of the target exhibition space.
According to an exemplary embodiment of the present disclosure, the remaining unit is configured to calculate a difference between the amount of space of the target exhibition space and the average amount of space of the schedule exhibition space; when the difference value meets a first preset condition, determining the residual space amount according to the average space amount; or recording the residual space amount as a preset value when the difference value meets a second preset condition.
According to an exemplary embodiment of the present disclosure, the schedule display space allocating apparatus 900 further includes a special case module (not shown in the figure) for selecting a target display space based on the space amount of the schedule display space when there is one schedule to be displayed; and displaying the schedule to be displayed in the terminal according to the target display space and the initial space amount of the target display space.
According to an exemplary embodiment of the present disclosure, the schedule display space allocating apparatus 900 further includes a control module (not shown in the figure) for obtaining a preset complete display space of the schedule to be displayed;
and when the complete display space is smaller than the distribution amount of the display space, the terminal generates a screen control of the schedule to be displayed so that a user can operate the screen control to view the complete display space.
The details of each module in the schedule display space allocation apparatus 900 are already described in detail in the corresponding schedule display space allocation method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In an exemplary embodiment of the present disclosure, there is also provided a storage medium capable of implementing the above-described method. Fig. 10 schematically illustrates a schematic diagram of a computer-readable storage medium in an exemplary embodiment of the disclosure, and as shown in fig. 10, depicts a program product 1000 for implementing the above method according to an embodiment of the disclosure, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a mobile phone. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided. Fig. 11 schematically illustrates a structural diagram of a computer system of an electronic device in an exemplary embodiment of the disclosure.
It should be noted that the computer system 1100 of the electronic device shown in fig. 11 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 11, a computer system 1100 includes a Central Processing Unit (CPU)1101, which can perform various appropriate actions and processes in accordance with a program stored in a Read-Only Memory (ROM) 1102 or a program loaded from a storage section 1108 into a Random Access Memory (RAM) 1103. In the RAM 1103, various programs and data necessary for system operation are also stored. The CPU 1101, ROM 1102, and RAM 1103 are connected to each other by a bus 1104. An Input/Output (I/O) interface 1105 is also connected to bus 1104.
The following components are connected to the I/O interface 1105: an input portion 1106 including a keyboard, mouse, and the like; an output section 1107 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, a speaker, and the like; a storage section 1108 including a hard disk and the like; and a communication section 1109 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 1109 performs communication processing via a network such as the internet. A driver 1110 is also connected to the I/O interface 1105 as necessary. A removable medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1110 as necessary, so that a computer program read out therefrom is mounted into the storage section 1108 as necessary.
In particular, the processes described below with reference to the flowcharts may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 1109 and/or installed from the removable medium 1111. When the computer program is executed by a Central Processing Unit (CPU)1101, various functions defined in the system of the present disclosure are executed.
It should be noted that the computer readable medium shown in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a flash Memory, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present disclosure also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may be separate and not incorporated into the electronic device. The computer readable medium carries one or more programs, which when executed by one of the electronic devices, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, and may also be implemented by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice in the art to which the disclosure pertains.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (8)

1. A method for allocating schedule display space is characterized by comprising the following steps:
acquiring a schedule to be displayed and a schedule display space of a terminal;
determining a schedule display space corresponding to the maximum space amount of the schedule display space as a target display space, and distributing the schedule to be displayed to the target display space;
summing the space amount of the schedule display space to obtain a global space amount; calculating the average space amount of the schedule display space based on the global space amount and the number of the schedules to be displayed; determining the residual space amount of the target display space according to the space amount of the target display space and the average space amount of the schedule display space; updating the amount of remaining space to an amount of space for the target presentation space;
and repeating the distribution steps until corresponding target display spaces are distributed for all the schedules to be displayed, so that the schedules to be displayed are displayed in the terminal according to the target display spaces.
2. The method for allocating the schedule display space according to claim 1, wherein the displaying the schedule to be displayed in the terminal according to the target display space comprises:
acquiring the number of the schedules to be displayed distributed in the target display space;
calculating the distribution amount of the display space of the schedules to be displayed based on the initial space amount of the schedule display space and the number of the schedules to be displayed;
and displaying the schedule to be displayed in the terminal according to the distribution amount of the display space.
3. The method according to claim 1, wherein the determining the remaining space amount of the target display space according to the space amount of the target display space and the average space amount of the schedule display space comprises:
calculating the difference value between the space amount of the target display space and the average space amount of the schedule display space;
when the difference value meets a first preset condition, determining the residual space amount according to the average space amount; or alternatively
And recording the residual space amount as a preset value when the difference value meets a second preset condition.
4. The method according to claim 1, wherein when there is one schedule to be displayed, the method further comprises:
selecting a target display space based on the space amount of the schedule display space;
and displaying the schedule to be displayed in the terminal according to the target display space and the initial space amount of the target display space.
5. The method according to claim 1, wherein after the schedule to be displayed is displayed on the terminal according to the target display space, the method further comprises:
acquiring a preset complete display space of the schedule to be displayed;
and when the complete display space is smaller than the distribution amount of the display space, the terminal generates a screen control of the schedule to be displayed so that a user can operate the screen control to view the complete display space.
6. A schedule display space allocation apparatus, comprising:
the acquisition module is used for acquiring the schedule to be displayed and the schedule display space of the terminal;
the distribution module is used for determining the schedule display space corresponding to the maximum space amount of the schedule display space as a target display space and distributing the schedule to be displayed to the target display space;
the updating module is used for summing the space amount of the schedule display space to obtain a global space amount; calculating the average space amount of the schedule display space based on the global space amount and the number of the schedules to be displayed; determining the residual space amount of the target display space according to the space amount of the target display space and the average space amount of the schedule display space; updating the amount of remaining space to an amount of space for the target presentation space;
and the display module is used for repeating the distribution steps until corresponding target display spaces are distributed for all the schedules to be displayed so as to display the schedules to be displayed in the terminal according to the target display spaces.
7. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, implements the schedule display space allocation method according to any one of claims 1 to 5.
8. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the schedule display space allocation method according to any one of claims 1 to 5.
CN202110488553.6A 2021-05-06 2021-05-06 Schedule display space distribution method and device, storage medium and electronic equipment Active CN113204400B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110488553.6A CN113204400B (en) 2021-05-06 2021-05-06 Schedule display space distribution method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110488553.6A CN113204400B (en) 2021-05-06 2021-05-06 Schedule display space distribution method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN113204400A CN113204400A (en) 2021-08-03
CN113204400B true CN113204400B (en) 2022-09-30

Family

ID=77029844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110488553.6A Active CN113204400B (en) 2021-05-06 2021-05-06 Schedule display space distribution method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113204400B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1577270A (en) * 2003-06-26 2005-02-09 微软公司 Side-by-side shared calendars
CN101438227A (en) * 2006-05-05 2009-05-20 微软公司 Agenda and day hybrid calendar view
CN108920244A (en) * 2018-06-29 2018-11-30 天津字节跳动科技有限公司 A kind of the schedule display methods and device of calendar view
CN112527162A (en) * 2020-11-25 2021-03-19 深圳左邻永佳科技有限公司 Schedule plan display method, device, equipment and medium applied to intelligent park

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9575562B2 (en) * 2012-11-05 2017-02-21 Synaptics Incorporated User interface systems and methods for managing multiple regions
CN103605524B (en) * 2013-11-26 2017-10-31 广东欧珀移动通信有限公司 A kind of method and device in mobile terminal split screen operation program
KR20160055552A (en) * 2014-11-10 2016-05-18 삼성전자주식회사 Method and Device for displaying memo
US11550858B2 (en) * 2017-11-28 2023-01-10 Uber Technologies, Inc. Detecting attribute change from trip data
JP6797850B2 (en) * 2018-02-02 2020-12-09 ヤフー株式会社 Information display program, information display method, information display device, and distribution device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1577270A (en) * 2003-06-26 2005-02-09 微软公司 Side-by-side shared calendars
CN101438227A (en) * 2006-05-05 2009-05-20 微软公司 Agenda and day hybrid calendar view
CN108920244A (en) * 2018-06-29 2018-11-30 天津字节跳动科技有限公司 A kind of the schedule display methods and device of calendar view
CN112527162A (en) * 2020-11-25 2021-03-19 深圳左邻永佳科技有限公司 Schedule plan display method, device, equipment and medium applied to intelligent park

Also Published As

Publication number Publication date
CN113204400A (en) 2021-08-03

Similar Documents

Publication Publication Date Title
US8583799B2 (en) Dynamic cost model based resource scheduling in distributed compute farms
CN109191202B (en) Resource allocation method, device, electronic equipment and computer readable storage medium
US9304817B2 (en) Method and apparatus for a user-driven priority based job scheduling in a data processing platform
CN113765820A (en) Token bucket-based current limiting method, token bucket-based current limiting device, token bucket-based computing equipment and token bucket-based current limiting medium
CN111831838B (en) Multimedia information recommendation method and device and server storage medium
CN113204400B (en) Schedule display space distribution method and device, storage medium and electronic equipment
CN110618855A (en) Task allocation method and device, electronic equipment and storage medium
CN113407322B (en) Multi-terminal task allocation method and device, electronic equipment and readable storage medium
CN111694670B (en) Resource allocation method, apparatus, device and computer readable medium
CN111813541B (en) Task scheduling method, device, medium and equipment
CN110633142B (en) Block chain consensus method, management node, electronic device, and storage medium
CN110007827B (en) Selection editing method and device, electronic equipment and computer readable storage medium
CN113590955A (en) Target recommendation user determination method and device, electronic equipment and storage medium
CN114358508A (en) Work order distribution method, device, equipment and medium
CN115344359A (en) Computing power resource allocation method, device, computer readable storage medium and equipment
CN112085426A (en) Order issuing control method and device, storage medium and electronic equipment
CN112132597A (en) Data processing method, device, equipment and storage medium
WO2016186631A1 (en) Price, completion time, and resource allocation determination for cloud services
CN111260912A (en) Vehicle formation processing method and device
CN116069513B (en) Cost determination method, device, electronic equipment and storage medium
CN113421035B (en) Resource allocation scheme recommendation method, device, equipment and storage medium
CN111063405B (en) Task scheduling method, device, equipment and storage medium
CN113792901A (en) Service processing method and device, storage medium and electronic equipment
CN117292804A (en) Medical resource management method, device, medium and electronic equipment
CN112148469A (en) Method, apparatus and computer storage medium for managing resources

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant