CN109918077A - Code administration method, apparatus, computer equipment and storage medium - Google Patents

Code administration method, apparatus, computer equipment and storage medium Download PDF

Info

Publication number
CN109918077A
CN109918077A CN201910057541.0A CN201910057541A CN109918077A CN 109918077 A CN109918077 A CN 109918077A CN 201910057541 A CN201910057541 A CN 201910057541A CN 109918077 A CN109918077 A CN 109918077A
Authority
CN
China
Prior art keywords
code
data source
database
address
source
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.)
Pending
Application number
CN201910057541.0A
Other languages
Chinese (zh)
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.)
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN201910057541.0A priority Critical patent/CN109918077A/en
Publication of CN109918077A publication Critical patent/CN109918077A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

This application involves data processing fields, more particularly to a kind of code administration method, apparatus, computer equipment and storage medium technical field, include: to obtain the data source address for needing to carry out code analysis, therefrom extracts code after connecting data source according to the data source address;Classify to the code extracted, by different classes of code storage to corresponding database;Code update request is obtained, the mapping relations of the code update request and the database is established, updates the database according to the mapping relations.The application is by effectively sorting out code, significant increase team code administration efficiency.

Description

Code administration method, apparatus, computer equipment and storage medium
Technical field
This application involves data processing field more particularly to a kind of code administration method, apparatus, computer equipment and storage Media technology field.
Background technique
In existing code management system, it is typically stored on the same hardware using with data.With amount of access Rise, separate unit hardware service has been unable to meet demand.Code management system is applied different from general web, because of all codes Data are not stored in distributed data base, but there are in local disk.Facing the most thorny issue as a result, is: because For shared the problem of storing, common load-balancing technique cannot be directly applied on existing code management system, moreover, existing Some code management systems need continually to read and write storage equipment, if cannot properly store code data, will affect code The response speed of hardware and the stability of system where management system.
Currently, by use Git as Version for, need when carrying out the cooperative development of project by long-range storehouse Library, Git are that a free, open source distributed version control system is supplied by the synchronization between remote warehouse and ware-house here The different members of project unify store code and update.Remote warehouse operates on a hardware, for example a store code is used Database server, and ware-house here can then increase with increasing for developer and constantly, and this mode is for exploitation Number is not that many middle Small Groups are applicable in very much, and for thousands of, the up to ten thousand company of exploitation number, what remote warehouse used The drawbacks of memory module of single device, will be with the increase of exploitation number and thoroughly be exposed.
Summary of the invention
In view of this, it is necessary to for coarse size is managed in existing code management process, lead to not accurately obtain code The problem of details, provides a kind of code administration method, apparatus, computer equipment and storage medium.
A kind of code administration method, includes the following steps:
The data source address for needing to carry out code analysis is obtained, after connecting data source according to the data source address Therefrom extract code;
Classify to the code extracted, by different classes of code storage to corresponding database;
Code update request is obtained, the mapping relations of the code update request and the database are established, according to described Mapping relations update the database.
It is described to obtain the data source address for needing to carry out code analysis in a wherein possible embodiment, according to Code is therefrom extracted after the data source address connection data source, comprising:
The data source IP address for needing to carry out code analysis is obtained, the data source IP address is parsed, is obtained To the signature of the data source, the frequency that code is extracted from the data source is determined according to the signature;
The frequency that code is extracted according to the data source establishes data source and extracts frequency histogram, wherein the number Abscissa according to source extraction frequency histogram is the time, ordinate is to extract number;
It successively extracts from the data source and is extracted in the corresponding data source of maximum value of the ordinate of frequency histogram Code.
In a wherein possible embodiment, the described pair of code extracted is classified, by different classes of code It is stored into corresponding database, comprising:
Code analysis interface is obtained, the code is solved according to the function service condition of the code analysis interface Analysis, obtains Program Type corresponding to the code;
The corresponding configuration file of described program type is obtained, the code is written to the corresponding configuration of described program type In file, wherein including described program type and key assignments in the configuration file;
Key assignments included in the corresponding configuration file of described program type is obtained, according to preset database and key assignments Mapping table obtains the corresponding database of the key assignments;
Detect whether every data record in the corresponding database of the key assignments meets preset format, if satisfied, then will Otherwise the code, is written in other configurations file by the code storage again to the database.
In a wherein possible embodiment, acquisition code update request, establish the code update request with The mapping relations of the database update the database according to the mapping relations, comprising:
The IP address for issuing the request source of code update request is obtained, the spy for including in the IP address of the request source is extracted Levy parameter;
According to the corresponding relationship that the ID of the characteristic parameter and the database is identified, establish the code update request with The mapping relations of the database, wherein the corresponding relationship that the ID of the characteristic parameter and the database is identified is stored in clothes It is engaged in device;
It obtains the code update and requests corresponding more fresh code, transfer the corresponding configuration file of the more fresh code, it will The more fresh code is written to the corresponding configuration file of the more fresh code, then the corresponding configuration file of the more fresh code is deposited Enter the database.
In a wherein possible embodiment, the acquisition needs to carry out the data source IP address of code analysis, right The data source IP address is parsed, and the signature of the data source is obtained, according to the signature determine from The data source extracts the frequency of code, comprising:
The data source IP address is obtained, obtains dns resolution generation after carrying out dns resolution to the data source IP address Code;
According to the mapping relations of the dns resolution code and preset dns resolution code table, the data source IP is obtained Public field and feature field in the corresponding dns resolution code in address;
According to the corresponding relationship of the public field and preset data source type, the class of the data source is determined Type, and the data source is marked according to the type of the data source;
The historical data that the feature field occurs is obtained, the distance according to the historical data apart from present moment is assigned Different weights is given, weighted average is calculated and obtains the frequency that any feature field occurs;
According to the frequency that the label of the data source and the feature field occur, determines and extracted from the data source The frequency of code.
In a wherein possible embodiment, the acquisition code analysis interface, according to the code analysis interface Function service condition parses the code, obtains Program Type corresponding to the code, comprising:
The code is entered ginseng and calculated to the starting function, obtained by the starting function for obtaining code analysis interface Starting function value;
By the starting function value enter ginseng into the non-starting function in the code analysis interface, if any two or with On the non-starting function calculated result it is consistent, then the consistent non-starting function of calculated result is transferred, if not counting The consistent non-starting function of result is calculated, then other code interfaces is called to carry out code analysis;
Program Type corresponding to the consistent non-starting function of calculated result is obtained, if all calculated results are consistent The corresponding Program Type of the non-starting function is consistent, then the code is classified as to the code of described program type;
If the corresponding Program Type of the consistent non-starting function of any two calculated result is inconsistent, by the generation Code is classified as different Program Types respectively.
It is described to obtain the IP address for issuing the request source of code update request in a wherein possible embodiment, it takes out Take the characteristic parameter for including in the IP address of the request source, comprising:
The IP address for issuing the request source of code update request is obtained, dns resolution is carried out to the IP address of the request source Obtain dns resolution code;
According to the mapping relations of the dns resolution code and preset dns resolution code table, the IP of the request source is obtained Public field and feature field in the corresponding dns resolution code in address;
Splice the public field and the feature field obtains the characteristic parameter.
A kind of code administration device, including following module:
Extract code module, be set as obtaining and need to carry out the data source address of code analysis, according to the data come Code is therefrom extracted after source address connection data source;
Code enters library module, is set as classifying to the code extracted, by different classes of code storage to correspondence Database;
Code update module is set as obtaining code update request, establishes the code update request and the database Mapping relations, update the database according to the mapping relations.
A kind of computer equipment, including memory and processor are stored with computer-readable instruction in the memory, institute When stating computer-readable instruction and being executed by the processor, so that the step of processor executes above-mentioned code administration method.
A kind of storage medium being stored with computer-readable instruction, the computer-readable instruction are handled by one or more When device executes, so that the step of one or more processors execute above-mentioned code administration method.
Above-mentioned code administration method, apparatus, computer equipment and storage medium need to carry out code analysis including obtaining Data source address therefrom extracts code after connecting data source according to the data source address;To the code extracted into Row classification, by different classes of code storage to corresponding database;Code update request is obtained, the code update is established and asks The mapping relations with the database are sought, update the database according to the mapping relations.The technical program is directed to existing generation Coarse size is managed in code management process, leads to not the problem of accurately obtaining code details, by effectively being sorted out to code, Significant increase team code administration efficiency.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the application Limitation.
Fig. 1 is a kind of overall flow figure of the code administration method of the application in one embodiment;
Fig. 2 is that the code in a kind of code administration method of the application in one embodiment is put in storage process schematic;
Fig. 3 is the code update process schematic in a kind of code administration method of the application in one embodiment;
Fig. 4 is a kind of structure chart of the device of the code administration of the application in one embodiment.
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.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in the description of the present application Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition Other one or more features, integer, step, operation, element, component and/or their group.
Fig. 1 is a kind of overall flow figure of the code administration method of the application in one embodiment, as shown in Figure 1, one Kind code administration method, comprising the following steps:
S1 is obtained and is needed to carry out the data source address of code analysis, according to the data source address connect data come Code is therefrom extracted behind source;
Specifically, the data source for carrying out code analysis is needed to can be local data, it is also possible to external data, works as number When according to source being local data, needs to obtain the position that is locally stored of data source, that is, which region of local hard drive be stored in Either which file;When data source is external data, then need to obtain the network connection address of data source, such as IP address obtains the information of data source according to IP address.
S2 classifies to the code extracted, by different classes of code storage to corresponding database;
Specifically, code has according to meaning and composition substantially type: sequence code, section code, mnemonic code.The characteristics of sequence code It is that code is brief, it is easy to use, it is easily managed, Yi Tianjia, to object of classification without any particular provisions.Section code the characteristics of be from The classification of data is reacted in structure, convenient for computer classes handling ordered, classification, insertion and use are also easier.It helps and recalls The characteristics of code is to indicate code object with the letter or number that can be memonic, by the title of the object of code, specification etc. As a part of code, to be memonic.
S3 obtains code update request, the mapping relations of the code update request and the database is established, according to institute It states mapping relations and updates the database.
Specifically, may include carrying out identity to the terminal for issuing code update request when obtaining code update request The step of veritification, specific checking method can be password and veritify either key veritification, can adopt when carrying out key veritification With Hash key, symmetric key also can be used.
The present embodiment enables a project team to have in time when using code by effectively being classified to code The position of code storage is known on effect ground, promotes efficiency when code uses.
In one embodiment, the S1 obtains the data source address for needing to carry out code analysis, according to the data Code is therefrom extracted after source address connection data source, comprising:
The data source IP address for needing to carry out code analysis is obtained, the data source IP address is parsed, is obtained To the signature of the data source, the frequency that code is extracted from the data source is determined according to the signature;
Specifically, when carrying out IP address parsing, it is thus necessary to determine that the characteristic and common portion of IP address, such as IP Location is that then characteristic is last three 256 to 202.116.235.256, then by 256 signature as data source.
The frequency that code is extracted according to the data source establishes data source and extracts frequency histogram, wherein the number Abscissa according to source extraction frequency histogram is the time, ordinate is to extract number;
Specifically, first select when statistics extracts the frequency of code and extract the time interval that code spectrum counts, one As with a project cycle be the time interval for extracting code spectrum statistics, several projects are selected in this time interval and are carried out Timing node as extract code spectrum statistics sub- time interval endpoint, in a sub- time zone of two timing nodes The interior frequency for extracting code extracts the abscissa numerical value of frequency histogram as data source.
It successively extracts from the data source and is extracted in the corresponding data source of maximum value of the ordinate of frequency histogram Code.
The present embodiment intuitively embodies code in different time period by establishing data source extraction frequency histogram The frequency used.
Fig. 2 is that the code in a kind of code administration method of the application in one embodiment is put in storage process schematic, such as Shown in figure, the S2 classifies to the code extracted, by different classes of code storage to corresponding database, comprising:
S201, obtain code analysis interface, according to the function service condition of the code analysis interface to the code into Row parsing, obtains Program Type corresponding to the code;
Specifically, the historical data used according to function, the setting several function service conditions of code analysis interface are counted The use of each function in the code analysis interface is acquired when the timing node arrives according to the timing node of acquisition Situation, and the function used in this timing node is labeled as " use ", not used function is labeled as " unused ", statistics Which function is using, which function is not using, needs to call function when running according to statistical result and preset program Situation determines the Program Type used in this timing node.For example, A Program Type needs to call c function and d function, if at certain C function and d function are all called in one timing node, then prove that A Program Type is executing.
S202, the corresponding configuration file of described program type is obtained, it is corresponding that the code is written to described program type Configuration file in, wherein in the configuration file include described program type and key assignments;
Specifically, each Program Type corresponds to a configuration file, the volume for the type that has program recorded thereon in configuration file Number and change Program Type storage arrive which database key assignments, the feature identifier that wherein key assignments is put in storage as code.
S203, obtain key assignments included in the corresponding configuration file of described program type, according to preset database with The mapping table of key assignments obtains the corresponding database of the key assignments;
Detect whether every data record in the corresponding database of the key assignments meets preset format, if satisfied, then will Otherwise the code, is written in other configurations file by the code storage again to the database.
Specifically, the initial statement of the one inquiry configuration file of setting, judges whether the initial statement includes key assignments, If including the key assignments in the initial statement, the key assignments is extracted, if not including the key assignments in the initial statement, Continue to judge after initial statement is extended to both ends, until the initial statement after extension includes the key assignments.
Record has the number of database in the mapping table of the database and key assignments, and the number of database is basis Included number of characters determines when database starts that first data is written.For example, key assignments is " 18 ", then in mapping table Middle number of queries is the database of " 18 ", then this database is key assignments " 18 " corresponding database.
Wherein, the format of every data record is stream data, column data or row data in the database;For example, key The first place of value is that odd number answers column data, the first place of key assignments be even-even should row data, the first place of key assignments is the corresponding streaming of letter Data.
The present embodiment can save the time of inquiry code storage location by effectively being classified to code.
Fig. 3 is the code update process schematic in a kind of code administration method of the application in one embodiment, such as Shown in figure, the S3 obtains code update request, establishes the mapping relations of the code update request and the database, root The database is updated according to the mapping relations, comprising:
S301, the IP address for issuing the request source of code update request is obtained, extracts and is wrapped in the IP address of the request source The characteristic parameter contained;
Specifically, the request source of code update request is issued, either the code stored in original database is corresponding Data source is also possible to new data source.If existing data source, then need to only veritify IP address whether be on It is transmitted through the IP address of data, if new data source then needs to veritify the terminal authorization of data source.
S302, the corresponding relationship identified according to the ID of the characteristic parameter and the database, establish the code update The mapping relations of request and the database, wherein the corresponding relationship that the ID of the characteristic parameter and the database is identified is deposited Storage is in the server;
Specifically, first comparing the initial of characteristic parameter when carrying out characteristic parameter and database ID mark is compared With the initial of database ID, if two initials unanimously if hexadecimal conversion is carried out to the numerical value of characteristic parameter again, calculate The similarity that hexadecimal character is identified from different database ID, the maximum database ID of similarity are identified as the feature The ID of database corresponding to parameter is identified.For example, characteristic parameter is A12, then the ID of corresponding database is identified as AB.
S303, the corresponding more fresh code of the code update request is obtained, transfers the corresponding configuration text of the more fresh code The more fresh code is written to the corresponding configuration file of the more fresh code by part, then will the corresponding configuration of the more fresh code File is stored in the database.
Specifically, obtaining the feature identifier of the more fresh code, according to the feature identifier, inquire existing several Configuration file extracts the configuration file comprising the feature identifier as the corresponding configuration file of the more fresh code.
The present embodiment improves project team and carries out code variations by effectively being managed code update process When efficiency.
In one embodiment, described to obtain the data source IP address for needing to carry out code analysis, the data are come Source IP address is parsed, and the signature of the data source is obtained, according to the signature determine from the data come The frequency of source extraction code, comprising:
The data source IP address is obtained, obtains dns resolution generation after carrying out dns resolution to the data source IP address Code;
According to the mapping relations of the dns resolution code and preset dns resolution code table, the data source IP is obtained Public field and feature field in the corresponding dns resolution code in address;
Specifically, obtaining preceding 3 codes of the dns resolution code, inquired in dns resolution code table comprising described The consistent row of preceding 3 codes, it is then public in the corresponding dns resolution code of the data source IP address from being obtained in this journey Field and feature field.
According to the corresponding relationship of the public field and preset data source type, the class of the data source is determined Type, and the data source is marked according to the type of the data source;
Wherein, data source type is divided into public database and personal terminal etc., for example, the first character of public field is Digital then corresponding public database, the first character of public field are the corresponding personal terminal of letter.
The historical data that the feature field occurs is obtained, the distance according to the historical data apart from present moment is assigned Different weights is given, weighted average is calculated and obtains the frequency that any feature field occurs;
Specifically, then public field is 202.98, tagged word for example, dns resolution code is DNS 202.98.192.67 Section is 192.67;202.98 corresponding data source types are anti-virus data, and 192.67 occur within this project cycle Starting the number that 5 hours occur is 2 times, and the number occurred for next 5 hours is 10 times, then the frequency of the appearance of feature field is (2*0.4+10*0.6)/10=0.68 times/hour.
According to the frequency that the label of the data source and the feature field occur, determines and extracted from the data source The frequency of code.
The present embodiment, the frequency by extracting code to data source carry out effective geo-statistic, can promote different data The efficiency of source code processing.
In one embodiment, the S201, acquisition code analysis interface, make according to the function of the code analysis interface The code is parsed with situation, obtains Program Type corresponding to the code, comprising:
The code is entered ginseng and calculated to the starting function, obtained by the starting function for obtaining code analysis interface Starting function value;
Specifically, the starting function of code analysis interface refers to the letter triggered at first when code analysis interface is started to work Number, after only this function is triggered, code analysis interface could be worked normally.
The starting function value is entered into ginseng into the non-starting function in the code analysis interface, if any two or two The calculated result of a above non-starting function is consistent, then the consistent non-starting function of calculated result is transferred, if not having There is the consistent non-starting function of calculated result, then other code interfaces is called to carry out code analysis;
Wherein, non-starting function refers to the function being triggered not when code analysis interface is not started to work.It is being counted When calculation result compares, error threshold can be introduced, if the calculated result of any two or more than two non-starting functions Within the scope of the error threshold, then it is assumed that the calculated result of the two is consistent, and general error threshold is set as 1%.
Program Type corresponding to the consistent non-starting function of calculated result is obtained, if all calculated results are consistent The corresponding Program Type of the non-starting function is consistent, then the code is classified as to the code of described program type;
If the corresponding Program Type of the consistent non-starting function of any two calculated result is inconsistent, by the generation Code is classified as different Program Types respectively.
The present embodiment is counted, the ownership of effective cognizance code by the function service condition to code analysis interface Program Type, to promote the efficiency of code administration.
In one embodiment, the S301, the IP address for obtaining the request source that sending code update is requested, are extracted The characteristic parameter for including in the IP address of the request source, comprising:
The IP address for issuing the request source of code update request is obtained, dns resolution is carried out to the IP address of the request source Obtain dns resolution code;
According to the mapping relations of the dns resolution code and preset dns resolution code table, the IP of the request source is obtained Public field and feature field in the corresponding dns resolution code in address;
Specifically, obtaining preceding 3 codes of the dns resolution code, inquired in dns resolution code table comprising described The consistent row of preceding 3 codes, it is then public in the corresponding dns resolution code of the data source IP address from being obtained in this journey Field and feature field.
When obtaining the public field and feature field in dns resolution code, application structure query language SQL is to described The index of dns resolution code table is inquired, and obtains the dns resolution code in dns resolution code table according to the index Position obtains public field and feature field in the corresponding dns resolution code in the position.Wherein, public field refers to this DNS Code part identical with other dns resolution codes is parsed, feature field refers to this dns resolution code and other dns resolution generations The different part of code.
Splice the public field and the feature field obtains the characteristic parameter.
Specifically, public field can be placed on to feature field front end when being spliced, feature field can also be put In the front end of public field, feature field can also be placed on to the centre of two public fields to increase the identification of data source Degree.
The present embodiment is effectively improved and is produced to new by identifying to the data source for issuing code update request The tracking and management of raw code, to promote the efficiency of management of entire item code.
In one embodiment it is proposed that a kind of code administration device, as shown in figure 4, including following module:
Code module 41 is extracted, is set as obtaining the data source address for needing to carry out code analysis, according to the data Code is therefrom extracted after source address connection data source;
Code enters library module 42, is set as classifying to the code extracted, by different classes of code storage to pair The database answered;
Code update module 43 is set as obtaining code update request, establishes the code update request and the data The mapping relations in library update the database according to the mapping relations.
A kind of computer equipment, including memory and processor are stored with computer-readable instruction in the memory, institute When stating computer-readable instruction and being executed by the processor, so that the processor executes dematron described in the various embodiments described above The step of reason method.
A kind of storage medium being stored with computer-readable instruction, the computer-readable instruction are handled by one or more When device executes, so that the step of one or more processors execute code administration method described in the various embodiments described above.It is described to deposit Storage media can be non-volatile memory medium.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage Medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or CD etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality It applies all possible combination of the technical characteristic in example to be all described, as long as however, lance is not present in the combination of these technical characteristics Shield all should be considered as described in this specification.
The some exemplary embodiments of the application above described embodiment only expresses, wherein describe it is more specific and detailed, But it cannot be understood as the limitations to the application the scope of the patents.It should be pointed out that for the ordinary skill of this field For personnel, without departing from the concept of this application, various modifications and improvements can be made, these belong to the application Protection scope.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of code administration method characterized by comprising
It obtains and needs to carry out the data source address of code analysis, connected after data source therefrom according to the data source address Extract code;
Classify to the code extracted, by different classes of code storage to corresponding database;
Code update request is obtained, the mapping relations of the code update request and the database are established, according to the mapping Relationship updates the database.
2. code administration method according to claim 1, which is characterized in that described to obtain the number for needing to carry out code analysis According to source address, code is therefrom extracted after connecting data source according to the data source address, comprising:
The data source IP address for needing to carry out code analysis is obtained, the data source IP address is parsed, institute is obtained The signature for stating data source determines the frequency that code is extracted from the data source according to the signature;
The frequency that code is extracted according to the data source establishes data source and extracts frequency histogram, wherein the data are come The abscissa of source extraction frequency histogram is the time, ordinate is to extract number;
It is successively extracted from the data source in the corresponding data source of maximum value of the ordinate of frequency histogram and extracts code.
3. code administration method according to claim 1, which is characterized in that the described pair of code extracted is classified, By different classes of code storage to corresponding database, comprising:
Code analysis interface is obtained, the code is parsed according to the function service condition of the code analysis interface, is obtained To Program Type corresponding to the code;
The corresponding configuration file of described program type is obtained, the code is written to the corresponding configuration file of described program type In, wherein including described program type and key assignments in the configuration file;
Key assignments included in the corresponding configuration file of described program type is obtained, it is corresponding with key assignments according to preset database Relation table obtains the corresponding database of the key assignments;
Detect whether every data record in the corresponding database of the key assignments meets preset format, if satisfied, then will be described Code is stored to the database, and otherwise, the code is written in other configurations file again.
4. code administration method according to claim 3, which is characterized in that institute is established in the acquisition code update request The mapping relations for stating code update request and the database update the database according to the mapping relations, comprising:
The IP address for issuing the request source of code update request is obtained, the feature ginseng for including in the IP address of the request source is extracted Number;
According to the corresponding relationship that the ID of the characteristic parameter and the database is identified, establish the code update request with it is described The mapping relations of database, wherein the corresponding relationship that the ID of the characteristic parameter and the database is identified is stored in server In;
It obtains the code update and requests corresponding more fresh code, transfer the corresponding configuration file of the more fresh code, it will be described More fresh code is written to the corresponding configuration file of the more fresh code, then will more fresh code corresponding configuration file deposit institute State database.
5. code administration method according to claim 2, which is characterized in that described to obtain the number for needing to carry out code analysis According to source IP addresses, the data source IP address is parsed, the signature of the data source is obtained, according to described Signature determines the frequency that code is extracted from the data source, comprising:
The data source IP address is obtained, obtains dns resolution code after carrying out dns resolution to the data source IP address;
According to the mapping relations of the dns resolution code and preset dns resolution code table, the data source IP address is obtained Public field and feature field in corresponding dns resolution code;
According to the corresponding relationship of the public field and preset data source type, the type of the data source is determined, and The data source is marked according to the type of the data source;
The historical data that the feature field occurs is obtained, the distance according to the historical data apart from present moment assigns not Same weight calculates weighted average and obtains the frequency that any feature field occurs;
According to the frequency that the label of the data source and the feature field occur, determines from the data source and extract code Frequency.
6. code administration method according to claim 3, which is characterized in that the acquisition code analysis interface, according to institute The function service condition for stating code analysis interface parses the code, obtains Program Type corresponding to the code, Include:
The code is entered ginseng and calculated to the starting function, originated by the starting function for obtaining code analysis interface Functional value;
By the starting function value enter ginseng into the non-starting function in the code analysis interface, if any two or more than The calculated result of the non-starting function is consistent, then the consistent non-starting function of calculated result is transferred, if not calculating knot The consistent non-starting function of fruit then calls other code interfaces to carry out code analysis;
Program Type corresponding to the consistent non-starting function of calculated result is obtained, if all calculated results are consistent described The corresponding Program Type of non-starting function is consistent, then the code is classified as to the code of described program type;
If the corresponding Program Type of the consistent non-starting function of any two calculated result is inconsistent, by the code point It is not classified as different Program Types.
7. code administration method according to claim 4, which is characterized in that described obtain issues asking for code update request The IP address for asking source extracts the characteristic parameter for including in the IP address of the request source, comprising:
The IP address for issuing the request source of code update request is obtained, dns resolution is carried out to the IP address of the request source and is obtained Dns resolution code;
According to the mapping relations of the dns resolution code and preset dns resolution code table, the IP address of the request source is obtained Public field and feature field in corresponding dns resolution code;
Splice the public field and the feature field obtains the characteristic parameter.
8. a kind of code administration device characterized by comprising
Code module is extracted, is set as obtaining the data source address for needing to carry out code analysis, according to the data source Code is therefrom extracted after location connection data source;
Code enters library module, is set as classifying to the code extracted, by different classes of code storage to corresponding number According to library;
Code update module is set as obtaining code update request, establishes reflecting for code update request and the database Relationship is penetrated, updates the database according to the mapping relations.
9. a kind of computer equipment, including memory and processor, it is stored with computer-readable instruction in the memory, it is described When computer-readable instruction is executed by the processor, so that the processor executes such as any one of claims 1 to 7 right It is required that the step of code administration method.
10. a kind of storage medium for being stored with computer-readable instruction, the computer-readable instruction is handled by one or more When device executes, so that one or more processors execute the code administration side as described in any one of claims 1 to 7 claim The step of method.
CN201910057541.0A 2019-01-22 2019-01-22 Code administration method, apparatus, computer equipment and storage medium Pending CN109918077A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910057541.0A CN109918077A (en) 2019-01-22 2019-01-22 Code administration method, apparatus, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910057541.0A CN109918077A (en) 2019-01-22 2019-01-22 Code administration method, apparatus, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109918077A true CN109918077A (en) 2019-06-21

