CN109213809A - Data search method, information dissemination system, public sentiment management system, artificial intelligence system - Google Patents

Data search method, information dissemination system, public sentiment management system, artificial intelligence system Download PDF

Info

Publication number
CN109213809A
CN109213809A CN201811128025.4A CN201811128025A CN109213809A CN 109213809 A CN109213809 A CN 109213809A CN 201811128025 A CN201811128025 A CN 201811128025A CN 109213809 A CN109213809 A CN 109213809A
Authority
CN
China
Prior art keywords
bit
value
variable
bit sequence
zero
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.)
Withdrawn
Application number
CN201811128025.4A
Other languages
Chinese (zh)
Inventor
张志宏
郭磊
刘佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changsha University
Original Assignee
Changsha University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changsha University filed Critical Changsha University
Priority to CN201811128025.4A priority Critical patent/CN109213809A/en
Publication of CN109213809A publication Critical patent/CN109213809A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The method for searching for data relies on digital computer and realizes for the search process of computer data;For obtaining the matching position for the substring (xu- > str) that need to be searched for into searched letter string (bei- > str), letter 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 letter string load before it is contemplated that, the value range of substring element is fixed, the value range of substring element before substring load it is contemplated that.Information dissemination system, public sentiment management system, artificial intelligence system realize data search using the method for the search data.Time efficiency can be improved in the present invention, improves space efficiency, improves the utilization rate of computer resource, the present invention provides a new approaches.

Description

