Disclosure of Invention
The invention provides a topic river reordering method, which can enable a user to layer rivers with larger fluctuation and rivers with smaller fluctuation in a topic river through reordering, and each layer is arranged according to the increasing sequence of range coefficients. By the reordering method, the problem that the rivers with larger fluctuation in the subject rivers interfere with the fluctuation of other rivers can be effectively solved, and the complexity of user operation is greatly reduced.
The technical scheme for realizing the purpose of the invention is as follows:
a method of topic river reordering, comprising:
step 1: obtaining a subject river topiciAnd the subject river topiciThe value topic _ value at time ti,t(ii) a Wherein i is 1,2, …, n, t is 1,2, …, m;
step 2: obtaining an initial fluctuation angle
Comprises that
Step 2.1: subject river topic
iArranged on the base line in sequence
tAbove 0, calculate topic
iEvery two adjacent time instants of the vector of values connection
And Baseline
tEvery two adjacent time instants of the vector of values connection
Angle of (theta)
i,t′(ii) a Where t 'is a time number, t' is 1,2, …, m-1, and an included angle θ
i,t′In order to realize the purpose,
wherein the content of the first and second substances,
step 2.2: respectively calculating topic of each subject riveriBaseline withtAngle of (theta)i,t′Maximum value of (Max θ)i;
Step 2.3: for all Max thetaiSorting, and marking the sorted sequence as Max thetakWhere k is 1,2, …, n, Max θ1≤Maxθ2≤…≤Maxθn;
Step 2.4: calculating Max θ
kThe Median of (1) is the initial fluctuation angle
Wherein the content of the first and second substances,
and step 3: for all subject rivers topiciReordering of, including
Step 3.1 calculating each subject river topic separatelyiValue of topic _ value at all times ini,tCoefficient of polar difference CRi(ii) a The coefficient of polar difference CRiIn order to realize the purpose,
wherein the content of the first and second substances,
Rangiis topiciGreat difference of (3), Rangi=Max_topic_valuei,t-Min_topic_valuei,t,
Max_topic_valuei,tAnd Min _ topoc _ valuei,tRespectively, indicate topoc _ valuei,tMaximum and minimum values of;
u
iis topic
iThe average value of (a) of (b),
step 3.2 according to the increasing sequence of the range coefficient, all the subject rivers topiciReordering, denoted topic after orderingjWherein j is 1,2, …, n;
and 4, step 4: by initial wave angle
Calculating topic in turn
jFluctuation value of (1)
jAnd through a preset smooth fluctuation value fluctuation _ value
0Will topoic
jDivided into a stationary river course and a fluctuating river course, comprising
Step 4.1: let the current baseline be Baselint=0;
Step 4.2: selecting the sequenced subject river topicjThe first subject river, i.e. j ═ 1, is the current river;
step 4.3: partitioning the current river and setting a current baseline, including
4.3.1 general Current river topic
jBaseline placed at current Baseline
tAnd calculating topic
jEvery two adjacent time instants of the vector of values connection
And Baseline
tEvery two adjacent time instants of the vector of values connection
Angle of (theta)
j,t′(ii) a Wherein the included angle theta
j,t′In order to realize the purpose,
wherein the content of the first and second substances,
wherein, topoc _ valuej,t′For the sequenced subject river topicjThe value at time t';
4.3.2 calculating topicjFluctuation value of (1)j,
4.3.3 according to the smooth fluctuation value fluctuation _ value0For the current river topicjDividing: if the navigation _ valuej>fluctuation_value0Then, the current river topicjAttributing to a fluctuating river layer; if the navigation _ valuej≤fluctuation_value0Then, the current river topicjAttributing to a stable river layer;
4.3.4 if the current river is topicjMaking the current Baselinet=Baselinet+topic_valuej,tWherein topoic _ valuej,tThe value of the current river at the t moment is obtained; otherwise, the current baseline is not changed;
step 4.4: sequentially selecting the topic rivers topic according to the sequence of j 2, … and njThe rest rivers in the river are the current rivers, and the step 4.3 is executed in a circulating mode until the division of all the theme rivers is completed;
step 4.5: stacking the subject rivers belonging to the stable river stratum from bottom to top according to the sequence to obtain a stable river; stacking the theme rivers belonging to the fluctuating river stratum from bottom to top according to the sequence to obtain a fluctuating river; finally, the fluctuating river is placed above the stationary river.
Compared with the prior art, the invention has the following positive effects:
firstly, the method is different from the traditional theme river visualization, and the method effectively reduces the interference of rivers with larger fluctuation to other rivers.
Traditional subject river visualization optimizes a subject river in an "inside-out" manner, where the overall fluctuations of the river are reduced, but individual rivers are still disturbed by the fluctuations of the rivers below the individual rivers. The subject river reordering method designed by the invention can effectively place rivers with larger fluctuation on the upper layer of the subject river to reduce the interference of the rivers with larger fluctuation on other rivers.
And secondly, the traditional theme river visualization is distinguished, and the upper-layer river and the lower-layer river are stacked in the order of increasing range coefficients, so that the influence caused by fluctuation among the rivers is further reduced.
The fluctuating rivers on the upper layer and the stable rivers on the lower layer are sequenced in the layer through the range coefficient, so that the interference of the rivers with larger fluctuation to other rivers is reduced, the subject rivers are stacked in the two layers of the fluctuating river layer and the stable river layer according to the ascending order of the fluctuation degree of the rivers, and the influence caused by the fluctuation between the rivers is further reduced.
And thirdly, the method is different from the traditional topic river reordering method, and the interaction designed by the invention greatly reduces the complexity of user operation.
The existing topic river reordering method identifies the ambiguity points of the river by calculating the fluctuation intensity and contribution degree of the river, so that the user can complete the reordering of the topic river by a dragging operation mode. The reordering methods require too complicated operation by users, and the user can obtain the required theme river view only by adjusting the stable fluctuation value of the theme river according to the theme river reordering method designed by the invention, thereby greatly reducing the complexity of the user operation.
The specific implementation steps are as follows:
step 1: obtaining a subject river topiciAnd the subject river topiciThe value topic _ value at time ti,t(ii) a Wherein i is 1,2, …, n, t is 1,2, …, m;
step 2: through calculation, recommending an initial fluctuation angle for the user
The method comprises the following specific steps:
step 2.1: subject topic
iAre sequentially arranged on Baseline
tAbove 0. Calculating topic
iEach two adjacent time points of value connectionVector of (2)
And Baseline
tEvery two adjacent time instants of the vector of values connection
Angle of (theta)
i,t′(ii) a Where t 'is a time number, t' is 1,2, …, m-1, and an included angle θ
i,t′The calculation formula of (a) is as follows:
wherein the content of the first and second substances,
step 2.2: calculate each topic separatelyiAnd BaselinetAngle of (theta)i,t′Maximum value of (Max θ)i;
Step 2.3: for all Max thetaiSorting, and marking the sorted sequence as Max thetakWhere k is 1,2, …, n, Max θ1≤Maxθ2≤…≤Maxθn;
Step 2.4: finding Max theta
kThe Median of (1) is the initial fluctuation angle
The calculation formula of Median θ is as follows:
and step 3: for all subject rivers topiciReordering of, including
Step 3.1: calculate each topic separatelyiAll values of (1) topoic _ valuei,tCoefficient of polar difference CRi;CRiThe calculation formula of (a) is as follows:
Rangiis topiciThe calculation formula is as follows:
Rangi=Max_topic_valuei,t-Min_topic_valuei,t;
where Max _ topoc _ valuei,tAnd Min _ topoc _ valuei,tRepresents topoic _ valuei,tMaximum and minimum values of.
uiIs topiciThe calculation formula is as follows:
step 3.2: according to the increasing sequence of the range coefficient, topic is carried out on all the subject riversiReordering, denoted topic after orderingjWherein j is 1,2, …, n;
and 4, step 4: initial fluctuation angle obtained from
step 2
Calculating topic in turn
jFluctuation value of (1)
jAnd through a preset smooth fluctuation value fluctuation _ value
0To divide the topic
jAt the level, i.e. topic
jThe river flow layer belongs to a stable river flow layer or a fluctuating river flow layer. The method comprises the following specific steps:
step 4.1: let the current Baseline be Baselinet=0;
Step 4.2: selecting the sequenced subject river topicjThe first subject river, i.e. j ═ 1, is the current river;
step 4.3: partitioning the current river and setting a current baseline, including
4.3.1 general Current river topic
jBaseline placed at current Baseline
tTop of (2), as shown in FIG. 1, calculate topic
jEvery two adjacent time instants of the vector of values connection
And Baseline
tEvery two adjacent time instants of the vector of values connection
Angle of (theta)
j,t′(ii) a Wherein the included angle theta
j,t′In order to realize the purpose,
wherein the content of the first and second substances,
wherein, topoc _ valuej,t′For the sequenced subject river topicjThe value at time t';
4.3.2 calculating topicjFluctuation value of (1)j,
4.3.3 according to the smooth fluctuation value fluctuation _ value0For the current river topicjDividing: if the navigation _ valuej>fluctuation_value0Then, the current river topicjAttributing to a fluctuating river layer; if the navigation _ valuej≤fluctuation_value0Then, the current river topicjAttributing to a stable river layer;
4.3.4 if the current river is topicjMaking the current Baselinet=Baselinet+topic_valuej,tWherein topoic _ valuej,tThe value of the current river at the t moment is obtained; otherwise, the current baseline is not changed;
step 4.4: sequentially selecting the topic rivers topic according to the sequence of j 2, … and njThe rest rivers in the river are the current rivers, and the step 4.3 is executed in a circulating mode until the division of all the theme rivers is completed;
step 4.5: stacking the subject rivers belonging to the stable river stratum from bottom to top according to the sequence to obtain a stable river; stacking the theme rivers belonging to the fluctuating river stratum from bottom to top according to the sequence to obtain a fluctuating river; finally, the fluctuating river is placed above the stationary river.
And 5: and (5) interactive design. The method comprises the following specific steps:
step 5.1: the design shows an initial re-ordered view as shown in the effect diagram of fig. 2. And provides a smooth or fluctuating river course that selectively displays the subject river.
Step 5.2: the design box displays details of the subject river, presents information and fluctuation values of the subject river for a user, and presents a specific river by selecting a certain river and hiding the rest of the rivers, as shown in fig. 3.
Step 5.3: an adjustable smooth fluctuation value sliding strip is designed, and a user reorders the smooth river course and the fluctuating river course again by adjusting the smooth fluctuation value of the subject river, as shown in fig. 4, and at this time, the effect diagrams of the smooth river course and the fluctuating river course of the subject river are shown in fig. 5 and fig. 6. And all the river fluctuation values in the reordered stable river flow layer are within the range of the stable fluctuation values, and all the river fluctuation values in the fluctuation river flow layer are outside the range of the stable fluctuation values.
Step 5.4: two time brushes are designed, and a user selects a river in a certain local time period to reorder through a red time brush below an abscissa, and also can eliminate the river in the certain local time period through a blue time brush above the abscissa to reorder the subject river, as shown in fig. 7.
The invention designs an interactive theme river reordering method, which obtains an initial fluctuation angle through calculation
And the coefficient of range CR per river
iAnd according to the initial fluctuation angle
And a set smooth fluctuation value
0The subject river is reordered. The reordering method can effectively place rivers with larger fluctuation on the upper layer of the subject river to reduce the interference of the rivers with larger fluctuation on other rivers, and the fluctuating river layer and the stable river layer are both according to the range coefficient CR
iThe rivers belonging to the river are stacked in increasing order, namely, the rivers are also sorted in the two river layers according to the increasing order of river fluctuation. And the user can obtain the required river map by adjusting the stable fluctuation value of the subject river according to the requirement, thereby greatly reducing the complexity of user operation, designing a plurality of interaction modes and providing convenience for the user to observe the subject river map.
In order to verify the effectiveness of the method, two comparison tests are designed, namely a comparison test between the method and the existing topic river reordering method. The second test is a comparative experiment between the method of the present invention and the conventional topic river visualization method.
Test No.)
In the experiment, the method is compared with the conventional theme river reordering based on the ambiguity points, and the data set adopts partial data of 4 themes known to be 2016 in a network question and answer community. Referring to fig. 8, the reordering method identifies ambiguous points by triangles for a topic river reordering effect graph based on the ambiguous points, thereby informing the user that river a and river B are rivers with larger fluctuation. The user drags the river a with large fluctuation to the upper layer of the river by the drag operation to reduce the interference of the river a with other rivers, as shown in fig. 9. According to the method, a user can only place one river with large fluctuation on the upper layer of the river through one-time dragging operation, and if the river B needs to be placed on the upper layer of the subject river, the dragging operation needs to be carried out on the river B once, so that the method is not friendly to the interactive operation of the user. The invention provides a reordering method based on fluctuation values, and an effect graph is shown in fig. 10 after the reordering of fig. 8. The river A and the river B can be placed on the upper layer of the theme river only by once reordering, and compared with a theme river reordering method based on an ambiguous point, the complexity of user operation is greatly reduced.
Test No. two
In the test, from the knowledge www.zhihu.com of the network question-answer community, 11 subjects in one month and daily activity data from 1 month 1 day in 2016 to 1 month 31 day in 2016 are selected as verification data sets, and the 11 subjects are respectively silicon valley, enterprise culture, Steve arbor, MacBook Pro, book recommendation, startup company, media, risk investment, art and science fiction. In order to verify that the reordering method can effectively place rivers with large fluctuation on the upper layer of a subject river to obtain a subject river view capable of well observing the trend of a single river, the experiment uses the fluctuation value as an index for evaluating the fluctuation degree of the river. Fig. 11 is a conventional topic river visualization effect diagram, in which through calculating the range coefficients of 11 topics and the initial fluctuation angle of the whole river, the fluctuation values of 11 topics and the river layers to which the fluctuation values belong are obtained according to the initial fluctuation angle and the increasing order of the range coefficients, the re-ranking of 11 rivers is realized, and the re-ranking result is shown in fig. 2. As can be seen from fig. 12, after the steady fluctuation value of the subject river is adjusted according to the requirement, the subject river can be reordered again, and the fluctuation values of all the rivers in the steady river layer of the reordered subject river are below the set steady fluctuation value, i.e., the river required by the user can be effectively placed in the lower layer for observation. Therefore, the reordering method can effectively reduce the interference of rivers with larger fluctuation to other rivers according to the requirements of users, so that the change trend of a single river can be intuitively observed while the overall trend of the subject river is observed.