Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to fall within the scope of the invention.
An embodiment of the present invention provides an information display method, as shown in fig. 1, where the method may include the following steps:
s100, acquiring a time range corresponding to the target information which is required to be displayed on the user interface at present and the number Dk of keywords.
In an exemplary embodiment of the present invention, the target information may be any event that needs to be displayed, and in a non-limiting embodiment, the target information may be alert information within a certain geographic area. The time range corresponding to the target information can be the starting time and the ending time of the target information which needs to be displayed currently, and the starting time and the ending time are expressed in a year, month and day format.
In the embodiment of the present invention, the keyword of the target information is a keyword that can reflect the information in each item of target information, for example, may be a subject, for example, for a certain item of target information, "2022, 5, 6, and a B event occurs at the a location", and the keyword of the information is "B". It is known to those skilled in the art that any method of extracting keywords falls within the scope of the present invention.
In the embodiment of the invention, the time range and the number of the keywords corresponding to the target information can be obtained through the corresponding information providing platform.
S200, obtaining the number Dt of unit time corresponding to the time range, and obtaining the first display weight w1 based on the first display weight calculation mode and the Dt.
In the embodiment of the invention, the unit time can be set based on actual needs, such as hours, days and the like. In one exemplary embodiment, the unit time may be a day. When the unit time is a day, the number of unit times corresponding to the time range is the number of days included in the time range.
In the embodiment of the invention, the first display weight is positively correlated with Dt. That is, a smaller time range corresponds to a smaller weight and a larger time range corresponds to a larger weight. The weights corresponding to a particular time range may be determined empirically, e.g., dt=0, w1=0; dt=1, w1=1; dt=7, w1=3; dt=14, w1=4; dt=30, w1=5; dt=50, w1=7, etc. In a preferred embodiment, w1= -2.24+1.63log (Dt). The w1 obtained in this way can make the visualization effect good.
S300, based on Dk, acquiring a second display weight w2.
In the embodiment of the present invention, the second display weight w2 is positively correlated with the number of keywords, that is, the more keywords, the larger w2, and vice versa. The weights corresponding to the number of different keywords may be obtained based on experience, for example, dk=0, w2=0; dk=1, w2=1; dk=10, w2=5; dk=50, w2=7; dk=100, w2=10, etc. In one exemplary embodiment, w2= -2.37+1.85log (Dk). The w2 obtained in this way can make the visualization effect good.
S400, acquiring width display weights wd=f (w 1, w 2) based on w1 and w2; f () is a set function expression.
In an exemplary embodiment of the present invention, wd=a1w1+a2w2, a1 is a first set coefficient, and a2 is a second set coefficient. a1 and a2 can be set based on actual needs, and can be obtained through multiple groups of visual effect experiments. In one non-limiting embodiment, a1 and a2 may each be a value between 0-1, and a1+a2=1. Preferably, a1=a2=0.5.
In a further embodiment of the present invention,,,representing a rounding down. Thus, when Dt is relatively large and Dk is relatively small, the first display weight can be made relatively large, in the Dt phaseFor smaller time, dk is relatively larger, the second display weight can be relatively larger, and display can be more reasonable.
S400, based on the width D and the width Wd of the designated display area in the user interface, acquiring the width D1 of a first display area and the width D2 of a second display area, wherein the first display area is used for carrying out visual display on information to be displayed currently in a corresponding time range, and the second display area is used for carrying out visual display on keywords corresponding to target information to be displayed currently.
In an exemplary embodiment of the present invention,,,representing a rounding down.
Therefore, the visual effect can be enhanced through the dynamic adjustment of the size of the time range required to be displayed and the number of the keywords, and the user experience is good.
In the embodiment of the invention, the quantity of the information corresponding to each unit time can be displayed by a state diagram, and the keywords corresponding to the target information to be displayed currently are displayed by a cloud diagram.
Further, in the embodiment of the present invention, the display width corresponding to each displayed keyword is positively correlated with the number of occurrences of the keyword in the target information, that is, if the number of occurrences of a certain keyword is greater, the corresponding display width is greater, that is, the keyword is greater. The display width corresponding to each keyword can be obtained randomly or based on a set manner. For example, for keyword i, its corresponding display width WS i =W0+(n i /∑ m i=1 n i )DeltaW, wherein W0 is a preset reference width, n i For keyword i in target letterThe number of occurrences in the message, i, is 1 to m, m is the number of keywords, and ΔW is the set increase width. W0 and aw may be set based on actual needs.
In the embodiment of the invention, if the display width of a certain keyword is larger than the set width, the keyword is displayed with the set width and displayed with the set color. In the embodiment of the invention, the set width can be set based on actual needs. For example, one tenth of D2 may be set.
In another embodiment of the present invention, if the width of a certain keyword is greater than a set width, the keyword is displayed in the set width, and displayed in a set color and blinked.
Further, in the embodiment of the present invention, the keyword with the largest width is displayed in the first color, and the keyword with the smallest width is displayed in the second color. Wherein the first color and the second color are different colors.
Further, in the embodiment of the present invention, keywords having the same width are displayed in the same color.
Further, in the embodiment of the present invention, when a certain keyword is clicked, the time corresponding to the keyword in the first display area is displayed in a set color, so that the keyword and the corresponding time are associated.
Further, in an embodiment of the present invention, each keyword may be displayed in a spheroid. Specifically, for each keyword, one sphere may be used for display. The radius of the sphere corresponding to each keyword may be half the display width corresponding to the keyword.
Further, the rotational speed may be set to rotate the sphere.
Further, a sphere with a corresponding display width within the same display width range, that is, a sphere with a radius within the same radius range is rotated and displayed on the same rotation circle. Therefore, the spheres with the radius being almost the same as that of the sphere can be positioned on the same rotary circle, and the visual display effect can be further improved.
Further, each sphere is provided with a corresponding keyword.
Further, when clicking a sphere, a corresponding keyword and the number of occurrences are displayed beside the sphere, and a time corresponding to the keyword corresponding to the sphere in the first display area is displayed in a set color.
Further, in the embodiment of the present invention, the specified display area further includes a third display area and a fourth display area. In one exemplary embodiment, the third display area, the first display area, and the second display area are sequentially disposed in order from left to right and below the designated display area. The fourth display area is located above the user interface.
The fourth display area is used for displaying map information corresponding to the target information. On the map information displayed, a geographical area in which the target information has occurred is identified using a setting identification. Further, for a geographical area with a large amount of target information, the larger the corresponding setting identifier is. When clicking a certain set identifier, displaying target information corresponding to the geographic area in the form of an identifier frame.
The third display area is used to display other statistics of the target information, such as type, number, homonymy, and cyclic ratio, etc.
Further, in the embodiment of the present invention, when a keyword is clicked, the time corresponding to the keyword in the first display area and the geographic area corresponding to the keyword in the fourth display area are displayed in a set color, so that the keyword, the corresponding time and the geographic area are associated.
In summary, according to the information display method provided by the embodiment of the invention, for the width of the display area for the time dimension and the keywords, dynamic adjustment can be performed based on the length of the time dimension and the number of the keywords, so that the visualization effect is good and the user experience is good.
Embodiments of the present invention also provide a non-transitory computer readable storage medium that may be disposed in an electronic device to store at least one instruction or at least one program for implementing one of the methods embodiments, the at least one instruction or the at least one program being loaded and executed by the processor to implement the methods provided by the embodiments described above.
Embodiments of the present invention also provide an electronic device comprising a processor and the aforementioned non-transitory computer-readable storage medium.
Embodiments of the present invention also provide a computer program product comprising program code for causing an electronic device to carry out the steps of the method according to the various exemplary embodiments of the invention as described in the specification, when said program product is run on the electronic device.
While certain specific embodiments of the invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the invention. Those skilled in the art will also appreciate that many modifications may be made to the embodiments without departing from the scope and spirit of the invention. The scope of the present disclosure is defined by the appended claims.