Summary of the invention
For above-mentioned defect, the application be designed to provide a kind of code build together method, system, oss server with
And open server, code library is established by customizing, can satisfy multiple companies for operating system code library structure
Specific needs can enhance transplantability and improve effect of building together, improve efficiency and reduce cost;And improve the peace that code is built together
Quan Xing, and interaction is more efficient.
To achieve the goals above, the application provides a kind of oss server, the oss server and open server
Communication connection, the open server are connected with partner's server communication, the oss server and partner service
Device is able to access that the open server, the open server and partner's server cannot access the source code service
Device;The oss server includes:
Code library customized module, for regular according to the code of operating system grade and scheduled library of opening, customization is established more
A code library;
Code library processing module is serviced for migrating the code library to the open server for the partner
Device is built together in the enterprising line code of the open server.
According to oss server described herein, the code library customized module further comprises:
Code library customizes submodule, for opening library rule according to, is scanned, builds to the code packet of operating system grade
The code library structure including multiple code libraries is erected, generates the index file for describing the code library structure, and will be described
It document creation and is uploaded in the code library in code packet.
According to oss server described herein, the library rule of opening is according to the oss server and/or the conjunction
Make server to formulate the specific needs of code library structure.
According to oss server described herein, the code library processing module further comprises:
Submodule is handled, for by the code of operating system grade is adapted to, binarization integrates and tests;
First checks submodule, if after passing through for test, the code is carried out safety inspection;
Submodule is migrated, if after passing through for code security inspection, the code library is migrated to the open server.
According to oss server described herein, the oss server is set to internal network, the open server
Set on opening network, partner's server is set to internet;The internal network and the internet can
The opening network is accessed, the opening network and the internet cannot access the internal network.
According to oss server described herein, the code library customized module of the oss server is further wrapped
It includes:
Submodule is scanned, for scanning data volume, the change frequency of the code and each code library of log acquisition
And reading frequency;
Computational submodule, for the data volume, the change frequency, the reading frequency according to each code library
Rate and scheduled code library split value-based algorithm, calculate the fractionation value of the code library;
Library submodule is torn open, for according to scheduled demand library sum, and the fractionation value phase of each code library of guarantee
Close fractionation rule, carries out the code library to tear library open.
According to oss server described herein, the code library splits value-based algorithm are as follows:
Fractionation value G=pc* (S*VC)+pd* (S*VD) of code library;
Wherein pc and pd is respectively weighted value, and S is the data volume in current code library, and VC is that the data in current code library change
Frequency, VD are the reading data frequency in current code library.
The application also provides a kind of open server, and the open server is serviced with oss server and partner respectively
Device communication connection, the oss server and partner's server are able to access that the open server, the open clothes
Business device and partner's server cannot access the oss server;The open server includes:
Code storage block, for receiving and storing the oss server according to the code of operating system grade and scheduled
Multiple code libraries that regular customizedization in library is established are opened, for partner's server in the enterprising line code of the open server
It builds together.
According to open server described herein, the open server further comprises:
Second checks module, for carrying out to the code in the code library stored into the open server
Code security inspection;
Code library opens module, if after passing through for code security inspection, by the code in the open server
Library is opened.
According to open server described herein, the open server provides designated ends for partner's server
The access authority of mouth.
According to open server described herein, the open server creation authorization account, the authorization account pair
Answer the access authority of the designated port of the open server;Partner's server is accessed by the authorization account
The designated port of the open server carries out code and builds together.
According to open server described herein, the oss server is set to internal network, the open server
Set on opening network, partner's server is set to internet;The internal network and the internet can
The opening network is accessed, the opening network and the internet cannot access the internal network.
The application also provides a kind of code and builds together system, including the oss server, the open server and institute
State partner's server.
The application also provides a kind of code and builds together method, and code method of building together is applied to including oss server, opens
The code for putting server and at least partner's server is built together in system, the oss server and partner's server
It is able to access that the open server, the open server and partner's server cannot access the source code service
Device;The code is built together method including the following steps:
The oss server is regular according to the code of operating system grade and scheduled library of opening, and multiple codes are established in customization
Library;
The oss server migrates the code library to the open server;
Partner's server is built together in the enterprising line code of the open server.
It is built together method according to code described herein, the oss server is according to the code and Kai Ku of operating system grade
Rule, customizing the step of establishing multiple code libraries includes:
The oss server opens library rule according to, is scanned to the code packet of operating system grade, it is established that packet
The code library structure of multiple code libraries is included, generates the index file for describing the code library structure, and by the generation
It document creation and is uploaded in the code library in code packet.
It is built together method according to code described herein, the library rule of opening is according to the oss server and/or described
Partner server formulates the specific needs of code library structure.
It is built together method according to code described herein, the oss server migrates the code library to the opening
The step of server includes:
By the code of operating system grade is adapted to, binarization integrates and tests;
If after test passes through, the code is carried out safety inspection;
If after code security inspection passes through, the code library is migrated to the open server.
Built together method according to code described herein, described the step of migrating code library to the open server it
After include:
The open server carries out code security inspection to the code in the code library;
If after code security inspection passes through, the code library in the open server is opened.
It is built together method according to code described herein, the open server provides designated port for partner's server
Access authority.
It is built together method according to code described herein, the open server creation authorization account, the authorization account
The access authority of the designated port of the corresponding open server;
Partner's server includes: the step of the enterprising line code of the open server is built together
Partner's server is carried out by the designated port that the authorization account accesses the open server
Code is built together.
It is built together method according to code described herein, the oss server is set to internal network, the open service
Device is set to opening network, and partner's server is set to internet;The internal network and the internet energy
The opening network is enough accessed, the opening network and the internet cannot access the internal network.
It is built together method according to code described herein, the oss server is according to the code of operating system grade and predetermined
Open library rule, after customization the step of establishing multiple code libraries further include:
Scan the data volume, change frequency and reading frequency of the code and each code library of log acquisition;
According to the data volume of each code library, the change frequency, the reading frequency and scheduled code
Library splits value-based algorithm, calculates the fractionation value of the code library;
According to scheduled demand library sum, and guarantee the similar fractionation rule of the fractionation value of each code library, it is right
The code library carries out tearing library open.
It is built together method according to code described herein, the code library splits value-based algorithm are as follows:
Fractionation value G=pc* (S*VC)+pd* (S*VD) of code library;
Wherein pc and pd is respectively weighted value, and S is the data volume in current code library, and VC is that the data in current code library change
Frequency, VD are the reading data frequency in current code library.
The code that the application provides operating system grade is built together technical solution, by oss server according to the generation of operating system grade
Code and scheduled library of opening are regular, and multiple code libraries are established in customization, and the code library is migrated to open server, partner
Server is built together in the enterprising line code of open server.Whereby, the application establishes code library by customizing, and can satisfy multiple
Company can enhance transplantability and improve effect of building together, improve efficiency and subtract for the specific needs of operating system code library structure
Small cost;Also, since the application is built together method using the point-to-point unidirectional authorization of server, code midway is greatly reduced and reveals
A possibility that, improve the safety that code is built together;In addition, due between companies multiple in the application in same open service
It is researched and developed on device, realizes that effect is similar in same company research and development effect, therefore interaction is more efficient.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and
It is not used in restriction the application.
In a typical configuration of this application, terminal, the equipment of service network and trusted party include one or more
Processor (CPU), input/output interface, network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory
(RAM) and/or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory
It is the example of computer-readable medium.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include non-temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
Fig. 1 is that the application code is built together the structural schematic diagram of system, and code system 100 of building together includes oss server
10, open server 20 and at least partner's server 30, the oss server 10 and partner's server 30 can visit
Ask that open server 20, the open server 20 and partner's server 30 cannot access oss server 10, i.e., it is described to open
Server 20 is put using the mode of unilateral network isolation.Preferably, oss server 10 is set to internal network, open server
20 are set to opening network, and partner's server 30 is set to internet (Internet), this is realized between each server
Domain isolation, and internal network and internet are able to access that opening network, the opening network and internet
Network cannot access internal network.
The application provides a kind of oss server 10, and the oss server 10 is communicated to connect with open server 20, opened
It puts server 20 and partner's server 30 communicates to connect, oss server 10 and partner's server 30 are able to access that open clothes
Business device 20, open server 20 and partner's server 30 cannot access oss server 10;The oss server 10 includes:
Code library customized module 11, for regular according to the code of operating system grade and scheduled library of opening, customization is established
Multiple code libraries.In general, about 300 code libraries of each operating system version.It is described open library rule according to oss server 10 and/
Or partner server 30 formulates the specific needs of code library structure, and operating system code library is tied to meet each company
The specific needs of structure.
Code library processing module 12, for migrating code library to open server 20.
Partner's server 30, for building together in the enterprising line code of open server 20.Here, partner's server
30 directly on open server 20 by code revision, oss server 10 can directly acquire modified code.
In the application specific embodiment, implementation are as follows: be based on foundation code packet, being customized establishes code library
(about 300 small libraries of each operating system version), these small libraries are based on opening library rule progress library depth and range is scanned, and build
Code library structure is erected, generates index file, and create and upload in code library based on files in batch in code packet, it is entire to grasp
Make system code library creation internal code to finish;The code carries out binarization and integrates after internal research staff is adapted to,
After being completed, it is open to carry out code;Before code is open, automation safety inspection is carried out, that is, scanning whether there is in library of building together
It is not desired to open sound code file, by rear, the automation of entire library is migrated to open server 20;It is enterprising in open server 20
Row further automation code security inspection, whether verification law works agreement signs, if having passed through, into next step;Creation
The account of open producer, gets through open server 20, the external research staff of partner's server 30 is ground with account and inside
Hair personnel carry out code and build together, the Open-Source Tools that entire code administration can be used.
The application solves the problems, such as that the code of multiple Inc. operating system codes is built together.Since operating system has and other generations
The characteristic that does not have of code, it is highly-safe, size of code is big, code structure is (chip model multiplicity) complicated and changeable, it mainly solves following
Problem: the 1, safety and high efficiency problem that code cooperation is related to;2, operating system code amount is big and causes with chip personalization
The problem of code structure complexity.Traditional builds library, only creates library according to demand, carries out code administration.The application not only realizes
Automation, and carried out building library according to specific service condition, so that research staff more accurately takes required code, substantially
Degree reduces downloading and uplink time, improves efficiency of research and development.
Fig. 2 is that the preferred code of the application is built together the structural schematic diagram of system, and code system 100 of building together includes source code clothes
Business device 10, open server 20 and at least partner's server 30, oss server 10 and partner's server 30 can visit
Ask that open server 20, open server 20 and partner's server 30 cannot access oss server 10.Preferably, source code
Server 10 is set to internal network, and open server 20 is set to opening network, and partner's server 30 is set to internet.
Internal network and internet are able to access that opening network, the opening network and internet cannot access inside
Network.
The application provides a kind of oss server 10, and the oss server 10 is communicated to connect with open server 20, opened
It puts server 20 and partner's server 30 communicates to connect, oss server 10 and partner's server 30 are able to access that open clothes
Business device 20, open server 20 and partner's server 30 cannot access oss server 10;The oss server 10 includes:
Code library customized module 11, for regular according to the code of operating system grade and scheduled library of opening, customization is established
Multiple code libraries.The specified need that library rule is opened according to oss server 10 and/or partner server 30 to code library structure
Formulation is asked, to meet each company for the specific needs of operating system code library structure.
The code library customized module 11 further comprises:
Code library customizes submodule 111, for according to opening library rule, to the code packet of operating system grade carry out library depth and
Library range scanning, it is established that the code library structure including multiple code libraries generates index file, and by files in batch in code packet
It creates and uploads in code library.
Submodule 112 is scanned, for scan code and the data volume of each code library of log acquisition, change frequency and reading
Frequency.
Computational submodule 113, for according to the data volume of each code library, change frequency, reading frequency and scheduled generation
Code library splits value-based algorithm, calculates the fractionation value of code library.
Preferably, the code library splits value-based algorithm are as follows:
Fractionation value G=pc* (S*VC)+pd* (S*VD) of code library, wherein pc and pd is respectively weighted value, and S is to work as former generation
The data volume in code library, VC are that the data in current code library change frequency, and VD is the reading data frequency in current code library.
Library submodule 114 is torn open, for close according to scheduled demand library sum, and the fractionation value of each code library of guarantee
Fractionation rule, code library is carried out to tear library open.
The application customizes technology and is directed to entire code packet, is scanned using the method for weight computing, finally obtains one
The customization scheme of a each code library weight equilibrium, the fractionation value for carrying out library further according to demand library total quantity are chosen.
Note: weight can be finely adjusted according to specific service condition
Tear library rule open: as the explanation of three-level attribute above, each catalogue can according to data volume, change frequency, read frequency
Rate generates a fractionation value, when tearing library open, guarantees that the fractionation of each code library is worth equal rule and carries out.Each fractionation value with tear open
Dosis refracta approximation is inversely proportional.
The application, which automates, realizes that scan code and log (log) obtain data volume, change frequency, reading frequency, goes forward side by side
Fractionation value is calculated in row, and according to the known quantity to be torn open, being customized tears library open.
One simple realization unit example is described below: the example is intended only as principle summary and uses, practical to split more than this
In it is complicated more.
| -- company A
| |--e(10,5,10)
| `--f(5,15,10)
| -- company B
| |--g(3,2,8)
| `--h(20,3,2)
Upper table is a simple catalogue tree structure, behind attribute in " () " be respectively data volume, change frequency, read
Take frequency.This simulation uses pc=2/3, pd=1/3, calculates, G (company Ae)=200/3, G (company Af)=200/3, G
(company Bg)=36/3, G (company Bh)=160/3, the fractionation value of a upper hierarchical directory are G (company A)=G (company Ae)+G
(company Af)=400/3, G (company B)=G (company Bg)+G (company Bh)=196/3.This fractionation can be seen that, company's B catalogue
Fractionation value it is close with the subdirectory of company A, so split structure be company Ae, company Af, tri- catalogues of company B respectively as
Code library is split.
Code library processing module 12, for migrating code library to open server 20.Preferably, at the code library
Reason module 12 further comprises:
Submodule 121 is handled, for the code of operating system grade to be adapted to, binarization integrates and tests.
First checks submodule 122, if code is carried out safety inspection after passing through for test.I.e. scanning is built together
With the presence or absence of open sound code file is not desired in code library, it is not desired to open sound code file if it exists and then forbids opening.
Submodule 123 is migrated, if after passing through for code security inspection, code library is migrated to open server 20.
The application provides a kind of open server 20, the open server 20 respectively with oss server 10 and partner
Server 30 communicates to connect, and oss server 10 and partner's server 30 are able to access that open server 20, open server
20 and partner's server 30 cannot access oss server 10.The open server 20 includes at least:
Code storage block 21, for receiving and storing oss server 10 according to the code of operating system grade and scheduled
Multiple code libraries that regular customizedization in library is established are opened, it is total in the enterprising line code of open server 20 for partner's server 30
It builds.
Preferably, the open server 20 further comprises:
Second checks module 22, for carrying out code security to the code in the code library in open server 20 to storage
It checks.
Code library open module 23, if after passing through for code security inspection, by the code library in open server 20 into
Row opens.
Partner's server 30, for building together in the enterprising line code of open server 20.Preferably, open service
Device 20 is that partner's server 30 provides the access authority of designated port.It is preferred that the creation authorization of open server 20
Account, authorization account correspond to the access authority of the designated port of open server 20.Partner's server 30 passes through authorization account
The designated port of access open server 20 carries out code and builds together.
The application is built together method using domain Quarantine Server, point-to-point unidirectional authorization.So-called domain isolation, which refers to, is opening
It puts and domain is taken to be isolated and (physical isolation or Network Isolation specifically can be used) between server 20 and oss server 10;Unidirectionally
Access, i.e., can only unidirectionally access, oss server 10 may have access to open server 20, and open server 20 can not visit between server
Ask oss server 10;Unidirectional authorization, i.e. open server 20 only to need to the side of building together provide and individually authenticate and port, make it have
Access the permission of the port designated code section.
The application key technology point includes: 1) based on operating system grade code library customizations technology and to tear library open regular;2) base
It builds together domain Quarantine Server point-to-point type code exchange method in operating system grade code.The application is imitated with following technology
Fruit:
It is highly-safe: to take the point-to-point direct-connected mode of server, avoid third-party intervention, code is greatly reduced
A possibility that midway is revealed;The designated port unidirectionally authorized is taken to build together mode, i.e., only authorization server could obtain service
The port code of device, increases for Server Security;The mode that open server 20 takes unilateral network to be isolated, even if
Open server 20 is broken, and does not still interfere with other server zones.
High efficiency interactive: being researched and developed on same open server 20 between the company that builds together, the log (day submitted every time
Will) it can check each other, submitting has instantaneity, i.e., realizes that effect researches and develops effect class in same company for research staff
Seemingly, immediate updating is submitted immediately, and saves unnecessary cost.
Customization technology and tear open library rule: build together due to taking in the mode of server on the same stage, and must satisfy each public affairs
The specific demand for operating system code library tree construction is taken charge of, the application is based on library depth and range parses, and customizes and criticizes
Amount builds library automatically.Meet each side's demand, enhance transplantability and improve effect of building together, improves efficiency reduction cost.Meanwhile the application
It in addition to meeting individual requirements, also takes algorithm and is optimized for tearing library open, increase substantially the use effect of code library itself
Rate.
Fig. 3 is that the application code is built together the flow chart of method, and code builds together method using code as shown in Figure 1 or 2
In system of building together 100, the code is built together method including the following steps:
Step S301, oss server 10 is regular according to the code of operating system grade and scheduled library of opening, and customizes and establishes
Multiple code libraries.
In general, about 300 code libraries of each operating system version.Preferably, oss server 10 is regular according to library is opened,
Library depth and the scanning of library range are carried out to the code packet of operating system grade, it is established that the code library structure including multiple code libraries,
Index file is generated, and files in batch in code packet is created and is uploaded in code library.The library rule of opening takes according to source code
Business device 10 and/or partner server formulate the specific needs of code library structure, to meet each company for operating system
The specific needs of code library structure.
Step S302, oss server 10 migrate code library to open server 20.
Step S303, partner's server 30 are built together in the enterprising line code of open server 20.
Here, for partner's server 30 by code revision directly on open server 20, oss server 10 can be straight
It obtains and takes modified code.Preferably, open server 20 is that partner's server 30 provides the access right of designated port
Limit.It is preferred that the creation authorization account of open server 20, authorization account correspond to the access of the designated port of open server 20
Permission.Partner's server 30 carries out code by the designated port that authorization account accesses open server 20 and builds together.
Fig. 4 is that the preferred code of the application is built together the flow chart of method, and code method of building together is total using code as shown in Figure 2
It builds in system 100, the code is built together method including the following steps:
Step S401, oss server 10 is regular according to the code of operating system grade and scheduled library of opening, and customizes and establishes
Multiple code libraries.
Preferably, oss server 10 carries out library depth and library to the code packet of operating system grade according to library rule is opened
Range scanning, it is established that the code library structure including multiple code libraries generates index file, and files in batch in code packet is created
It builds and uploads in code library.It is described to open library rule according to oss server 10 and/or partner server to code library structure
Specific needs are formulated, to meet each company for the specific needs of operating system code library structure.
Data volume, change frequency and the reading frequency of step S402, scan code and each code library of log acquisition.
Step S403, according to the data volume of each code library, change frequency, reading frequency and scheduled code library fractionation value
Algorithm calculates the fractionation value of code library.
Preferably, the code library splits value-based algorithm are as follows:
Fractionation value G=pc* (S*VC)+pd* (S*VD) of code library, wherein pc and pd is respectively weighted value, and S is to work as former generation
The data volume in code library, VC are that the data in current code library change frequency, and VD is the reading data frequency in current code library.
Step S404 according to scheduled demand library sum, and guarantees that the fractionation value of each code library is similar and splits rule
Then, code library is carried out tearing library open.
The code of operating system grade is adapted to by step S405, binarization integrates and tests.
Step S406, if code is carried out safety inspection after test passes through.
With the presence or absence of open sound code file is not desired to i.e. in scan code library, it is not desired to open sound code file if it exists and then prohibits
Only open.
Step S407, if after code security inspection passes through, code library is migrated to open server 20.
Step S408, open server 20 carry out code security inspection to the code in code library.
With the presence or absence of open sound code file is not desired to i.e. in scan code library, it is not desired to open sound code file if it exists and then prohibits
Only open.
Step S409, if after code security inspection passes through, the code library in open server 20 is opened.
Step S410, partner's server 30 are built together in the enterprising line code of open server 20.
Preferably, open server 20 is that partner's server 30 provides the access authority of designated port.It is preferred that
The creation authorization account of open server 20, authorization account correspond to the access authority of the designated port of open server 20.Partner
Server 30 carries out code by the designated port that authorization account accesses open server 20 and builds together.
The technical solution in conclusion code that the application provides operating system grade is built together, by oss server according to operation
System-level code and scheduled library of opening are regular, and multiple code libraries are established in customization, and the code library is migrated to open and is taken
Business device, partner's server are built together in the enterprising line code of open server.Whereby, the application establishes code library by customizing,
Multiple companies be can satisfy for the specific needs of operating system code library structure, transplantability can be enhanced and improve effect of building together,
It improves efficiency and reduces cost;Also, it since the application is built together method using the point-to-point unidirectional authorization of server, is greatly reduced
A possibility that code midway is revealed, improves the safety that code is built together;In addition, due between companies multiple in the application same
It is researched and developed on one open server, realizes that effect is similar in same company research and development effect, therefore interaction is more efficient.
Certainly, the application can also have other various embodiments, ripe without departing substantially from the application spirit and its essence
Various corresponding changes and modifications, but these corresponding changes and change ought can be made according to the application by knowing those skilled in the art
Shape all should belong to the protection scope of the application the attached claims.