基于文字水印的谈判系统设计与实现-毕设论文.doc
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 基于 文字 水印 谈判 系统 设计 实现 论文
- 资源描述:
-
毕 业 论 文 学生姓名 学 号 学院 计算机科学与技术学院 专 业 软件工程 题 目 基于文字水印的谈判系统设计与实现 指导教师 (姓 名) (专业技术职称/学位) (姓 名) (专业技术职称/学位) 年 月 淮阴师范学院毕业论文(设计) 摘 要:随着社会节奏越来越快,各种信息化网络工具越来越多,例如:腾讯QQ。鉴于网络的流行,社会的生活节奏加快,人们的矛盾日益趋于突显,但限于地域和时间的紧迫,一些谈判和协商及相互沟通更加需要网络软件的支持。因此,网络谈判系统势在必行,本系统基于文字水印的谈判系统设计与实现,主要采用C/S模式开发,采用MVC三层架构:Model View Controller,是模型(model)-视图(view)-控制器(controller)。1.模型层:数据的存储主要使用的是SQL Server 2005,以数据库的形式存储数据,以便于数据的增删查改和后期维护。2.视图层:采用的是Java Swing技术来开发并以命名以UI结尾。3.控制器:用Java代码来实现,主要用于业务和数据处理的函数实现。采用MVC之后,可以使编程条理更加清晰,各个层之间相互独立并相互合作,有利于系统的健壮性和后期维护扩展。开发语言Java;开发工具为Myeclipse,数据库SQL Server 2005。主要的技术为:接口技术(Interface),多态技术,类的封装和继承以及重写和重载技术,并且使用文字水印来维护版权信息。 关键字:网络谈判,文字水印,聊天谈判,Java,C/S,SQL Server 2005 Abstract:Along with the social rhythm faster and faster, all kinds of information networking tools more and more, such as tencent QQ. Given the popularity of network, the social life rhythm speeding up, the contradictions of people increasingly tend to highlight, but limited by geographical and time urgent, some negotiation and consultation, and communicate with each other more need the support of network software. Network negotiation system is imperative, therefore, this system based on system design and implementation of text watermark in the negotiations, mainly USES the C/S Model development, USES the MVC three-tier architecture: the Model View Controller, is the Model (the Model) - View (View) Controller (the Controller). Layer: 1. The model of data storage is mainly used in SQL Server 2005 is, in the form of a database to store data, in order to add or delete of data check and later maintenance. 2. The view layer, using a Java Swing technique to develop and to name the end with the UI. 3. Controller: using Java code, mainly for the business and data processing function. After using MVC, programming method can be more clear, between each layer are independent of each other and mutual cooperation, is advantageous to the system robustness, and later maintenance extension. The Java development language; For Myeclipse development tools, database SQL Server 2005. Main technology is: Interface technology (Interface), polymorphism technology, encapsulation and inheritance of class and override and overloading technology,And use text watermark to maintain the copyright information. Keyword:Chat online negotiations, text watermark, negotiations, Java, C/S, SQL Server 2005 目 录 摘要 Abstract 1 前言..................................................4 1.1系统简介............................................4 1.2系统需求分析及目标..................................5 1.3业务流程分析........................................5 1.4功能需求分析........................................6 2 系统概念模型描述.....................................7 2.1用户信息实体E-R图.................................7 2.2部门信息实体E-R图.................................7 3 系统设计.............................................7 3.1系统数据库的物理结构设计和逻辑结构描述.............7 3.2系统数据库转化为关系数据模型.......................8 3.3数据库表的结构.....................................8 3.3.1表dbo_td_userinfo用于保存用户信息...............8 3.3.2表dbo_td_department用于保存部门信息.............8 4 系统运行平台........................................9 4.1系统运行环境.......................................9 4.2系统开发平台.......................................9 5 系统实现和核心模块的描述............................9 5.1登陆界面及代码实现.................................9 5.2 聊天界面及聊天接口代码...........................15 5.3数据库操作函数及代码实现..........................16 5.4文字水印代码实现..................................25 总结.................................................25 参考文献.............................................25 致谢.................................................25 1 前言 在当今信息化爆炸的时代,互联网的作用越来越大,将人们联系成一体,人们可以足不出户的进行信息的交流和共享。计算机的用应普及了各行各业,这就使得人们和计算机的联系愈来愈广泛而密切,网络交流可以是人们足不出户的解决问题,大大削弱了地域和时间的紧迫性,各种交流软件应运而生,网络谈判系统就是专门用来解决人际关系,使人们进行协商,交流,解决问题。本文下面将具体的介绍基于文字水印的谈判系统设计与实现。 1.1 系统简介 基于文字水印的谈判系统设计与实现,主要用于用户双方在聊天软件上实现互相沟通,协商,洽谈。由注册页面:用于用户的注册功能,使用户添加进入数据库SQL Server 2005,登录页面:用于检验登录账号是否合法,是否账号存在 ,主界面:用于显示好友及在线好友的通讯录,聊天界面:用于通信的双方互相聊天沟通,谈判等。采用MVC三层建构模式,m ----model模型层也是实体层,一般与数据库的一个表对应;v-----view,视图层,主要用Java Swing 实现;c------control,控制层,一般是把页面提交的信息进行处理,或者是与数据库建立的连接操作都放在这里。这样使各个层之间互不干扰,又相互合作,便于后期维护和扩展。最后采用文字水印的功能实现版权的维护功能,以防止盗用。基于文字水印的谈判系统设计与实现,主要采用的技术:接口技术,类的封装继承以及多态技术,重载和重写等。基于文字水印的谈判系统的设计与实现总体设计图如下: 1.2 系统需求分析及目标 a. 良好的界面管理及人际交互 b. 实现用户的注册,登录,退出 c. 实现系统对用户的增删改查 d. 方便迅速的信息传递和流通 e.实现超级管理员的功能 f.接口技术实现后期系统升级与维护 1.3 业务流程分析 业务流程图能更好的反映业务情况: 1.4 功能需求分析 2 系统概念模型描述 2.1用户信息实体E-R图 2.2部门信息实体E-R图 部门号 部门信息表 部门名 部门职责 3 系统设计 3.1 系统数据库的物理结构设计和逻辑结构描述 物理结构:数据结构在计算机中的表示(映像)称为数据的物理(存储)结构,系统搭建在win7系统下,采用java语言进行编写,它包括数据元素的表示和关系的表示。 逻辑结构:是对数据之间关系的描述,有时就把逻辑结构简称为数据结构。逻辑结构形式地定义为(K,R)(或(D,S)),其中,K是数据元素的有限集,R是K上的关系的有限集, 并采用SQL Server 2005来进行数据的管理支配,逻辑设计阶段的主要任务,是把E-R图转化为所选用DBMS产品支持的数据模型。由于该系统采用SQL Server关系型数据库系统,因此,应将概念设计的E-R模型转化为关系数据模型。 3.2 系统数据库转化为关系数据模型 用户(账号,密码,昵称,性别,年龄,部门号,电话,邮箱,姓名) 部门(部门号,部门名,部门职责) 3.3 数据库表的结构 通过以上得出关系数据模型之后,设计数据库如下: 3.3.1表dbo_td_userinfo用于保存用户信息 字段名称 数据类型 字段大小 说明 userID int 4 用户账号 nickname varchar 20 昵称 password varchar 50 密码 sex varchar 2 性别 age int 4 年龄 departID int 4 部门号 photo int 4 电话 email varchar 50 邮箱地址 name varchar 50 姓名 3.3.2表dbo_td_department用于保存部门信息 字段名称 数据类型 字段大小 说明 departID int 4 部门号 departName varchar 50 部门名称 departMemo varchar 100 部门职责 具体数据库内容展示: 4 系统运行平台 4.1 系统运行环境 系统运行平台:操作系统winAll/winXP,数据库:安装了SQL Server 2005 4.2 系统开发平台 系统采用MyEclipse开发,而后台数据的存储采用数据可SQL Server 2005 5 系统实现和核心模块的描述 5.1登陆界面及代码实现 登陆界面用户名格式必须正确且必须注册过,登陆界面如图所示: 代码实现: /** * @(#)client.JQClient.java 2013-2-26 * Copy Right Information : 淮阴师范学院 计算机科学与技术学院(软件工程) * @author : 刘 超(计科0903 学号:210910018) * Project : 基于文字水印谈判系统的设计与实现 * JDK version used : jdk1.6.0 * Comments : java类 * Environment :Win7/Win8/Win XP * Version : 1.0.1 * Sr Date Modified By : * null * ************日本語版*********** * @(#)client.JQClient.java 2013-2-26 * Copy Right Information : 淮陰師範学院コンピュータの科学と技術学院(ソフト工程) * @author :りゅう ちょう( 計科0903 番号210910018) * Project : 文字に基づいて透かし交渉システムの設計と実現 * JDK version used : jdk1.6.0 * Comments : java類 * Environment :Win7/Win8/Win XP * Version : 1.0.1 * Sr Date Modified By : * null **/ package client.UI; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Vector; import java.util.regex.Pattern; import java.awt.*; import java.io.BufferedReader; import java.io.FileReader; import javax.swing.*; import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; import javax.swing.text.PlainDocument; import client.interfaces.ILoginDao; /** * 登陆界面类 * @author 刘 超 * */ public class LoginUI extends JFrame{ private static final long serialVersionUID = 1L; private JComboBox cbUserId; private JPasswordField passwordField; private JButton loginBtn; private JButton cancelBtn; private double screenWidth;//当前屏幕的宽度 private double srceenHeight;//当前屏幕的高度 private static final int width=360,height=280; private ILoginDao loginHandle; private Vector<String> userID; /** * 登陆界面有参构造函数 * @param loginDao */ public LoginUI(ILoginDao loginDao){ super("用户登录界面"); this.loginHandle = loginDao; userID = new Vector<String>(); userID = readUserIDFromFile(); cbUserId = new JComboBox(userID); cbUserId.setEditable(true); JTextField txtField = (JTextField)cbUserId.getEditor().getEditorComponent(); MyDocument document = new MyDocument(); document.setAccpetPattern("\\d+"); document.setMaxSize(10); txtField.setDocument(document); cbUserId.setToolTipText("<html>请在这里输入用户号码<br>用户号码只能输入数字,最多输入10位</html>"); passwordField = new JPasswordField(10); passwordField.setEchoChar('●'); passwordField.setToolTipText("<html>请在这里密码<br>密码必须是字符和数字</html>"); MyDocument documents = new MyDocument(); documents.setAccpetPattern("\\p{Alnum}"); documents.setMaxSize(8); passwordField.setDocument(documents); loginBtn = new JButton(); cancelBtn = new JButton("退出"); cancelBtn.setActionCommand("Cancel"); cancelBtn.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e) { System.exit(1); } }); Action loginMessage = new AbstractAction() { //发送消息Action private static final long serialVersionUID = 1L; public void actionPerformed(ActionEvent e){ sendLoginMessage(); //更新消息显示框 } }; passwordField.getInputMap().put(KeyStroke.getKeyStroke("ENTER"),"login"); //键盘事件处理,接受回车事件 passwordField.getActionMap().put("login",loginMessage); //回车时的处理(调用发送消息Action) loginBtn.setAction(loginMessage); loginBtn.setText("登录"); loginBtn.setActionCommand("Login"); } /** * 登陆界面的布局设置函数 */ public void setLayout(){ JPanel contentPane = (JPanel)getContentPane(); contentPane.setBorder(BorderFactory.createLineBorder(Color.ORANGE, 2)); GridBagLayout gridbag = new GridBagLayout(); contentPane.setLayout(gridbag); contentPane.add(new JLabel(new ImageIcon("image\\login.gif")),new GridBagConstraints(0,0,3,1,0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.BOTH,new Insets(0,0,20,0),0,0)); contentPane.add(new JLabel("用户名:"),new GridBagConstraints(0,1,1,1,0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.HORIZONTAL,new Insets(15,50,0,5),0,0)); contentPane.add(cbUserId,new GridBagConstraints(1,1,2,1,1.0,0.0, GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(15,5,0,40),0,0)); contentPane.add(new JLabel("密 码:"),new GridBagConstraints(0,2,1,1,0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.HORIZONTAL,new Insets(10,50,0,5),0,0)); contentPane.add(passwordField,new GridBagConstraints(1,2,2,1,0.0,0.0, GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(10,5,0,40),0,0)); contentPane.add(loginBtn,new GridBagConstraints(1,3,1,1,0.0,0.0, GridBagConstraints.CENTER,GridBagConstraints.NONE,new Insets(15,4,50,50),0,0)); contentPane.add(cancelBtn,new GridBagConstraints(2,3,1,1,0.0,0.0, GridBagConstraints.NORTHWEST,GridBagConstraints.NONE,new Insets(15,35,50,40),0,0)); setSize(width, height); Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize(); screenWidth = dimension.getWidth(); srceenHeight = dimension.getHeight(); super.setLocation((int)screenWidth/2-width/2, (int)srceenHeight/2-height/2); setVisible(true); setResizable(false); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } /** * 自定义文档模型 * @author 刘 超 * */ public class MyDocument extends PlainDocument{ private static final long serialVersionUID = 1L; Pattern pattern; int maxSize = 10; public void setAccpetPattern(String pattern){ this.pattern = Ppile(pattern); } public void setMaxSize(int size){ maxSize = size; } public void insertString(int offs, String str, AttributeSet a) throws BadLocationException{ if(getLength() == maxSize){ return; } if(getLength() + str.length() > maxSize){ int i = maxSize - getLength(); str = str.substring(0, i); } if(pattern.matcher(str).matches()){ super.insertString(offs, str, a); } } } /** * 发送登陆信息 */ private void sendLoginMessage(){ char[] pw = passwordField.getPassword(); String userId= (String)cbUserId.getSelectedItem(); String password = new String(pw); if (!userId.equals("")&& !password.equals("")){ if(loginHandle != null){ loginHandle.login(Integer.valueOf(userId).intValue(), password); } } else { this.setVisible(false); JOptionPane.showMessageDialog(this, "<html>用户号码和密码不能为空<br>用户号码只能是1-10位数字<br>密码必须是字符和数字</html>", "登录消息", JOptionPane.INFORMATION_MESSAGE); this.clearTextContent(); this.setVisible(true); } } /** * 清除文本内容 */ public void clearTextContent(){ cbUserId.setSelectedIndex(-1); passwordField.setText(""); } /** * 从txt文本文档中读取历史登陆的账号信息 * @return */ public Vector<String> readUserIDFromFile(){ try { BufferedReader br=new BufferedReader(new FileReader("Info//user.txt")); String msg = null; while((msg = br.readLine()) != null){ String temp = msg.trim(); if (!temp.equals("")){ if ( !userID.contains(temp)){ userID.add(temp); } } } } catch (Exception e) { e.printStackTrace(); } return userID; } } 5.2 聊天界面及聊天接口代码 /** * @(#)client.JQClient.java 2013-2-26 * Copy Right Information : 淮阴师范学院 计算机科学与技术学院(软件工程) * @author : 刘 超(计科0903 学号:210910018) * Project : 基于文字水印谈判系统的设计与实现 * JDK version used : jdk1.6.0 * Comments : java类 * Environment :Win7/Win8/Win XP * Version : 1.0.1 * Sr Date Modified By : * null **/ package client.interfaces; import resource.*; /** * 客户端的接口 2013-2-7 * * @author 刘 超 * @version 1.0.1 * @since JDK1.6(建议) */ public interface IClient { /** * 发送信息包 * @param packet */ public void sendChatMessage(MessagePacket packet); /** * 清空函数 */ public void clear(); } 5.3 数据库操作函数及代码实现 /** * @(#)client.JQClient.java 2013-2-26 * Copy Right Information : 淮阴师范学院 计算机科学与技术学院(软件工程) * @author : 刘 超(计科0903 学号:210910018) * Project : 基于文字水印谈判系统的设计与实现 * JDK version used : jdk1.6.0 * Comments : java类 * Environment :Win7/Win8/Win XP * Version : 1.0.1 * Sr Date Modified By : * null **/ package server; import java.sql.CallableStatement; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Vector; import resource.*; /** * 数据库操作类 * @author 刘 超 * */ public class BaseDaoApp implements IBaseDao { private Connection con = null; public static final String DRIVER="net.sourceforge.jtds.jdbc.Driver"; public static final String URL="jdbc:jtds:sqlserver://localhost:1433;databasename=chatSystem"; public static final String USER_NAME="sa"; public static final String USER_PASS="123"; private Connection getConnection() { try{ Class.forName(DRIVER); con=DriverManager.getConnection(URL,USER_NAME,USER_PASS); }catch(Exception e){ e.printStackTrace(); } return con; } public void closeAll(Connection con,St展开阅读全文
咨信网温馨提示:1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。




基于文字水印的谈判系统设计与实现-毕设论文.doc



实名认证













自信AI助手
















微信客服
客服QQ
发送邮件
意见反馈



链接地址:https://www.zixin.com.cn/doc/2147643.html