CN109271507A - Handle method, computer data management system, the analysis of public opinion system, the social network analysis system of substring information - Google Patents
Handle method, computer data management system, the analysis of public opinion system, the social network analysis system of substring information Download PDFInfo
- Publication number
- CN109271507A CN109271507A CN201811112026.XA CN201811112026A CN109271507A CN 109271507 A CN109271507 A CN 109271507A CN 201811112026 A CN201811112026 A CN 201811112026A CN 109271507 A CN109271507 A CN 109271507A
- Authority
- CN
- China
- Prior art keywords
- metering
- value
- circulation
- variable
- ballot
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000004458 analytical method Methods 0.000 title claims abstract description 7
- 238000003012 network analysis Methods 0.000 title claims abstract description 7
- 238000013523 data management Methods 0.000 title claims abstract description 5
- 238000010276 construction Methods 0.000 claims abstract description 25
- 238000003672 processing method Methods 0.000 claims abstract description 11
- 238000012545 processing Methods 0.000 claims abstract description 8
- 238000011017 operating method Methods 0.000 claims abstract description 7
- 238000006073 displacement reaction Methods 0.000 claims description 39
- 238000013459 approach Methods 0.000 abstract description 2
- 238000005516 engineering process Methods 0.000 description 49
- 238000012163 sequencing technique Methods 0.000 description 5
- 238000007405 data analysis Methods 0.000 description 4
- 241001269238 Data Species 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 230000009191 jumping Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000000717 retained effect Effects 0.000 description 2
- 230000009182 swimming Effects 0.000 description 2
- 230000002123 temporal effect Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000012141 concentrate Substances 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 102220286456 rs1223222289 Human genes 0.000 description 1
- 238000013519 translation Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/01—Social networking
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- General Health & Medical Sciences (AREA)
- Human Resources & Organizations (AREA)
- Marketing (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- Tourism & Hospitality (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The processing method of substring information has the method for following construction ballot mark table preceding in advance, opens up memory headroom for ballot mark table;It D2, is tail end template storage allocation;One D3, construction circulation, the circulation has an integer type variable metering, the initial value of variable metering is equal to zero, the numerical value of metering terminates circulation when being more than or equal to computer digit, recycle every execute once, the value of metering increases by 1, and circulation is interior with following operating procedure: as follows with process: F1, sequentially to copy each unit of tail end template in each unit of the first dimension serial number 1 of ballot mark table.Computer data management system, data search system, the analysis of public opinion system, social network analysis system, the substring searched for required for the processing method processing using the substring information.Time efficiency can be improved in the present invention, improves space efficiency, improves the utilization rate of computer resource, provide a new approaches.
Description
Technical field
The present invention relates to field of computer data processing, and in particular to the processing method of substring information, data search system,
The analysis of public opinion system, social network analysis system.
Technical background
Data search method is referred to as data matching method, and data search is the important utilization of computer technology,
The processing of real-time text, file search system, real-time data analysis, automatic investigating system of big data analysis, public sentiment etc. technology
In usually use.There are room for improvement, the space efficiencies of the prior art to exist for time efficiency of the prior art towards completely new data
Room for improvement, there are room for improvement with insufficient to computer resource for the prior art.
Summary of the invention
The invention proposes method, data search system, the analysis of public opinion systems, social network analysis of processing substring information
Time efficiency can be improved in system, improves space efficiency, improves the utilization rate of computer resource.
Technology contents of the invention are specific as follows:
1, ballot mark, it is characterised in that: for storing the ballot of serial data matching state, ratio of the ballot mark for ballot
Special digit is less than or equal to the number of bits of institute's appliance computer single treatment data;Ballot identifies the member for storing serial data
Support permission or rejection permission of the element to each position of entire serial data and the matching state that substring need to be searched for, ballot mark entirety
A corresponding serial data, an element of the respective independent corresponding data string of each bit in ballot mark.
2, ballot mark, it is characterised in that: number of bits of the ballot mark for ballot, less than the bit of ballot mark
Sum.
3, it votes and identifies as described in technology contents 1, it is characterised in that: pair of bit and serial data element in ballot mark
It is sequentially corresponding for answering mode.
4, it votes and identifies as described in technology contents 2, it is characterised in that: pair of bit and serial data element in ballot mark
Answering mode is that same ordered pair is answered, i.e., first element of first bit corresponding data string in ballot mark, the in ballot mark
Second element of two bit corresponding data strings, the third of third bit corresponding data string is first in ballot mark
Element, and so on.
5, it votes and identifies as described in technology contents 2, it is characterised in that: pair of bit and serial data element in ballot mark
Answering mode is that backward is corresponding, i.e., a element last of first bit corresponding data string, ballot mark in ballot mark
In second bit corresponding data string penultimate element, ballot mark in third bit corresponding data string
Number third element, and so on.
6, it votes and identifies as described in technology contents 1~4, it is characterised in that: bit is represented in ballot mark with 1 supports,
Rejection is represented with zero.
7, it votes and identifies as described in technology contents 1~4, it is characterised in that: bit represents rejection with 1 in ballot mark,
It represents and supports with zero.
8, ballot mark table, it is characterised in that: identified for ballot described in any technology contents in technology contents 1~6
Storage;Multiple ballot mark datas are integrated into ballot mark table, the number of bits of all ballot marks is equal;
Ballot mark table is gathered around there are two query interface, sequence of the first query interface corresponding data string element in serial data
Position, serial number is equal to the value of the serial data element of the value of the first query interface in the second query interface corresponding data string.
9, the building method of ballot mark table, it is characterised in that: for the construction side of ballot mark table described in technology contents 7
Method;All ballot mark datas correspond to the same substring that need to be searched for;
In order to facilitate statement, if the first query interface of some element is j in ballot mark table, the second query interface is
The element for mark table of voting is expressed as biao [j] [ca], it is assumed that the serial number w of first element of serial data by ca;
Ballot stored by biao [j] [ca] identifies to serial data element of the position number greater than j in serial data
Permission is not vetoed with situation;(for example j=4, substring length are 3, then the ballot stored by biao [j] [ca] is identified to data
The matching state of serial data element of the subscript of string greater than 4 does not veto permission;
Ballot mark stored by biao [j] [ca] in serial data position number be less than j and serial number to j step-length it is big
Permission is not vetoed in the matching state of the serial data element of substring length;(such as j=4, substring length are 3, then biao [j]
The matching state of element of the ballot mark to the subscript of serial data less than 1 stored by [ca] does not veto permission);
If ca is equal with the value of substring element of serial number k, the ballot stored by biao [j] [ca] identifies logarithm
The matching state of serial data element according to position number in string equal to j-k+w is that branch takes ticket;
Ballot mark pair if the value of the substring element of ca and serial number k is unequal, stored by biao [j] [ca]
The matching state of serial data element of the position number equal to j-k+w is non placet in serial data;
The above rule is limited without temporal sequencing.
10, the building method of ballot mark table, it is characterised in that: for the construction of ballot mark table described in technology contents 7
Method;All ballot mark datas correspond to the same substring that need to be searched for;In order to facilitate statement, if certain in ballot mark table
First query interface of a element is j, the second query interface is ca, and the element for mark table of voting is expressed as biao [ca]
[j], it is assumed that the serial number w of first element of serial data;
Ballot stored by biao [ca] [j] identifies to serial data element of the position number greater than j in serial data
Permission is not vetoed with situation;
Ballot mark stored by biao [ca] [j] in serial data position number be less than j and serial number to j step-length it is big
Permission is not vetoed in the matching state of the serial data element of substring length;
If ca is equal with the value of substring element of serial number k, the ballot stored by biao [ca] [j] identifies logarithm
The matching state of serial data element according to position number in string equal to j-k+w is that branch takes ticket;
Ballot mark pair if the value of the substring element of ca and serial number k is unequal, stored by biao [ca] [j]
The matching state of serial data element of the position number equal to j-k+w is non placet in serial data;
The above rule is limited without temporal sequencing.
11, the building method of the ballot mark table as described in technology contents 9 or 10, it is characterised in that: the serial number is from 0
Start counting the value 0 of i.e. w.
12, the building method of the ballot mark table as described in technology contents 9 or 10, it is characterised in that: the serial number is from 1
Start counting the value 1 of i.e. w.(the array access count of part programming language since 1, such as e language)
13, Data Matching acquisition methods, it is characterised in that: the matching state for judging serial data Yu need to search for substring;
The length of serial data is less than or equal to the bit quantity of the ballot mark of ballot mark table;
Process a, using the building method of ballot mark table described in technology contents 8 or 9 according to the data that need to search for substring
Building ballot mark table biao [] [];
Process b, using the position number of each element of serial data as the first query interface, the value of serial data each element is made
For the second query interface (Bz1.1), the corresponding ballot mark of each element of serial data is inquired in special bit sequence table
(Sj1.3), and vote information is counted, the statistical data of acquisition obtains the ballot knot of serial data each position and substring
Infructescence column;
Process a is before process b in time sequencing.
Process a, b can mutually be connected in time, other processes can also be inserted between process a, b.
14, as described in technology contents 10, data search method, it is characterised in that: carried out by the way of veto by one vote
Statistics obtains voting results sequence (Bz2.3).
15, as described in technology contents 10, data search method, it is characterised in that: in such a way that cumulative branch takes ticket into
Row statistics illustrates that the data element is complete if the accumulated value of serial data element is equal to the length value that need to search substring
Matching position.
16, data search method, it is characterised in that:
It is female for obtaining the matching position for the substring (xu- > str) that need to be searched for into searched letter string (bei- > str)
String (bei- > str) length (bei- > size) is greater than or equal to the length (xu- > size) of substring (xu- > str);
The value range of letter string element is fixed, the value range of letter string element before letter string load it is contemplated that, substring
The value range of element is fixed, the value range of substring element before substring load it is contemplated that;
Include following below scheme:
Process a, using the building method of ballot mark table described in technology contents 8 or 9 according to the data that need to search for substring
Building ballot mark table biao [] [];
Process b, matching operation is carried out to letter string using ballot mark table biao [] [] of process a construction, matching rule is such as
Under:
Step 1, putting in order according to letter string, take serial data, fetch and are equal to ballot mark table according to the quantity of string length
Sum in the stored ballot mark of the element of biao [] [] for the bit of ballot;Referring to (youmo) in attached drawing
The ballot mark for the data not yet inquired in step 2, inquiry serial data, last time have inquired when executing this step
The element crossed is not inquired then, using the position number of each element of serial data as the first query interface, by serial data each element
Value is used as the second query interface (Bz1.1, Bz1.2, Bz1.3), and it is corresponding that each element of serial data is inquired in ballot mark table
Ballot identify (Sj1.1, Sj1.2, Sj1.3), the statistical data string by the way of veto by one vote (Bz2.1, Bz2.2, Bz2.3)
The vote information of middle all elements executed the vote information that this step is retained including last time, obtains voting results sequence
(Sj2.1,Sj2.2, Sj2.3);
Equipped with position k in serial data, if the step-length of k to the tail portion of serial data is more than or equal to ' substring (xu- > str)
The number of results that length (xu- > size) subtracts 1 ', then k is located at Matching band (pipei);
If the step-length of k to the tail portion of serial data is less than the ' result that the length (xu- > size) of substring (xu- > str) subtracts 1
Number ', then k is located at sliding area (hudong);
If the serial number of k is greater than the maximum serial number of sliding area, k meaningless (ny in Sj2.3);
Positioned at Matching band and voting results be support position be matching position, matching position is recorded
(BZ3.1,BZ3.2,BZ3.3);
Positioned at sliding area and voting results be support position concentrate the smallest position of serial number be sliding position;
If the sum of step 3, the matching position currently obtained is less than the quantity for needing the matching position found, and data
String does not get letter string least significant end, then enters step 4, otherwise enters process c;
If there is sliding position, by voting results sequence in voting results sequence (Sj2.1) obtained by step 4, A2
(Sj2.1) vote information after sliding position and sliding position is corresponded in remain, and other information is erased, to slide position
It is set to step 1 first place of serial data is taken to set and enter step 1 in (lower left corner in referring to fig. 2);
If there is no sliding position in voting results sequence (Sj2.1) obtained by A2, do not retaining voting results sequence
(Sj2.1) in the case where any information in, with next position of the position of letter string element corresponding to current data string tail end
It is set to step 1 first place of serial data is taken to set and enter step 1.
Process c, it completes.
17, the data search method as described in technology contents 13, it is characterised in that: will be in voting results sequence (Sj2.1)
Vote information after corresponding sliding position and sliding position remains, and other information is erased, and method is to utilize computer
Bit manipulation instruction carry out displacement operation (BZ6 of Fig. 2).
18, the data search method as described in technology contents 14, it is characterised in that: the bit manipulation instruction is that displacement refers to
It enables.
19, file search system, it is characterised in that: there is technology described in any technology contents in technology contents 1~15
Scheme.
20, file management system, it is characterised in that: there is technology described in any technology contents in technology contents 1~15
Scheme.
21, data search system, it is characterised in that: there is technology described in any technology contents in technology contents 1~15
Scheme.
22, data management system, it is characterised in that: there is technology described in any technology contents in technology contents 1~15
Scheme.
23, text search system, it is characterised in that: there is technology described in any technology contents in technology contents 1~15
Scheme.
24, text management system, it is characterised in that: there is technology described in any technology contents in technology contents 1~15
Scheme.
25, search engine, it is characterised in that: there is technical solution described in any technology contents in technology contents 1~15.
26, real-time data analysis system, it is characterised in that: have in technology contents 1~15 described in any technology contents
Technical solution.
27, big data analysis system, it is characterised in that: there is skill described in any technology contents in technology contents 1~15
Art scheme.
28, artificial intelligence system, it is characterised in that: there is technology described in any technology contents in technology contents 1~15
Scheme.
29, social network analysis system, it is characterised in that: have in technology contents 1~15 described in any technology contents
Technical solution.Technical effect explanation:
Time efficiency can be improved in the present invention, improves space efficiency, improves the utilization rate of computer resource, can be sufficient
Using computer processor resource, so that the speed for obtaining Data Matching is accelerated.
The present invention provides a new approaches.
Detailed description of the invention
Fig. 1 is the schematic diagram of the principle of the present invention figure, in order to help reader to understand, is depicted in Fig. 1 for evidence of fetching
The logical construction of the youmo of string, youmo and non-specific presence, youmo have 8 imaginary logic units, the first of youmo
It is designated as that the element of i is corresponding under a unit y0 and letter string bei- > str, the second unit y1's and letter string bei- > str of youmo
Under be designated as i+1 element it is corresponding, and so on, correspond in order;Bz1.1 is to inquire serial data in ballot mark table in Fig. 1
The corresponding ballot mark (Sj1.1) of each element;In Fig. 1 B2.1 represent to the vote information of each ballot of Sj1.1 mark into
Row veto by one vote formula counts, and Sj2.1 is that B2.1 counts ' voting results sequence ' obtained in Fig. 1, and wherein pipei sections of intermediate values are
Position corresponding to 1 bit is matching position, and position corresponding to the bit that huadong sections of intermediate values are 1 is sliding position
It sets.The tactic number of the lower section of Sj1.1, Sj2.1 is serial number of each bit in ballot mark in Fig. 1.In Fig. 1
Tactic number below bei- > str is serial number of each element in letter string.
Fig. 2 is the schematic diagram of the principle of the present invention figure, and Fig. 1 is undertaken in time sequencing, since Fig. 1 obtains a cunning
Dynamic position 6, so first unit y0 of the trip youmo of Fig. 2 corresponds to bei- > str [6].In Fig. 2 in Sj2.1, that is, Fig. 1
Sj2.1, due to obtaining sliding position in Fig. 1, Fig. 2 carries out the content of the huadong section of Fig. 1 by displacement operation (Bz6)
Retain, the 7th (under be designated as 6) of Sj2.1 and the 8th after displacement operation (under be designated as 7) be retained in Sj3 the 1st (under be designated as
And second (under be designated as 1) 0);In order to not influence subsequent ballot, Sj3 and Sj4 is subjected to position or operation (BZ4) is voted
Sj5 is identified as vote information;Since bei- > str [6], bei- > str [7] be read in Fig. 1, bei- > str
[6], the vote information of bei- > str [7] is also reside in Sj5, so need not repeat to read, so table lookup operation is from correspondence
The y2 of bei- > str [8] starts.
Fig. 3 is the schematic diagram of the principle of the present invention figure, and Fig. 2 is undertaken in time sequencing, due to sliding no in Fig. 2 position
It sets, the sliding of Fig. 3 (6+8=14) since 14;Since youmo has got the end of bei- > str, so search terminates.Due to
The length that serial data is represented in Fig. 3 only has 7, and the length for mark of voting is 8, leads to ' the voting results sequence of vote by proxy result
There are meaningless area ny in column ' Sj2.3;
Fig. 4 is the screenshot of the code operation result of the embodiment of the present invention 1.
Specific embodiment
Embodiment 1, a kind of searching method, it is characterised in that:
For the search process of computer data, relies on digital computer and realize;
For obtaining for the substring (substring -> character string) that need to be searched for into searched letter string (letter string -> character string)
With position, the maximum serial number (letter string -> maximum serial number) of letter string (letter string -> character string) member be greater than or equal to substring (substring ->
Character string) member maximum serial number (substring -> maximum serial number), the value range of letter string element is fixed, and letter string element takes
Be worth range letter string load before it is contemplated that, the value range of substring element is fixed, and the value range of substring element is in substring
Before load it is contemplated that;
Serial number, the serial number of the member of substring of the member of letter string is all started from scratch calculating, i.e., the sequence of first member
It number is zero;
Distribution ballot mark table is tool there are two the ballot logo collection of dimension, the maximum serial number 256 of the first dimension, the
Quantity of the maximum serial number ballot mark of two-dimensions for the bit of ballot;The ballot mark that ballot mark table is included is single
Member all have following characteristics " for store serial data matching state ballot, ballot mark for ballot number of bits be less than or
Equal to the number of bits of institute's appliance computer single treatment data;Ballot mark is for storing the element of serial data to entire data
Go here and there the support permission or rejection permission of each position and the matching state that substring need to be searched for, the whole corresponding data of ballot mark
String, an element of the respective independent corresponding data string of each bit in ballot mark, bit and serial data in ballot mark
The corresponded manner of element be it is sequentially corresponding, ballot mark in bit with 1 represent support, with zero represent rejection, ballot mark in
The corresponded manner of bit and serial data element is that same ordered pair is answered, i.e., the of first bit corresponding data string in ballot mark
One element, ballot mark in second bit corresponding data string second element, ballot mark in third bit
The third element of corresponding data string, and so on ";
Need to distribute following variable, the scope of these variables covers entire searching method:
1, variable ballot mark table data field pointer, the data type that ballot mark table data field pointer is directed toward are ballot mark
Know;Pseudo table reaches are as follows: ballot identifies _ 64 * ballot mark table data field pointer=NULL;
2, the data type that variable tail end template tail end template is directed toward is ballot mark;Pseudo table reaches are as follows: and ballot mark _
64 * tail end template=NULL;
Also include following data processing method:
A, the method for match condition table is constructed, it is characterised in that:
It is a kind of data processing method, realizes data search for digital computer;
The data structure for relying on match condition structural body is realized;Note that data structure, is the organizational form of data;
Match condition structural body includes following member:
Matched data, matched data are the arrays with eight integer type members;
Quantity, the several integer type variables of quantity;
Constructing match condition table has 256 match condition structural bodies;
Building method is as follows:
It step A1, is match condition table storage allocation, pseudo table reaches are as follows: the interim matching list of match condition structural body *=
(match condition structural body *) malloc (sizeof (match condition structural body) * 256);
Step A2, by the memory of match condition table, it is initialized as zero;Pseudo table reaches are as follows: memset (interim matching list,
0,256*sizeof (match condition structural body));
Step A3, this step includes sub-step below:
One A3.1, building first circulation, distribute a variable metering for first circulation, the initial value of variable metering is
Zero, the every circulation primary of the value of variable metering increases by 1, and the scope of variable metering is only within first circulation;If metering is greater than
Or stopping is recycled equal to 256;It include following below scheme inside first circulation;Pseudo table reaches are as follows: (metering=0 size_t for;
Metering < 256;Metering ++) { };
A3.1.1, the variable for distributing a bit number of bits 8 are temporarily voted mark, the scope of interim ballot mark
Within first circulation;Sharing body _ 8bit temporarily votes mark;Sharing body _ 8bit temporarily votes mark;
A3.1.2, the value of variable metering is given to interim ballot mark;Pseudo table reaches are as follows: interim ballot mark is whole
Number=metering;
A3.1.3, a pointer variable integer pointer, type pointed by integer pointer and match condition structural body are distributed
Matched data member type it is consistent, the scope of integer pointer is only within first circulation;Pseudo table reaches are as follows:
Unsigned int* integer pointer;
A3.1.4, the serial number that integer pointer is directed toward match condition table the match condition structural body equal with the value of metering
First matched data;Pseudo table reaches are as follows: integer pointer=& interim matching list [metering] matched data [0];
Whether each bit of the interim ballot mark of A3.1.5, successively judgement is 1, if it is 1, is carried out three following
Step:
A3.1.5.1, numerical value pointed by integer pointer is increased, increased numerical value is that current bit position is voted temporarily
The serial number of mark;
A3.1.5.2, by the direction of integer pointer, move backward a unit;Pseudo table reaches are as follows: integer pointer ++;
A3.1.5.3, the quantitative variation of the serial number of the match condition table match condition structural body equal with the value of metering is increased
Add 1;Pseudo table reaches are as follows: interim matching list [metering] quantity ++;
Step A4, terminate;
B, the method for sliding condition table is constructed, it is characterised in that:
It is a kind of data processing method, realizes data search for digital computer;
Building method is as follows:
It step B1, is match condition table storage allocation;Pseudo table reaches are as follows: unsigned char* temporarily slide table=
(unsigned char*)malloc(256*sizeof(unsigned char));
Step B2, this step includes sub-step below:
One B2.1, building first circulation, distribute a variable metering for first circulation, the initial value of variable metering is
Zero, the every circulation primary of the value of variable metering increases by 1, and the scope of variable metering is only within first circulation;If metering is greater than
Or stopping is recycled equal to 256;It include following below scheme inside first circulation;Pseudo table reaches are as follows: (metering=0 size_t for;
Metering < 256;Metering ++) { };
B2.1.1, the variable for distributing a bit number of bits 8 are temporarily voted mark, the scope of interim ballot mark
Within first circulation;Sharing body _ 8bit temporarily votes mark;Sharing body _ 8bit temporarily votes mark;
B2.1.2, the value of variable metering is given to interim ballot mark;Pseudo table reaches are as follows: interim ballot mark is whole
Number=metering;
Whether each bit of the interim ballot mark of B2.1.3, successively judgement is 1, if it is 1, carries out following two
Step:
B2.1.3.1, the unit equal with the numerical value of variable metering to the serial number of match condition table carry out assignment, are assigned
Value be equal to bit serial number of the current bit position in interim ballot mark;
B2.1.3.2, the loop tail for jumping to first circulation;
B2.1.4, the unit equal with the numerical value of variable metering to the serial number of match condition table carry out assignment, are assigned
Value is equal to 8;
B2.2, end;
C, the method for search result storage container is constructed, it is characterised in that: for parsing search result data, search result
Data are the data for storing or running in digital computer;
Search result data represents whether the position is matching position with the numerical value (0 or 1) of each bit;
Dependent on the data structure for being named as matching result structural body;
Matching result structural body includes: maximum capacity;Number of matches;* matching position ordered series of numbers pointer;The upper limit;
Carry out following operation:
C1, the example for constructing a matching result structural body are referred to as result;
C2, the value of the maximum capacity of definitive result, that is definitive result can support the number of maximum matching number value
Amount, that is, to this member's assignment of maximum capacity in result;
C3 applies for memory and the first address for the memory applied is assigned to the data space first address of result;Memory ruler
It is very little be the maximum capacity of result this member value multiplied by result matching position data size;
C4 determines the value of the numerical value of the upper limit needed for user, that is the number of search result required for operator,
Namely give this member's assignment of the upper limit of result;
D, the method for construction ballot mark table, it is characterised in that:
D1, memory headroom is opened up for ballot mark table;Pseudo table reaches are as follows:
Ballot mark table=(_ 64 * * of ballot mark) malloc (sizeof (_ 64 * of ballot mark) * 256);
Ballot mark table data field pointer=(_ 64 * of ballot mark) malloc (256*sizeof (ballot mark _ 64
Position) * computer digit);
(metering=0 unsigned int for;Metering < 256;Metering ++)
{
Ballot mark table [metering]=ballot mark table data field pointer+metering * computer digit;
}
It D2, is tail end template storage allocation;Pseudo table reaches are as follows: tail end template=(_ 64 * of ballot mark) malloc
(sizeof (ballot mark _ 64) * computer digit);
One D3, construction circulation, the circulation have an integer type variable metering, and the initial value of variable metering is equal to
Zero, the numerical value of metering terminates circulation when being more than or equal to computer digit, the every execution of circulation is primary, and the value of metering increases by 1, follows
There is following operating procedure in ring:
D3.1, be all to all bits 1 ballot mark carry out moving to left displacement operation, move to left the bit of displacement operation
Number be metering values add 1 gained and;Pseudo table reaches are as follows: tail end template [metering] integer=ballot mark _ all bits are all
For 1 < < (metering+1);
D3.2, be all to all bits 1 ballot mark carry out moving to right displacement operation, move to right displacement operation and obtain bit
It is poor obtained by the value of metering that quantity subtracts for computer digit, will move to right displacement operation resulting value and is given to first in ballot mark table
The ballot that 0 second dimension serial number of dimension serial number is equal to the value of metering identifies unit;Pseudo table reaches are as follows: ballot mark table [0]
[metering] integer=ballot mark _ all bits are all 1 > > (computer digit-metering);
D4, the first dimension serial number zero that ballot is identified to table, the unit of the second dimension serial number zero are assigned a value of zero;Pseudo- generation
Code table reaches are as follows: ballot mark table [0] [0] integer=0;
D5, end;
E, it before the formal execution of search, is pre-processed, pretreatment process includes:
E1, the method for construction match condition table above-mentioned, construction match condition table are utilized;Pseudo table reaches are as follows: matching feelings
Condition table=construction match condition table ();
E2, the method for construction sliding condition table above-mentioned, construction match condition table are utilized;Pseudo table reaches are as follows: sliding feelings
Condition table=construction sliding condition table ();
E3, the method construct ballot mark table using construction ballot mark table above-mentioned;Pseudo table reaches are as follows: construction ballot
It identifies table ();
E4, variable result is handled using the method for construction search result storage container above-mentioned;Pseudo table reaches
Are as follows: pretreatment direct result example ()
Do not have sequential restriction between E1, E2, E3, E4, that is, is not carried out successive limitation;
F, before the formal execution of search, after pretreatment terminates, the process flow of substring information is carried out:
F, the process flow of substring information is as follows:
F1, each unit of tail end template is sequentially copied to the first of ballot mark table each unit for tieing up serial number 1 to
In;Pseudo table reaches are as follows: memcpy (ballot mark table [1], tail end template, sizeof (ballot mark _ 64) * computer bit
Number);
One F2, distribution integer type variable, referred to as the first integer, and the first integer is carried out to be assigned a value of computer digit
Subtract 1 and add the maximum serial number of substring, the scope of the first integer is the process flow of substring information;
F3, one circulation of construction, referred to as first circulation, first circulation have an integer type variable for counting,
Referred to as metering, the initial value of metering are the maximum serial number of substring, and first circulation is every to execute primary, the value increase by 1 of metering, when
Circulation stops when the value of metering is more than or equal to computer digit, when the scope of metering within first circulation, tool in first circulation
There is following operating procedure:
F3.1, the ballot of the value of 0 second dimension serial number metering of the first dimension serial number in ballot mark table is identified into list
First assignment zero;Pseudo table reaches are as follows: ballot mark table [0] integer=0 [metering];
F3.2, be all by all bits 1 ballot mark yield carry out moving to right displacement operation, move to right the ratio of displacement operation
It is poor obtained by the value of metering that the value that special position digit is equal to the first integer subtracts, and will move to right and is displaced operating result, first in mark table of voting
The ballot that 1 second dimension serial number of dimension serial number is equal to the value of metering identifies unit, and the two carries out position or operation, by position or operation
As a result it is given to the ballot mark unit that 1 second dimension serial number of the first dimension serial number in ballot mark table is equal to the value of metering;
Pseudo table reaches are as follows: ballot mark table [1] [metering] integer |=(ballot mark _ all bits are all 1 > > (the first integer-
Metering));
F4, one circulation of construction, referred to as second circulation, second circulation have an integer type variable for counting,
Referred to as metering, the initial value of metering are the maximum serial number of substring, and second circulation is every to execute primary, the value increase by 1 of metering, when
Circulation stops when the value of metering is more than or equal to 256, when the scope of metering within second circulation, has following behaviour in second circulation
Make step:
F4.1, the ballot of the first dimension serial number 1 in ballot mark table is identified into unit, sequentially copies ballot to and is identified as
In the unit of the value of metering;Pseudocode statement are as follows: memcpy (ballot mark table [metering] [0], ballot mark table [1] [0],
Sizeof (ballot mark _ 64) * computer digit);
F5, this step include following sub-step:
Step F5.1, the first metering of building recycles, and has the first metering of variable, the first metering of variable in the first metering circulation
Initial value be number of bits of the ballot mark for ballot, the first metering recycles every circulation primary, and then the first metering of variable is reduced
1, it recycles and stops when the first metering of variable is less than zero, each circulation of the first metering circulation all includes following operating process:
Step F5.1.1, the first temporary variable of variable is distributed;
Step F5.1.2, the value by the first metering of variable is given to the first temporary variable;
Step F5.1.3, the maximum serial number of substring is given to if the first metering of variable is greater than the maximum serial number of substring
First temporary variable;Pseudo table reaches are as follows: if (the first metering > substring -> maximum serial number) first temporary variable=substring -> maximum
Serial number;
Step F5.1.4, the second metering of building recycles, and has the second metering of variable in the second metering circulation, and variable second is counted
Secondary initial value is the value of the first temporary variable, and the first metering recycles every circulation primary, and then the second metering of variable reduces 1, works as variable
It recycles and stops when second metering is less than zero, each circulation of the second metering circulation all includes following operating process:
Step F5.1.4.1, the ballot mark that 1 other bits of bit place value position of serial number 0 are all 0 is shifted left
Operation is moved, the value for moving to left the first metering of bit numerical digit of displacement operation subtracts the resulting difference of the second metering, will move to left displacement behaviour
The unit for making resulting value and mark table of voting carries out position or operation, and unit serial number of the first dimension in ballot mark table is equal to
The serial number of substring is equal to the value of the character of the value of the second metering, and unit serial number of the second dimension in ballot mark table is equal to the
Position or operation resulting value are given to the unit by the value of one metering;Pseudo table reaches are as follows: ballot mark table [substring -> character string
[the second metering]] [the first metering] integer | the bit place value of=ballot mark _ serial number zero be 1 other be all zero < < (first
The-the second metering of metering);
F6, end;
G, it to the search of letter string, could be executed after substring message processing flow, as follows to the search routine of letter string:
G1, member's number of matches of result is assigned a value of 0;Pseudo table reaches are as follows: number of matches=0 result;
One G2, distribution variable are referred to as matching result pointer, and matching result pointer is directed toward to member's match bit of result
Set first unit of quantity, the i.e. unit of serial number zero;Pseudo table reaches are as follows: and unsigned int* matching result pointer=
As a result matching position ordered series of numbers;
One G3, distribution integer type variable are referred to as to demarcate, and carry out operation, and computer digit is subtracted son when operation rule
The maximum serial number resulting value of string obtains cut off value divided by 8, and cut off value is given to boundary;Pseudo table reaches are as follows: unsigned int
Boundary=(computer digit-substring -> maximum serial number)/8;
G4, judge that boundary whether less than 1, if it is less than 1, is then given to boundary for 1;;Pseudo table reaches are as follows: if (boundary
< 1) boundary=1;
Two G5, distribution ballot marking variables, are slip information template respectively, go match information template;
G6, to going slip information template to handle, this step includes following sub-step:
G6.1, each bit of slip information template will be gone to be assigned a value of 1;Pseudo table reaches are as follows: goes slip information
Template integer=0XFFFFFFFFFFFFFFFF;
G6.2, to going slip information template to carry out moving to right displacement operation, move to right displacement operation digit be substring maximum
Serial number subtracts 1, and the result for moving to right displacement operation is copied to slip information template;Pseudo table reaches are as follows: goes slip information
Template integer > >=(substring -> maximum serial number -1);
G7, to going match information template to handle, this step includes following sub-step:
G7.1, each bit of match information template will be gone to be assigned a value of 1;Pseudo table reaches are as follows: goes match information
Template integer=0XFFFFFFFFFFFFFFFF;
G7.2, to going match information template to carry out moving to left displacement operation, move to left displacement operation digit be computer digit
The maximum serial number of substring is subtracted, and the result for moving to left displacement operation is assigned to match information template;Pseudo table reaches are as follows: goes
Match information template integer<≤(computer digit-substring ->maximum serial number);
G7.3, to going match information template to carry out moving to left displacement operation, the digit for moving to left displacement operation is 1, and will be moved to left
The result of displacement operation is assigned to match information template;Pseudo table reaches are as follows: go match information template integer <≤1;
Two G8, distribution ballot marking variables are the first ballot mark respectively;Pseudo table reaches are as follows: ballot mark _ 64
First ballot mark;
G9, each position assignment position 1 for identifying the first ballot;Pseudo table reaches are as follows: and the first ballot mark integer=
0XFFFFFFFFFFFFFFFF;
One G10, distribution integer type variable swim mould starting point, and are assigned a value of zero to trip mould starting point;Pseudo table reaches are as follows: int
Swim mould starting point=0;
One G11, distribution integer type variable sliding step, and zero is assigned a value of to sliding step;Pseudo table reaches are as follows:
Sliding step=0 unsigned int;
G12, a search terminal is distributed, and the maximum serial number of letter string is subtracted to the maximum serial number of substring, then subtract 1 gained
Value be given to search terminal;Pseudo table reaches are as follows: and unsigned int search terminal=letter string -> maximum serial number-substring ->
Maximum serial number -1;
G13, one circulation of construction, referred to as search circulation, when the value for swimming mould starting point is greater than trip mould terminal, search circulation
It terminates, there is following operating procedure in search circulation:
One G13.1, distribution character string pointer are referred to as to swim mould pointer, and character string pointer is directed toward to the serial number etc. of letter string
In the character of the value of trip mould starting point;Pseudo table reaches are as follows: unsigned char* swims mould pointer=& (letter string -> character string [trip
Mould starting point]);
One G13.2, distribution variable are referred to as to swim mould terminal, and the value that letter string maximum serial number subtracts trip mould starting point is obtained
Result be assigned to trip mould terminal;Pseudo table reaches are as follows: unsigned int swims mould terminal=letter string -> maximum serial number-trip mould and rises
Point;
G13.4, judge to swim whether mould terminal is less than computer digit and subtracts 1, if it is judged that be it is yes, then by the first throwing
Ticket mark carries out moving to right displacement operation, and the digit for moving to right displacement operation is that computer digit subtracts the trip resulting value of mould terminal, will
Move to right displacement operation operating result be given to the first ballot mark: if it is judged that be it is no, then computer digit is subtracted 1
Resulting value is given to trip mould starting point;Pseudo table reaches are as follows:
If (trip mould terminal < (computer digit -1))
{
First ballot mark integer > >=computer digit-trip mould terminal;
}
Else swims mould terminal=(computer digit -1);
G13,5, one circulation of construction, referred to as Voting Circular, Voting Circular is interior to be claimed with a variable for counting
Be metering, the initial value of metering is the value of sliding step, the scope of metering in Voting Circular, Voting Circular is every execute according to
The value of secondary metering increases by 1, and when the value of metering is greater than or equal to the value of trip mould terminal, Voting Circular is terminated, tool in Voting Circular
There is following operating procedure:
G13.5.1, it obtains in ballot mark table, the first dimension serial number is equal to swim the serial number that mould pointer is 0 serial number starting point
For the value of metering, the second dimension serial number is equal to the value of the ballot mark unit of the value of metering, the value of the unit and first is voted
The value of mark carries out position and operation, and position and operating result are given to the first ballot mark;
G13.6, judge first ballot mark with the presence or absence of the bit being not zero, if there is the bit being not zero
Then execute following sub-step:
One G13.6.1, distribution ballot marking variable, the referred to as second ballot mark;Pseudo table reaches are as follows: ballot mark
Know _ 64 second ballot marks;
G13.6.2, the first ballot mark is carried out being located at operation with slip information template is gone, then by position and operation gained
Value be given to the second ballot mark;Pseudocode statement are as follows: the second ballot mark integer=first ballot mark integer goes to slide
Dynamic information model integer;
G13.6.3, judge the second ballot mark, if the bit that existence value is 1, if there is no then entering
G13.6.4, and if so, executing following sub-step:
The pointer variable of G13.6.3.1, distribution one only 8 bits position, referred to as eight bit pointers, by the second ballot
The address of mark is given to eight bit pointers, and eight bit pointers is made to be directed toward the second ballot mark;Pseudocode statement are as follows: single byte _ 8 *
Eight bit pointers=(single byte _ 8 *) & second ballot mark integer;
One G13.6.3.2, building circulation, for parsing match information included in the second ballot mark, referred to as
There is an integer type variable to be referred to as metering for matching parsing circulation, matching parsing circulation, and the initial value of metering is zero, matching solution
The every value for executing successively metering of analysis circulation increases once, when the value of metering is less than or equal to boundary, matches parsing loop termination,
Matching parsing circulation includes following sub-step: [note that the pseudo table of matching parsing circulation reaches are as follows: for (size_t metering=
0;Metering≤boundary;Metering ++)]
G13.6.3.2.1, judge that 8 bits position is with the presence or absence of the bit equal to 1 in memory pointed by eight bit pointers
Position, if there is no G13.6.3.2.2 is then entered, and if so, executing following sub-step:
G13.6.3.2.1.1, one integer type variable of distribution, referred to as temporary variable, the scope covering of temporary variable
All sub-steps of G13.6.3.2.1, by the value of metering multiplied by 8 along with the value end value obtained of trip mould starting point is given to
Temporary variable;Pseudo table reaches are as follows: unsigned int temporary variable=trip mould starting point+8* metering;
One G13.6.3.2.1.2, distribution match condition structural body variable are referred to as match condition, will be in match condition table
The value of unit of the serial number value that is equal to eight bit pointers be given to match condition;Pseudo table reaches are as follows: match condition structural body
With situation=match condition table [eight bit pointers -> integer];
G13.6.3.2.1.3, it once copies the value of eight members of the matched data of match condition to matching result and refers to
Memory performed by needle;Pseudo table reaches are as follows: memcpy (matching result pointer, & match condition matched data [0], 8*4);
G13.6.3.2.1.4, the value of 8 units of memory pointed by matching result pointer is subjected to increase operation,
Increased value is equal to the value of temporary variable;Pseudo table reaches are as follows:
Matching result pointer [0] +=temporary variable;
Matching result pointer [1] +=temporary variable;
Matching result pointer [2] +=temporary variable;
Matching result pointer [3] +=temporary variable;
Matching result pointer [4] +=temporary variable;
Matching result pointer [5] +=temporary variable;
Matching result pointer [6] +=temporary variable;
Matching result pointer [7] +=temporary variable;
G13.6.3.2.1.5, increase operation is carried out to the value of the number of matches of result, increased value is equal to match condition
The value of number of members;The expression of pseudocode are as follows: result number of matches +=match condition quantity;
G13.6.3.2.1.6, position pointed by matching result pointer is moved backward, so that matching result pointer
Mobile, mobile element number is equal to the value of the quantity of match condition;Pseudo table reaches are as follows: matching result pointer +=matching feelings
Condition quantity;G13.6.3.2.2, eight bit pointers are moved backward to a position;Pseudocode represents are as follows:
Eight bit pointers ++;
If the value of member's number of matches of G13.6.3.2.3, result is greater than or equal to the value of member's upper limit of result,
Exit search;Pseudo table reaches are as follows: { goto search terminates if (the result number of matches >=result upper limit);}
G13.6.4, the first ballot is identified and is gone match information carry out position and operation, and position and the resulting value of operation are assigned
It gives to the second ballot mark;Pseudo table reaches are as follows: the second ballot mark integer=first ballot mark integer & goes matching to believe
Cease template integer;
G13.6.5, judge the second ballot identify whether existence value for 1 bit, if there is no then entering
G13.6.6, and if so, executing following sub-step:
The bit quantity of data pointed by G13.6.5.1, building one integer type pointer I32, I32 is ballot mark
Half, by second ballot mark address be given to I32, if I32 be directed toward data value be equal to zero if I32 move back
It is one dynamic;Pseudo table reaches are as follows:
Unsigned int*I32=(unsigned int*) & second ballot mark;
I32+=!I32[0];
The bit quantity of data pointed by G13.6.5.2, building one integer type pointer I16, I16 is I32 signified
To data bit quantity half, the address of I32 is given to I16, if I16 be directed toward data value be equal to zero
Then I16 moves backward one;
G13.6.5.3, successively G13.6.5.5 analogizes, and constructs an integer type pointer every time, and number pointed by the pointer
According to the half that size is the size of data pointed by pointer constructed by preceding step is obtained, the address of preceding step is given to this
Pointer, the pointer moves backward one if the value for the data that the pointer is directed toward is equal to zero ... until constructed whole
The bit quantity of data pointed by number type pointer I8, I8 is eight, and the address of I16 is given to I8, if what I8 was directed toward
The value of data is equal to zero I8 and moves backward one;Pseudo table reaches are as follows: I8+=!I8[0];
G13.6.5.4, distribution one character variable Y, by the address of I8 pointer with second ballot mark pointer address it
Between the character cell quantity that is separated by be given to Y;Pseudo table reaches are as follows: unsigned char Y=I8- (unsigned
Char*) the ballot of & second mark integer;
Variable pointed by the serial number I8 of G13.6.5.5, the product for obtaining the value of Y and 8 threads plus sliding condition table
Value unit value;Pseudo table reaches are as follows: sliding step=Y*8+sliding condition table [* I8];
G13.6.5.6, the value for swimming mould starting point is carried out to increase operation, the increased value of institute is equal to sliding step;Pseudo table
It reaches are as follows: trip mould starting point +=sliding step;
G13.6.5.7, it carries out the binary numeral of the first ballot mark to move to right displacement operation, moves to right the ratio of displacement operation
Special bit quantity be sliding step numerical value, and eight move to right displacement operation value obtained be given to the first ballot identify;Pseudocode
Expression are as follows: first ballot mark integer > >=sliding step;
G13.6.5.8, it computer digit is subtracted to 1 resulting value subtracts the obtained value of value of sliding step and be given to sliding
Step-length;Pseudo table reaches are as follows: sliding step=(computer digit -1)-sliding step;
G13.6.5.9, be all by all bits 1 ballot mark move to right displacement operation, move to right the bit of displacement operation
Digit quantity is the value of sliding step, by the value of the first ballot mark and moves to right displacement operation resulting value progress position or operation, will
Position or operation gained, which must be worth, is given to the first ballot mark;
G13.6.5.10, the tail portion for jumping to search circulation;Pseudo table reaches are as follows: continue;
G13.7, increase operation is carried out to the value of trip mould starting point, the value for increasing operation is equal to the institute for subtracting 1 for computer digit
It must be worth, and set zero for the value of sliding step, and each bit of the first ballot mark is assigned a value of 1;Pseudocode
Expression are as follows: trip mould starting point +=(computer digit -1);Sliding step=0;First ballot mark integer=ballot mark _ all
Bit is all 1;
G14, search terminate.
The code of the present embodiment is as follows;Following code is clarified above to those skilled in the art and clearly expresses the present invention
Data search method, and it is detailed carried out remarks, even the new hand that technical level is very poor, can also with duplication paste with
The mode of lower code realizes the present embodiment, so disclosure of the invention is clearly.
/ * code start */
/ * swims mould search, and 64 byte versions swim 64 bytes of mould once-through operation;This program example is adapted to searched son
The length of string is less than or equal to the case where 64 bytes;This example exemplary principle can be extended to by those skilled in the art at all
Other versions, the overall length for being such as but not limited to 128,172,256 byte of support etc. trip mould can be equal to the processor of computer
Data bits, the debugging of this example surveys software environment used: windows10 operating system, microsoft visual
2015 translation and compiling environment of studio, language C++, programs categories: X64 Console program;Hardware environment used in this example: intel
(R)core(TM)i9-7900X cpu;128GB memory;It is debugged for the ease of the upper machine of reader.This example specially increases just
In the content of debugging;For the searching method class that horizontal lower user can directly be provided using this example, without certainly
Own reconstruction */
Above example illustrates implementation of the invention, and the content that the above code is embodied is not to patent of the invention
The restriction of protection scope is weighed, the above code is compiled to be passed through, and can be operated normally, but applicant not can guarantee in data
It saves and changes in transmission process, if reader's compiling can't pass, reader should be in conjunction with common sense in the field to code
It is repaired, is still difficult to run if repaired, applicant can be contacted and obtain the above code.
Claims (5)
1. the processing method of substring information, is characterized in that:
Method with following construction ballot mark table preceding in advance,
D1, memory headroom is opened up for ballot mark table;
It D2, is tail end template storage allocation;
One D3, construction circulation, the circulation have an integer type variable metering, and the initial value of variable metering is equal to zero, meter
Termination circulation when secondary numerical value is more than or equal to computer digit, the every execution of circulation is primary, the value increase by 1 of metering, in circulation
With following operating procedure:
D3-1, be all to all bits 1 ballot mark carry out moving to left displacement operation, the number of bits for moving to left displacement operation is
The value of metering add 1 gained and;
D3-2, be all to all bits 1 ballot mark carry out moving to right displacement operation, move to right displacement operation and obtain bit quantity
It is poor obtained by the value of metering to subtract for computer digit, will move to right displacement operation resulting value and is given to the first dimension in ballot mark table
The ballot that 0 second dimension serial number of serial number is equal to the value of metering identifies unit;
D4, the first dimension serial number zero that ballot is identified to table, the unit of the second dimension serial number zero are assigned a value of zero;
D5, end;
It is as follows with process:
F1, each unit of tail end template is sequentially copied in each unit of the first dimension serial number 1 of ballot mark table;
One F2, distribution integer type variable, referred to as the first integer, and the first integer is carried out being assigned a value of computer digit to subtract 1
Along with the maximum serial number of substring, the scope of the first integer is the process flow of substring information;
F3, one circulation of construction, referred to as first circulation, first circulation have an integer type variable for counting, referred to as
For metering, the initial value of metering is the maximum serial number of substring, and first circulation is every to execute primary, the value increase by 1 of metering, when metering
Circulation stops when value is more than or equal to computer digit, has when the scope of metering within first circulation, in first circulation following
Operating procedure:
The value of first integer is subtracted the value gained of metering by one F3-1, distribution integer type variable, referred to as the first temporary variable
Number be given to the first temporary variable;
One F3-2, distribution ballot mark are referred to as interim ballot mark, and each bit of interim ballot mark is assigned
It is worth position 1;
F3-3, it carries out interim ballot mark to move to right displacement operation, the digit moved to right is the value of the first temporary variable, by moving to right
It must be worth and be given to interim ballot mark;
F3-4, will ballot mark table in the 1 second dimension serial number metering of the first dimension serial number value ballot mark unit with
Interim ballot mark carries out position or operation, and position or operating result are given to the unit;
F3-5, the ballot mark unit of the value of 0 second dimension serial number metering of the first dimension serial number in ballot mark table is assigned
Value zero;
F4, one circulation of construction, referred to as second circulation, second circulation have an integer type variable for counting, referred to as
For metering, the initial value of metering is the maximum serial number of substring, and second circulation is every to execute primary, the value increase by 1 of metering, when metering
Circulation stops when value is more than or equal to 256, when the scope of metering within second circulation, in second circulation there is following operation to walk
It is rapid:
F4-1, the ballot of the first dimension serial number 1 in ballot mark table is identified into unit, sequentially copies ballot to and is identified as metering
Value unit in;
F5, this step include following sub-step:
Step F5-1, building the first metering circulation, the first metering circulation in have the first metering of variable, the first metering of variable just
Initial value is number of bits of the bit bit sequence for ballot, and the first metering recycles every circulation primary, and then the first metering of variable reduces 1,
It recycles and stops when the first metering of variable is less than zero, each circulation of the first metering circulation all includes following operating process:
Step F5-1-1, the first temporary variable of variable is distributed;
Step F5-1-2, the value by the first metering of variable is given to the first temporary variable;
Step F5-1-3, the maximum serial number of substring is given to first if the first metering of variable is greater than the maximum serial number of substring
Temporary variable;
Step F5-1-4, the second metering of building recycles, and has the second metering of variable in the second metering circulation, the second metering of variable
Initial value is the value of the first temporary variable, and the first metering recycles every circulation primary, and then the second metering of variable reduces 1, when variable second
It recycles and stops when metering is less than zero, each circulation of the second metering circulation all includes following operating process:
Step F5-1-4-1, a variable is distributed, interim ballot mark is assigned a value of 1 by referred to as interim ballot mark;
Step F5-1-4-2, an interim integer of integer type variable is distributed, the first metering of variable is subtracted into the second metering of variable institute
The value obtained is given to interim integer;
Step F5-1-4-3, interim ballot mark is carried out moving to left displacement operation, the quantity of the digit of shift left operation is interim whole
Several values will move to left the resulting value of displacement operation and be given to interim ballot mark;
Step F5-1-4-4, the character of the value of the second metering of serial number variable in the character string of substring is obtained, and by the word of acquisition
Symbol is given to the interim integer of variable;
Step F5-1-4-5, value the second dimension serial number for being equal to interim integer to the first dimension serial number of bit bit sequence table is equal to
The unit of the value of the first metering of variable carries out assignment operation, and the mode of assignment operation is: first by the value of the unit and interim ballot
Mark carries out position or operation, and position or the resulting value of operation are then given to the unit;
F6, end.
2. computer data management system, it is characterised in that: handled using the processing method of substring information described in claim 1
The substring of required search.
3. the analysis of public opinion system, the substring searched for required for the processing method processing using substring information described in claim 1.
4. data search system, the substring searched for required for the processing method processing using substring information described in claim 1.
5. social network analysis system is searched for required for the processing method processing using substring information described in claim 1
Substring.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811112026.XA CN109271507B (en) | 2018-09-21 | 2018-09-21 | Substring information processing method, computer data management system, public opinion analysis system and social network analysis system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811112026.XA CN109271507B (en) | 2018-09-21 | 2018-09-21 | Substring information processing method, computer data management system, public opinion analysis system and social network analysis system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109271507A true CN109271507A (en) | 2019-01-25 |
CN109271507B CN109271507B (en) | 2022-02-08 |
Family
ID=65197255
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811112026.XA Active CN109271507B (en) | 2018-09-21 | 2018-09-21 | Substring information processing method, computer data management system, public opinion analysis system and social network analysis system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109271507B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109213808A (en) * | 2018-09-26 | 2019-01-15 | 长沙学院 | Searching method, internet information library, the analysis of public opinion system based on search |
CN109344301A (en) * | 2018-09-26 | 2019-02-15 | 长沙学院 | Method, computer data processing system, the information management system of construction ballot mark table |
CN109376279A (en) * | 2018-09-26 | 2019-02-22 | 长沙学院 | Construct method, data search system, computer information processing system, the artificial intelligence system of search result storage container |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101036127A (en) * | 2004-10-04 | 2007-09-12 | 松下电器产业株式会社 | Source code inspection device, method, program, and recording medium |
CN103365884A (en) * | 2012-03-30 | 2013-10-23 | 上海申通地铁集团有限公司 | Data storage method and data search method |
US20150169674A1 (en) * | 2005-06-27 | 2015-06-18 | Lawrence Greenfield | Processing ambiguous search requests in a geographic information system |
CN105589894A (en) * | 2014-11-13 | 2016-05-18 | 腾讯数码(深圳)有限公司 | Document index establishing method and device as well as document retrieving method and device |
CN106469218A (en) * | 2016-09-08 | 2017-03-01 | 中国科学院信息工程研究所 | A kind of Boolean expression storage based on bitmap, matching process and system |
-
2018
- 2018-09-21 CN CN201811112026.XA patent/CN109271507B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101036127A (en) * | 2004-10-04 | 2007-09-12 | 松下电器产业株式会社 | Source code inspection device, method, program, and recording medium |
US20150169674A1 (en) * | 2005-06-27 | 2015-06-18 | Lawrence Greenfield | Processing ambiguous search requests in a geographic information system |
CN103365884A (en) * | 2012-03-30 | 2013-10-23 | 上海申通地铁集团有限公司 | Data storage method and data search method |
CN105589894A (en) * | 2014-11-13 | 2016-05-18 | 腾讯数码(深圳)有限公司 | Document index establishing method and device as well as document retrieving method and device |
CN106469218A (en) * | 2016-09-08 | 2017-03-01 | 中国科学院信息工程研究所 | A kind of Boolean expression storage based on bitmap, matching process and system |
Non-Patent Citations (2)
Title |
---|
C. VAMSI KRISHNA,等: "Novel approach for string searching and matching using American standard code for information interchange value", 《2016 INTERNATIONAL CONFERENCE ON RECENT TRENDS IN INFORMATION TECHNOLOGY (ICRTIT)》 * |
蔡婷,等: "一种改进的字符串模式匹配算法", 《物联网技术》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109213808A (en) * | 2018-09-26 | 2019-01-15 | 长沙学院 | Searching method, internet information library, the analysis of public opinion system based on search |
CN109344301A (en) * | 2018-09-26 | 2019-02-15 | 长沙学院 | Method, computer data processing system, the information management system of construction ballot mark table |
CN109376279A (en) * | 2018-09-26 | 2019-02-22 | 长沙学院 | Construct method, data search system, computer information processing system, the artificial intelligence system of search result storage container |
Also Published As
Publication number | Publication date |
---|---|
CN109271507B (en) | 2022-02-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109284424A (en) | Construct method, the data search method, computerized information broadcasting system, the machine learning system based on big data of sliding condition table | |
CN109271507A (en) | Handle method, computer data management system, the analysis of public opinion system, the social network analysis system of substring information | |
CN104063314B (en) | A kind of automated test data generation device and method | |
CN105138335B (en) | A kind of function call path extraction method and device based on controlling stream graph | |
CN106227573A (en) | Function call path extraction method based on controlling stream graph | |
CN100377089C (en) | Identifying method of multiple target branch statement through jump list in binary translation | |
CN108897572A (en) | A kind of complicated type reconstructing method based on variable association tree | |
CN106951963A (en) | The method and device of a kind of knowledge refinement | |
CN115859302A (en) | Source code vulnerability detection method, device, equipment and storage medium | |
CN113642835B (en) | Work ticket generation method based on data similarity and terminal | |
CN103235757B (en) | Several apparatus and method that input domain tested object is tested are made based on robotization | |
CN109213808A (en) | Searching method, internet information library, the analysis of public opinion system based on search | |
CN113536308B (en) | Binary code tracing method for multi-granularity information fusion under software gene view angle | |
CN110209772A (en) | A kind of text handling method, device, equipment and readable storage medium storing program for executing | |
CN104885060B (en) | Data leakage updates and checks that the leakage of device, data updates inspection method | |
CN109376279A (en) | Construct method, data search system, computer information processing system, the artificial intelligence system of search result storage container | |
CN109241115A (en) | Construct method, the searching method, computer public sentiment monitoring system, artificial intelligence system of match condition table | |
CN109344301A (en) | Method, computer data processing system, the information management system of construction ballot mark table | |
Gordon | A qualitative justification for a measure of program clarity | |
CN109376292A (en) | It is a kind of to construct the method for bit sequence table, data search method, public sentiment monitoring system, information dissemination system | |
CN109376281A (en) | Bit bit sequence, data search method, search system, social network analysis system, public sentiment monitoring system | |
CN115935943A (en) | Analysis framework supporting natural language structure calculation | |
CN106933665A (en) | The method for predicting MPI program runtimes | |
Huffman | A purely definitional universal domain | |
Denzinger et al. | Analysis and representation of equational proofs generated by a distributed completion based proof system |
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 |