Data search method, information dissemination system, public sentiment management system, artificial intelligence system
Technical field
The present invention relates to field of computer data processing, and in particular to bit bit sequence, data search method, search system System, social network analysis system, public sentiment monitoring system.
Technical background
Data search method is referred to as data matching method, and data search the important utilization that element is 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 efficiency of the prior art exists to be improved time efficiency of the prior art towards completely new data Space, there are room for improvement with insufficient to computer resource for the prior art.
Summary of the invention
The invention proposes bit bit sequence, data search method, search system, social network analysis system, public sentiment prisons Time efficiency can be improved in control system, improves space efficiency, improves the utilization rate of computer resource.
Technology contents of the invention are specific as follows:
1, bit bit sequence, it is characterised in that: for storing the ballot of serial data matching state, bit bit sequence is for voting Number of bits be less than or equal to institute's appliance computer single treatment data number of bits;Bit bit sequence is for storing data Support permission or rejection permission of the element of string to each position of entire serial data and the matching state that substring need to be searched for, bit Sequence integrally corresponds to a serial data, an element of the respective independent corresponding data string of each bit in bit bit sequence.
2, bit bit sequence, it is characterised in that: number of bits of the bit bit sequence for ballot, less than bit bit sequence Bit sum.
3, the bit bit sequence as described in technology contents 1, it is characterised in that: bit and serial data element in bit bit sequence Corresponded manner be sequentially corresponding.
4, the bit bit sequence as described in technology contents 2, it is characterised in that: bit and serial data element in bit bit sequence Corresponded manner be that same ordered pair is answered, i.e., first element of first bit corresponding data string, bit in bit bit sequence Second element of second bit corresponding data string in sequence, third bit corresponding data string in bit bit sequence Third element, and so on.
5, the bit bit sequence as described in technology contents 2, it is characterised in that: bit and serial data element in bit bit sequence Corresponded manner be that backward is corresponding, i.e., a element last of first bit corresponding data string in bit bit sequence, than The penultimate element of second bit corresponding data string in special bit sequence, third bit is corresponding in bit bit sequence The third last element of serial data, and so on.
6, the bit bit sequence as described in technology contents 1~4, it is characterised in that: bit represents branch with 1 in bit bit sequence It holds, represents rejection with zero.
7, the bit bit sequence as described in technology contents 1~4, it is characterised in that: bit represents no in bit bit sequence with 1 Certainly, it represents and supports with zero.
8, bit sequence table, it is characterised in that: for bit described in any technology contents in technology contents 1~6 The storage of sequence;Multiple bit sequence datas are integrated into bit sequence table, the number of bits of all bit bit sequences It is equal;
Bit sequence table is gathered around there are two query interface, sequence of the first query interface corresponding data string element in serial data Column 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 bit sequence table, it is characterised in that: for the structure of bit sequence table described in technology contents 7 Make method;
All bit sequence 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 bit sequence table, the second query interface is The element of bit sequence table is expressed as biao [j] [ca], it is assumed that the serial number w of first element of serial data by ca;
Bit bit sequence stored by biao [j] [ca] is to serial data element of the position number greater than j in serial data Matching state does not veto permission;(such as j=4, substring length are 3, then the bit bit sequence pair stored by biao [j] [ca] The matching state of serial data element of the subscript of serial data greater than 4 does not veto permission;
Bit bit sequence stored by biao [j] [ca] in serial data position number be less than j and serial number to j step-length Matching state greater than the serial data element of substring length does not veto permission;(such as j=4, substring length are 3, then biao The matching state of element of the bit bit sequence to the subscript of data string less than 1 stored by [j] [ca] does not veto permission);
Bit bit sequence pair if ca is equal with the value of substring element of serial number k, stored by biao [j] [ca] The matching state of serial data element of the position number equal to j-k+w is that branch takes ticket in serial data;
Bit bit sequence 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 to position number in serial data equal to j-k+w is non placet;
The above rule is limited without temporal sequencing.
10, the building method of bit sequence table, it is characterised in that: for bit sequence table described in technology contents 7 Building method;
All bit sequence 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 bit sequence table, the second query interface is The element of bit sequence table is expressed as biao [ca] [j], it is assumed that the serial number w of first element of serial data by ca;
Bit bit sequence stored by biao [ca] [j] is to serial data element of the position number greater than j in serial data Matching state does not veto permission;
Bit bit sequence stored by biao [ca] [j] in serial data position number be less than j and serial number to j step-length Matching state greater than the serial data element of substring length does not veto permission;
Bit bit sequence pair if ca is equal with the value of substring element of serial number k, stored by biao [ca] [j] The matching state of serial data element of the position number equal to j-k+w is that branch takes ticket in serial data;
Bit bit sequence 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 to position number in serial data equal to j-k+w is non placet;
The above rule is limited without temporal sequencing.
11, the building method of the bit sequence table as described in technology contents 9 or 10, it is characterised in that: the serial number The value 0 for starting counting i.e. w from 0.
12, the building method of the bit sequence table as described in technology contents 9 or 10, it is characterised in that: the serial number The value 1 for starting counting i.e. w from 1.(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 bit bit sequence of bit sequence table;
Process a, using the building method of bit sequence table described in technology contents 8 or 9 according to the number that need to search for substring According to building bit sequence 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 bit bit sequence 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 voting results sequence of serial data each position and substring;
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:
For obtaining the matching position for the substring (xu- > str) that need to be searched for into searched letter string (bei- > str), Letter 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 bit sequence table described in technology contents 8 or 9 according to the number that need to search for substring According to building bit sequence table biao [] [];
Process b, matching operation, matching rule are carried out to letter string using the bit sequence table biao [] [] of process a construction It is then as follows:
Step 1, putting in order according to letter string, take serial data, fetch and are equal to bit bit sequence according to the quantity of string length Sum stored by the element of table biao [] [] in bit bit sequence for the bit of ballot;Referring in attached drawing (youmo)
The bit bit sequence for the data not yet inquired in step 2, inquiry serial data, last time have looked into when executing this step The element ask 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 as the second query interface (Bz1.1, Bz1.2, Bz1.3), each element of serial data is inquired in bit sequence table Corresponding bit bit sequence (Sj1.1, Sj1.2, Sj1.3), is united by the way of veto by one vote (Bz2.1, Bz2.2, Bz2.3) The vote information for counting all elements in string 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 ' knot that the length (xu- > size) of substring (xu- > str) subtracts 1 Fruit 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, public sentiment monitoring system, it is characterised in that: there is technology described in any technology contents in technology contents 1~15 Scheme.
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, and the present invention provides One new approaches.The present invention can adequately utilize computer processor resource, so that the speed for obtaining Data Matching is accelerated.
Detailed description of the invention
Fig. 1 is the schematic diagram of the test case of the embodiment of the present invention 1, in order to help reader to understand, depicts and is used in Fig. 1 The logical construction of the youmo of serial data, youmo and non-specific presence are taken, youmo has 8 imaginary logic units, youmo First unit y0 and letter string bei- > str under be designated as that the element of i is corresponding, the second unit y1 and letter string of youmo The element that i+1 is designated as under bei- > str is corresponding, and so on, it corresponds in order;Bz1.1 is in bit sequence table in Fig. 1 The corresponding bit bit sequence (Sj1.1) of each element of middle inquiry serial data;B2.1 represents each bit to Sj1.1 in Fig. 1 The vote information of sequence carries out veto by one vote formula statistics, and Sj2.1 is that B2.1 counts ' voting results sequence ' obtained in Fig. 1, Position corresponding to the bit that wherein pipei sections of intermediate values are 1 is matching position, huadong sections of intermediate values for 1 bit institute Corresponding position is sliding position.The tactic number of the lower section of Sj1.1, Sj2.1 is each bit in bit in Fig. 1 Serial number in bit sequence.Tactic number in Fig. 1 below bei- > str is serial number of each element in letter string.
Fig. 2 is the schematic diagram of the test case of the embodiment of the present invention 1, and Fig. 1 is undertaken in time sequencing, since Fig. 1 is obtained One sliding position 6, so first unit y0 of the trip youmo of Fig. 2 corresponds to bei- > str [6].Sj2.1 schemes in Fig. 2 Sj2.1 in 1, due to obtaining sliding position in Fig. 1, Fig. 2 passes through displacement operation to the content of the huadong section of Fig. 1 (Bz6) retained, the 7th (under be designated as 6) of Sj2.1 and the 8th after displacement operation (under be designated as 7) are retained in the of Sj3 1 (under be designated as 0) and second (under be designated as 1);In order to not influence subsequent ballot, Sj3 and Sj4 is subjected to position or operation (BZ4) bit bit sequence Sj5 is obtained as vote information;Due to bei- > str [6], bei- > str [7] in Fig. 1 by Read, bei- > str [6], bei- > str [7] vote information be also reside in Sj5, so need not repeat read, institute With table lookup operation since the y2 of corresponding bei- > str [8].
Fig. 3 is the schematic diagram of the test case of the embodiment of the present invention 1, and Fig. 2 is undertaken in time sequencing, due to not having in Fig. 2 There are sliding position, the sliding of Fig. 3 (6+8=14) since 14;Since youmo has got the end of bei- > str, so search Terminate.Length due to representing serial data in Fig. 3 only has 7, and the length of bit bit sequence is 8, leads to vote by proxy result ' there are meaningless area ny in voting results sequence ' Sj2.3;
Fig. 4 is the screenshot of the code operation result of the embodiment of the present invention 29.
Specific embodiment
Embodiment 1, search for the following of method of data it is characterized by:
For the search process of computer data, relies on digital computer and realize;
For obtaining the matching position for the substring (xu- > str) that need to be searched for into searched letter string (bei- > str), Letter string (bei- > str) length (bei- > size) is greater than or equal to the length (xu- > size) of substring (xu- > str), female The value range of string element is fixed, the value range of letter string element before letter string load it is contemplated that, the value of substring element Range is fixed, the value range of substring element before substring load it is contemplated that;
Distributing bit bit sequence table [] [], the maximum serial number 256 of the first dimension, the maximum serial number ratio of the second dimension Quantity of the special bit sequence for the bit of ballot;The bit sequence units that bit sequence table is included all have following spy " for storing the ballot of serial data matching state, bit bit sequence is by the number of bits of ballot less than or equal to based on applying for sign The number of bits of calculation machine single treatment data;Bit bit sequence is used to store the element of serial data to each position of entire serial data A serial data, bit are integrally corresponded to the support permission or rejection permission, bit bit sequence of the matching state that need to search for substring An element of the respective independent corresponding data string of each bit in bit sequence, bit and serial data element in bit bit sequence Corresponded manner be it is sequentially corresponding, bit is represented with 1 and is supported in bit bit sequence, rejection is represented with zero, in bit bit sequence The corresponded manner of bit and serial data element is that same ordered pair is answered, i.e., first bit corresponding data string in bit bit sequence First element, second element of second bit corresponding data string in bit bit sequence, third in bit bit sequence The third element of bit corresponding data string, and so on ";
Distributing bit bit sequence variable n1, n2;
Pretreatment:
D1, using it is above-mentioned it is a kind of construct bit sequence table method construct bit sequence table biao [] [];Tool Steps are as follows for body:
The method for constructing bit sequence table biao [] [] is as follows:
Step D1.1, construct bit sequence table template: c language pseudo table reaches are as follows: building bit sequence table template ();
The method for constructing bit sequence table template is as follows:
Step D1.1.1 is bit sequence table template (wei_zhuan jm [8]) storage allocation, bit sequence table mould Plate has bit sequence units, and the quantity of bit sequence units is equal to bit bit sequence and is used in bit sequence table template The quantity of the bit of ballot;There is bit sequence table template the serial number of bit sequence units to start from scratch calculating;
Step D1.1..2, to each bit sequence units in bit bit sequence table template (wei_zhuan jm [8]) into Row assignment;Assignment operation is as follows:
Step D1.1..1, first by each bit sequence units in bit sequence table template (wei_zhuan jm [8]) All bits for ballot be assigned a value of 1, c language pseudo table and reach are as follows: jm [j] .cha=OXFF:
Step D1.1..2, all bits for being used to vote of each bit sequence units are subjected to displacement operation, position The digit for moving operation is serial number and 1 of each bit sequence units in bit sequence table template (wei_zhuanjm [8]) With;C language pseudo table reaches are as follows: jm [j] .cha < <=(j+1);
Step D1.2, bit sequence table template (jm) is loaded into tie up in (biao [0] []) to bit sequence table first, Its method is as follows:
Step D1.2.1, the data of bit sequence table template (jm) are sequentially copied in bit sequence table, c language Pseudo table reaches are as follows: memcpy (&biao [0] [0], jm, sizeof (wei_zhuan) * 8);
Step D1.3, do not have to each bit sequence units are respective in the dimension of bit bit sequence table first (biao [0] []) The bit having a veto is assigned a value of 1, specific as follows:
Step D1.3.1, a variable, referred to as the 9th variable (n9), the bit quantity of the 9th variable (n9) are distributed Equal to the bit quantity of bit bit sequence;
Step D1.3.2, each bit of the 9th variable (n9) 1, c language pseudo table is assigned a value of to reach are as follows: N9.cha=OXFF;;
Step D1.3.3, the 9th variable is carried out moving to right displacement operation, moves to right the maximum that digit is bit sequence units Serial number subtracts the serial number of currently processed bit sequence units, along with the maximum serial number for needing character in search string (size), in character string character first serial number zero, i.e., the subscript of character is started from scratch in character string, C language pseudocode Expression are as follows: n9.cha > >=(7-j+ size);;
Step D1.3.4, the value of current bit bit sequence unit and the 9th variable (n9) are subjected to position or operation, and by position Or the result of operation is given to current bit bit sequence unit, C language pseudo table reaches are as follows: biao [ca] [j] .cha |= n1.cha;;
Step D1.4, by each bit sequence units in the dimension of bit sequence table first (biao [0] []) with same Sequentially, it copies in other dimensions of bit sequence table, c language pseudo table reaches are as follows: (size_ti=1: i < 256;i+ +) memcpy (&biao [i] [0] , &biao [0] [0], sizeof (wei_zhuan) * 8);
Step D1.5, vote information assignment, specific method are carried out to bit sequence units each in bit bit sequence table It is as follows:
Step D1.5.1, the first metering of building recycles, and has the first metering variable (j), the first meter in the first metering circulation The initial value of secondary variable is number of bits of the bit bit sequence for ballot, and the first metering recycles every circulation primary then the first metering Variable (j) reduces 1, recycles and stops when the first metering variable (j) is less than zero, c language pseudocode statement are as follows: for (int j= 8;>=0 j;j--){};Each circulation of first metering circulation all includes following operating process:
Step D1.5.1.1, kr variable (kr) is distributed;
Step D1.5.1.2, the value of the first metering variable (j) is given to kr variable;
If step D1.5.1.3, the first metering variable (j) is greater than the maximum serial number for needing character in search string (size) the maximum serial number (size) for needing character in search string is then given to kr variable;
Step D1.5.1.4, building the second metering circulation, the second metering circulation in have the second metering variable (k), second The initial value of metering variable (k) is the value of kr variable, and the first metering recycles every circulation primary, and then the second metering variable (k) reduces 1, It recycles and stops when the second metering variable (k) is less than zero, c language pseudocode statement are as follows: or (int k=kr;>=0 k; k--){};Each circulation of second metering variable (k) all includes following operating process:
Step D1.5.1.4.1, a variable, referred to as the tenth variable (n10), the bit of the tenth variable (n10) are distributed Quantity is equal to the bit quantity of bit bit sequence;
Step D1.5.1.4.2, the tenth variable (n10) is assigned a value of 1, c language pseudo table to reach are as follows: n10.cha= 0x1;;
Step D1.5.1.4.3, the tenth variable (n10) is carried out moving to left displacement operation, the quantity of the digit of shift left operation is First metering variable (j) subtracts the resulting value of the second metering variable (k), will move to left the resulting value of displacement operation and is given to the tenth Variable (n10), c language pseudocode are expressed as n10.cha < <=(j-k);;
Step D1.5.1.4.4, ca variable is distributed;
Step D1.5.1.4.5, the word for needing the second metering variable (k) of serial number in search string (xu- > str) is obtained It accords with (xu- > str [k]), and the character of acquisition (xu- > str [k]) is given to ca variable, the statement of C language pseudocode are as follows: unSigned char ca=xu- > str [k];;
Step D1.5.1.4.6, it is equal to value the second dimension sequence of ca variable to the first dimension serial number of bit bit sequence table Number be equal to the first metering variable (j) value unit (biao [ca] [j]) carry out assignment operation, the mode of assignment operation is: first The value of the unit and the tenth variable (n10) are subjected to position or operation, position or the resulting value of operation are then given to the unit, c Language pseudo table reaches are as follows: biao [ca] [j] .cha |=n10.cha;;
Step D1.6 terminates.
Search operation process is as follows:
D2.1, distribution signless integer type variable sp, hr;C language pseudocode statement are as follows: unsigned int sp=0;
D2.2, distribution character pointer sty;C language pseudocode statement are as follows: unsigned int hr;
D2.3, distributing bit position sequence pointer kp;C language pseudocode statement are as follows: wei_zhuan*kp;
D2.4, the effective length numerical value (sn.shu) for the direct result example (jieguo) that D1 step is constructed is assigned a value of Zero;C language pseudocode statement are as follows: jieguo.shu=0;
D2.5, distribution signless integer type variable b_size;And letter string length (bei- > size) value is given to b_ size;C language pseudo table reaches are as follows: unsigned intb_size=bei- > size;
Whether the length (xu- > size) for the substring (xu- > str) that D2.6, judgement need to search for, which is greater than bit bit sequence, is used In the quantity of the bit of ballot, the quantity if it is greater than bit bit sequence for the bit of ballot then exits process, to behaviour Author is returned as empty information;Enter if the quantity of the bit no more than bit bit sequence for voting in next step;C language Speech pseudo table reaches are as follows: if (xu- > size > 8) return (NUJLL);
D2.7, to the length (bei- > size) of letter string (bei- > str) and length (the xu- > of substring (xu- > str) Size it) is compared, if the length (bei- > size) of letter string (bei- > str) is less than the length of substring (xu- > str) (xu- > size) then exits process, and empty information is returned as to operator;Otherwise enter in next step;C language pseudo table reaches Are as follows: if (bei- > size < xu- > size) return (NULL);
D2.8, distribution signless integer type variable ks;And variable b_size is subtracted into the ratio that bit bit sequence is used to vote The resulting value of the quantity of special position is given to variable ks;C language pseudo table reaches are as follows: unsi b-size-8;
D2.9, distribution signless integer type variable bc, and variable bc is assigned a value of zero;C language pseudo table reaches are as follows: Unsignedcharbc=0;
D2.10, it is assigned symbol integer type variable i, and variable i is assigned a value of zero;C language pseudo table reaches are as follows: int I=0;
D2.11, it is assigned symbol integer type variable ket, and the quantity for the bit that bit bit sequence is used to vote is added The length (xu- > size) of substring (xu- > str) is subtracted after one, c language pseudo table reaches are as follows: intket=8+1-xu- > size;
D2.12,1 is assigned a value of to all bits for ballot of bit bit sequence variable n1;C language pseudo table Up to for n1.cha=0XFF;
D2.13, construction third circulation, the conditional-variable for circulation are i, and the metering initial value of i is 0, when i is greater than ks It does not continue to execute circulation;;C language codes are expressed as (i=0;J <=ks;){};
There is following process in the loop body of third metering circulation:
D2.13.0, judge whether bc is greater than zero, if no more than entering step D2.13.6 if zero, if it is greater than if zero into Enter D2.13.1;C language pseudo table reaches are as follows: if (bc > 0) { };
D2.13.1, variable n1 is displaced to right-shift operation, the value of the digit of right-shift operation is the value of bc, and by displacement operation Resulting value is given to n1 afterwards;C language pseudo table reaches are as follows: n1.cha > >=bc;
D2.13.2, all each bits for being used for bit bit sequence of variable n2 are assigned a value of1;C language puppet generation Code table reaches are as follows: n2.cha=0XFF;
D2.13.3, the quantity for the bit that bit bit sequence is used to vote is subtracted the resulting result of bc and is given to bc;C Language pseudo table reaches are as follows: bc=8-bc;
D2.13.4, n2 is carried out to move to left displacement operation, the quantity of shift left operation digit is bc, and will move to left displacement operation Resulting value is given to n2;C language pseudo table reaches are as follows: n2.cha < <=bc;
D2.13.5, n1 and n2 is subjected to position or operation, and the result of position or operation is given to n1;C language pseudo table Reach are as follows: n1.cha=n1.cha | n2.cha;
D2.13.6, the serial number that sty is directed toward letter string (bei- > str) character equal with the value of variable i;C language puppet generation Code table reaches are as follows: sty=(bei- > str)+i;;
D2.13.7, building the 4th metering circulation, the conditional-variable for circulation are j, and the metering initial value of j is bc, is often followed The value of j of ring increases by 1, does not continue to execute when j is more than or equal to quantity of the bit bit sequence for the bit of ballot and follow Ring;C language code expression are as follows: for (intj=bc;J < 8;j++){};
There is following process in the loop body of 4th metering circulation:
D2.13.7.1, distribution variable ca, and by the numerical value in letter string using sty as serial number in the serial data at beginning equal to j The value of unit is given to ca;C language code expression are as follows: unsigned char ca=(unsigned char) sty [j];
D2.13.7.2, the bit sequence for obtaining first dimension serial number ca the second dimension serial number j in bit sequence table The value of column unit, and the value is given to n2;C language code expression are as follows: n2.cha=biao [ca] [j] .cha;;
D2.13.7.3, n1 and n2 is carried out to position and operation, and position will be located at and operate resulting value and be given to n1;C language Say code expression are as follows: n1.cha&=n2.cha:
D2.13.8, judge whether the value of n1 is not zero;D2.13.9 is entered step if being not zero;Otherwise it enters step D2.13.10;
D2.13.9, this step include following sub-step:
D2.13.9.1, each bit of n2 is assigned a value of 1;C language code expression are as follows: n2.cha=0XFF:
D2.13.9.2, n2 is carried out to move to right displacement operation, the digit for moving to right displacement operation is the length of substring (xu- > str) Degree (xu- > size) subtracts 1;The resulting value of displacement operation is given to n2;C language codes expression are as follows: n2.cha > >=xu- > size-1:
D2.13.9.3, n2 and n1 is subjected to position and operation, operation resulting value is given to n2;C language code expression are as follows: N2.cha&=n1.cha;
D2.13.9.4, judge whether n2 is not zero, if n2 is not zero enter D2.13.9.5, if n2 is zero into Enter D2.13.9.6;
Matching position is indicated for 1 bit in D2.13.9.5, variable n2, n2 is parsed;Resolution rules are: If n-th of bit is 1 in n2, the position of i+n is substring matching position in letter string (bei- > str);
D2.13.9.6, each bit of n2 is assigned a value of 1;C language code expression are as follows: n2.cha=0XFF;
D2.13.9.7, n2 is carried out to move to left displacement operation, the digit for moving to left displacement operation is the value of ket;By displacement operation Resulting value is given to n2;C language codes expression are as follows: n2.cha < <=(ket);
D2.13.9.8, n2 and n1 is subjected to position and operation, operation resulting value is given to n2;C language code expression are as follows: N2.cha&=n1.cha;
D2.13.9.9, judge whether n2 is not zero, D2.13.9.10 is entered if n2 is not zero, if n2 is zero Into D2.13.9.11;
Sliding step is indicated for 1 bit in D2.13.9.10, variable n2, n2 is parsed;Resolution rules are: Judge in order, encounter first be 1 bit be the minimum slip step-length, if first be 1 serial number nx, by i Value increase nx, and nx is given to bc, jumps to the tail portion of third circulation, c language pseudo table reaches are as follows: continue;;
The quantity of D2.13.9.11, the bit for being used to vote from increasing bit bit sequence by the value of i;C language pseudo table It reaches are as follows: i+=8;
D2.13.9.12, bc is assigned a value of zero;C language pseudo table reaches are as follows: bc=0;
D2.13.9.13, each bit of n1 is assigned a value of 1;C language code expression are as follows: n1.cha=0XFF;
D2.13.9.14, the tail portion for jumping to third circulation, c language pseudo table reach are as follows: continue;;
D2.13.10, this step include following sub-step:
The quantity of D2.13.10.1, the bit for being used to vote from increasing bit bit sequence by the value of i;C language pseudo table It reaches are as follows: i+=8:
D2.13.10.2, bc is assigned a value of zero;C language pseudo table reaches are as follows: bc=0;
D2.13.10.3, each bit of n1 is assigned a value of 1;C language code expression are as follows: n1.cha=0XFF;
D2.13.10.4, the tail portion for jumping to third circulation, c language pseudo table reach are as follows: continue;;
D2.14, judge i whether be located at letter string length (bei- > size) subtract bit bit sequence for ballot bit Quantity resulting value and letter string length (bei- > size) subtract in the section of substring length (xu- > size) resulting value;If Then enter D2.15 in section, D2.16 is entered if not in section;C language pseudo table reaches are as follows: if (i <=bei- > size-xu- > size&&i >=bei- > size-8) { };
D2.15, this step include following sub-step:
D2.15.1, distribution signless integer type variable hr;And letter string length is subtracted into i resulting value and is given to hr;C language Code expression are as follows: unsigned int hr=bei- > size-i:
D2.15.2, judge whether bc is equal to zero, if being equal to zero, enter D2.15.3, if being not equal to zero, enter D2.15.4;
D2.15.3, all bits of n1 are assigned a value of 1;C language pseudo table reaches are as follows: n1.cha=0XFF:
D2.15.4, judge whether bc is greater than zero, enter D2.15.5 if bc is greater than zero, otherwise enter D2.15.6;
D2.15.5, this step include following sub-step:
D2.15.5.0, judge whether bc is greater than zero, D2.15.5.6 is entered step if no more than zero, if it is greater than zero Then enter D2.15.5.1;C language pseudo table reaches are as follows: if (bc > 0) { };
D2.15.5.1, variable n1 is displaced to right-shift operation, the value of the digit of right-shift operation is the value of bc, and displacement is grasped Resulting value is given to n1 after work;C language pseudo table reaches are as follows: n1.cha > >=bc;
D2.15.5.2, all each bits for being used for bit bit sequence of variable n2 are assigned a value of 1;C language Pseudo table reaches are as follows: n2.cha=OXFF;
D2.15.5.3, the quantity for the bit that bit bit sequence is used to vote is subtracted the resulting result of bc and is given to bc;C language pseudo table reaches are as follows: bc=8-bc;
D2.15.5.4, n2 is carried out to move to left displacement operation, the quantity of shift left operation digit is bc, and will move to left displacement behaviour Make resulting value and is given to n2;C language pseudo table reaches are as follows: n2.cha < <=bc;
D2.15.5.5, n1 and n2 is subjected to position or operation, and the result of position or operation is given to n1;C language pseudocode Expression are as follows: n1.cha=n1.cha | n2.cha;
D2.15.6, the serial number that sty is directed toward letter string (bei- > str) character equal with the value of variable i;C language puppet generation Code table reaches are as follows: sty=(bei- > str)+i;;
D2.15.7, building the 5th metering circulation, the conditional-variable for circulation are jr, and the metering initial value of jr is bc, often The value of circulation primary jr increases by 1, does not continue to execute circulation when the value more than or equal to hr of jr;C language code expression are as follows: For (int jr=bc;Jr < hr;jr++){};
There is following process in the loop body of 5th metering circulation:
D2.13.7.1, distribution variable ca, and the numerical value that jr will be equal in letter string using sty as serial number in the serial data at beginning The value of unit be given to ca;C language code expression are as follows: unsigned charca=(unsigned char) sty [jr];
D2.13.7.2, the bit for obtaining first dimension serial number ca the second dimension serial number jr in bit sequence table The value of sequence units, and the value is given to n2;C language code expression are as follows: n2.cha=biao [ca] [jr] .cha;;
D2.13.7.3, n1 and n2 is carried out to position and operation, and position will be located at and operate resulting value and be given to n1;C language Say code expression are as follows: n1.cha&=n2.cha;
D2.15.8, judge whether the value of n1 is not zero;D2.15.9 is entered step if being not zero;Otherwise it enters step D2.1b.10;
D2.15.9, this step include following sub-step:
D2.15.9.1, each bit of n2 is assigned a value of 1;C language code expression are as follows: n2.cha=0XFF;
D2.15.9.2, n2 is carried out to move to right displacement operation, the digit for moving to right displacement operation is the length of substring (xu- > str) Degree (xu- > size) subtracts 1 and subtracts the value of hr again along with substring length (xu- > size);The resulting value of displacement operation is assigned To n2;C language code expression are as follows: n2.cha > >=(8-1-hr+xu- > size);
D2.15.9.3, n2 and n1 is subjected to position and operation, operation resulting value is given to n2;C language code expression are as follows: N2.cha&=n1.cha;
D2.15.9.4, judge whether n2 is not zero, if n2 is not zero enter D2.15.9.5, if n2 is zero into Enter D2.15.10;
Matching position is indicated for 1 bit in D2.15.9.5, variable n2, n2 is parsed;Resolution rules are: If n-th of bit is 1 in n2, the position of i+n is substring matching position in letter string (bei- > str);
D2.15.10, into D2.16;
D2.16, end.
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.
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 (4)

1. the method for searching for data, it is characterised in that:
For the search process of computer data, relies on digital computer and realize;
For obtaining the matching position for the substring (xu- > str) that need to be searched for, letter string into searched letter string (bei- > str) (bei- > str) length (bei- > size) is greater than or equal to the length (xu- > size) of substring (xu- > str), and letter string element takes Value range is fixed, the value range of letter string element before letter string load it is contemplated that, the value range of substring element is fixed, son Go here and there element value range substring load before it is contemplated that;
Distributing bit bit sequence table [] [], the maximum serial number 256 of the first dimension, the maximum serial number bit of the second dimension Quantity of the sequence for the bit of ballot;The bit sequence units that bit sequence table is included all have following characteristics " for storing the ballot of serial data matching state, number of bits of the bit bit sequence for ballot is less than or equal to institute's computation The number of bits of machine single treatment data;Bit bit sequence be used to store the element of serial data to each position of entire serial data with The support permission or rejection permission, bit bit sequence that the matching state of substring need to be searched for integrally correspond to a serial data, bit An element of the respective independent corresponding data string of each bit in sequence, bit and serial data element in bit bit sequence Corresponded manner be it is sequentially corresponding, bit is represented with 1 and is supported in bit bit sequence, is represented rejection with zero, is compared in bit bit sequence The corresponded manner of special position and serial data element is that same ordered pair is answered, i.e., the of first bit corresponding data string in bit bit sequence One element, second element of second bit corresponding data string in bit bit sequence, third ratio in bit bit sequence The third element of special position corresponding data string, and so on ";
Distributing bit bit sequence variable n1, n2;
Pretreatment:
D1, using it is above-mentioned it is a kind of construct bit sequence table method construct bit sequence table biao [] [];Specific steps It is as follows:
The method for constructing bit sequence table biao [] [] is as follows:
Step D1-1, bit sequence table template is constructed:
The method for constructing bit sequence table template is as follows:
Step D1-1-1 is bit sequence table template (wei_zhuan jm [8]) storage allocation, bit sequence table template tool There are bit sequence units, the quantity of bit sequence units is equal to bit bit sequence for voting in bit sequence table template Bit quantity;There is bit sequence table template the serial number of bit sequence units to start from scratch calculating;
Step D1-1-1-2, bit sequence units each in bit bit sequence table template (wei_zhuan jm [8]) are carried out Assignment;Assignment operation is as follows:
Step D1-1-2-1, first by each bit sequence units in bit sequence table template (wei_zhuan jm [8]) All bits for ballot are assigned a value of 1;
Step D1-1-2-2, all bits for being used to vote of each bit sequence units are subjected to displacement operation, displacement The digit of operation is serial number and 1 of each bit sequence units in bit sequence table template (wei_zhuanjm [8]) With;;
Step D1-2, it is loaded into bit sequence table template (jm) to tie up in (biao [0] []) to bit sequence table first, method It is as follows:
Step D1-2-1, the data of bit sequence table template (jm) are sequentially copied in bit sequence table;
Step D1-3, respective not no to each bit sequence units in the dimension of bit bit sequence table first (biao [0] []) The bit certainly weighed is assigned a value of 1, specific as follows:
Step D1-3-1, distribute a variable, referred to as the 9th variable (n9), the bit quantity of the 9th variable (n9) be equal to than The bit quantity of special bit sequence;
Step D1-3-2, each bit of the 9th variable (n9) is assigned a value of 1;
Step D1-3-3, the 9th variable is carried out moving to right displacement operation, moves to right the maximum serial number that digit is bit sequence units The serial number for subtracting currently processed bit sequence units, along with the maximum serial number (size) for needing character in search string, First serial number zero of character in character string, i.e., the subscript of character is started from scratch in character string;
Step D1-3-4, the value of current bit bit sequence unit and the 9th variable (n9) are subjected to position or operation, and by position or behaviour The result of work is given to current bit bit sequence unit;
Step D1-4, bit sequence table first is tieed up into (biao [0] []) each bit sequence units with same sequence, It copies in other dimensions of bit sequence table;
Step D1-5, vote information assignment is carried out to bit sequence units each in bit bit sequence table, the specific method is as follows:
Step D1-5-1, the first metering of building recycles, and has the first metering variable (j) in the first metering circulation, and the first metering becomes The initial value of amount is number of bits of the bit bit sequence for ballot, and the first metering recycles every circulation primary then the first metering variable (j) 1 is reduced, recycles and stops when the first metering variable (j) is less than zero;Each circulation of first metering circulation is all comprising following behaviour Make process:
Step D1-5-1-1, kr variable (kr) is distributed;
Step D1-5-1-2, the value of the first metering variable (j) is given to kr variable;
Step D1-5-1-3, if the first metering variable (j) greater than if needing the maximum serial number (size) of character in search string The maximum serial number (size) for needing character in search string is given to kr variable;
Step D1-5-1-4, the second metering of building recycles, and has the second metering variable (k), the second metering in the second metering circulation The initial value of variable (k) is the value of kr variable, and the first metering recycles every circulation primary, and then the second metering variable (k) reduces 1, when the It recycles and stops when two metering variables (k) are less than zero;Each circulation of second metering variable (k) all includes following operating process:
Step D1-5-1-4-1, a variable, referred to as the tenth variable (n10), the bit quantity of the tenth variable (n10) are distributed Equal to the bit quantity of bit bit sequence;
Step D1-5-1-4-2, the tenth variable (n10) is assigned a value of 1;
Step D1-5-1-4-3, the tenth variable (n10) is carried out moving to left displacement operation, the quantity of the digit of shift left operation is first Metering variable (j) subtracts the resulting value of the second metering variable (k), will move to left the resulting value of displacement operation and is given to the tenth variable (n10);
Step D1-5-1-4-4, ca variable is distributed;
Step D1-5-1-4-5, the character (xu- for needing the second metering variable (k) of serial number in search string (xu- > str) is obtained > str [k]), and the character of acquisition (xu- > str [k]) is given to ca variable;
Step D1-5-1-4-6, value the second dimension serial number for being equal to ca variable to the first dimension serial number of bit bit sequence table is equal to The unit (biao [ca] [j]) of the value of first metering variable (j) carries out assignment operation, and the mode of assignment operation is: first by the list The value of member and the tenth variable (n10) carry out position or operation, and position or the resulting value of operation are then given to the unit;
Step D1-6 terminates.
Search operation process is as follows:
D2-1, distribution signless integer type variable sp, hr;
D2-2, distribution character pointer sty;
D2-3, distributing bit position sequence pointer kp;
D2-4, zero is assigned a value of to the effective length numerical value (sn-shu) for the direct result example (jieguo) that D1 step is constructed;
D2-5, distribution signless integer type variable b_size;And letter string length (bei- > size) value is given to b_size;
Whether the length (xu- > size) for the substring (xu- > str) that D2-6, judgement need to search for is greater than bit bit sequence for voting Bit quantity, the quantity of bit if it is greater than bit bit sequence for ballot then exits process, returns to operator It returns as empty information;Enter if the quantity of the bit no more than bit bit sequence for voting in next step;
D2-7, the length (bei- > size) of letter string (bei- > str) and the length (xu- > size) of substring (xu- > str) are carried out Compare, if the length (bei- > size) of letter string (bei- > str) less than substring (xu- > str) length (xu- > size) if if Process is exited, empty information is returned as to operator;Otherwise enter in next step;
B2-8, distribution signless integer type variable ks;And variable b_size is subtracted into the bit that bit bit sequence is used to vote The resulting value of quantity be given to variable ks;
D2-9, distribution signless integer type variable bc, and variable bc is assigned a value of zero;
D2-10, it is assigned symbol integer type variable i, and variable i is assigned a value of zero;
D2-11, it is assigned symbol integer type variable ket, and after the quantity for the bit that bit bit sequence is used to vote is added one Subtract the length (xu- > size) of substring (xu- > str);
D2-12,1 is assigned a value of to all bits for ballot of bit bit sequence variable n1;;
B2-13, construction third circulation, the conditional-variable for circulation are i, and the metering initial value of i is 0, no longer when i is greater than ks Continue to execute circulation;
There is following process in the loop body of third metering circulation:
D2-13-0, judge whether bc is greater than zero, enter step D2-13-6 if no more than zero, enter if if it is greater than zero D2-13-1;
D2-13-1, variable n1 is displaced to right-shift operation, the value of the digit of right-shift operation is the value of bc, and by institute after displacement operation The value obtained is given to n1;
D2-13-2, all each bits for being used for bit bit sequence of variable n2 are assigned a value of 1;
D2-13-3, the quantity for the bit that bit bit sequence is used to vote is subtracted the resulting result of bc and is given to bc;C language Pseudo table reaches are as follows: bc=8-bc;
D2-13-4, n2 is carried out to move to left displacement operation, the quantity of shift left operation digit is bc, and will be moved to left obtained by displacement operation Value be given to n2;
D2-13-5, n1 and n2 is subjected to position or operation, and the result of position or operation is given to n1;
D2-13-6, the serial number that sty is directed toward letter string (bei- > str) character equal with the value of variable i;
D2-13-7, building the 4th metering circulation, the conditional-variable for circulation are j, and the metering initial value of j is the value of bc, are often followed The value of j of ring increases by 1, and when j is more than or equal to quantity of the bit bit sequence for the bit of ballot, no longer continuous execute of dimension is followed Ring;
There is following process in the loop body of 4th metering circulation:
D2-13-7-1, distribution variable ca, and the unit of the numerical value of j will be equal in letter string using sty as serial number in the serial data at beginning Value be given to ca;C language code expression are as follows: unsigned char ca=(unsigned char) sty [j];
D2-13-7-2, the bit bit sequence list for obtaining first dimension serial number ca the second dimension serial number j in bit sequence table The value of member, and the value is given to n2;
D2-13-7-3, n1 and n2 is carried out to position and operation, and position will be located at and operate resulting value and be given to n1;
D2-13-8, judge whether the value of n1 is not zero;D2-13-9 is entered step if being not zero;Otherwise D2- is entered step 13-10;
D2-13-9, this step include following sub-step:
D2-13-9-1, each bit of n2 is assigned a value of 1;C language code expression are as follows: n2-cha=0XFF;
D2-13-9-2, n2 is carried out to move to right displacement operation, the digit for moving to right displacement operation is the length of substring (xu- > str) (xu- > size) subtracts 1;The resulting value of displacement operation is given to n2;
D2-13-9-3, n2 and n1 is subjected to position and operation, operation resulting value is given to n2;
D2-13-9-4, judge whether n2 is not zero, D2-13-9-5 is entered if n2 is not zero, is entered if n2 is zero D2-13-9-6;
Matching position is indicated for 1 bit in D2-13-9-5, variable n2, n2 is parsed;Resolution rules are: if N-th of bit is 1 in n2, then the position of i+n is substring matching position in letter string (bei- > str);
D2-13-9-6, each bit of n2 is assigned a value of 1;
D2-13-9-7, n2 is carried out to move to left displacement operation, the digit for moving to left displacement operation is the value of ket;It will be obtained by displacement operation Value be given to n2;
D2-13-9-8, n2 and n1 is subjected to position and operation, operation resulting value is given to n2;
D2-13-9-9, judge whether n2 is not zero, D2-13-9-10 is entered if n2 is not zero, is entered if n2 is zero D2-13-9-11;
Sliding step is indicated for 1 bit in D2-13-9-10, variable n2, n2 is parsed;Resolution rules are: by suitable Sequence judgement, encounter first be 1 bit be the minimum slip step-length, if first be 1 serial number nx, by the value of i Increase nx, and nx is given to bc, jumps to the tail portion of third circulation;
The quantity of D2-13-9-11, the bit for being used to vote from increasing bit bit sequence by the value of i;
D2-13-9-12, bc is assigned a value of zero;
D2-13-9-13, each bit of n1 is assigned a value of 1;
D2-13-9-14, the tail portion for jumping to third circulation;
D2-13-10, this step include following sub-step:
The quantity of D2-13-10-1, the bit for being used to vote from increasing bit bit sequence by the value of i;
D2-13-10-2, bc is assigned a value of zero;
D2-13-10-3, each bit of n1 is assigned a value of 1;
D2-13-10-4, the tail portion for jumping to third circulation;
D2-14, judge i whether be located at letter string length (bei- > size) subtract bit bit sequence for ballot bit number Amount resulting value and letter string length (bei- > size) are subtracted in the section of substring length (xu- > size) resulting value;If in section Inside then enter D2-15, D2-16 is entered if not in section;
D2-15, this step include following sub-step:
D2-15-1, distribution signless integer type variable hr;And letter string length is subtracted into i resulting value and is given to hr;
D2-15-2, judge whether bc is equal to zero, if being equal to zero, enter D2-15-3, if being not equal to zero, enter D2- 15-4;
D2-15-3, all bits of n1 are assigned a value of 1;
D2-15-4, judge whether bc is greater than zero, enter D2-15-5 if bc is greater than zero, otherwise enter D2-15-6;
D2-15-5, this step include following sub-step:
D2-15-5-0, judge whether bc is greater than zero, if no more than entering step D2-15-5-6 if zero, if it is greater than if zero into Enter D2-15-5-1;
D2-15-5-1, variable n1 is displaced to right-shift operation, the value of the digit of right-shift operation is the value of bc, and will be after displacement operation Resulting value is given to n1;
D2-15-5-2, all each bits for being used for bit bit sequence of variable n2 are assigned a value of 1;
D2-15-5-3, the quantity for the bit that bit bit sequence is used to vote is subtracted the resulting result of bc and is given to bc;
D2-15-5-4, n2 is carried out to move to left displacement operation, the quantity of shift left operation digit is bc, and will move to left displacement operation institute The value obtained is given to n2;
D2-15-5-5, n1 and n2 is subjected to position or operation, and the result of position or operation is given to n1;
D2-15-6, the serial number that sty is directed toward letter string (bei- > str) character equal with the value of variable i;
D2-15-7, building the 5th metering circulation, the conditional-variable for circulation are jr, and the metering initial value of jr is bc, every circulation The value of jr increases by 1, does not continue to execute circulation when the value more than or equal to hr of jr;
There is following process in the loop body of 5th metering circulation:
D2-13-7-1, distribution variable ca, and the list of the numerical value of jr will be equal in letter string using sty as serial number in the serial data at beginning The value of member is given to ca;
D2-13-7-2, the bit bit sequence for obtaining first dimension serial number ca the second dimension serial number jr in bit sequence table The value of unit, and the value is given to n2;
D2-13-7-3, n1 and n2 is carried out to position and operation, and position will be located at and operate resulting value and be given to n1;
D2-15-8, judge whether the value of n1 is not zero;D2-15-9 is entered step if being not zero;Otherwise D2- is entered step 15-10;
D2-15-9, this step include following sub-step:
D2-15-9-1, each bit of n2 is assigned a value of 1;C language code expression are as follows: n2-cha=0XFF;
D2-15-9-2, n2 is carried out to move to right displacement operation, the digit for moving to right displacement operation is the length of substring (xu- > str) (xu- > size) subtracts 1 and subtracts the value of hr again along with substring length (xu- > size);The resulting value of displacement operation is given to n2;
D2-15-9-3, n2 and n1 is subjected to position and operation, operation resulting value is given to n2;
D2-15-9-4, judge whether n2 is not zero, D2-15-9-5 is entered if n2 is not zero, is entered if n2 is zero D2-15-10;
Matching position is indicated for 1 bit in D2-15-9-5, variable n2, n2 is parsed;Resolution rules are: if N-th of bit is 1 in n2, then the position of i+n is substring matching position in letter string (bei- > str);
D2-15-10, into D2-16;
D2-16, end.
2. information dissemination system, it is characterised in that: realize data search using the method for search data described in claim 1.
3. public sentiment management system, it is characterised in that: realize data search using the method for search data described in claim 1.
4. artificial intelligence system, it is characterised in that: realize data search using the method for search data described in claim 1.
CN201811128025.4A 2018-09-26 2018-09-26 Data search method, information dissemination system, public sentiment management system, artificial intelligence system Withdrawn CN109213809A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811128025.4A CN109213809A (en) 2018-09-26 2018-09-26 Data search method, information dissemination system, public sentiment management system, artificial intelligence system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811128025.4A CN109213809A (en) 2018-09-26 2018-09-26 Data search method, information dissemination system, public sentiment management system, artificial intelligence system

Publications (1)

Publication Number Publication Date
CN109213809A true CN109213809A (en) 2019-01-15

Family

ID=64981708

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811128025.4A Withdrawn CN109213809A (en) 2018-09-26 2018-09-26 Data search method, information dissemination system, public sentiment management system, artificial intelligence system

Country Status (1)

Country Link
CN (1) CN109213809A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376292A (en) * 2018-09-21 2019-02-22 长沙学院 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) * 2018-09-21 2019-02-22 长沙学院 Bit bit sequence, data search method, search system, social network analysis system, public sentiment monitoring system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109376292A (en) * 2018-09-21 2019-02-22 长沙学院 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) * 2018-09-21 2019-02-22 长沙学院 Bit bit sequence, data search method, search system, social network analysis system, public sentiment monitoring system

