CN110474970A - A kind of code synchronisation method, apparatus and system - Google Patents

A kind of code synchronisation method, apparatus and system Download PDF

Info

Publication number
CN110474970A
CN110474970A CN201910700610.5A CN201910700610A CN110474970A CN 110474970 A CN110474970 A CN 110474970A CN 201910700610 A CN201910700610 A CN 201910700610A CN 110474970 A CN110474970 A CN 110474970A
Authority
CN
China
Prior art keywords
code
code data
synchronisation
version number
computer
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.)
Granted
Application number
CN201910700610.5A
Other languages
Chinese (zh)
Other versions
CN110474970B (en
Inventor
王运峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Shenghui Technology Co ltd
Original Assignee
Ocdop Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ocdop Ltd filed Critical Ocdop Ltd
Priority to CN201910700610.5A priority Critical patent/CN110474970B/en
Publication of CN110474970A publication Critical patent/CN110474970A/en
Application granted granted Critical
Publication of CN110474970B publication Critical patent/CN110474970B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of code synchronisation method, apparatus and systems, wherein, code synchronisation method is by obtaining user identity information and code data to be synchronized, and after according to user identity information and code data generating corresponding version number, version number and code data are packaged into synchronizing code data packet and are sent to code synchronisation target device save;Solve in the prior art research and development of software personnel carry out code save backup when, it not only needs to be named the file of preservation, also need storage size in view of storage server, the technical problem for leading to whole process time-consuming, low efficiency and process are cumbersome;Provide a kind of efficient, convenient, timesaving code synchronisation method.

Description

A kind of code synchronisation method, apparatus and system
Technical field
The present invention relates to data backup simultaneous techniques fields, more particularly, to a kind of code synchronisation method, apparatus and system.
Background technique
GIT: being the distributed version control system of an open source, can handle effectively, at high speed from very little to very greatly Item version management.
With the continuous development and extensive use of Internet technology, the action of research and development of software personnel and the complicated journey that works Degree is also being continuously increased, and when how to solve research and development of software personnel progress R&D work, is carried out quickly and easily to the code of generation Backup, preservation, synchronous become need the technical issues of overcoming.
In the prior art, research and development of software personnel run code by using the mode of third party's Open-Source Tools, this side Formula needs to be backed up by manual input commands, expends longer time and also needs research and development of software personnel to code data Carry out backup save when need to name, further need exist for consider storage server memory space, this to software developer with Carry out biggish inconvenience, affects the efficiency and convenience of its work.
Summary of the invention
The present invention is directed to solve at least some of the technical problems in related technologies.For this purpose, of the invention One purpose is to provide a kind of efficient, convenient, timesaving code synchronisation method.
The technical scheme adopted by the invention is that:
In a first aspect, the present invention provides a kind of code synchronisation method comprising:
Obtain user identity information and code data to be synchronized;
According to the user identity information and the code data build version number;
The version number and the code data are packaged into synchronizing code data packet, and is sent to code synchronisation target and sets It is standby to be stored.
Further, it is specifically included according to the code data build version number:
After obtaining the code data, believe automatically according to the time of the user identity information, the acquisition code data Breath and the content information of the code data generate the version number.
Further, user identity information and code data to be synchronized are obtained specifically:
The name for obtaining user is referred to as the user identity information, obtains described in computer code data conduct to be synchronized Code data.
Further, the code synchronisation target device is the first GIT server;The computer and the first GIT The synchronizing code data packet can be obtained after server connection.
Further, the version number and the code data synchronizing code data packet is packaged into specifically include:
Take the version number as the title of the code data packet, and is the code data packet with the code data After content is packaged, the code data packet is sent to the first GIT server and is stored.
Second aspect, the present invention provide a kind of code synchronisation device comprising:
Information data obtains module, for obtaining user identity information and code data to be synchronized;
Version number's generation module, for according to the user identity information and the code data build version number;
Data packet generates and sending module, for the version number and the code data to be packaged into synchronizing code data Packet, and be sent to code synchronisation target device and stored.
The third aspect, the present invention provide a kind of code synchronisation system comprising: the code synchronisation device, computer With the first GIT server;
The computer obtains module with the information data and connect, by user identity information and code number to be synchronized Module is obtained according to the information data is sent to;
The data packet generates and sending module is connect with the first GIT server, and the code data packet is sent out It send to the first GIT server;
The computer is connect with the first GIT server, so that the computer can obtain the code number According to packet.
Further, the code synchronisation device is the 2nd GIT server;The 2nd GIT server is for obtaining institute User identity information and the code data are stated, and the version is generated according to the user identity information and the code data Number, the version number and the code data are packaged into after synchronizing code data packet be sent to the first GIT server into Row storage.
Fourth aspect, the present invention provide a kind of code synchronisation equipment comprising:
At least one processor;And the memory being connect at least one described processor communication;
Wherein, the processor is by calling the computer program stored in the memory, for executing the generation Code synchronous method.
5th aspect, the present invention provide a kind of computer readable storage medium, the computer-readable recording medium storage There are computer executable instructions, the computer executable instructions are used to that computer to be made to execute the code synchronisation method.
The beneficial effects of the present invention are:
The embodiment of the present invention, which passes through, obtains user identity information and code data to be synchronized, and according to user identity information After generating corresponding version number with code data, version number and code data are packaged into synchronizing code data packet and are sent to generation The synchronous target device of code is saved;Solve in the prior art research and development of software personnel carry out code save backup when, not only It needs to be named the file of preservation, also need storage size in view of storage server, whole process is caused to consume Duration, low efficiency and the cumbersome technical problem of process;Provide a kind of efficient, convenient, timesaving code synchronisation method.
Detailed description of the invention
Fig. 1 is an a kind of specific embodiment flow chart of code synchronisation method in the present invention;
Fig. 2 is an a kind of specific embodiment module frame chart of code synchronisation device in the present invention;
Fig. 3 is an a kind of specific embodiment module frame chart of code synchronisation system in the present invention.
Specific embodiment
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.
Embodiment one:
The present embodiment provides a kind of code synchronisation devices, obtain user identity information by being provided with data obtaining module With code data to be synchronized, then the information data transmission that will acquire into version number's generation module with build version number, finally Version number and code data are packaged into synchronizing code data packet by data packet generation and sending module, code data packet is protected It is sent in code synchronisation target device and is saved after depositing;It solves in the prior art, research and development of software personnel are to code number According to carrying out needing to name when backup saves, the memory space for considering storage server is further needed exist for, software developer is caused The technical issues of efficiency and convenience of work are affected.
Specifically, in the present embodiment, code synchronisation device includes: that information data obtains module, version number's life referring to Fig. 2 At module and data packet generates and sending module;Information data obtains the user identity information that will acquire of module and to be synchronized Code data is transmitted to version number's generation module, wherein is referred to as user identity information with the name of user, then version generation module According to the title of user, obtains the temporal information of code data and obtain the corresponding version of content information generation of code data Number, such as: user's name is the research and development of software personnel of the first user (user can customize user's name) in 01 month 2000 01 00 divides 00 second and synchronizes setting to the code data that a content information is addition algorithm when days 12, then the version of corresponding generation Number be " 20000101120000 addition algorithm of the first user " (it, which puts in order, arbitrarily to exchange).Generate corresponding version number Afterwards, version number and code data are transmitted to data packet generation and sending module, data packet generates and sending module will be received Version number and code data are packaged into synchronizing code data packet, and send after synchronizing code data packet is saved to local code storehouse It is stored to code synchronisation target device, realizes and code data is synchronized in code synchronisation target device, provide one Efficient, convenient, the timesaving code synchronisation device of kind.
Embodiment two:
As shown in figure 3, the embodiment of the invention provides a kind of code synchronisation systems comprising computer, such as embodiment one The code synchronisation device and the first GIT server.In the present embodiment, computer respectively with the first GIT server, second The connection of GIT server, the first GIT server are connect with the 2nd GIT server.
Specifically, computer carry out code synchronisation operation when, computer by user identity information (i.e. user's name) and to Synchronous code data is sent to the 2nd GIT server, and information data executes such as embodiment to the 2nd GIT server based on the received A kind of work of code synchronisation device generates synchronizing code data packet, is provided with code storehouse in the 2nd GIT server, will generate Synchronizing code data packet save into code storehouse after be sent to the synchronizing code storehouse being arranged in the first GIT server and deposited Storage, completes the process that code data is synchronized to the first GIT server;Solve in the prior art research and development of software personnel into It when line code saves backup, not only needs to be named the file of preservation, also need the storage in view of storage server empty Between size, the technical problem for leading to whole process time-consuming, low efficiency and process are cumbersome;It provides a kind of efficient, convenient, time saving Code synchronisation system.In the present embodiment, computer, which carries out code synchronisation operation, can be user's triggering or clocked flip or reality When it is synchronous, different modes can be selected according to the actual demand of user.
In addition, occurring saving in the code storehouse that network failure causes computer that can not get the 2nd GIT server same When walking code data packet, the first GIT server can be accessed by computer, obtain the synchronization generation for being stored in the first GIT server Synchronizing code data packet in code storehouse, ensure that code data can be obtained by two ways, provide a kind of safe and reliable Code synchronisation system.
Embodiment three:
Referring to Fig.1, the present embodiment provides a kind of code synchronisation methods comprising:
S1 obtains user identity information and code data to be synchronized;
S2, according to user identity information and code data build version number;
Version number and code data are packaged into synchronizing code data packet by S3, and be sent to code synchronisation target device into Row storage.
It is specific:
Code data build version number specifically includes:
After obtaining code data, automatically according to user identity information, the temporal information and code data of acquisition code data Content information build version number.
Obtain user identity information and code data to be synchronized specifically:
The name for obtaining user is referred to as user identity information, obtains computer code data to be synchronized as code number According to.
In the present embodiment, code synchronisation target device is the first GIT server, and computer is connect with the first GIT server After can obtain synchronizing code data packet.
Version number and the code data are packaged into synchronizing code data packet, and be sent to code synchronisation target device into Row storage specifically includes:
Using version number as the title of code data packet, and after being packaged using code data as the content of code data packet, Code data packet is sent to the first GIT server to store.
In the present embodiment the realization Principle of Process of code synchronisation method can with code synchronisation device described in embodiment one, The cross-referenced correspondence of realization Principle of Process of code synchronisation system described in embodiment two, does not do excessively repeat herein.
A kind of code synchronisation method in the present embodiment, by obtaining user identity information and code data to be synchronized, and After generating corresponding version number according to user identity information and code data, version number and code data are packaged into synchronizing code Data packet is simultaneously sent to code synchronisation target device and is saved;It solves research and development of software personnel in the prior art and is carrying out code It when saving backup, not only needs to be named the file of preservation, also need storage size in view of storage server, The technical problem for leading to whole process time-consuming, low efficiency and process are cumbersome;Provide a kind of efficient, convenient, timesaving code Synchronous method.
In addition, the present invention also provides a kind of code synchronisation equipment, comprising:
At least one processor;And the memory being connect at least one processor communication;
Wherein, processor is by calling the computer program stored in memory, for executing as described in embodiment three Code synchronisation method.
In addition, the present invention also provides a kind of computer readable storage medium, computer-readable recording medium storage has calculating Machine executable instruction, the code synchronisation method that computer executable instructions are used to that computer to be made to execute as described in embodiment three.
It is to be illustrated to preferable implementation of the invention, but the invention is not limited to the implementation above Example, those skilled in the art can also make various equivalent variations on the premise of without prejudice to spirit of the invention or replace It changes, these equivalent deformations or replacement are all included in the scope defined by the claims of the present application.

Claims (10)

1. a kind of code synchronisation method characterized by comprising
Obtain user identity information and code data to be synchronized;
According to the user identity information and the code data build version number;
After the version number and the code data are packaged into the preservation of synchronizing code data packet, and it is sent to code synchronisation target Equipment is stored.
2. code synchronisation method according to claim 1, which is characterized in that had according to the code data build version number Body includes:
After obtaining the code data, automatically according to the user identity information, obtain the code data temporal information and The content information of the code data generates the version number.
3. code synchronisation method according to claim 1 or 2, which is characterized in that obtain user identity information and to be synchronized Code data specifically:
The name for obtaining user is referred to as the user identity information, obtains computer code data to be synchronized as the code Data.
4. code synchronisation method according to claim 3, which is characterized in that the code synchronisation target device is first GIT server;The computer obtains the synchronizing code data packet after connecting with the first GIT server.
5. code synchronisation method according to claim 4, which is characterized in that beat the version number and the code data Be bundled into synchronizing code data packet, and be sent to code synchronisation target device carry out storage specifically include:
Take the version number as the title of the code data packet, and take the code data as the content of the code data packet After being packaged, the code data packet is sent to the first GIT server and is stored.
6. a kind of code synchronisation device characterized by comprising
Information data obtains module, for obtaining user identity information and code data to be synchronized;
Version number's generation module, for according to the user identity information and the code data build version number;
Data packet generates and sending module, protects for the version number and the code data to be packaged into synchronizing code data packet After depositing, and it is sent to code synchronisation target device and is stored.
7. a kind of code synchronisation system characterized by comprising as claimed in claim 6 code synchronisation device, computer and First GIT server;
The computer obtains module with the information data and connect, and user identity information and code data to be synchronized are sent out It send to the information data and obtains module;
The data packet generates and sending module is connect with the first GIT server, and the code data packet is sent to The first GIT server;
The computer is connect with the first GIT server, so that the computer can obtain the code data packet.
8. code synchronisation system according to claim 7, which is characterized in that the code synchronisation device is the 2nd GIT clothes Business device;The 2nd GIT server is marked for obtaining the user identity information and the code data, and according to the user Know information and the code data generates the version number, the version number and the code data are packaged into synchronizing code number It is stored according to the first GIT server is sent to after packet.
9. a kind of code synchronisation equipment characterized by comprising
At least one processor;And the memory being connect at least one described processor communication;
Wherein, the processor is by calling the computer program stored in the memory, for execute as claim 1 to 5 described in any item code synchronisation methods.
10. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer can It executes instruction, the computer executable instructions are for executing computer as code described in any one of claim 1 to 5 is same One step process.
CN201910700610.5A 2019-07-31 2019-07-31 Code synchronization method, device and system Active CN110474970B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910700610.5A CN110474970B (en) 2019-07-31 2019-07-31 Code synchronization method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910700610.5A CN110474970B (en) 2019-07-31 2019-07-31 Code synchronization method, device and system

Publications (2)

Publication Number Publication Date
CN110474970A true CN110474970A (en) 2019-11-19
CN110474970B CN110474970B (en) 2022-03-01

Family

ID=68509715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910700610.5A Active CN110474970B (en) 2019-07-31 2019-07-31 Code synchronization method, device and system

Country Status (1)

Country Link
CN (1) CN110474970B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968646A (en) * 2019-12-20 2020-04-07 睿住科技有限公司 Embedded system database synchronization method, device and storage medium
CN113138769A (en) * 2021-05-17 2021-07-20 上海交通大学 Biological analysis code storage method and device based on cloud storage
CN114221971A (en) * 2021-12-15 2022-03-22 中国建设银行股份有限公司 Data synchronization method, device, server, storage medium and product

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106886445A (en) * 2016-06-23 2017-06-23 阿里巴巴集团控股有限公司 Java packets generation method and equipment and information extracting method and equipment
US20170364354A1 (en) * 2016-06-15 2017-12-21 Red Hat Israel, Ltd. Committed program-code management
CN108196915A (en) * 2018-02-06 2018-06-22 杭州朗和科技有限公司 Code process method, equipment and storage medium based on application container engine
CN108256352A (en) * 2018-01-15 2018-07-06 北京安博通科技股份有限公司 A kind of method, apparatus and terminal of web protection feature database automatic packaging
CN108268253A (en) * 2017-05-05 2018-07-10 平安科技(深圳)有限公司 Interface code generation method and terminal device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170364354A1 (en) * 2016-06-15 2017-12-21 Red Hat Israel, Ltd. Committed program-code management
CN106886445A (en) * 2016-06-23 2017-06-23 阿里巴巴集团控股有限公司 Java packets generation method and equipment and information extracting method and equipment
CN108268253A (en) * 2017-05-05 2018-07-10 平安科技(深圳)有限公司 Interface code generation method and terminal device
CN108256352A (en) * 2018-01-15 2018-07-06 北京安博通科技股份有限公司 A kind of method, apparatus and terminal of web protection feature database automatic packaging
CN108196915A (en) * 2018-02-06 2018-06-22 杭州朗和科技有限公司 Code process method, equipment and storage medium based on application container engine

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968646A (en) * 2019-12-20 2020-04-07 睿住科技有限公司 Embedded system database synchronization method, device and storage medium
CN110968646B (en) * 2019-12-20 2023-06-06 广东睿住智能科技有限公司 Embedded system database synchronization method, device and storage medium
CN113138769A (en) * 2021-05-17 2021-07-20 上海交通大学 Biological analysis code storage method and device based on cloud storage
CN114221971A (en) * 2021-12-15 2022-03-22 中国建设银行股份有限公司 Data synchronization method, device, server, storage medium and product
CN114221971B (en) * 2021-12-15 2024-04-19 中国建设银行股份有限公司 Data synchronization method, device, server, storage medium and product

Also Published As

Publication number Publication date
CN110474970B (en) 2022-03-01

Similar Documents

Publication Publication Date Title
CN106209948B (en) A kind of data push method and device
CN110474970A (en) A kind of code synchronisation method, apparatus and system
CN107526626B (en) Docker container thermal migration method and system based on CRIU
CN102841927B (en) Method and device for data interaction among a plurality of databases and distributed data interaction system
CN105302676B (en) Active and standby the mechanism data transmission method and device of a kind of distributed file system
CN109271283A (en) A kind of data back up method based on block chain
CN108566290A (en) service configuration management method, system, storage medium and server
CN205725862U (en) A kind of data handling system based on cloud computing
CN107193499A (en) A kind of moving method and device of container data volume
CN103532753A (en) Double-computer hot standby method based on memory page replacement synchronization
CN110502572A (en) A kind of method and server that data are synchronous
CN105721582A (en) Multi-node file backup system
CN106790713A (en) Across data center virtual machine migration method under cloud computing environment
CN104484167B (en) Task processing method and device
CN110347389A (en) Processing method, the device and system of algorithm file
CN108833569A (en) A kind of method of data synchronization and relevant apparatus
CN107729515A (en) The method, apparatus and storage medium of a kind of data syn-chronization
CN110113406A (en) Based on distributed calculating service cluster frame
CN109783126A (en) A kind of distribution Global ID's generation method and its device
CN103516734A (en) Data processing method, device and system
CN104536852B (en) Data recovery method and device
CN107422980A (en) Internet of Things data document storage system and its data file storage method
CN104717175B (en) The processing method and system of virtual desktop
CN103152428A (en) Method for carrying out service communication among nodes on cloud platform
US9430301B2 (en) Distributed system for downloading internet information and a method thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220602

Address after: 518000 401, building 1, nantaiyun chuanggu Park, Southeast of the intersection of Guangming Avenue and Dongchang Road, Tangwei community, Fenghuang street, Guangming District, Shenzhen City, Guangdong Province

Patentee after: Shenzhen Shenghui Technology Co.,Ltd.

Address before: 518000 room 602, 6 / F, Langfeng building, No. 2 Kefa Road, Yuehai street, Nanshan District, Shenzhen, Guangdong

Patentee before: Ocdop Ltd.