Movatterモバイル変換


[0]ホーム

URL:


CN107862098A - A kind of affiliated partner search method based on full-text search - Google Patents

A kind of affiliated partner search method based on full-text search
Download PDF

Info

Publication number
CN107862098A
CN107862098ACN201711393410.7ACN201711393410ACN107862098ACN 107862098 ACN107862098 ACN 107862098ACN 201711393410 ACN201711393410 ACN 201711393410ACN 107862098 ACN107862098 ACN 107862098A
Authority
CN
China
Prior art keywords
search
full
model
text
incidence relation
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.)
Pending
Application number
CN201711393410.7A
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.)
CHINACCS INFORMATION INDUSTRY Co Ltd
Original Assignee
CHINACCS INFORMATION INDUSTRY Co Ltd
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 CHINACCS INFORMATION INDUSTRY Co LtdfiledCriticalCHINACCS INFORMATION INDUSTRY Co Ltd
Priority to CN201711393410.7ApriorityCriticalpatent/CN107862098A/en
Publication of CN107862098ApublicationCriticalpatent/CN107862098A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The invention discloses a kind of affiliated partner search method based on full-text search, it is related to field of metallurgical equipment, technical scheme S1, establishes the object data model of different classes of object;S2, using Map and Reduce methods, establish the relational data model of incidence relation between object;S3, the full-text search that incidence relation database is established according to S2 result index;S4, the search key provided according to user, incidence relation database index is searched for, extract all affiliated partners in relational model, and return to user.The beneficial effects of the invention are as follows:Depth excavates other object informations associated with important object, is the powerful of management of enhancing public security.Big data analytical technology is used in a creative way in public safety field, compared with general search engine technique, the search result using object as base unit can more accurately be obtained, the criminal investigation that is particularly suitable for use in, the clue solved a case etc. between object is the application scenarios being oriented to.

Description