Family

ID=66960622

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910057541.0A Pending CN109918077A (en) 2019-01-22 2019-01-22 Code administration method, apparatus, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109918077A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061469A (en) * 2019-11-06 2020-04-24 贝壳技术有限公司 WEB front-end source code generation method and device, storage medium and processor
CN111724105A (en) * 2020-05-12 2020-09-29 北京旷视机器人技术有限公司 Data processing method and device and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061469A (en) * 2019-11-06 2020-04-24 贝壳技术有限公司 WEB front-end source code generation method and device, storage medium and processor
CN111061469B (en) * 2019-11-06 2023-09-15 贝壳技术有限公司 WEB front-end source code generation method and device, storage medium and processor
CN111724105A (en) * 2020-05-12 2020-09-29 北京旷视机器人技术有限公司 Data processing method and device and electronic equipment
CN111724105B (en) * 2020-05-12 2024-05-17 北京旷视机器人技术有限公司 Data processing method and device and electronic equipment

Similar Documents

Publication Publication Date Title
CN110099059B (en) Domain name identification method and device and storage medium
US10237295B2 (en) Automated event ID field analysis on heterogeneous logs
US11250250B2 (en) Pedestrian retrieval method and apparatus
CN103685307A (en) Method, system, client and server for detecting phishing fraud webpage based on feature library
CN111160021A (en) Log template extraction method and device
CN109740129B (en) Report generation method, device and equipment based on blockchain and readable storage medium
CN106997431B (en) Data processing method and device
CN105512283A (en) Data quality management and control method and device
CN109558411A (en) A kind of lower chain synchronous method and device based on block chain data
CN109446208A (en) A kind of date storage method, computer readable storage medium and server
US20040002983A1 (en) Method and system for detecting tables to be modified
CN114022151A (en) Block chain data visualization method and system, electronic device and storage medium
CN109918077A (en) Code administration method, apparatus, computer equipment and storage medium
US11609897B2 (en) Methods and systems for improved search for data loss prevention
CN112800061B (en) Data storage method, device, server and storage medium
CN115994079A (en) Test method, test device, electronic apparatus, storage medium, and program product
CN111680110B (en) Data processing method, data processing device, BI system and medium
CN113138906A (en) Call chain data acquisition method, device, equipment and storage medium
CN113360210A (en) Data reconciliation method and device, computer equipment and storage medium
CN103309929B (en) Storage and the method and system of retrieval data
US20220318378A1 (en) Detecting threats based on api service business logic abuse
CN115344633A (en) Data processing method, device, equipment and storage medium
CN107908724A (en) A kind of data model matching process, device, equipment and storage medium
CN114861076A (en) Information processing method, information processing device, computer equipment and storage medium
CN112184493A (en) Data processing method, system and storage medium based on big data and assembly type building platform

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