Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method of decision paths and bag name corresponding relation, device and electronic equipment, more adequately can determine the installation kit corresponding to path.
For achieving the above object, embodiments of the invention adopt following technical scheme:
On the one hand, the embodiment of the present invention provides a kind of method of decision paths and bag name corresponding relation, comprising:
From the first tables of data comprising path to be determined and bag name corresponding relation, read the first path and bag name corresponding relation;
Determine in the first path and bag name corresponding relation, the similarity of path and bag name;
If in the first path and bag name corresponding relation, the similarity of path and bag name is greater than the first predetermined threshold, then judge that the first path and bag name corresponding relation are set up.
Alternatively, described from the first tables of data comprising path to be determined and bag name corresponding relation, read the first path and bag name corresponding relation, comprising:
Read the first tables of data comprising path to be determined and bag name corresponding relation, the path in the first tables of data and bag name corresponding relation are filtered;
From the path of filtering rear reservation and bag name corresponding relation, read the first path and bag name corresponding relation;
Wherein, carry out filtration to the path in the first tables of data with bag name corresponding relation to comprise: the path comprising following arbitrary situation is filtered out with bag name corresponding relation: path and common path mate completely; Path is the self-built path of user.
Alternatively, describedly determine that in the first path and bag name corresponding relation, the similarity of path and bag name, comprising: judge in the first path and bag name corresponding relation, whether path and bag name include common character string; If described path and bag name include common character string, then give the first weighted value to the first path and bag name corresponding relation;
Cutting is carried out respectively in path in path in first tables of data and bag name corresponding relation and bag name, sets up the first set of correspondences; Each first corresponding relation that described first corresponding relation is concentrated is the corresponding relation between the cutting vocabulary in path in the first tables of data and the cutting vocabulary of the bag name corresponding with this path; Described first corresponding relation concentrates the quantity of the first corresponding relation, identical with the quantity of path in the first tables of data and bag name corresponding relation;
The frequency of the first corresponding relation set up after carrying out cutting to the first path and bag name corresponding relation calculates, and judges whether the frequency of this first corresponding relation is greater than the second predetermined threshold; If the frequency of this first corresponding relation is greater than the second predetermined threshold, then judge whether this first corresponding relation exists in the second corresponding relation frequency table; Wherein, the frequency of the second corresponding relation and the second corresponding relation is included, the corresponding relation of described second corresponding relation for setting up after cutting is carried out respectively in the path be defined as in advance in correct path and bag name corresponding relation and bag name in described second corresponding relation frequency table;
If this first corresponding relation exists in the second corresponding relation frequency table, then read the frequency that this first corresponding relation is corresponding in the second corresponding relation frequency table; Judge whether the frequency corresponding to this first corresponding relation is in the second corresponding relation frequency table is greater than the 3rd predetermined threshold;
If the frequency of this first corresponding relation corresponding in the second corresponding relation frequency table is greater than the 3rd predetermined threshold, then give the second weighted value to the first path and bag name corresponding relation;
Described first weighted value and the second weighted value are added, obtain in the first path and bag name corresponding relation, the similarity of path and bag name.
Alternatively, in described judgement first path and bag name corresponding relation, whether path and bag name include common character string, comprising: judge, in the first path and bag name corresponding relation, whether the sub cost sum bag name in path includes common character string.
Alternatively, described cutting is carried out to the first path and bag name corresponding relation after the frequency of the first corresponding relation set up calculate, comprising: the frequency of the first corresponding relation set up after carrying out cutting according to following formula to the first path and bag name corresponding relation calculates:
F1=n/m;
Wherein, F1 is the frequency of the first corresponding relation set up after carrying out cutting to the first path and bag name corresponding relation;
N for concentrate at the first corresponding relation, with cutting is carried out to the first path and bag name corresponding relation after the quantity sum of identical all first corresponding relations of the first corresponding relation of setting up;
M, for concentrate at the first corresponding relation, comprises the quantity sum of all first corresponding relations of path cutting vocabulary in the first path and bag name corresponding relation or bag name cutting vocabulary.
Alternatively, from the first tables of data comprising path to be determined and bag name corresponding relation, before reading the first path and bag name corresponding relation, the method for described decision paths and bag name corresponding relation, also comprises:
Under the user EXEC of mobile terminal, by client application, the establishment in path in mobile terminal or change are monitored;
When monitor in described mobile terminal current have new path to create or have path changing time, read the new path created or the path changed, obtain the bag name of the application program of described mobile terminal foreground and backstage current active, set up the corresponding relation between described path and the described bag name of acquisition read;
Set up the tables of data of the corresponding relation comprised between the described path of reading and the described bag name of acquisition, as described the first tables of data comprising path to be determined and bag name corresponding relation.
Alternatively, from the first tables of data comprising path to be determined and bag name corresponding relation, before reading the first path and bag name corresponding relation, the method for described decision paths and bag name corresponding relation, also comprises:
Set up and include the second tables of data being defined as correct path and bag name corresponding relation in advance;
Cutting is carried out respectively in path in path in second tables of data and bag name corresponding relation and bag name, sets up the second set of correspondences; Each second corresponding relation that described second corresponding relation is concentrated is the corresponding relation between the cutting vocabulary in path in the second tables of data and the cutting vocabulary of the bag name corresponding with this path; Described second corresponding relation concentrates the quantity of the second corresponding relation, identical with the quantity of path in the second tables of data and bag name corresponding relation;
Calculate according to the frequency of following formula to each second corresponding relation that the second corresponding relation is concentrated:
F2=j/k;
Wherein, F2 is the frequency that the second corresponding relation concentrates one of them the second corresponding relation;
J for concentrate at the second corresponding relation, the quantity sum of all second corresponding relations identical with one of them second corresponding relation described;
K, for concentrate at the second corresponding relation, comprises the quantity sum of all second corresponding relations of path cutting vocabulary in one of them second corresponding relation described or bag name cutting vocabulary.
According to the frequency of each second corresponding relation that the second corresponding relation calculated is concentrated, set up described second corresponding relation frequency table.
Alternatively, described foundation includes the second tables of data being defined as correct path and bag name corresponding relation in advance, comprising: under the root user pattern of mobile terminal, monitored the establishment in path in mobile terminal or change by client application;
When monitor in described mobile terminal current have new path to create or have path changing time, read the new path created or the path changed, obtain the bag name of the application program of described mobile terminal foreground and backstage current active, set up the corresponding relation between described path and the described bag name of acquisition read;
Set up the tables of data of the corresponding relation comprised between the described path of reading and the described bag name of acquisition, include as described the second tables of data being defined as correct path and bag name corresponding relation in advance.
On the other hand, the embodiment of the present invention provides the device of a kind of decision paths and bag name corresponding relation, comprising: source data read module, for from the first tables of data comprising path to be determined and bag name corresponding relation, reads the first path and bag name corresponding relation; Similarity determination module, for determining in the first path and bag name corresponding relation, the similarity of path and bag name; Judge module, if in the first path and bag name corresponding relation, the similarity of path and bag name is greater than the first predetermined threshold, then judge that the first path and bag name corresponding relation are set up.
Alternatively, described source data read module, comprising: the first reading submodule, for reading the first tables of data comprising path to be determined and bag name corresponding relation; Filter submodule, for filtering the path in the first tables of data and bag name corresponding relation; Second reading submodule, for from the path of filtering rear reservation and bag name corresponding relation, reads the first path and bag name corresponding relation; Wherein, carry out filtration to the path in the first tables of data with bag name corresponding relation to comprise: the path comprising following arbitrary situation is filtered out with bag name corresponding relation: path and common path mate completely; Path is the self-built path of user.
Alternatively, described similarity determination module, comprises first and determines that submodule, second determines submodule and accumulator module; Wherein, described first determines submodule, for judging in the first path and bag name corresponding relation, whether path and bag name include common character string; If described path and bag name include common character string, then give the first weighted value to the first path and bag name corresponding relation;
Described second determines submodule, for:
Cutting is carried out respectively in path in path in first tables of data and bag name corresponding relation and bag name, sets up the first set of correspondences; Each first corresponding relation that described first corresponding relation is concentrated is the corresponding relation between the cutting vocabulary in path in the first tables of data and the cutting vocabulary of the bag name corresponding with this path; Described first corresponding relation concentrates the quantity of the first corresponding relation, identical with the quantity of path in the first tables of data and bag name corresponding relation;
The frequency of the first corresponding relation set up after carrying out cutting to the first path and bag name corresponding relation calculates, and judges whether the frequency of this first corresponding relation is greater than the second predetermined threshold; If the frequency of this first corresponding relation is greater than the second predetermined threshold, then judge whether this first corresponding relation exists in the second corresponding relation frequency table; Wherein, the frequency of the second corresponding relation and the second corresponding relation is included, the corresponding relation of described second corresponding relation for setting up after cutting is carried out respectively in the path be defined as in advance in correct path and bag name corresponding relation and bag name in described second corresponding relation frequency table;
If this first corresponding relation exists in the second corresponding relation frequency table, then read the frequency that this first corresponding relation is corresponding in the second corresponding relation frequency table; Judge whether the frequency corresponding to this first corresponding relation is in the second corresponding relation frequency table is greater than the 3rd predetermined threshold;
If the frequency of this first corresponding relation corresponding in the second corresponding relation frequency table is greater than the 3rd predetermined threshold, then give the second weighted value to the first path and bag name corresponding relation;
Described accumulator module, for being added described first weighted value and the second weighted value, obtains in the first path and bag name corresponding relation, the similarity of path and bag name.
Alternatively, described first determines submodule, for judging, in the first path and bag name corresponding relation, whether the sub cost sum bag name in path includes common character string; If the sub cost sum bag name in described path includes common character string, then give the first weighted value to the first path and bag name corresponding relation.
Alternatively, described second determines submodule, comprising: the first calculating sub module, and the frequency for the first corresponding relation set up after carrying out cutting according to following formula to the first path and bag name corresponding relation calculates:
F1=n/m;
Wherein, F1 is the frequency of the first corresponding relation set up after carrying out cutting to the first path and bag name corresponding relation;
N for concentrate at the first corresponding relation, with cutting is carried out to the first path and bag name corresponding relation after the quantity sum of identical all first corresponding relations of the first corresponding relation of setting up;
M, for concentrate at the first corresponding relation, comprises the quantity sum of all first corresponding relations of path cutting vocabulary in the first path and bag name corresponding relation or bag name cutting vocabulary.
Alternatively, the device of described decision paths and bag name corresponding relation, also comprises: the first monitoring module, under the user EXEC of mobile terminal, is monitored the establishment in path in mobile terminal or change by client application; First builds module, for when monitor in described mobile terminal current have new path to create or have path changing time, read the new path created or the path changed, obtain the bag name of the application program of described mobile terminal foreground and backstage current active, set up the corresponding relation between described path and the described bag name of acquisition read; Set up the tables of data of the corresponding relation comprised between the described path of reading and the described bag name of acquisition, as described the first tables of data comprising path to be determined and bag name corresponding relation.
Alternatively, the device of described decision paths and bag name corresponding relation, also comprises the second structure module, computing module and the 3rd builds module; Wherein
Second builds module, for setting up the second tables of data including and be defined as correct path and bag name corresponding relation in advance;
Computing module, carries out cutting respectively with by the path in the path in the second tables of data and bag name corresponding relation and bag name, sets up the second set of correspondences; Each second corresponding relation that described second corresponding relation is concentrated is the corresponding relation between the cutting vocabulary in path in the second tables of data and the cutting vocabulary of the bag name corresponding with this path; Described second corresponding relation concentrates the quantity of the second corresponding relation, identical with the quantity of path in the second tables of data and bag name corresponding relation;
Calculate according to the frequency of following formula to each second corresponding relation that the second corresponding relation is concentrated:
F2=j/k;
Wherein, F2 is the frequency that the second corresponding relation concentrates one of them the second corresponding relation;
J for concentrate at the second corresponding relation, the quantity sum of all second corresponding relations identical with one of them second corresponding relation described;
K, for concentrate at the second corresponding relation, comprises the quantity sum of all second corresponding relations of path cutting vocabulary in one of them second corresponding relation described or bag name cutting vocabulary;
3rd builds module, for the frequency of each second corresponding relation concentrated according to the second corresponding relation of calculating, sets up described second corresponding relation frequency table.
Alternatively, described second builds module, comprising: second monitors submodule, under the root user pattern of mobile terminal, is monitored the establishment in path in mobile terminal or change by client application; 4th builds submodule, for when monitor in described mobile terminal current have new path to create or have path changing time, read the new path created or the path changed, obtain the bag name of the application program of described mobile terminal foreground and backstage current active, set up the corresponding relation between described path and the described bag name of acquisition read; Set up the tables of data of the corresponding relation comprised between the described path of reading and the described bag name of acquisition, include as described the second tables of data being defined as correct path and bag name corresponding relation in advance.
Again on the one hand, the embodiment of the present invention also provides a kind of electronic equipment, and described electronic equipment comprises: housing, processor, storer, circuit board and power circuit, wherein, circuit board is placed in the interior volume that housing surrounds, and processor and storer are arranged on circuit boards; Power circuit, for powering for each circuit of above-mentioned electronic equipment or device; Storer is used for stores executable programs code; Processor runs the program corresponding with executable program code by reading in storer the executable program code stored, for performing the method for decision paths described in aforementioned any embodiment and bag name corresponding relation.
The method of the decision paths that the embodiment of the present invention provides and bag name corresponding relation, device and electronic equipment, by determining the similarity of path to be determined and bag name corresponding relation, and judge whether this similarity is greater than the predetermined threshold value first set, the threshold value preset if be greater than, then judge that the first path and bag name corresponding relation are set up, more adequately can determine the installation kit corresponding to path thus.
Embodiment
Below in conjunction with accompanying drawing, the method for a kind of decision paths of the embodiment of the present invention and bag name corresponding relation, device and electronic equipment are described in detail.
Should be clear and definite, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments all obtained under creative work prerequisite, belong to the scope of protection of the invention.
Fig. 1 is the schematic flow sheet of method one embodiment of decision paths of the present invention and bag name corresponding relation.Referring to Fig. 1, method one embodiment of decision paths of the present invention and bag name corresponding relation, comprises the steps:
S11, from the first tables of data comprising path to be determined and bag name corresponding relation, read the first path and bag name corresponding relation;
Fig. 2 is the first tables of data comprising path to be determined and bag name corresponding relation in the present embodiment.Referring to Fig. 2, the first tables of data can be a two-dimensional data table, wherein includes the corresponding relation of path and bag name.
The data of path and bag name corresponding relation in first tables of data, client application can be passed through in advance, from the mobile terminal such as mobile phone, panel computer of user, collect path to be determined and bag name corresponding relation, then set up the tables of data comprising path to be determined and bag name corresponding relation.
In the embodiment of the present invention, described first path and bag name corresponding relation are any one path in general reference first tables of data and bag name corresponding relation.
S12, determine in the first path and bag name corresponding relation, the similarity of path and bag name;
In this step, as an embodiment, according to the similarity of the character string of path and bag name, the similarity of path and bag name can be determined.
If in S13 first path and bag name corresponding relation, the similarity of path and bag name is greater than the first predetermined threshold, then judge that the first path and bag name corresponding relation are set up.
The method of the decision paths that the embodiment of the present invention provides and bag name corresponding relation, by determining the similarity of path to be determined and bag name corresponding relation, and judge whether this similarity is greater than the predetermined threshold value first set, the threshold value preset if be greater than, then judge that the first path and bag name corresponding relation are set up, more adequately can determine the installation kit corresponding to path thus.
In order to improve the accuracy judging efficiency and judgement, can filter the path comprised in the tables of data of path to be determined and bag name corresponding relation and bag name corresponding relation, filtering out undesirable path and bag name corresponding relation.Referring to Fig. 3, described from the first tables of data comprising path to be determined and bag name corresponding relation, read the first path and bag name corresponding relation (S11), can comprise:
S111, read and comprise the tables of data of path to be determined and bag name corresponding relation, the path in this tables of data and bag name corresponding relation are filtered.
Wherein, carry out filtration to the path in this tables of data and bag name corresponding relation to comprise: the path and bag name corresponding relation that comprise arbitrary situation in the following two kinds situation are filtered out:
(1) path and common path mate completely;
(2) path is the self-built path of user.
S112, the path retained after filtration and bag name corresponding relation, read a paths and bag name corresponding relation.
Fig. 3 is the schematic flow sheet of another embodiment of method of decision paths of the present invention and bag name corresponding relation.Referring to Fig. 3, in another embodiment of method of decision paths of the present invention and bag name corresponding relation, describedly determine that, in the first path and bag name corresponding relation, the similarity (12) of path and bag name, can comprise the steps:
S121, judge in the first path and bag name corresponding relation, whether path and bag name include common character string.
Under normal circumstances, one paths generally includes the subpath under common path and common path, in such as path " Tencent QQMusic QzoneMusic ", " Tencent " can be described as common path, and " QQMusic QzoneMusic " can be described as subpath.In order to improve judgement efficiency, only can judge, in the subpath in the path in described path and bag name corresponding relation, whether to there is the character string common with described bag name.
If the described path of S122 and bag name include common character string, then give the first weighted value to the first path and bag name corresponding relation.
S123, cutting is carried out respectively in the path in path in the first tables of data and bag name corresponding relation and bag name, set up the first set of correspondences.
Each first corresponding relation that described first corresponding relation is concentrated is the corresponding relation between the cutting vocabulary in path in the first tables of data and the cutting vocabulary of the bag name corresponding with this path; Described first corresponding relation concentrates the quantity of the first corresponding relation, identical with the quantity of path in the first tables of data and bag name corresponding relation.
S124, cutting is carried out to the first path and bag name corresponding relation after the frequency of the first corresponding relation set up calculate.
Frequency is the number of times that in one group of data, certain data occurs.As an embodiment, in this step, the frequency of the first corresponding relation set up after can carrying out cutting according to following formula to the first path and bag name corresponding relation calculates:
F1=n/m;
Wherein, F1 is the frequency of the first corresponding relation set up after carrying out cutting to the first path and bag name corresponding relation;
N for concentrate at the first corresponding relation, with cutting is carried out to the first path and bag name corresponding relation after the quantity sum of identical all first corresponding relations of the first corresponding relation of setting up;
M, for concentrate at the first corresponding relation, comprises the quantity sum of all first corresponding relations of path cutting vocabulary in the first path and bag name corresponding relation or bag name cutting vocabulary.
S125, judge whether the frequency of this first corresponding relation is greater than the second predetermined threshold.
If the frequency of this first corresponding relation of S126 is greater than the second predetermined threshold, then judge whether this first corresponding relation exists in the second corresponding relation frequency table.
Wherein, the frequency of the second corresponding relation and the second corresponding relation is included, the corresponding relation of described second corresponding relation for setting up after cutting is carried out respectively in the path be defined as in advance in correct path and bag name corresponding relation and bag name in described second corresponding relation frequency table.
If this first corresponding relation of S127 exists in the second corresponding relation frequency table, then read the frequency that this first corresponding relation is corresponding in the second corresponding relation frequency table.
S128, judge whether the frequency corresponding in the second corresponding relation frequency table of this first corresponding relation is greater than the 3rd predetermined threshold.
If the frequency of this first corresponding relation of S129 corresponding in the second corresponding relation frequency table is greater than the 3rd predetermined threshold, then give the second weighted value to the first path and bag name corresponding relation.
S130, described first weighted value and the second weighted value to be added, to obtain in the first path and bag name corresponding relation, the similarity of path and bag name.
In the embodiment of the method for aforementioned decision paths and bag name corresponding relation, alternatively, from in the first tables of data comprising path to be determined and bag name corresponding relation, before reading the first path and bag name corresponding relation (S11), the method of described decision paths and bag name corresponding relation, also set up described first tables of data by following steps:
A1, under the user EXEC of mobile terminal, by client application, the establishment in path in mobile terminal or change to be monitored.
Wherein, the user EXEC of described mobile terminal is for root user model, and root user model can be described as again root user pattern; Under normal circumstances, what automatically enter after mobile terminal-opening is user EXEC; Root user model can be switched to by user EXEC, also can be switched to user EXEC by root user model.
A2, when monitor in described mobile terminal current have new path to create or have path changing time, read the new path created or the path changed, obtain the bag name of the application program of described mobile terminal foreground and backstage current active, set up the corresponding relation between described path and the described bag name of acquisition read.
A3, set up the tables of data comprising corresponding relation between the described path of reading and the described bag name of acquisition, as described the first tables of data comprising path to be determined and bag name corresponding relation.
In the path of current new establishment or the path that changes, and set up corresponding relation between the bag name of the application program of current foreground and background activity, thus the quantity of the corresponding relation between the path of foundation and bag name can be reduced, improve follow-up judgement efficiency.This corresponding relation can be the relation of one-to-many, also can be many-to-one relation, namely can be that a path is corresponding with multiple bag name, also can be that multiple path is corresponding with same bag name.
In the embodiment of the method for aforementioned decision paths and bag name corresponding relation, alternatively, from in the first tables of data comprising path to be determined and bag name corresponding relation, before reading the first path and bag name corresponding relation (S11), the method of described decision paths and bag name corresponding relation, also set up described second corresponding relation frequency table by following steps:
B1, foundation include the second tables of data being defined as correct path and bag name corresponding relation in advance.
In this step, as an embodiment, setting up the second tables of data including and be defined as correct path and bag name corresponding relation in advance by artificial mode, also obtaining the data of path and bag name corresponding relation in the second tables of data by burying point mode.
B2, cutting is carried out respectively in the path in the path in the second tables of data and bag name corresponding relation and bag name, set up the second set of correspondences.
Each second corresponding relation that described second corresponding relation is concentrated is the corresponding relation between the cutting vocabulary in path in the second tables of data and the cutting vocabulary of the bag name corresponding with this path; Described second corresponding relation concentrates the quantity of the second corresponding relation, identical with the quantity of path in the second tables of data and bag name corresponding relation;
B3, to calculate according to the frequency of following formula to each second corresponding relation that the second corresponding relation is concentrated:
F2=j/k;
Wherein, F2 is the frequency that the second corresponding relation concentrates one of them the second corresponding relation;
J for concentrate at the second corresponding relation, the quantity sum of all second corresponding relations identical with one of them second corresponding relation described;
K, for concentrate at the second corresponding relation, comprises the quantity sum of all second corresponding relations of path cutting vocabulary in one of them second corresponding relation described or bag name cutting vocabulary.
The frequency of each second corresponding relation that the second corresponding relation that B4, basis calculate is concentrated, sets up described second corresponding relation frequency table.
In the embodiment of the method for aforementioned decision paths and bag name corresponding relation, alternatively, described foundation includes the second tables of data (B1) being defined as correct path and bag name corresponding relation in advance, comprising:
B11, under the root user pattern of mobile terminal, by client application, the establishment in path in mobile terminal or change to be monitored;
B12, when monitor in described mobile terminal current have new path to create or have path changing time, read the new path created or the path changed, obtain the bag name of the application program of described mobile terminal foreground and backstage current active, set up the corresponding relation between described path and the described bag name of acquisition read;
B13, set up the tables of data comprising corresponding relation between the described path of reading and the described bag name of acquisition, include as described the second tables of data being defined as correct path and bag name corresponding relation in advance.
Corresponding relation in second tables of data can be the relation of one-to-many, also can be many-to-one relation, namely can be that a path is corresponding with multiple bag name, also can be that multiple path is corresponding with same bag name.
Below to be judged to be that example is described to the path in the tables of data shown in Fig. 2 and bag name corresponding relation " qqmusic/cache->com.tencent.qqmusic ".
The method of the present embodiment decision paths and bag name corresponding relation, comprises the steps:
S21, under the root user model of mobile terminal, by client application, the establishment in path in mobile terminal or change to be monitored.
In this step, can monitor the establishment in the path in multiple mobile terminal or change, to collect more data.
S22, when monitor in described mobile terminal current have new path to create or have path changing time, read the new path created or the path changed, obtain the bag name of the application program of described mobile terminal foreground and backstage current active, set up the corresponding relation between described path and the described bag name of acquisition read.
S23, set up the second tables of data comprising corresponding relation between the described path of reading and the described bag name of acquisition.
The second tables of data comprising described corresponding relation that Fig. 4 sets up for the corresponding relation set up according to step S22; In the second tables of data, have 10 paths and bag name corresponding relation, namely have 10 data.
S24, cutting is carried out respectively in the path in the path in the second tables of data and bag name corresponding relation and bag name, set up the second set of correspondences, as shown in Figure 5.
In this step, in units of vocabulary, remove the "/" in path, ". " of removing Bao Mingzhong accords with at equal intervals, carries out cutting respectively to path and bag name.
S25, based on path, to calculate according to the frequency of following formula to each second corresponding relation that the second corresponding relation is concentrated:
F2=j/k;
Wherein, F2 is the frequency that the second corresponding relation concentrates one of them the second corresponding relation;
J for concentrate at the second corresponding relation, the quantity sum of all second corresponding relations identical with one of them second corresponding relation described;
K, for concentrate at the second corresponding relation, comprises the quantity sum of all second corresponding relations of path cutting vocabulary in one of them second corresponding relation described or bag name cutting vocabulary.
The frequency of each second corresponding relation that the second corresponding relation that S26, basis calculate is concentrated, sets up described second corresponding relation frequency table, as shown in Figure 6.
S27, under the user EXEC of mobile terminal device, by client application, the establishment in path in mobile terminal device or change to be monitored.
S28, when monitor in described mobile terminal device current have new path to create or have path changing time, read the new path created or the path changed, obtain the bag name of the application program of described mobile terminal device foreground and backstage current active, set up the corresponding relation between described path and the described bag name of acquisition read.
S29, set up the tables of data comprising corresponding relation between the described path of reading and the described bag name of acquisition, as described the first tables of data comprising path to be determined and bag name corresponding relation.Fig. 2 is the first tables of data comprising path to be determined and bag name corresponding relation set up.
S30, from the first tables of data, read the first path and bag name corresponding relation " qqmusic/cache->com.tencent.qqmusic ", as path to be determined and bag name corresponding relation.Wherein, " qqmusic/cache " is path, and " com.tencent.qqmusic " is bag name.
S31, judge described path and bag name corresponding relation " qqmusic/cache->com.tencent.qqmusic ", in, whether path and bag name include common character string; By judging, described path and bag name include common character string " qqmusic ", to described path and bag name corresponding relation " qqmusic/cache->com.tencent.qqmusic ", give the first weighted value 1.0.
S32, cutting is carried out respectively in the path in path in the first tables of data and bag name corresponding relation and bag name, set up the first set of correspondences, as shown in Figure 7.
S33, cutting is carried out to " qqmusic/cache->com.tencent.qqmusic " after the frequency of the first corresponding relation set up calculate according to following formula, the frequency obtaining this first corresponding relation is 2/4=0.5.
Computing formula is: F1=n/m;
Wherein, F1 is the frequency of the first corresponding relation set up after carrying out cutting to " qqmusic/cache->com.tencent.qqmusic ";
N concentrates at the first corresponding relation, with cutting is carried out to " qqmusic/cache->com.tencent.qqmusic " after the quantity sum of identical all first corresponding relations of the first corresponding relation of setting up, n=2 in the present embodiment;
M concentrates at the first corresponding relation, comprises the path cutting vocabulary in " qqmusic/cache->com.tencent.qqmusic " " qqmusiccache " the quantity sum of all first corresponding relations, in the present embodiment, m=4.
S34, judge whether the frequency of this first corresponding relation is greater than the second predetermined threshold 0.4.
S35, by judge, the frequency of this first corresponding relation is 0.5, is greater than the second predetermined threshold 0.4, judges whether this first corresponding relation exists in the second corresponding relation frequency table.
By judging, this first corresponding relation " qqmusiccache->comtencentqqmusic " exists in the second corresponding relation frequency table.
S36, read this first corresponding relation frequency 1.0 corresponding in the second corresponding relation frequency table.
S37, judge whether the frequency 1.0 corresponding in the second corresponding relation frequency table of this first corresponding relation is greater than the 3rd predetermined threshold 0.2.
S38, process judge, the frequency 1.0 of this first corresponding relation corresponding in the second corresponding relation frequency table is greater than the 3rd predetermined threshold 0.2, then give the second weighted value 0.8 to the first path and bag name corresponding relation.
S39, be added described first weighted value 1.0 and the second weighted value 0.8, obtain in the first path and bag name corresponding relation, the similarity of path and bag name is 1.8.
S40, process judge, in first path and bag name corresponding relation, the similarity 1.8 of path and bag name is greater than the first predetermined threshold 1.0, judges that the first path and bag name corresponding relation " qqmusic/cache->com.tencent.qqmusic " are set up.
Fig. 8 is the structural representation of device one embodiment of decision paths of the present invention and bag name corresponding relation.Referring to Fig. 8, device one embodiment of decision paths of the present invention and bag name corresponding relation, comprises source data read module 51, similarity determination module 52 and judge module 53; Wherein
Source data read module 51, for from the first tables of data comprising path to be determined and bag name corresponding relation, reads the first path and bag name corresponding relation.
Fig. 2 is the first tables of data comprising path to be determined and bag name corresponding relation in the present embodiment.Referring to Fig. 2, the first tables of data can be a two-dimensional data table, wherein includes the corresponding relation of path and bag name.
The data of path and bag name corresponding relation in first tables of data, client application can be passed through in advance, from the mobile terminal such as mobile phone, panel computer of user, collect path to be determined and bag name corresponding relation, then set up the tables of data comprising path to be determined and bag name corresponding relation.
Similarity determination module 52, for determining in the first path and bag name corresponding relation, the similarity of path and bag name.
As an embodiment, according to the similarity of the character string of path and bag name, the similarity of path and bag name can be determined.
Judge module 53, if in the first path and bag name corresponding relation, the similarity of path and bag name is greater than the first predetermined threshold, then judge that the first path and bag name corresponding relation are set up.
The device of the decision paths that the embodiment of the present invention provides and bag name corresponding relation, by determining the similarity of path to be determined and bag name corresponding relation, and judge whether this similarity is greater than the predetermined threshold value first set, the threshold value preset if be greater than, then judge that the first path and bag name corresponding relation are set up, more adequately can determine the installation kit corresponding to path thus.
Fig. 9 is the structural representation of another embodiment of device of decision paths of the present invention and bag name corresponding relation.In order to improve the accuracy judging efficiency and judgement, can filter the path comprised in the tables of data of path to be determined and bag name corresponding relation and bag name corresponding relation, filtering out undesirable path and bag name corresponding relation.Referring to Fig. 9, in the device embodiment of aforementioned decision paths and bag name corresponding relation, described source data read module 51, comprising:
First reading submodule 511, for reading the first tables of data comprising path to be determined and bag name corresponding relation;
Filter submodule 512, for filtering the path in the first tables of data and bag name corresponding relation; Wherein, carry out filtration to the path in the first tables of data and bag name corresponding relation to comprise: the path and bag name corresponding relation that comprise following arbitrary situation are filtered out:
(1) path and common path mate completely;
(2) path is the self-built path of user.
Second reading submodule 513, for from the path of filtering rear reservation and bag name corresponding relation, reads the first path and bag name corresponding relation.
In the device embodiment of aforementioned decision paths and bag name corresponding relation, described similarity determination module 52, can comprise first and determine that submodule 521, second determines submodule 522 and accumulator module 523; Wherein
Described first determines submodule 521, for judging in the first path and bag name corresponding relation, whether path and bag name include common character string; If described path and bag name include common character string, then give the first weighted value to the first path and bag name corresponding relation.
Under normal circumstances, one paths generally includes the subpath under common path and common path, in such as path " Tencent QQMusic QzoneMusic ", " Tencent " can be described as common path, and " QQMusic QzoneMusic " can be described as subpath.In order to improve judgement efficiency, only can judge, in the subpath in the path in described path and bag name corresponding relation, whether to there is the character string common with described bag name.
Described second determines submodule 522, for:
Cutting is carried out respectively in path in path in first tables of data and bag name corresponding relation and bag name, sets up the first set of correspondences; Each first corresponding relation that described first corresponding relation is concentrated is the corresponding relation between the cutting vocabulary in path in the first tables of data and the cutting vocabulary of the bag name corresponding with this path; Described first corresponding relation concentrates the quantity of the first corresponding relation, identical with the quantity of path in the first tables of data and bag name corresponding relation;
The frequency of the first corresponding relation set up after carrying out cutting to the first path and bag name corresponding relation calculates, and judges whether the frequency of this first corresponding relation is greater than the second predetermined threshold; If the frequency of this first corresponding relation is greater than the second predetermined threshold, then judge whether this first corresponding relation exists in the second corresponding relation frequency table; Wherein, the frequency of the second corresponding relation and the second corresponding relation is included, the corresponding relation of described second corresponding relation for setting up after cutting is carried out respectively in the path be defined as in advance in correct path and bag name corresponding relation and bag name in described second corresponding relation frequency table;
If this first corresponding relation exists in the second corresponding relation frequency table, then read the frequency that this first corresponding relation is corresponding in the second corresponding relation frequency table; Judge whether the frequency corresponding to this first corresponding relation is in the second corresponding relation frequency table is greater than the 3rd predetermined threshold;
If the frequency of this first corresponding relation corresponding in the second corresponding relation frequency table is greater than the 3rd predetermined threshold, then give the second weighted value to the first path and bag name corresponding relation;
Described accumulator module 523, for being added described first weighted value and the second weighted value, obtains in the first path and bag name corresponding relation, the similarity of path and bag name.
In the device embodiment of aforementioned decision paths and bag name corresponding relation, alternatively, described second determines submodule 522, comprising: the first calculating sub module, and the frequency for the first corresponding relation set up after carrying out cutting according to following formula to the first path and bag name corresponding relation calculates:
F1=n/m;
Wherein, F1 is the frequency of the first corresponding relation set up after carrying out cutting to the first path and bag name corresponding relation;
N for concentrate at the first corresponding relation, with cutting is carried out to the first path and bag name corresponding relation after the quantity sum of identical all first corresponding relations of the first corresponding relation of setting up;
M, for concentrate at the first corresponding relation, comprises the quantity sum of all first corresponding relations of path cutting vocabulary in the first path and bag name corresponding relation or bag name cutting vocabulary.
In the device embodiment of aforementioned decision paths and bag name corresponding relation, alternatively, the device of described decision paths and bag name corresponding relation, also comprises the first monitoring module 54 and first and builds module 55; Wherein
First monitoring module 54, under the user EXEC of mobile terminal, is monitored the establishment in path in mobile terminal or change by client application.
Wherein, the user EXEC of described mobile terminal is for root user model, and root user model can be described as again root user pattern; Under normal circumstances, what automatically enter after mobile terminal-opening is user EXEC; Root user model can be switched to by user EXEC, also can be switched to user EXEC by root user model.
First builds module 55, for when monitor in described mobile terminal current have new path to create or have path changing time, read the new path created or the path changed, obtain the bag name of the application program of described mobile terminal foreground and backstage current active, set up the corresponding relation between described path and the described bag name of acquisition read; Set up the tables of data of the corresponding relation comprised between the described path of reading and the described bag name of acquisition, as described the first tables of data comprising path to be determined and bag name corresponding relation.
In the path of current new establishment or the path that changes, and set up corresponding relation between the bag name of the application program of current foreground and background activity, thus the quantity of the corresponding relation between the path of foundation and bag name can be reduced, improve follow-up judgement efficiency.This corresponding relation can be the relation of one-to-many, also can be many-to-one relation, namely can be that a path is corresponding with multiple bag name, also can be that multiple path is corresponding with same bag name.
In the device embodiment of aforementioned decision paths and bag name corresponding relation, alternatively, the device of described decision paths and bag name corresponding relation, also comprises the second structure module 56, computing module 57 and the 3rd builds module 58; Wherein
Second builds module 56, for setting up the second tables of data including and be defined as correct path and bag name corresponding relation in advance.As an embodiment, setting up the second tables of data including and be defined as correct path and bag name corresponding relation in advance by artificial mode, also obtaining the data of path and bag name corresponding relation in the second tables of data by burying point mode.
Computing module 57, for cutting is carried out respectively in the path in the path in the second tables of data and bag name corresponding relation and bag name, sets up the second set of correspondences; Each second corresponding relation that described second corresponding relation is concentrated is the corresponding relation between the cutting vocabulary in path in the second tables of data and the cutting vocabulary of the bag name corresponding with this path; Described second corresponding relation concentrates the quantity of the second corresponding relation, identical with the quantity of path in the second tables of data and bag name corresponding relation;
Calculate according to the frequency of following formula to each second corresponding relation that the second corresponding relation is concentrated:
F2=j/k;
Wherein, F2 is the frequency that the second corresponding relation concentrates one of them the second corresponding relation;
J for concentrate at the second corresponding relation, the quantity sum of all second corresponding relations identical with one of them second corresponding relation described;
K, for concentrate at the second corresponding relation, comprises the quantity sum of all second corresponding relations of path cutting vocabulary in one of them second corresponding relation described or bag name cutting vocabulary;
3rd builds module 58, for the frequency of each second corresponding relation concentrated according to the second corresponding relation of calculating, sets up described second corresponding relation frequency table.
In the device embodiment of aforementioned decision paths and bag name corresponding relation, alternatively, described second builds module 56, comprising:
Second monitors submodule 561, under the root user pattern of mobile terminal, is monitored the establishment in path in mobile terminal or change by client application;
4th builds submodule 562, for when monitor in described mobile terminal current have new path to create or have path changing time, read the new path created or the path changed, obtain the bag name of the application program of described mobile terminal foreground and backstage current active, set up the corresponding relation between described path and the described bag name of acquisition read; Set up the tables of data of the corresponding relation comprised between the described path of reading and the described bag name of acquisition, include as described the second tables of data being defined as correct path and bag name corresponding relation in advance.
Corresponding relation in second tables of data can be the relation of one-to-many, also can be many-to-one relation, namely can be that a path is corresponding with multiple bag name, also can be that multiple path is corresponding with same bag name.
Figure 10 is the structural representation of electronic equipment one embodiment of the present invention.Referring to Figure 10, electronic equipment embodiment of the present invention comprises: housing 81, processor 82, storer 83, circuit board 84 and power circuit 85, wherein, circuit board 84 is placed in the interior volume that housing 81 surrounds, and processor 82 and storer 83 are arranged on circuit board 84; Power circuit 85, for powering for each circuit of above-mentioned electronic equipment or device; Storer 83 is for stores executable programs code; Processor 82 runs the program corresponding with executable program code by reading in storer the executable program code stored, for perform aforementioned decision paths and bag name corresponding relation method any embodiment described in step.
The electronic equipment that the embodiment of the present invention provides, by determining the similarity of path to be determined and bag name corresponding relation, and judge whether this similarity is greater than the predetermined threshold value first set, the threshold value preset if be greater than, then judge that the first path and bag name corresponding relation are set up, more adequately can determine the installation kit corresponding to path thus.
This electronic equipment exists in a variety of forms, includes but not limited to:
(1) mobile communication equipment: the feature of this kind equipment possesses mobile communication function, and to provide speech, data communication for main target.This Terminal Type comprises: smart mobile phone (such as iPhone), multimedia handset, functional mobile phone, and low-end mobile phone etc.
(2) super mobile personal computer equipment: this kind equipment belongs to the category of personal computer, has calculating and processing capacity, generally also possesses mobile Internet access characteristic.This Terminal Type comprises: PDA, MID and UMPC equipment etc., such as iPad.
(3) portable entertainment device: this kind equipment can show and play multimedia content.This kind equipment comprises: audio frequency, video player (such as iPod), handheld device, e-book, and intelligent toy and portable car-mounted navigator.
(4) server: the equipment that calculation services is provided, the formation of server comprises processor, hard disk, internal memory, system bus etc., server and general computer architecture similar, but owing to needing to provide highly reliable service, therefore require higher in processing power, stability, reliability, security, extensibility, manageability etc.
(5) other have the electronic installation of data interaction function.
One of ordinary skill in the art will appreciate that all or part of flow process realized in above-described embodiment method, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process of the embodiment as above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-OnlyMemory, ROM) or random store-memory body (RandomAccessMemory, RAM) etc.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; the change that can expect easily or replacement, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.