A kind of affiliated partner search method based on full-text search
Technical field
The present invention relates to public safety technical field, more particularly to a kind of affiliated partner retrieval side based on full-text searchMethod.
Background technology
In the epoch that Internet technology is maked rapid progress, all things on earth interconnects, data turn into the main carriers that information is propagated, by variousEquipment, service, converging information caused by platform are into the ocean of data, and how therefrom quick-searching obtains maximally related informationThe development of universal search engine technology is expedited the emergence of.Prior art includes following process:Establish information database and its associatedIndex data base, full-text search, keyword retrieval and systematic searching etc. are carried out to the search term of user's input, by the degree of correlation from heightSearch result is presented to low order.Prior art preferably solves the demand of universal search, but for some it is special shouldThere is strong relational network with scene, such as searched object, or there is an urgent need to obtain having certain special with searched object by userDuring other objects of contact, universal search engine is felt inadequate.
Public safety field is exactly one of such special applications scene, related to important object (people, car, thing, case etc.)Other objects of connection are that people most it is expected to obtain while and are difficult to by existing search technique.
The content of the invention
In order to realize foregoing invention purpose, for important object be associated other object search difficulties the problem of, this hairA kind of bright affiliated partner search method based on full-text search of offer, including,
S1, establish the object data model of different classes of object;
S2, using Map and Reduce methods, establish the relational data model of incidence relation between object;
S3, the full-text search that incidence relation database is established according to S2 result index;
S4, the search key provided according to user, incidence relation database index is searched for, the institute extracted in relational model is relevantJoin object, and return to user.
Preferably, by the object sequence number in objects association it is ID values in a manner of Map, and object is in itself in the S2Mapped, be then combined ID identical objects in a manner of Reduce, form correlation model, and travel through all possibilityObject relationship form.
Preferably, in the S3, carried out in full in incidence relation database index by using the search key of offerRetrieval, for the candidate result of matching, further obtain associated all objects.
Preferably, the object model of the S1 comprises at least people, car, space, case;
Wherein, people's object model comprises at least name, identification card number, native place attribute, and car object model comprises at least car plate, vehicleAttribute;Spatial object model comprises at least title, address properties;Case object model comprises at least personnel, criminal type attribute.
Preferably, the object relationship that the data model of incidence relation comprises at least between object in the S2 is:Subordinate, familyFront yard, rent, go together;According to the object relationship between each object model of the S1;Established pair by Map and Reduce modesRelational model as between, the ID values and object of object relationship are mapped in itself in the Map stages, will be closed in the Reduce stagesIt is that ID identical objects are combined, forms correlation model;All possibility object relationship forms are traveled through, to include all objectsRelation.
Preferably, the step of S4 is the keyword used when user is searched for and the full text rope established in the S3Row matching search is introduced, according to the order of matching degree from high to low, obtains initial search result;Then each search is tiedFruit, its relational model stored in the S3 is obtained respectively, all objects included in relational model are extracted, as finalSearch result returns to user.
The beneficial effect that technical scheme provided in an embodiment of the present invention is brought is:Depth is excavated associated with important objectOther object informations, be the powerful of management of enhancing public security.Big data is used in a creative way in public safety fieldAnalytical technology, compared with general search engine technique, the search result using object as base unit can be more accurately obtained,Criminal investigation, the clue solved a case etc. between object be particularly suitable for use in as the application scenarios being oriented to., can be straight centered on searched objectConnect to obtain the information of each related object, for further analysis cutback in demand search complexity.
Brief description of the drawings
Fig. 1 is the flow chart of the embodiment of the present invention.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and ExamplesThe present invention is further elaborated.Certainly, specific embodiment described herein is not used to only to explain the present inventionLimit the present invention.
Embodiment 1
The present invention provides a kind of affiliated partner search method based on full-text search, including,
S1, establish the object data model of different classes of object;
S2, using Map and Reduce methods, establish the relational data model of incidence relation between object;
S3, the full-text search that incidence relation database is established according to S2 result index;
S4, the search key provided according to user, incidence relation database index is searched for, the institute extracted in relational model is relevantJoin object, and return to user.
In S2, the ID values in objects association and object are mapped in itself in a manner of Map, then with Reduce sideID identical objects are combined by formula, form correlation model, and travel through all possibility object relationship forms.
In S3, the search key provided by user carries out full-text search in incidence relation database index, forThe candidate result of matching, further obtain associated all objects.
S1 object model comprises at least people, car, space, case;
Wherein, people's object model comprises at least name, identification card number, native place attribute, and car object model comprises at least car plate, vehicleAttribute;Spatial object model comprises at least title, address properties;Case object model comprises at least personnel, criminal type attribute.
The object relationship that the data model of incidence relation comprises at least between object in S2 is:Subordinate, family, rent, togetherOK;According to the object relationship between S1 each object model;The relation mould established by Map and Reduce modes between objectType, the ID values and object of object relationship are mapped in itself in the Map stages, in the Reduce stages by relations I D identical objectsIt is combined, forms correlation model;All possibility object relationship forms are traveled through, to include all object relationships.
The step of S4 is that the full-text index established in the keyword and S3 used when user is searched for carries out matching search,According to the order of matching degree from high to low, initial search result is obtained;Then to each search result, obtain respectively itsThe relational model stored in S3, all objects included in relational model are extracted, user is returned to as final search result.
Referring to Fig. 1, the present invention provides a kind of affiliated partner search method based on full-text search.The operating procedure of the present inventionIt is as follows:
Step 1, establish a variety of object models.Common object type someone, car, space, case etc., typical people's object modelForm is as follows:
NameIDHeight
Li Si18 identification card numbers170
Typical car object model form is as follows:
Car ownerCar owner IDCar plateColor
Li Si18 identification card numbersX XXXXIn vain
Typical spatial object model form is as follows:
Lodging personIDHotel titleAddress
Li Si18 identification card numbersXXXXBeijing XXX
Typical case object model form is as follows:
NameIDCriminal typeTool used in crime
Li Si18 identification card numbersTheftWaddy
Model above is stored into database.
Step 2, the relational model established between object.By taking subordinate relation as an example, typical Object Relational Model form is such asUnder:
IDNameCar plate
18 identification card numbersLi SiX XXXX
The typical model is associated people's object model and car object model by identical ID values.
Step 3, the full-text search index for establishing Object Relational Model.The Object Relational Model obtained in step 2 is storedEnter database, and establish and be indexed for full-text search.
Step 4, search procedure.By taking search key " Li Si " as an example, illustrate specific search procedure.First from step 3" Li Si " is searched in the index database of foundation, " ID " and " car plate " of correlation is obtained, by incidence relation, further obtains people's modelAs a result with vehicle model result, and user is returned to as the search result of " Li Si ".
Above procedure can use following codes to realize:
public void map(ImmutableBytesWritable key, Result result, Contextcontext) throws IOException, InterruptedException {
TableSplit sp = ((TableSplit)context.getInputSplit());
String table = Bytes.toString(sp.getTable().getName());
try {
BaseModel bean=(BaseModel) database Util.resultToBean(result, table);
MergeUtil.json2str(bean);
if(bean instanceof Person){
Person entity = (Person)bean;
write(context, bean, entity.getCardNo());
}else if(bean instanceof Vehicle){
Vehicle entity = (Vehicle)bean;
write(context, bean, entity.getPaperNumber());
}else if(bean instanceof AlarmList){
AlarmList entity = (AlarmList)bean;
write(context, bean, entity.getId());
}else if(bean instanceof Mrza){
Mrza entity = (Mrza)bean;
write(context, bean, entity.getId());
}else if(bean instanceof Case){
Case entity = (Case)bean;
if(StringUtils.isNotBlank(entity.getCardNos())){
String[] cardNos = entity.getCardNos().split(",");
for (String cardNo : cardNos) {
write(context, bean, cardNo);
}
}else{
write(context, bean, entity.getId());
}
}else if(bean instanceof PawnshopRecord){
PawnshopRecord entity = (PawnshopRecord)bean;
write(context, bean, entity.getCardNo());
}
Catch (Cdc databases Exception | CdCommonException |IllegalArgumentException | IllegalAccessException e) {
logger.error(e,e);
throw new IOException(e);
}
}
private void write(Context context, BaseModel bean, String rowkey)throws IOException, InterruptedException, CdCommonException {
if(StringUtils.isNotBlank(rowkey)){
context.write(new Text(String.valueOf(rowkey)), new Text(SeralizeFactory.original().serializa(bean)));;}}
protected void reduce(Text key, Iterable<Text> values, Context context)throws IOException, InterruptedException {
List<SolrAIOAttr> personList = new ArrayList<SolrAIOAttr>();
List<SolrAIOAttr> caseList = new ArrayList<SolrAIOAttr>();
List<SolrAIOAttr> vehicleList = new ArrayList<SolrAIOAttr>();
List<SolrAIOAttr> alarmLists = new ArrayList<SolrAIOAttr>();
List<SolrAIOAttr> mrzaLists = new ArrayList<SolrAIOAttr>();
List<SolrAIOAttr> pawnshops = new ArrayList<SolrAIOAttr>();
int size = 0;
try {
String date = null;
for (Text text : values) {
size++;
if(size>10){
return;
}
PhoenixBaseBean bean = (PhoenixBaseBean)SeralizeFactory.original().unSerializa(text.getBytes());
if(bean instanceof Person){
SolrAIOAttr aio = new SolrAIOAttr(JsonUtil.bean2json(bean), null);;
personList.add(aio);
}else if(bean instanceof Case){
Case cases = (Case)bean;
SolrAIOAttr aio = new SolrAIOAttr(JsonUtil.bean2json(bean), cases.getAlarmTime());
caseList.add(aio);
date = updateDate(date, cases.getAlarmTime());
}else if(bean instanceof Vehicle){
Vehicle vehicle = (Vehicle)bean;
String title = vehicle.getVehicleNum();
if(StringUtils.isBlank(title)){
vehicle.getCardNum();
}
SolrAIOAttr aio = new SolrAIOAttr(JsonUtil.bean2json(bean), vehicle.getRegisterDate());
vehicleList.add(aio);
date = updateDate(date, vehicle.getRegisterDate());
}else if(bean instanceof AlarmList){
AlarmList alarmList = (AlarmList)bean;
if(alarmList.getAlarmNumber()!=null && !alarmList.getAlarmNumber().trim().equals("") && alarmList.getAlarmDescribe()!=null && !alarmList.getAlarmDescribe().trim().equals("")){
SolrAIOAttr aio = new SolrAIOAttr(JsonUtil.bean2json(bean), alarmList.getCallTime());
alarmLists.add(aio);
date = updateDate(date,alarmList.getCallTime());
}
}else if(bean instanceof Mrza){
Mrza mrza = (Mrza)bean;
SolrAIOAttr aio = new SolrAIOAttr(JsonUtil.bean2json(bean), mrza.getTitle());
mrzaLists.add(aio);
date = updateDate(date, mrza.getTitle());
}else if(bean instanceof PawnshopRecord){
PawnshopRecord pawnshop= (PawnshopRecord)bean;
SolrAIOAttr aio = new SolrAIOAttr(JsonUtil.bean2json(bean), pawnshop.getDate());
pawnshops.add(aio);
date = updateDate(date, pawnshop.getDate());
}
}
Collections.sort(vehicleList);
Collections.sort(caseList);
Collections.sort(pawnshops);
logger.info("key:"+key.toString());
SolrAIO bean = new SolrAIO(key.toString());
bean.setPerson(JSONArray.fromObject(personList).toString());
bean.setVehicles(JSONArray.fromObject(vehicleList).toString());
bean.setCases(JSONArray.fromObject(caseList).toString());
bean.setAlarmList(JSONArray.fromObject(alarmLists).toString());
bean.setMrzas("");
bean.setPawnshop(JSONArray.fromObject(pawnshops).toString());
bean.setDateTime(date);
context.write(null, new Text(bean.toCSV()));
} catch (CdCommonException e) {
logger.error(e, e);
} catch (Exception e) {
logger.error(e, e);
throw new IOException(e);
}
}
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the invention, it is all in the spirit and principles in the present inventionWithin, any modification, equivalent substitution and improvements made etc., it should be included in the scope of the protection.

Claims (6)

CN201711393410.7A2017-12-212017-12-21A kind of affiliated partner search method based on full-text searchPendingCN107862098A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201711393410.7ACN107862098A (en)2017-12-212017-12-21A kind of affiliated partner search method based on full-text search

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201711393410.7ACN107862098A (en)2017-12-212017-12-21A kind of affiliated partner search method based on full-text search

Publications (1)

Publication NumberPublication Date
CN107862098Atrue CN107862098A (en)2018-03-30

Family

ID=61706798

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201711393410.7APendingCN107862098A (en)2017-12-212017-12-21A kind of affiliated partner search method based on full-text search

Country Status (1)

CountryLink
CN (1)CN107862098A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108520079A (en)*2018-04-242018-09-11珠海市新德汇信息技术有限公司A kind of Migo search engines
CN113191145A (en)*2021-05-212021-07-30百度在线网络技术(北京)有限公司Keyword processing method and device, electronic equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101645092A (en)*2008-06-032010-02-10阿尔卡特朗讯Method for mapping an X500 data model onto a relational database
CN102663044A (en)*2012-03-282012-09-12福建榕基软件股份有限公司Method and device for creating search base and method and device for full-text search with authorities
CN102968501A (en)*2012-12-072013-03-13福建亿榕信息技术有限公司 A General Full-text Search Method
CN106777110A (en)*2016-12-152017-05-31武汉邮电科学研究院A kind of smart city big data integration system and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN101645092A (en)*2008-06-032010-02-10阿尔卡特朗讯Method for mapping an X500 data model onto a relational database
CN102663044A (en)*2012-03-282012-09-12福建榕基软件股份有限公司Method and device for creating search base and method and device for full-text search with authorities
CN102968501A (en)*2012-12-072013-03-13福建亿榕信息技术有限公司 A General Full-text Search Method
CN106777110A (en)*2016-12-152017-05-31武汉邮电科学研究院A kind of smart city big data integration system and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108520079A (en)*2018-04-242018-09-11珠海市新德汇信息技术有限公司A kind of Migo search engines
CN108520079B (en)*2018-04-242021-10-26珠海市新德汇信息技术有限公司Migo search engine
CN113191145A (en)*2021-05-212021-07-30百度在线网络技术(北京)有限公司Keyword processing method and device, electronic equipment and medium
CN113191145B (en)*2021-05-212023-08-11百度在线网络技术(北京)有限公司Keyword processing method and device, electronic equipment and medium

Similar Documents

PublicationPublication DateTitle
SrihariAutomatic indexing and content-based retrieval of captioned images
CN103368992B (en)Message push method and device
CN106227863A (en)Data mining method in case serial-parallel and suspect investigation
CN109189867A (en)Relationship discovery method, apparatus and storage medium based on Corporate Intellectual map
CN109446343A (en)A kind of method of public safety knowledge mapping building
CN105786800A (en)Police standard address acquiring method and system
CN110399448A (en) Chinese place name and address search and matching method, terminal, and computer-readable storage medium
CN110874326B (en)Test case generation method and device, computer equipment and storage medium
CN109376182A (en)The method for realizing affiliated company&#39;s identifying processing based on computer software
CN107862098A (en)A kind of affiliated partner search method based on full-text search
CN116662342B (en) A heterogeneous data fusion indexing method and system based on knowledge graph
CN119577098A (en) A knowledge graph search method and system based on local semantics and global community
CN111343419B (en)City security system based on social surface surveillance camera
CN108153661A (en)The method and apparatus of implementation of test cases
CN106779599A (en)A kind of data processing method and system for lost objects
CN110781213B (en)Multi-source mass data correlation searching method and system with personnel as center
CN109344212A (en)A kind of geographical big data of subject-oriented feature excavates the method and system of recommendation
CN112084293B (en)Data authentication system and data authentication method for public security field
CN119312811A (en) Method and system for constructing spatiotemporal derivation relationship network of place names based on semantics drive
CN119647571A (en) A natural resource map completion method based on large models
CN117808640A (en)Investigation system and method for constructing information analysis teaching based on information knowledge big model
CN116541887B (en)Data security protection method for big data platform
CN109388648B (en)Method for extracting personnel information and relation person from electronic record
CN107016052A (en)A kind of information intelligent processing method
CN110019237B (en)System and method for analyzing criminal whereabouts based on map

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20180330


[8]ページ先頭

©2009-2025 Movatter.jp