CN105117456A - Method for extracting entity information - Google Patents
Method for extracting entity information Download PDFInfo
- Publication number
- CN105117456A CN105117456A CN201510512376.5A CN201510512376A CN105117456A CN 105117456 A CN105117456 A CN 105117456A CN 201510512376 A CN201510512376 A CN 201510512376A CN 105117456 A CN105117456 A CN 105117456A
- Authority
- CN
- China
- Prior art keywords
- information
- entity
- satellite
- main
- entity information
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/951—Indexing; Web crawling techniques
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The invention discloses a method for extracting entity information. The entity information is divided into main information and multiple pieces of subsidiary information, and the information is subjected to step-by-step extraction. The method for extracting the main information comprises the following steps: 1) compiling one or a plurality of main information query programs; and 2) calling one main information query program to obtain one piece of main information. After the main information of the entity information is extracted, subsidiary information extraction is carried out. The method for extracting the subsidiary information comprises the following steps: 1) compiling one or a plurality of subsidiary information query programs; 2) calling one subsidiary information query program, taking the entity information returned from the step for extracting the main information as the input of the step, and obtaining one piece of corresponding subsidiary information according to an entity ID (Identity) by each subsidiary information query program; and 3) taking the returned entity information as the input of the step, successively calling a plurality of other required subsidiary information query programs one by one, and returning the entity information until the subsidiary information query programs successively finishes being executed, wherein the entity information not only comprises the main information but also contains a plurality of pieces of corresponding subsidiary information.
Description
Technical field
The invention belongs to program design and coding field, be specifically related to a kind of method extracting entity information.
Background technology
For the entity information of complexity, commodity in such as e-commerce website or order, be made up of main information and satellite information, containing field---the entity ID of entity information exclusive number in main information, main information and satellite information are stored in different database tables, like this along with the satellite information of entity information gets more and more, the database table stored involved by these satellite informations gets more and more.And in different extraction entity information scenes, often need from database, extract one or more different satellite information, traditional method is the different database table correlation inquiry program of different scene composition, opens in database table, then have at most if satellite information is stored in n respectively
individual use scenes, that is needs to write
individual database table correlation inquiry program.The method not only needs the polling routine of writing more, and these programs do not have reusability.
Summary of the invention
In order to write the quantity of polling routine when reducing and extract entity information, improve the efficiency extracted entity information and extract, the present invention devises a kind of method extracting entity information.
Technical scheme is as follows in detail:
Extract a method for entity information, entity information is divided into main information and multiple satellite information, step by step arithmetic information, comprise main information extracting method and satellite information extracting method;
Main information extracting method, comprises the following steps:
Step one, write one or more main information inquiry program;
Step 2, call a main information inquiry program, obtain a main information, by main information assignment to the main information variable of entity information, return entity information; Now entity information only comprises main information, containing entity information exclusive number field---entity ID in main information;
After extracting the main information of entity information, carry out satellite information extraction, satellite information extracting method, comprises the following steps:
Step one, write one or more satellite information polling routine;
Step 2, call a satellite information polling routine, the array of the entity information returned in main information extracting method or list are as the input of this step, satellite information polling routine obtains a corresponding satellite information according to entity ID, by satellite information assignment to the satellite information variable of correspondent entity information, return entity information; Now entity information had both comprised main information, comprised again a corresponding satellite information;
The entity information returned in step 3, step 2 is as the input of this step, call other required satellite information polling routines more successively singly, call each time satellite information polling routine complete after return the input being re-used as and calling satellite information polling routine next time, until satellite information polling routine is finished successively, return entity information; Now entity information had both comprised main information, comprised again many corresponding satellite informations.
Beneficial effect of the present invention, its remarkable advantage is:
(1) entity information is divided into main information and many satellite informations, write main information inquiry program and satellite information polling routine respectively pointedly again, can main information and multiple satellite information be stored in different database tables or other storage mediums respectively, expand the storage dirigibility of entity information.
(2) can according to no extraction entity information scene, main information inquiry program and multiple satellite information polling routine are called in combination, improve the reusability of polling routine.
(3) if satellite information is stored in different database tables respectively, call satellite information polling routine singly successively, avoid, to multiple correlation inquiries of database table, reducing the mean search frequency to database table.
Accompanying drawing explanation
Fig. 1 is embodiment of the present invention entity information storage node composition.
Fig. 2 is embodiment of the present invention polling routine structural representation.
Fig. 3 is embodiment of the present invention sequential chart.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearly, describe the present invention below in conjunction with the drawings and specific embodiments.
As shown in Figure 1, be embodiment of the present invention entity information storage node composition.Entity information is made up of main information and many satellite informations, and containing field---the entity ID of entity information exclusive number in main information, main information and satellite information are stored in different storage mediums.The present embodiment supposes that main information is deposited hereof, satellite information 1 leaves in database table a, and satellite information 2 leaves in database table b, satellite information ... leave file in ... in, satellite information M leaves in file or database table, and satellite information N leaves in file N.
As shown in Figure 2, be embodiment of the present invention polling routine structural representation.Main information inquiry program has one or more, and its effect is the main message part inquiring entity information, and by its assignment to the main information variable of entity information.Satellite information polling routine has one or more, and its effect is the satellite information part inquiring entity information, and by its assignment to the satellite information variable of entity information.
The main information of the commodity in typical e-commerce website or order: entity ID, title, price, model, generic-document form stores, and also can be stored in database; Satellite information is as description, color, life-span, certification, picture, correlated performance or compare; The each table being stored in database with array or list can be adopted.
As shown in Figure 3, be embodiment of the present invention sequential chart.Entity information scene is extracted, the main information inquiry program of Selection and call one and one or more satellite information polling routine according to concrete.The present embodiment hypothesis need extract a main information and M bar satellite information.Concrete steps are as follows:
Step 301: call the main information inquiry program 1 write, the initial conditions of main information inquiry program is one or more query argument, obtains a main information thus, by main information assignment to the main information variable of entity information, returns entity information; Now entity information only comprises main information, containing entity information exclusive number field---entity ID in main information;
Step 302: call the satellite information polling routine 1 write, the initial conditions of satellite information polling routine is the entity information that step 301 returns, according to entity ID, to corresponding satellite information database table, (the present embodiment is that database table a) obtains a corresponding satellite information to satellite information polling routine 1, by satellite information assignment to the satellite information variable of correspondent entity information, return entity information; Now entity information had both comprised main information, comprised again a corresponding satellite information (the present embodiment is satellite information 1);
Step 303: call the satellite information polling routine 2 write again, the initial conditions of satellite information polling routine is the entity information that step 302 returns, satellite information polling routine 2 obtains a corresponding satellite information according to entity ID to corresponding satellite information database table (the present embodiment is database table b), by satellite information assignment to the satellite information variable of correspondent entity information, return entity information; Now entity information had both comprised main information, comprised again two corresponding satellite informations (the present embodiment is satellite information 1 and satellite information 2);
Step 30 ...: call the satellite information polling routine write again ... the initial conditions of satellite information polling routine is step 30 ...-1 entity information returned, satellite information polling routine ... according to entity ID, to corresponding satellite information file, (the present embodiment is file ...) obtain a corresponding satellite information, by satellite information assignment to the satellite information variable of correspondent entity information, return entity information; Now entity information had both comprised main information, comprised again ... (the present embodiment is that satellite information 1 is to satellite information to the satellite information that bar is corresponding ...);
Step 30M: call the satellite information polling routine M (M≤N) write again, the initial conditions of satellite information polling routine is the entity information that step 30M-1 returns, satellite information polling routine M obtains a corresponding satellite information according to entity ID to corresponding satellite information storage medium (the present embodiment is file or database table), by satellite information assignment to the satellite information variable of correspondent entity information, return entity information; Now entity information had both comprised main information, comprised again satellite information corresponding to M bar (the present embodiment is that satellite information 1 is to satellite information M); Now, extract entity information to complete.
The foregoing is only the embodiment of patent of the present invention, not in order to limit patent of the present invention, any amendment made within all spirit in patent of the present invention and principle, equivalently to replace and improvement etc., all with within the protection domain being included in patent of the present invention.
Claims (4)
1. extract a method for entity information, entity information is divided into main information and multiple satellite information, it is characterized in that step by step arithmetic information, comprise main information extracting method and satellite information extracting method;
Main information extracting method, is characterized in that comprising the following steps:
Step one, write one or more main information inquiry program;
Step 2, call a main information inquiry program, obtain a main information, by main information assignment to the main information variable of entity information, return entity information; Now entity information only comprises main information, containing entity information exclusive number field---entity ID in main information;
After extracting the main information of entity information, carry out satellite information extraction, satellite information extracting method, it is characterized in that comprising the following steps:
Step one, write one or more satellite information polling routine;
Step 2, call a satellite information polling routine, the array of the entity information returned in main information extracting method or list are as the input of this step, satellite information polling routine obtains a corresponding satellite information according to entity ID, by satellite information assignment to the satellite information variable of correspondent entity information, return entity information; Now entity information had both comprised main information, comprised again a corresponding satellite information;
The entity information returned in step 3, step 2 is as the input of this step, call other required multiple satellite information polling routines more successively singly, call each time satellite information polling routine complete after return the input being re-used as and calling satellite information polling routine next time, until satellite information polling routine is finished successively, return entity information; Now entity information had both comprised main information, comprised again many corresponding satellite informations.
2. extract the method for entity information according to claim 1, it is characterized in that main information and many satellite informations to be stored in different database tables or other storage mediums respectively, expand the storage dirigibility of entity information.
3. extract the method for entity information according to claim 1, it is characterized in that can according to no extraction entity information scene, and main information inquiry program and multiple satellite information polling routine are called in combination, improve the reusability of polling routine.
4. extract the method for entity information according to claim 1, if it is characterized in that, satellite information is stored in different database tables respectively, call satellite information polling routine singly successively, avoid, to multiple correlation inquiries of database table, reducing the mean search frequency to database table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510512376.5A CN105117456A (en) | 2015-08-19 | 2015-08-19 | Method for extracting entity information |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510512376.5A CN105117456A (en) | 2015-08-19 | 2015-08-19 | Method for extracting entity information |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105117456A true CN105117456A (en) | 2015-12-02 |
Family
ID=54665446
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510512376.5A Pending CN105117456A (en) | 2015-08-19 | 2015-08-19 | Method for extracting entity information |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105117456A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107784091A (en) * | 2017-10-12 | 2018-03-09 | 中国平安财产保险股份有限公司 | A kind of operating right querying method and terminal device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1374606A (en) * | 2001-03-06 | 2002-10-16 | 时睿软件公司 | Method and system for obtaining & integrating data from data bank via computer network |
EP1482418A1 (en) * | 2003-05-28 | 2004-12-01 | Sap Ag | A data processing method and system |
CN101382957A (en) * | 2008-10-24 | 2009-03-11 | 用友软件股份有限公司 | System for establishing enquiry model and establishing method |
CN103778239A (en) * | 2014-01-28 | 2014-05-07 | 北京京东尚科信息技术有限公司 | Multi-database data management method and system |
-
2015
- 2015-08-19 CN CN201510512376.5A patent/CN105117456A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1374606A (en) * | 2001-03-06 | 2002-10-16 | 时睿软件公司 | Method and system for obtaining & integrating data from data bank via computer network |
EP1482418A1 (en) * | 2003-05-28 | 2004-12-01 | Sap Ag | A data processing method and system |
CN101382957A (en) * | 2008-10-24 | 2009-03-11 | 用友软件股份有限公司 | System for establishing enquiry model and establishing method |
CN103778239A (en) * | 2014-01-28 | 2014-05-07 | 北京京东尚科信息技术有限公司 | Multi-database data management method and system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107784091A (en) * | 2017-10-12 | 2018-03-09 | 中国平安财产保险股份有限公司 | A kind of operating right querying method and terminal device |
CN107784091B (en) * | 2017-10-12 | 2020-05-29 | 中国平安财产保险股份有限公司 | Operation authority query method and terminal device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101739453B (en) | Method and device for carrying out condition query on database table | |
CN102456058B (en) | Method and device for providing category information | |
CN107515882B (en) | Data query method and device | |
CN106528787B (en) | query method and device based on multidimensional analysis of mass data | |
CN110674154B (en) | Spark-based method for inserting, updating and deleting data in Hive | |
CN103150397B (en) | A kind of data directory creation method, data retrieval method and system | |
CN102298650B (en) | Distributed recommendation method of massive digital information | |
CN104394118A (en) | User identity identification method and system | |
CN105512229B (en) | A kind of storage, querying method and the device of the regional information of IP address | |
CN101446962A (en) | Data conversion method, device thereof and data processing system | |
CN101388042B (en) | Method and device for establishing file characteristic library index | |
CN102722566A (en) | Method for inquiring potential friends in social network | |
CN107832440B (en) | Data mining method, device, server and computer readable storage medium | |
CN103164424A (en) | Method and device for acquiring time-efficient words | |
CN102609500A (en) | Question push method, question answering system using same and search engine | |
CN108334494B (en) | Method and device for constructing user relationship network | |
CN102081649A (en) | Method and system for searching computer files | |
CN110727702A (en) | Data query method, device, terminal and computer readable storage medium | |
Ozawa et al. | Will the World Bank's vision materialize? Relocating China's factories to sub-Saharan Africa, flying-geese style | |
CN108304404B (en) | Data frequency estimation method based on improved Sketch structure | |
CN104346347A (en) | Data storage method, device, server and system | |
CN104765767A (en) | Knowledge storage algorithm for intelligent learning | |
CN104765868A (en) | Page display method for data query | |
CN113763034B (en) | Advertisement data processing method and device | |
CN105117456A (en) | Method for extracting entity information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20151202 |
|
RJ01 | Rejection of invention patent application after publication |