CN102394927B - Method for storing and synchronizing internal and external network data - Google Patents
- ️Wed Jan 14 2015
CN102394927B - Method for storing and synchronizing internal and external network data - Google Patents
Method for storing and synchronizing internal and external network data Download PDFInfo
-
Publication number
- CN102394927B CN102394927B CN201110338826.5A CN201110338826A CN102394927B CN 102394927 B CN102394927 B CN 102394927B CN 201110338826 A CN201110338826 A CN 201110338826A CN 102394927 B CN102394927 B CN 102394927B Authority
- CN
- China Prior art keywords
- external network
- data
- server
- synchronized
- synchronization Prior art date
- 2011-10-31 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.)
- Active
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to the technical field of cloud computing, in particular to an internal and external network data storage and synchronization method. According to the method, a set of software environment consistent with an external network server is deployed in the internal network, and when a user accesses the system through the internal network, the system is automatically switched to the internal network server, so that the internal network server responds to the operation of the internal network server; and finally, synchronizing the data of the local server to the external network server through a background synchronization program, and downloading corresponding synchronous data from the external network server at the same time to finally achieve the consistency of the data of the two servers. The method for storing the file is faster and more efficient, and the occupation of bandwidth resources by a system can be reduced as much as possible. The method of the invention can be widely applied to data storage and synchronization of the internal network and the external network.
Description
技术领域technical field
本发明涉及云计算技术领域,具体涉及一种内外网数据存储和同步的方法。The invention relates to the technical field of cloud computing, in particular to a method for storing and synchronizing data on internal and external networks.
背景技术Background technique
教育在本质上就是对知识和经验的共享和交流,而网络的本质就是一种信息共享服务,它在很大程度上改变了时间和空对间人们之间信息交流的约束,可以让人们以极低的代价、极高的效率共享信息和知识。所以对于教育这种几乎可以纯数字化的行业而言,应该是最能发挥移动网络优势的行业之一。在国家大力发展教育信息化的大背景下,学校推进信息化来加强办学水平、提高师生的信息化素养、促进家长与学校形成合力共同开展教育是目前极为迫切的任务。Education is essentially the sharing and exchange of knowledge and experience, and the essence of the Internet is an information sharing service, which largely changes the constraints of time and space on information exchange between people, allowing people to Sharing information and knowledge at extremely low cost and extremely high efficiency. Therefore, for an industry that can be almost purely digitized, education should be one of the industries that can best take advantage of the mobile network. Under the background of the country's vigorous development of educational informatization, it is an extremely urgent task for schools to promote informatization to strengthen the level of school-running, improve the informatization literacy of teachers and students, and promote the joint efforts of parents and schools to jointly carry out education.
结合教育行业特点、信息化趋势及用户需求,目前行业发展的方向是通过建立一个综合性的网络教育互动信息平台将各种优质的教育资源和沟通手段有机的结合起来,通过信息平台及教育集群网在一定程度上捆绑教师群体,最终通过全面推广进而培养稳固家长群体,逐步培养行业对移动网络及品牌的依赖性,从而形成一套完整的带有信息化特色的服务体系和标准体系。Combining the characteristics of the education industry, information trends and user needs, the current direction of industry development is to organically combine various high-quality educational resources and communication means through the establishment of a comprehensive online education interactive information platform. The Internet binds the teacher group to a certain extent, and finally cultivates a stable parent group through comprehensive promotion, and gradually cultivates the industry's dependence on mobile networks and brands, thus forming a complete service system and standard system with informatization characteristics.
然而,多年的办学历程,学校方面已经保存了大量的教学资源,上传这些数据已经成了一个问题;而且频率的数据上传与下载也将占用的珍贵的带宽资源,这也是目前学校必须解决的问题。However, over the years of running a school, the school has saved a large number of teaching resources, and uploading these data has become a problem; and the frequency of data uploading and downloading will also occupy precious bandwidth resources, which is also a problem that the school must solve at present .
发明内容Contents of the invention
本发明解决的技术问题在于提供一种内外网数据存储和同步的方法。为用户提供一种更快捷、高效的文件存储方法,同时也可以尽量减少系统对带宽资源的占用。The technical problem to be solved by the present invention is to provide a method for storing and synchronizing data on internal and external networks. Provide users with a faster and more efficient file storage method, and at the same time minimize the system's occupation of bandwidth resources.
本发明解决上述技术问题的技术方案是:The technical scheme that the present invention solves the problems of the technologies described above is:
在内网部署一套与外网服务器一致的软件环境,当用户通过内网访问系统时,系统自动切换到内网服务器中,让内网服务器对其操作进行响应;最后,通过后台同步程序,把本地服务器的数据同步至外网服务器,同时从外网服务器中下载相应的同步数据,最终达到两个服务器的数据一致;本地数据文件同步至外网服务器包括如下步骤:Deploy a set of software environment consistent with the external network server on the internal network. When users access the system through the internal network, the system will automatically switch to the internal network server, allowing the internal network server to respond to its operations; finally, through the background synchronization program, Synchronize the data of the local server to the external network server, and download the corresponding synchronization data from the external network server at the same time, and finally achieve the data consistency of the two servers; the synchronization of local data files to the external network server includes the following steps:
第1步、根据当时的网络情况,设置单次同步的数据数量N,该值最高不超过150;Step 1. According to the network situation at that time, set the number of data N for a single synchronization, and the maximum value should not exceed 150;
第2步、获取本地数据库中没有同步至外网数据库的N条记录,数据不足的,以具体的数据量为准;Step 2. Obtain N records in the local database that have not been synchronized to the external network database. If the data is insufficient, the specific data volume shall prevail;
第3步、循环取得的数据,取出每一条记录的文件信息地址,并通过该地址获取文件信息,通过外网接口把文件信息同步到外网服务器中,同时把每一条记录插入至外网数据库中;Step 3. Cycle through the obtained data, take out the file information address of each record, and obtain the file information through the address, synchronize the file information to the external network server through the external network interface, and insert each record into the external network database at the same time middle;
第4步、更新本地数据库中这N条记录的状态,把它的状态设为已同步;Step 4, update the status of these N records in the local database, and set its status as synchronized;
第5步、重新返回到第1步,直到数据库全部同步完成;Step 5, return to step 1 until all databases are synchronized;
外网服务器数据文件同步至本地服务器包括如下步骤:Synchronizing data files from the external network server to the local server includes the following steps:
第1步、根据当时的网络情况,设置单次同步的数据数量N,该值最高不超过150;Step 1. According to the network situation at that time, set the number of data N for a single synchronization, and the maximum value should not exceed 150;
第2步、获取外网数据库中没有同步至本地数据库的N条本校的文件记录,数据不足的,以具体的数据量为准;Step 2. Obtain N school file records that have not been synchronized to the local database in the external network database. If the data is insufficient, the specific data volume shall prevail;
第3步、循环取得的数据,取出每一条记录的文件信息地址,并通过该地址获取文件信息,通过外网接口把文件信息下载至本地服务器中;同时把每一条记录插入至本地数据库中;Step 3, loop through the obtained data, take out the file information address of each record, and obtain the file information through the address, download the file information to the local server through the external network interface; at the same time insert each record into the local database;
第4步、更新外网数据库中这N条记录的状态,把它的状态设为已同步;Step 4, update the status of these N records in the external network database, and set its status as synchronized;
第5步、重新返回到第1步,直到数据库全部同步完成。Step 5, return to step 1 until all databases are synchronized.
本发明的有益效果是:数据同步功能,可以让用户在访问外网系统时,系统自动将访问重定向本地服务器,让本地服务器为用户服务。这样不仅有更好的响应效应,而且在文件上传下载中也有更高的速度,占用极小的带宽资源。而数据同步也使内、外网系统一致,用户在操作和数据上没有任何的差别。The beneficial effects of the invention are: the data synchronization function can allow the system to automatically redirect the access to the local server when the user accesses the external network system, so that the local server can serve the user. This not only has a better response effect, but also has a higher speed in file upload and download, and occupies a very small bandwidth resource. The data synchronization also makes the internal and external network systems consistent, and there is no difference between the user's operation and data.
附图说明Description of drawings
下面结合附图对本发明进一步说明:The present invention is further described below in conjunction with accompanying drawing:
图1为内网数据同步至外网服务器流程图;Figure 1 is a flow chart of synchronizing intranet data to an extranet server;
图2为外网数据同步至内网服务器流程图。Figure 2 is a flow chart of synchronizing data from the external network to the server on the internal network.
具体实施方式Detailed ways
本发明系统通过在内网部署一套与外网服务器一致的软件环境,当用户通过内网访问系统时,系统自动切换到内网服务器中,让内网服务器对其操作进行响应;最后,通过后台同步程序,把本地服务器的数据同步至外网服务器,同时从外网服务器中下载相应的同步数据,最终达到两个服务器的数据一致。The system of the present invention deploys a set of software environment consistent with the external network server through the internal network. When the user accesses the system through the internal network, the system automatically switches to the internal network server to allow the internal network server to respond to its operation; finally, through The background synchronization program synchronizes the data of the local server to the external network server, and downloads the corresponding synchronization data from the external network server at the same time, and finally achieves the consistency of the data of the two servers.
下面具体以教育云系统的内外网数据存储、同步为例。The following specifically takes the data storage and synchronization of the internal and external network of the education cloud system as an example.
如附图1所示,是教育云存储平台内网向外网同步流程图;本地数据文件同步至外网服务器包括如下步骤:As shown in Figure 1, it is the flow chart of the synchronization from the internal network to the external network of the education cloud storage platform; the synchronization of local data files to the external network server includes the following steps:
第1步、根据当时的网络情况,设置单次同步的数据数量N,该值最高不超过150;Step 1. According to the network situation at that time, set the number of data N for a single synchronization, and the maximum value should not exceed 150;
第2步、获取本地数据库中没有同步至外网数据库的N条记录,数据不足的,以具体的数据量为准;Step 2. Obtain N records in the local database that have not been synchronized to the external network database. If the data is insufficient, the specific data volume shall prevail;
第3步、循环取得的数据,取出每一条记录的文件信息地址,并通过该地址获取文件信息,通过外网接口把文件信息同步到外网服务器中,同时把每一条记录插入至外网数据库中;Step 3. Cycle through the obtained data, take out the file information address of each record, and obtain the file information through the address, synchronize the file information to the external network server through the external network interface, and insert each record into the external network database at the same time middle;
第4步、更新本地数据库中这N条记录的状态,把它的状态设为已同步;Step 4, update the status of these N records in the local database, and set its status as synchronized;
第5步、重新返回到第1步,直到数据库全部同步完成。Step 5, return to step 1 until all databases are synchronized.
如附图2所示,是教育云存储平台外网向内网同步据流程图;外网服务器数据文件同步至本地服务器包括如下步骤:As shown in Figure 2, it is a flow chart of synchronizing data files from the external network to the internal network of the education cloud storage platform; synchronizing data files from the external network server to the local server includes the following steps:
第1步、根据当时的网络情况,设置单次同步的数据数量N,该值最高不超过150;Step 1. According to the network situation at that time, set the number of data N for a single synchronization, and the maximum value should not exceed 150;
第2步、获取外网数据库中没有同步至本地数据库的N条本校的文件记录,数据不足的,以具体的数据量为准;Step 2. Obtain N school file records that have not been synchronized to the local database in the external network database. If the data is insufficient, the specific data volume shall prevail;
第3步、循环取得的数据,取出每一条记录的文件信息地址,并通过该地址获取文件信息,通过外网接口把文件信息下载至本地服务器中;同时把每一条记录插入至本地数据库中;Step 3, loop through the obtained data, take out the file information address of each record, and obtain the file information through the address, download the file information to the local server through the external network interface; at the same time insert each record into the local database;
第4步、更新外网数据库中这N条记录的状态,把它的状态设为已同步;第5步、重新返回到第1步,直到数据库全部同步完成。Step 4, update the status of the N records in the external network database, and set its status as synchronized; Step 5, return to step 1 until all databases are synchronized.
Claims (1)
1.一种内外网数据存储和同步的方法,其特征在于:在内网部署一套与外网服务器一致的软件环境,当用户通过内网访问系统时,系统自动切换到内网服务器中,让内网服务器对其操作进行响应;最后,通过后台同步程序,把本地服务器的数据同步至外网服务器,同时从外网服务器中下载相应的同步数据,最终达到两个服务器的数据一致;本地数据文件同步至外网服务器包括如下步骤:1. A method for internal and external network data storage and synchronization, characterized in that: the internal network deploys a set of software environment consistent with the external network server, when the user accesses the system through the internal network, the system automatically switches to the internal network server, Let the intranet server respond to its operation; finally, through the background synchronization program, the data of the local server is synchronized to the external network server, and the corresponding synchronization data is downloaded from the external network server at the same time, and finally the data of the two servers is consistent; the local The synchronization of data files to the external network server includes the following steps: 第1步、根据当时的网络情况,设置单次同步的数据数量N,该值最高不超过150;Step 1. According to the network situation at that time, set the number of data N for a single synchronization, and the maximum value should not exceed 150; 第2步、获取本地数据库中没有同步至外网数据库的N条记录,数据不足的,以具体的数据量为准;Step 2. Obtain N records in the local database that have not been synchronized to the external network database. If the data is insufficient, the specific data volume shall prevail; 第3步、循环取得的数据,取出每一条记录的文件信息地址,并通过该地址获取文件信息,通过外网接口把文件信息同步到外网服务器中,同时把每一条记录插入至外网数据库中;Step 3. Cycle through the obtained data, take out the file information address of each record, and obtain the file information through the address, synchronize the file information to the external network server through the external network interface, and insert each record into the external network database at the same time middle; 第4步、更新本地数据库中这N条记录的状态,把它的状态设为已同步;Step 4, update the status of these N records in the local database, and set its status as synchronized; 第5步、重新返回到第1步,直到数据库全部同步完成;Step 5, return to step 1 until all databases are synchronized; 外网服务器数据文件同步至本地服务器包括如下步骤:Synchronizing data files from the external network server to the local server includes the following steps: 第1步、根据当时的网络情况,设置单次同步的数据数量N,该值最高不超过150;Step 1. According to the network situation at that time, set the number of data N for a single synchronization, and the maximum value should not exceed 150; 第2步、获取外网数据库中没有同步至本地数据库的N条本校的文件记录,数据不足的,以具体的数据量为准;Step 2. Obtain N school file records that have not been synchronized to the local database in the external network database. If the data is insufficient, the specific data volume shall prevail; 第3步、循环取得的数据,取出每一条记录的文件信息地址,并通过该地址获取文件信息,通过外网接口把文件信息下载至本地服务器中;同时把每一条记录插入至本地数据库中;Step 3, cycle through the obtained data, take out the file information address of each record, and obtain the file information through the address, download the file information to the local server through the external network interface; at the same time insert each record into the local database; 第4步、更新外网数据库中这N条记录的状态,把它的状态设为已同步;Step 4, update the status of these N records in the external network database, and set its status as synchronized; 第5步、重新返回到第1步,直到数据库全部同步完成。Step 5, return to step 1 until all databases are synchronized.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110338826.5A CN102394927B (en) | 2011-10-31 | 2011-10-31 | Method for storing and synchronizing internal and external network data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201110338826.5A CN102394927B (en) | 2011-10-31 | 2011-10-31 | Method for storing and synchronizing internal and external network data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102394927A CN102394927A (en) | 2012-03-28 |
CN102394927B true CN102394927B (en) | 2015-01-14 |
Family
ID=45862131
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201110338826.5A Active CN102394927B (en) | 2011-10-31 | 2011-10-31 | Method for storing and synchronizing internal and external network data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102394927B (en) |
Families Citing this family (9)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102664948B (en) * | 2012-04-18 | 2015-05-27 | 杭州海康威视数字技术股份有限公司 | Inter-gateway data storing system and method |
CN103227774B (en) * | 2012-12-27 | 2016-03-23 | 国网浙江富阳市供电公司 | The intranet and extranet method of data synchronization of electric operating field pipes Ore-controlling Role |
CN106095880A (en) * | 2016-06-07 | 2016-11-09 | 浪潮软件集团有限公司 | Method for synchronizing data of inner network and outer network of sybase based on VB development |
CN106710339A (en) * | 2017-01-21 | 2017-05-24 | 深圳科达智慧科技有限公司 | Digit learning system based on internal network and external network servers and method |
CN108132794A (en) * | 2017-12-29 | 2018-06-08 | 普华基础软件股份有限公司 | A kind of operating system update method and system |
CN111371741B (en) * | 2020-02-19 | 2024-04-26 | 中国平安人寿保险股份有限公司 | Method, device, computer equipment and storage medium for transmitting external network data to internal network |
CN111339113B (en) * | 2020-02-28 | 2023-04-28 | 湖南九鼎科技(集团)有限公司 | ETL technology-based formula direct method and system |
CN111478943A (en) * | 2020-03-06 | 2020-07-31 | 上海数据交易中心有限公司 | Cross-local area network file storage method and system, storage medium and terminal |
CN112364037A (en) * | 2020-11-09 | 2021-02-12 | 深圳橙电新能源科技有限公司 | Data synchronization control method based on local server |
Citations (3)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101175030A (en) * | 2006-10-31 | 2008-05-07 | 中兴通讯股份有限公司 | Method for implementing proxy to multiple isomorphic subnets |
CN201690480U (en) * | 2010-05-06 | 2010-12-29 | 安徽省电力公司合肥供电公司 | IES500 automatic real-time data and information system transmission interface |
CN102137132A (en) * | 2010-01-26 | 2011-07-27 | 腾讯科技(深圳)有限公司 | System and method for synchronizing data |
Family Cites Families (1)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1277210C (en) * | 2003-05-06 | 2006-09-27 | 联想(北京)有限公司 | Method of document synchronization |
-
2011
- 2011-10-31 CN CN201110338826.5A patent/CN102394927B/en active Active
Patent Citations (3)
* Cited by examiner, † Cited by third partyPublication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101175030A (en) * | 2006-10-31 | 2008-05-07 | 中兴通讯股份有限公司 | Method for implementing proxy to multiple isomorphic subnets |
CN102137132A (en) * | 2010-01-26 | 2011-07-27 | 腾讯科技(深圳)有限公司 | System and method for synchronizing data |
CN201690480U (en) * | 2010-05-06 | 2010-12-29 | 安徽省电力公司合肥供电公司 | IES500 automatic real-time data and information system transmission interface |
Also Published As
Publication number | Publication date |
---|---|
CN102394927A (en) | 2012-03-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102394927B (en) | 2015-01-14 | Method for storing and synchronizing internal and external network data |
CN106843828B (en) | 2020-11-10 | Interface display and loading method and device |
Ray | 2017 | An introduction to dew computing: definition, concept and implications |
Pujol et al. | 2010 | The little engine (s) that could: scaling online social networks |
CN103873290B (en) | 2018-01-23 | A kind of method and system for being used to assess the performance of application |
CN103685186B (en) | 2017-12-01 | Resource data exchange method is used in cloud educational system and terminal, Cloud Server and education |
US10002141B2 (en) | 2018-06-19 | Distributed database in software driven networks |
Hjorth et al. | 2012 | The place of emplaced visualities: A case study of smartphone visuality and location-based social media in Shanghai, China |
US10298678B2 (en) | 2019-05-21 | Omnichannel approach to application sharing across different devices |
US20150229715A1 (en) | 2015-08-13 | Cluster management |
EP3055761B1 (en) | 2019-08-14 | Framework for screen content sharing system with generalized screen descriptions |
CN104967647A (en) | 2015-10-07 | Message push method and apparatus |
CN105809058B (en) | 2018-11-23 | teaching resource base management system |
CN103258149A (en) | 2013-08-21 | Online reading system and method based on cloud computing |
CN106875307A (en) | 2017-06-20 | Course learning method and system |
CN105225556A (en) | 2016-01-06 | A kind of method of courseware distribution and device |
Sun et al. | 2016 | Profiling and supporting adaptive micro learning on open education resources |
CN106611001A (en) | 2017-05-03 | Method, device and system for checking consistency of data in database tables in virtual machines |
Hjorth et al. | 2014 | The social in the mobile: QQ as cross-generational media in China |
CN103825943A (en) | 2014-05-28 | SCORM standard courseware playing system based on P2P and implementation method thereof |
Wong et al. | 2017 | Interactive museum exhibits with embedded systems: A use‐case scenario |
US20170230456A1 (en) | 2017-08-10 | Method, apparatus, and system for deep mirroring |
CN106920195A (en) | 2017-07-04 | A kind of teaching resource sharing system based on cloud computing |
CN103188281B (en) | 2016-05-25 | The method and system that a kind of network upgrade is replied |
CN104134153A (en) | 2014-11-05 | Internet service promotion system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2012-03-28 | C06 | Publication | |
2012-03-28 | PB01 | Publication | |
2012-05-09 | C10 | Entry into substantive examination | |
2012-05-09 | SE01 | Entry into force of request for substantive examination | |
2015-01-14 | C14 | Grant of patent or utility model | |
2015-01-14 | GR01 | Patent grant | |
2018-12-04 | CP02 | Change in the address of a patent holder |
Address after: 523808 19th Floor, Cloud Computing Center, Chinese Academy of Sciences, No. 1 Kehui Road, Songshan Lake Hi-tech Industrial Development Zone, Dongguan City, Guangdong Province Patentee after: G-Cloud Technology Co., Ltd. Address before: 523808 No. 14 Building, Songke Garden, Songshan Lake Science and Technology Industrial Park, Dongguan City, Guangdong Province Patentee before: G-Cloud Technology Co., Ltd. |
2018-12-04 | CP02 | Change in the address of a patent holder |