# 基于Node.js的医药搜索平台网站设计与实现
# 摘 要
随着科技的快速发展, 越来越多的医药公司积攒了大量的医药文档。这些文档资源如何高效、快速的被管理员管理,以及被用户检索,如何统一的实现资源管理与资源开放,成为了当下医药公司待解决的问题。
普通的、零散的、单一的文档管理方式已经不能满足企业的要求,企业需要的是综合、协同、集成化的文档搜索解决方案。构建基于Node.js的医药搜索平台,实现对文档的添加、删除、编辑等常见的操作,以及对大规模数据的快速检索匹配,用户对文档的查看权限等功能。为了解决如上问题,需要使用文档管理系统来对文档进行管理,如果文档是面向用户的还需要添加用户管理系统,权限系统等相应的辅助系统。
建立文档管理系统的目的就是要实现对文档的集中存储和管理,从而可以很好地保证文档的存储安全,提高文档的安全访问级别,很好地实现文档的分发、查询、共享,提高企业的文档管理和使用效率。在Internet环境下,我们设计的新型文档管理系统的体系结构采用B/S结构。本地用户可以通过企业内部网络直接进入文档管理系统,当然也可以进入企业的其他的业务系统。移动办公用户以及企业的客户可以通过门户站点访问到本系统,分支机构以及企业的合作伙伴可以通过Web服务方式建立与系统的连接。
本文最终实现一个基于Node.js的医药文档搜索平台,其中包括用户管理模块、文档管理模块、系统设置模块等多个子模块。并利用Sphinx和MYSQL实现了具有分词功能的多语言文档搜索引擎。前端利用Angular实现了Single Page Application。本系统现在已经在阿里云服务器上部署应用,并上线。
**关键词:**Node.js,Sphinx,Angular.js,ORM
# ABSTRACT
With the rapid development of technology, more and more pharmaceutical companies accumulate a large number of medical documents. These documents how resource efficient, rapid management by an administrator, and retrieved by the user, how to achieve a unified resource management and resource opened as the current problems to be solved pharmaceutical companies.
Ordinary,fragmented, single document management methods can not meet the requirements of enterprises, enterprises need a comprehensive, coordinated, integrated document search solutions. Construction Node.js based medical search platform, to add to the document, delete, edit and other common operations, and rapid retrieval of large-scale data matching the user permission to view the document on Zen and other functions. In order to solve the above problem, we need to use document management system to manage the document, if the document is a user-oriented management systems also need to add a user, system privileges and other appropriate assistance systems.
The purpose of establishing the document management system is to achieve the centralized document storage and management, which can ensure the safe storage of documents, improve security access level of the document, to achieve a good distribution of the document, query, share, and improving document management and efficiency. In the Internet environment, the architecture we designed a new document management system using B / S structure. Local users can go directly through the corporate intranet document management system, of course, can also enter other business systems business. Mobile office users and corporate customers can access the system through the portal, branch offices and business partner scan establish a connection with the system through a Web service.
In this paper, the ultimate realization of a medical document search based Node.js platform,including user management module, document management module, system settings module multiple sub-modules. And using Sphinx and have realized the word MYSQL function multi-language document search engine. Angular use front-end to achieve a Single Page Application. The system is now deployed on the application server Ali cloud and on-line.
**Key words:** Node.js, Sphinx, Angular.js, ORM
# 1 绪论
## 1.1 课题来源及研究背景
本课题源于实际生产,目的是为西安泰科迈医药科技开发医药文档管理系统来优化现有的文档管理系统。
原有的文档管理方式为手工编辑Excel,利用目录来对文档进行分类和查询。当需要修改一个文档的时候,需根据目录结构进行检索,逐目录的查找文档,然后编辑后保存。
但这样的查询有一定的局限性,如只能根据文件的名称进行字典排序,或者根据文档的关键词来进行分类。
无论哪种的方法都不适合大量的文档管理,如当文档的名称被修改后,需要根据名称进行重新的排序,或者一个文档的关键词被修改后,需要根据新的关键词来重新分类,或者当一个文档有多个关键词的时候,分类方式变的极其复杂。
基于上述的缺点和不足,我们将实现一个医药文档搜索和管理平台。利用程序来实现常见的文档操作,比如文档的上传、下载、修改、搜索、查看等,因为文档是面向用户的,用户分为游客、普通用户、管理员,每个用户对文档都有不同的操作权限,所以我们还需要实现角色权限系统。
## 1.2 技术栈的选择
系统需要分别实现前端和后端。
在后端框架上,我们有很多选择,比如PHP下的Yii、ThinkPhP等框架都很流行,Java下也有 Spring、Play 等框架,还有近两年比较火的Node.js。在本系统中我选择了使用Node.js来搭建后端系统,具体有如下原因。
- 由于常见的操作,均为I/O 型操作,所以使用异步非阻塞I/O模型和事件编程可以提高系统的吞吐量。相比于PHP或者Java,Node.js天生就支持异步非阻塞I/O模型和事件编程。所以这里Node.js 更加合适。
- 本系统将运行在单核服务器上,考虑到系统的资源有限,由于Node.js为单线程的,所以很适合在单核CUP上跑,相比于PHP或者Java, Node.js由于不需要频繁的线程切换,加上内置的Event Loop机制[1],所以Node.js在此环境下更加快。
- 考虑到是一个人开发前后端,使用JS全栈开发效率更高。
前端的开发上,我选择使用Angular.js 来进行SAP开发,由于我们开发的是医药文档搜素和管理平台,并不需要支持搜素引擎友好,并且前端逻辑页面逻辑比较复杂,所以选择Angular.js来进行单页面Webapp 开发。
总上所述我最终选择了使用Mean栈来进行开发,Mean栈包括MySQL、Express、Angular.js 、Node.js。
## 1.3 论文主要工作内容
为了实现本系统,我们首先的从实现数据层开始,提供良好的数据层接口,可以保证我们后期实现Model层时更加的快速和稳定。
接下来我们要基于数据层实现用户管理模块和角色权限模块的接口,因为网站是面向用户的,所以基本上所有功能都依赖于用户。将用户模块和角色权限模块放在第二步实现,会保证我们后期的其他模块实现起来更加方便。
然后我们就可以建立文档模块,文档模块主要有文档的上传,修改,删除,搜索等功能。在第四章中,我们会详细介绍到如何将原始数据Excel解析并存储到MySQL中,以及如何从MySQL中将数据还原到Excel中。还有文档项权限的设置等技术。
文档的搜索,我是基于Sphinx进行开发的,所以在第五章我会详细的讲解如何配置和使用Sphinx来提供多语言全文搜索功能。
当我们将后端服务器全部构建完毕后,我们便可以编写前端代码。前端我是基于Angular.js 构建的SPA 应用。我会在第6章
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
8360322823737603.zip (3个子文件)
drug-search-application
src
MedicalSite
毕业论文.doc 1.22MB
LICENSE 1KB
README.md 45KB
共 3 条
- 1
资源评论
工具盒子
- 粉丝: 58
- 资源: 1313
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功