Giter Club home page Giter Club logo

cnsipo's Introduction

cnsipo

INTRODUCTION

cnsipo fetches data from SIPO of China.

USAGE

Please take the following steps(step 1-5 are essential, others are optional):

  1. get all patent ids for each year(1985-2014) of each kind (kind: 1-发明公布 2-发明授权 3-实用新型 4-外观设计)

     python cnsipo/patent_list.py -k{kind} {year} -i {input_dir} -o {output_dir}
    

    output:

     {input_dir}/{kind}-{year}.html (cached for later use)
     {output_dir}/{year}/{page_index}
    
  2. merge id files(result of step 1) for each year

     bin/merge.sh output_dir path_to_year_dir/{year}
    

    output:

     {output_dir}/{year}
    
  3. fetch patents' details from the id files(result of step 2) of each kind (detail_kind: 1-详细信息 2-事务数据)

     python cnsipo/patent_detail.py -k{kind} -K{detail_kind} {year} -i {input_dir} -o {output_dir}
    

    output:

     {output_dir}/{year}
    
  4. create a table on a (Postgres) database(d: detail, t: transaction)

     bin/initdb.sh -d{database} -u{db_user} -t{db_table} d|t
    

    output:

     a table in database
    
  5. import data into database

     python cnsipo/patent_db.py -d{database} -u{db_user} -p{password} -t{db_table} -i {input_dir} -K{detail_kind} {year}
    

    output:

     data in database
    
  6. create an auxiliary table on a (Postgres) database

     bin/initdb.sh -d{database} -u{db_user} -t{db_table} a
    

    output:

     a table in database
    
  7. collect auxiliary data into database

     python cnsipo/patent_aux_db.py -d{database} -u{db_user} -p{password} -t{patent_table} -a{aux_table} {year}
    

    output:

     data in database
    
  8. create a UIG(university/industry/government) table on a (Postgres) database

     bin/initdb.sh -d{database} -u{db_user} -t{db_table} u
    

    output:

     a table in database
    
  9. collect UIG data into database

     python cnsipo/patent_uig_db.py -d{database} -u{db_user} -p{password} -i{uig_table} -t{patent_table} -a{aux_table} {year}
    

    output:

     data in database
    
  10. print UIG nodes for each year

    python cnsipo/patent_report.py -d{database} -u{db_user} -p{password} -i{uig_table} -a{aux_table} {year} -o {output_dir}
    

    output:

    {output_dir}/node{year}
    

REFERENCE

  1. **专利公布公告

  2. INTERNATIONAL PATENT CLASSIFICATION

  3. High-tech patents

  4. C:\Program Files\Tencent\QQ\I18N\2052\LocList.xml

LICENSE

Copyright 2014-2015 Hui Zheng

Released under the MIT License.

cnsipo's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.