Similar Documents

Publication Publication Date Title
Schulz System description: E 1.8
Esparza Decidability of model checking for infinite-state concurrent systems
Gabbay et al. Extending the Curry-Howard interpretation to linear, relevant and other resource logics1
CN112364167A (en) Deep learning-based intention recognition method, system, device and storage medium
Pippenger Pure versus impure Lisp
CN108897572B (en) Complex type reconstruction method based on variable association tree
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
CN111178701A (en) Risk control method and device based on feature derivation technology and electronic equipment
Tarau A hiking trip through the orders of magnitude: deriving efficient generators for closed simply-typed lambda terms and normal forms
Medvedev Separable statistics in a polynomial scheme. I
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
CN109213809A (en) Data search method, information dissemination system, public sentiment management system, artificial intelligence system
CN109376281A (en) Bit bit sequence, data search method, search system, social network analysis system, public sentiment monitoring system
Ribeiro et al. Certified bit-coded regular expression parsing
Le et al. Involving cpus into multi-gpu deep learning
Pennings et al. Using cached functions and constructors for incremental attribute evaluation
Freund et al. Sequential P systems with unit rules and energy assigned to membranes
CN109213808A (en) Searching method, internet information library, the analysis of public opinion system based on search
Reynolds Lectures on reasoning about shared mutable data structure
CN110968690B (en) Clustering division method and device for words, equipment and storage medium
Sangiorgi Locality and true-concurrency in calculi for mobile processes
Kullmann Heuristics for SAT algorithms: Searching for some foundations
CN109117142A (en) A kind of fundamental type reconstructing method based on variable association tree
Zhao et al. Development of a driver duty estimator

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20190115