CN109783105A - Encoding statistics method, equipment, storage medium and the device of enterprises service platform - Google Patents

Encoding statistics method, equipment, storage medium and the device of enterprises service platform Download PDF

Info

Publication number
CN109783105A
CN109783105A CN201811531185.3A CN201811531185A CN109783105A CN 109783105 A CN109783105 A CN 109783105A CN 201811531185 A CN201811531185 A CN 201811531185A CN 109783105 A CN109783105 A CN 109783105A
Authority
CN
China
Prior art keywords
file
code
coding
enterprises service
platform
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
CN201811531185.3A
Other languages
Chinese (zh)
Other versions
CN109783105B (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.)
Beijing Zhongfa Zhiyuan Artificial Intelligence Technology Development Co ltd
Original Assignee
Ping An Puhui Enterprise Management Co 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 Ping An Puhui Enterprise Management Co Ltd filed Critical Ping An Puhui Enterprise Management Co Ltd
Priority to CN201811531185.3A priority Critical patent/CN109783105B/en
Publication of CN109783105A publication Critical patent/CN109783105A/en
Application granted granted Critical
Publication of CN109783105B publication Critical patent/CN109783105B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses encoding statistics method, equipment, storage medium and the devices of a kind of enterprises service platform, this method comprises: obtaining the submission record that enterprises service is administered in platform corresponding SVN code branch, extract file to be matched from submission record;The file to be matched is matched according to default regular expression, obtains file destination;The file destination is parsed, target code is obtained;Platform is administered from the enterprises service and obtains original coding, compares the target code and original coding, obtains newly-increased coding.In the present invention, go out file destination by regular expression matching, based on data processing, file destination is parsed, target code is obtained, compares target code and original coding, to accurately obtain the newly-increased coding that platform is administered in enterprises service, it is omitted when avoiding manually counting, and then causes to send out version and report an error, the case where production environment can not start or function is not available.

Description

Encoding statistics method, equipment, storage medium and the device of enterprises service platform
Technical field
The present invention relates to technical field of data processing more particularly to a kind of encoding statistics method of enterprises service platform, set Standby, storage medium and device.
Background technique
It is sent out every time currently, platform (Enterprise service governance, ESG) server-side is administered in enterprises service It when version, requires to be artificially collected by version manager, counts the ESG consumption coding and Services Code that this needs is issued, when When ESG Services Code and more consumption encoding ratio that version needs to issue, some Services Code or consumption are often lost Coding, but cannot find in time again, it reports an error when so as to cause hair version, production environment can not start or function can not make With, reduce hair version efficiency.Therefore, the accuracy of encoding statistics how is improved, so that it is urgently to be resolved for improving hair version efficiency Technical problem.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of encoding statistics methods of enterprises service platform, equipment, storage medium And device, it is intended to solve enterprises service in the prior art and administer the low technical problem of plateau coding statistics accuracy rate.
To achieve the above object, the present invention provides a kind of encoding statistics method of enterprises service platform, the enterprises service The encoding statistics method of platform the following steps are included:
The submission record that enterprises service is administered in platform corresponding SVN code branch is obtained, is mentioned from submission record Take file to be matched;
The file to be matched is matched according to default regular expression, obtains file destination;
The file destination is parsed, target code is obtained;
Platform is administered from the enterprises service and obtains original coding, is compared the target code and original coding, is obtained Coding must be increased newly.
Preferably, the basis is preset regular expression and is matched to the file to be matched, obtains file destination, packet It includes:
The file to be matched is matched according to the first regular expression, obtains the first file, first file For the file destination to be ended up with the first predetermined keyword;
The file to be matched is matched according to the second regular expression, obtains the second file, second file For the file destination to be ended up with the second predetermined keyword.
Preferably, described that the file destination is parsed, obtain target code, comprising:
First file is traversed, when traversing the object code comprising third predetermined keyword, obtains the target Code;
The object code is parsed, Services Code is obtained;
Second file is parsed by default resolver, obtains consumption coding, the target code includes the service Coding and consumption coding.
Preferably, described that the object code is parsed, obtain Services Code, comprising:
The object code is stored into default temporary table;
The default temporary table is traversed, the object code is matched according to third regular expression, is taken Business coding.
Preferably, described that second file is parsed by default resolver, obtain consumption coding, comprising:
Second file is parsed by the selector preset in resolver, obtains consumption coding.
Preferably, described that second file is parsed by default resolver, after obtaining consumption coding, enterprise's clothes The encoding statistics method of business platform further include:
The incidence relation between newly-increased Services Code and newly-increased consumption coding is configured, the newly-increased coding includes described newly-increased Services Code and the newly-increased consumption coding;
The newly-increased Services Code, newly-increased consumption coding and the incidence relation are sent to production environment system, with The production environment system is set to carry out file according to the newly-increased Services Code, the newly-increased consumption coding and the incidence relation Configuration.
Preferably, the submission record for obtaining enterprises service and administering in platform corresponding SVN code branch, mentions from described It hands over before extracting file to be matched in record, the encoding statistics method of the enterprises service platform further include:
It scans enterprises service and administers platform corresponding SVN code branch, mentioned if scanning exists into SVN code branch Record is handed over, then the submission record that the acquisition enterprises service is administered in platform corresponding SVN code branch is executed, from the submission The step of file to be matched is extracted in record.
In addition, to achieve the above object, the present invention also proposes a kind of encoding statistics equipment of enterprises service platform, the enterprise The encoding statistics equipment of industry service platform includes memory, processor and is stored on the memory and can be in the processor The encoding statistics program of the enterprises service platform of upper operation, the encoding statistics program of the enterprises service platform be arranged for carrying out as The step of encoding statistics method of enterprises service platform described above.
In addition, to achieve the above object, the present invention also proposes a kind of storage medium, enterprise is stored on the storage medium It realizes when the encoding statistics program of the encoding statistics program of service platform, the enterprises service platform is executed by processor as above The step of encoding statistics method of the enterprises service platform.
In addition, to achieve the above object, the present invention also proposes a kind of encoding statistics device of enterprises service platform, the enterprise The encoding statistics device of industry service platform includes:
Module is obtained, the submission record administered in platform corresponding SVN code branch for obtaining enterprises service, from described It submits in record and extracts file to be matched;
Matching module obtains file destination for matching according to default regular expression to the file to be matched;
Parsing module obtains target code for parsing to the file destination;
Comparison module obtains original coding for administering platform from the enterprises service, compares the target code and institute Original coding is stated, newly-increased coding is obtained.
In the present invention, recorded by obtaining the submission that enterprises service is administered in platform corresponding SVN code branch, from described It submits in record and extracts file to be matched, file extraction is carried out to each submission record, to guarantee that each newly-increased coding can It is counted in time;The file to be matched is matched according to default regular expression, file destination is obtained, to the target File is parsed, and target code is obtained, and is administered platform from the enterprises service and is obtained original coding, compares the target code With original coding, newly-increased coding is obtained, data processing is based on, to accurately obtain newly-increased coding, improves hair version efficiency, It is omitted when avoiding manually counting, and then causes to send out version and report an error, the case where production environment can not start or function is not available Occur.
Detailed description of the invention
Fig. 1 is the encoding statistics equipment of the enterprises service platform for the hardware running environment that the embodiment of the present invention is related to Structural schematic diagram;
Fig. 2 is the flow diagram of the encoding statistics method first embodiment of enterprises service platform of the present invention;
Fig. 3 is the flow diagram of the encoding statistics method second embodiment of enterprises service platform of the present invention;
Fig. 4 is the flow diagram of the encoding statistics method 3rd embodiment of enterprises service platform of the present invention;
Fig. 5 is the structural block diagram of the encoding statistics device first embodiment of enterprises service platform of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Referring to Fig.1, Fig. 1 is the coding system of the enterprises service platform for the hardware running environment that the embodiment of the present invention is related to Count device structure schematic diagram.
As shown in Figure 1, the encoding statistics equipment of the enterprises service platform may include: processor 1001, such as centre It manages device (Central Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, storage Device 1005.Wherein, communication bus 1002 is for realizing the connection communication between these components.User interface 1003 may include showing Display screen (Display), optional user interface 1003 can also include standard wireline interface and wireless interface, for user interface 1003 wireline interface can be USB interface in the present invention.Network interface 1004 optionally may include standard wireline interface, Wireless interface (such as Wireless Fidelity (WIreless-FIdelity, WI-FI) interface).Memory 1005 can be the random of high speed Memory (Random Access Memory, RAM) memory is accessed, stable memory (Non-volatile is also possible to Memory, NVM), such as magnetic disk storage.Memory 1005 optionally can also be the storage independently of aforementioned processor 1001 Device.
It will be understood by those skilled in the art that structure shown in Fig. 1 does not constitute the coding system to enterprises service platform The restriction for counting equipment may include perhaps combining certain components or different component cloth than illustrating more or fewer components It sets.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium Believe module, the encoding statistics program of Subscriber Interface Module SIM and enterprises service platform.
In the encoding statistics equipment of enterprises service platform shown in Fig. 1, network interface 1004 is mainly used for connection backstage Server carries out data communication with the background server;User interface 1003 is mainly used for connecting user equipment;The enterprise The encoding statistics equipment of service platform calls the coding of the enterprises service platform stored in memory 1005 by processor 1001 Statistics program, and execute the encoding statistics method of enterprises service platform provided in an embodiment of the present invention.
Based on above-mentioned hardware configuration, the embodiment of the encoding statistics method of enterprises service platform of the present invention is proposed.
It is the flow diagram of the encoding statistics method first embodiment of enterprises service platform of the present invention referring to Fig. 2, Fig. 2, It is proposed the encoding statistics method first embodiment of enterprises service platform of the present invention.
In the first embodiment, the enterprises service platform encoding statistics method the following steps are included:
Step S10: the submission record that enterprises service is administered in platform corresponding SVN code branch is obtained, from the submission File to be matched is extracted in record.
It should be understood that the executing subject of the present embodiment is the encoding statistics equipment of the enterprises service platform, wherein institute The encoding statistics equipment for stating enterprises service platform can be the electronic equipments such as PC or server.SVN code branch is The version control system of one open source code, SVN are the abbreviations of Subversion, it uses branch management system, and SVN is For multiple same projects of people's joint development, the purpose of common source, the core of centralized code administration is server, is owned Developer must obtain code from server before starting new darg and then develop into the branch of oneself, finally Conflict is solved, is submitted.The file information of all versions is all put on the server.The file to be matched can be the submission All types of files in record, or ended up including at least filename with the .java file to end up and filename with .xml Configuration file.
Step S20: matching the file to be matched according to default regular expression, obtains file destination.
It will be appreciated that usually Services Code can be present in in the file of .java ending, then it is settable it is described it is default just Then expression formula is " [a-zA-Z] * .java $ ", according to this preset regular expression matching into the file to be matched it is all with .java the file to end up, the file destination include all files to be ended up with .java.It can be tied by the way that parsing is all with .java The file of tail obtains Services Code.
In the concrete realization, usually consumption coding can exist in the configuration file that is ended up with .xml, then it is settable described Default regular expression is " [a-zA-Z] * xml $ ", presets regular expression matching institute into the file to be matched according to this There is the configuration file to end up with .xml, the file destination includes all configuration files to end up with .xml.Parsing institute can be passed through Have and consumption coding is obtained with the configuration file of .xml ending.
Step S30: parsing the file destination, obtains target code.
It should be noted that the target code includes the Services Code and consumption coding, the consumption coding It is all the term on ESG platform with Services Code, ESG platform includes two systems: a service side, a consumer, consumption It is interacted between side and service side, consumption coding is the coding uniquely fixed of consumer, for matching on ESG platform The incidence relation with Services Code is set, Services Code is the coding uniquely fixed that service side provides, and is matched on ESG platform It sets, for being associated with consumption coding.Services Code and consumption coding can be increased newly before ESG platform hair version, need to unite before sending out version The consumption coding and Services Code of this hair version are counted, so that it is guaranteed that the correctness of hair version content.
It should be understood that the file destination includes all with the file of .java ending and all matching with .xml ending Set file.The file to be ended up with .java is parsed, reads file content line by line, finds the target started with@PA_API Code scans the object code to obtain the Services Code.The configuration to end up with .xml can be parsed by Jsoup resolver File, Jsoup are HyperText Markup Language (HyperText Markup Language, HTML) resolvers of a Java, Some uniform resource locator address (Uniform Resource Locator, URL) or html text content can be directly parsed, It provide a set of very labour-saving application programming interface (Application Programming Interface, API), DOM Document Object Model (Document Object Model, DOM), cascading style sheets (Cascading Style can be passed through Sheets, CSS) and take out and operation data similar to the mode of operation of auspicious (jQuery) of being exceedingly fast, to disappear described in obtaining Take coding.The Services Code and consumption coding to acquisition count, can be according to the Services Code of statistics and consumption Coding is adjusted the hair version content of ESG platform, to guarantee the correctness of hair version, improves hair version efficiency.
Step S40: administering platform from the enterprises service and obtain original coding, compare the target code with it is described original Coding obtains newly-increased coding.
It will be appreciated that can be compiled to the Services Code and the consumption when statistical fractals coding and consumption encode every time Code puts on corresponding label, then original coding of platform, institute can be administered by the label lookup to the enterprises service State all Services Codes and consumption coding present in original last revision for being encoded to the enterprises service improvement platform.It will be from It is described that the target code for parsing acquisition in record is submitted to be compared with original coding, if the target code does not go out In present original coding, then it can assert that the target code not appeared in original coding is newly-increased coding.It is logical Often the Services Code in the target code is compared with the Services Code in original coding, it, can if inconsistent Regard as newly-increased Services Code.Consumption coding in the target code is encoded with the consumption in original coding and is carried out It compares, if inconsistent, newly-increased consumption coding can be regarded as.
In the present embodiment, recorded by obtaining the submission that enterprises service is administered in platform corresponding SVN code branch, from institute It states in submission record and extracts file to be matched, file extraction is carried out to each submission record, to guarantee each newly-increased coding It can be counted in time;The file to be matched is matched according to default regular expression, file destination is obtained, to the mesh Mark file is parsed, and target code is obtained, and is administered platform from the enterprises service and is obtained original coding, is compared the target and is compiled Code and original coding obtain newly-increased coding, are based on data processing, to accurately obtain newly-increased coding, improve hair version effect Rate is omitted when avoiding manually counting, and then hair version is caused to report an error, the feelings that production environment can not start or function is not available Condition occurs.
It is the flow diagram of the encoding statistics method second embodiment of enterprises service platform of the present invention referring to Fig. 3, Fig. 3, Based on above-mentioned first embodiment shown in Fig. 2, the second embodiment of the encoding statistics method of enterprises service platform of the present invention is proposed.
In a second embodiment, the step S20, comprising:
Step S201: matching the file to be matched according to the first regular expression, obtains the first file, described First file is the file destination to be ended up with the first predetermined keyword.
It will be appreciated that first regular expression can be " [a-zA-Z] * .java $ ", to the file to be matched It is matched, to match all first files to end up with .java in the file to be matched, described first is default Keyword is .java.Services Code can be obtained by parsing all files with .java ending.
Step S202: matching the file to be matched according to the second regular expression, obtains the second file, described Second file is the file destination to be ended up with the second predetermined keyword.
It should be understood that second regular expression can be " [a-zA-Z] * xml $ ", to the band matching files into Row matching, so that all second files to end up with .xml in the file to be matched are matched, the described second default pass Keyword .xml.Consumption coding can be obtained by parsing all configuration files with .xml ending.
In a second embodiment, the step S30, comprising:
Step S301: traversal first file is obtained when traversing the object code comprising third predetermined keyword The object code.
It should be noted that the third predetermined keyword is@PA_API, it include fixing in the code of usual Services Code The third predetermined keyword, first file can be traversed, read the content of first file line by line, if The object code started with the third predetermined keyword is traversed, then only needs further to solve the object code Analysis, can be obtained the Services Code.
Step S302: parsing the object code, obtains Services Code.
In the concrete realization, the object code can be stored in default temporary table, then recycles the temporary table In data, that is to say, that the default temporary table is traversed, according to third regular expression " " (.*?) " " The Services Code is allotted, if there is coding in the object code can match the third regular expression, can be assert Successful match is encoded to the Services Code.In the present embodiment, the step S302, comprising: store the object code extremely In default temporary table;The default temporary table is traversed, the object code is matched according to third regular expression, Obtain Services Code.
Step S303: second file is parsed by default resolver, obtains consumption coding, the target code includes The Services Code and consumption coding.
It should be understood that the default resolver can be Jsoup resolver, pass through the choosing in the Jsoup resolver It selects device and parses second file, DOM Document Object Model (Document ObjectModel, DOM), cascading style sheets can be passed through (Cascading Style Sheets, CSS) and similar to be exceedingly fast auspicious (jQuery) mode of operation from second file In extract data, to obtain consumption coding.
In the present embodiment, the step S303, comprising: second text is parsed by the selector preset in resolver Part obtains consumption coding.
It will be appreciated that the default resolver can be Jsoup resolver, the selector in the Jsoup resolver Second file is parsed, element can also be searched in NameSpace by label by label lookup element, it can be with Element is searched using attribute, element can also be searched using attribute-name prefix, element can also be searched using attribute value, also It can use the beginning of match attribute value, end up or search element comprising attribute value, canonical table can also be matched using attribute value Element is searched up to formula, can also be searched element by the combination of above-mentioned several ways, can also be searched matcher-selector-connector Element comprising element, can also search with the unmatched element of selector, the element comprising given text can also be searched, also The element directly comprising given text can be searched, the specified regular expression of the text matches of which element can also be searched, The element for itself regular expression being specified comprising text matches can also be searched.
It should be noted that the selector in the Jsoup resolver is usually Element.select, pass through Element.select searches corresponding consumption coding, will return to an Elements set, and provides one group of method to extract And processing result, search rule are as follows:
" bean [class=" com.paic.esg.config.spring.ReferenceBean "] > property > value”。
In the present embodiment, first file is traversed, when traversing the object code comprising third predetermined keyword, is obtained The object code is taken, the object code is parsed, obtains Services Code, passes through default resolver parsing described second File obtains consumption coding, and the target code includes the Services Code and consumption coding, so that programming count goes out institute It states and increases Services Code and the newly-increased consumption coding described in submission record newly, avoid manually counting to there is the case where omission, Improve encoding statistics efficiency and accuracy rate.
It is the flow diagram of the encoding statistics method 3rd embodiment of enterprises service platform of the present invention referring to Fig. 4, Fig. 4, Based on above-mentioned second embodiment shown in Fig. 3, the 3rd embodiment of the encoding statistics method of enterprises service platform of the present invention is proposed.
In the third embodiment, after the step S303, further includes:
Step S50: configuring the incidence relation between newly-increased Services Code and newly-increased consumption coding, and the newly-increased coding includes The newly-increased Services Code and the newly-increased consumption coding;
It will be appreciated that consumption coding and Services Code are all the terms on ESG platform, the ESG platform includes two System: service side and consumer interact between the service side and the consumer, and consumption coding is one of consumer Uniquely fixed coding, for configuring the incidence relation with Services Code on the ESG platform, Services Code is that service side mentions The coding that one supplied uniquely fixes, configures on the ESG platform, for being associated with consumption coding.It is recorded from the submission The newly-increased Services Code of the ESG platform of middle statistics and newly-increased consumption coding, then need before sending out version to the newly-increased service Coding and the newly-increased consumption encode configuration association relationship, and the production environment system docked with the ESG platform relies on described new Increase Services Code and newly-increased consumption coding carry out file configuration, can be counted before send out version from the submission record in parse and obtain The newly-increased consumption coding and the newly-increased Services Code.
Step S60: the newly-increased Services Code, the newly-increased consumption coding and the incidence relation are sent to production environment System, so that the production environment system is according to the newly-increased Services Code, the newly-increased consumption coding and the incidence relation Carry out file configuration.
It should be understood that having counted the newly-increased Services Code and the newly-increased consumption coding, and it is configured with described new Increase Services Code and it is described it is newly-increased consumption coding between incidence relation, the production environment system docked with the ESG platform according to Rely the newly-increased Services Code, newly-increased consumption coding and the incidence relation to carry out file configuration, then sends institute before sending out version Newly-increased Services Code, newly-increased consumption coding and the incidence relation are stated to the production environment system, so that the production environment System carries out file configuration according to the newly-increased Services Code, the newly-increased consumption coding and the incidence relation, to avoid Some Services Code or consumption coding are lost, causes to report an error when sending out version, production environment can not start or function is not available.
In the third embodiment, before the step S10, further includes:
It scans enterprises service and administers platform corresponding SVN code branch, mentioned if scanning exists into SVN code branch Record is handed over, then executes the step S10.
It should be noted that in order to find the newly-increased Services Code and the newly-increased consumption coding in time, it can be to described SVN code branch carries out in real time or timing scan obtains if scanning exists into SVN code branch submits record The submission record in platform corresponding SVN code branch is administered in enterprises service, extracts file to be matched from submission record, So as to be counted the newly-increased Services Code and the newly-increased consumption coding in time, avoid omitting.
In the present embodiment, by configuring the incidence relation between the newly-increased Services Code and the newly-increased consumption coding, The newly-increased Services Code, the newly-increased consumption coding and the incidence relation are sent to production environment system, so that the life It produces environmental system and file configuration is carried out according to the newly-increased Services Code, the newly-increased consumption coding and the incidence relation, from And avoid losing some Services Code or consumption coding, cause to report an error when sending out version, production environment can not start or function without The case where method use, occurs.
In addition, the embodiment of the present invention also proposes a kind of storage medium, enterprises service platform is stored on the storage medium Encoding statistics program, the encoding statistics program of the enterprises service platform realizes enterprise as described above when being executed by processor The step of encoding statistics method of industry service platform.
In addition, the embodiment of the present invention also proposes a kind of encoding statistics device of enterprises service platform, the enterprise referring to Fig. 5 The encoding statistics device of industry service platform includes:
Module 10 is obtained, the submission record administered in platform corresponding SVN code branch for obtaining enterprises service, from institute It states in submission record and extracts file to be matched;
Matching module 20 obtains target text for matching according to default regular expression to the file to be matched Part;
Parsing module 30 obtains target code for parsing to the file destination;
Comparison module 40 obtains original coding for administering platform from the enterprises service, compare the target code with Original coding obtains newly-increased coding.
It should be understood that SVN code branch is the version control system of an open source code, SVN is The abbreviation of Subversion, it uses branch management system, and SVN is shared for multiple same projects of people's joint development The purpose of resource, the core of centralized code administration are servers, and all developers are necessary before starting new darg Code is obtained from server then to develop into the branch of oneself, finally solves conflict, is submitted.The file of all versions is believed Breath is all put on the server.The file to be matched can be all types of files in the submission record, or at least The configuration file to be ended up including filename with the .java file to end up and filename with .xml.
It will be appreciated that usually Services Code can be present in in the file of .java ending, then it is settable it is described it is default just Then expression formula is " [a-zA-Z] * .java $ ", according to this preset regular expression matching into the file to be matched it is all with .java the file to end up, the file destination include all files to be ended up with .java.It can be tied by the way that parsing is all with .java The file of tail obtains Services Code.
In the concrete realization, usually consumption coding can exist in the configuration file that is ended up with .xml, then it is settable described Default regular expression is " [a-zA-Z] * xml $ ", presets regular expression matching institute into the file to be matched according to this There is the configuration file to end up with .xml, the file destination includes all configuration files to end up with .xml.Parsing institute can be passed through Have and consumption coding is obtained with the configuration file of .xml ending.
It should be noted that the target code includes the Services Code and consumption coding, the consumption coding It is all the term on ESG platform with Services Code, ESG platform includes two systems: a service side, a consumer, consumption It is interacted between side and service side, consumption coding is the coding uniquely fixed of consumer, for matching on ESG platform The incidence relation with Services Code is set, Services Code is the coding uniquely fixed that service side provides, and is matched on ESG platform It sets, for being associated with consumption coding.Services Code and consumption coding can be increased newly before ESG platform hair version, need to unite before sending out version The consumption coding and Services Code of this hair version are counted, so that it is guaranteed that the correctness of hair version content.
It should be understood that the file destination includes all with the file of .java ending and all matching with .xml ending Set file.The file to be ended up with .java is parsed, reads file content line by line, finds the target started with@PA_API Code scans the object code to obtain the Services Code.The configuration to end up with .xml can be parsed by Jsoup resolver File, Jsoup are HyperText Markup Language (HyperText Markup Language, HTML) resolvers of a Java, Some uniform resource locator address (Uniform Resource Locator, URL) or html text content can be directly parsed, It provide a set of very labour-saving application programming interface (Application Programming Interface, API), DOM Document Object Model (Document Object Model, DOM), cascading style sheets (Cascading Style can be passed through Sheets, CSS) and take out and operation data similar to the mode of operation of auspicious (jQuery) of being exceedingly fast, to disappear described in obtaining Take coding.The Services Code and consumption coding to acquisition count, can be according to the Services Code of statistics and consumption Coding is adjusted the hair version content of ESG platform, to guarantee the correctness of hair version, improves hair version efficiency.
It will be appreciated that can be compiled to the Services Code and the consumption when statistical fractals coding and consumption encode every time Code puts on corresponding label, then original coding of platform, institute can be administered by the label lookup to the enterprises service State all Services Codes and consumption coding present in original last revision for being encoded to the enterprises service improvement platform.It will be from It is described that the target code for parsing acquisition in record is submitted to be compared with original coding, if the target code does not go out In present original coding, then it can assert that the target code not appeared in original coding is newly-increased coding.It is logical Often the Services Code in the target code is compared with the Services Code in original coding, it, can if inconsistent Regard as newly-increased Services Code.Consumption coding in the target code is encoded with the consumption in original coding and is carried out It compares, if inconsistent, newly-increased consumption coding can be regarded as.
In the present embodiment, recorded by obtaining the submission that enterprises service is administered in platform corresponding SVN code branch, from institute It states in submission record and extracts file to be matched, file extraction is carried out to each submission record, to guarantee each newly-increased coding It can be counted in time;The file to be matched is matched according to default regular expression, file destination is obtained, to the mesh Mark file is parsed, and target code is obtained, and is administered platform from the enterprises service and is obtained original coding, is compared the target and is compiled Code and original coding obtain newly-increased coding, are based on data processing, to accurately obtain newly-increased coding, improve hair version effect Rate is omitted when avoiding manually counting, and then hair version is caused to report an error, the feelings that production environment can not start or function is not available Condition occurs.
In one embodiment, the matching module 20 is also used to according to the first regular expression to the file to be matched It is matched, obtains the first file, first file is the file destination to end up with the first predetermined keyword;
The matching module 20 is also used to match the file to be matched according to the second regular expression, obtains Second file, second file are the file destination to be ended up with the second predetermined keyword.
In one embodiment, the encoding statistics device of the enterprises service platform further include:
Spider module, for traversing first file, when traversing the object code comprising third predetermined keyword, Obtain the object code;
The parsing module 30 is also used to parse the object code, obtains Services Code;
The parsing module 30 is also used to parse second file by default resolver, obtains consumption coding, described Target code includes the Services Code and consumption coding.
In one embodiment, the encoding statistics device of the enterprises service platform further include:
Storage module, for storing the object code into default temporary table;
The spider module is also used to traverse the default temporary table, according to third regular expression to the target Code is matched, and Services Code is obtained.
In one embodiment, the parsing module 30 is also used to parse described the by the selector preset in resolver Two files obtain consumption coding.
In one embodiment, the encoding statistics device of the enterprises service platform further include:
Configuration module, for configuring the incidence relation between newly-increased Services Code and newly-increased consumption coding, the new addendum Code includes the newly-increased Services Code and the newly-increased consumption coding;
Sending module, for sending the newly-increased Services Code, the newly-increased consumption coding and the incidence relation to life Environmental system is produced, so that the production environment system is according to the newly-increased Services Code, the newly-increased consumption coding and the pass Connection relationship carries out file configuration.
In one embodiment, the encoding statistics device of the enterprises service platform further include:
Scan module administers platform corresponding SVN code branch for scanning enterprises service, if the SVN generation is arrived in scanning Exist in code branch and submit record, then executes the submission that the acquisition enterprises service is administered in platform corresponding SVN code branch The step of recording, extracting file to be matched from submission record.
The other embodiments or specific implementation of the encoding statistics device of enterprises service platform of the present invention can refer to Above-mentioned each method embodiment, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.If listing equipment for drying Unit claim in, several in these devices, which can be, to be embodied by the same item of hardware.Word first, Second and the use of third etc. do not indicate any sequence, can be mark by these word explanations.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium (such as read-only memory mirror image (Read Only Memory image, ROM)/random access memory (Random Access Memory, RAM), magnetic disk, CD) in, including some instructions are used so that terminal device (can be mobile phone, computer, Server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of encoding statistics method of enterprises service platform, which is characterized in that the encoding statistics side of the enterprises service platform Method the following steps are included:
Obtain enterprises service administer platform corresponding SVN code branch in submission record, from submissions record in extraction to Matching files;
The file to be matched is matched according to default regular expression, obtains file destination;
The file destination is parsed, target code is obtained;
Platform is administered from the enterprises service and obtains original coding, compares the target code and original coding, is obtained new Addendum code.
2. the encoding statistics method of enterprises service platform as described in claim 1, which is characterized in that the basis presets canonical Expression formula matches the file to be matched, obtains file destination, comprising:
The file to be matched is matched according to the first regular expression, obtain the first file, first file be with The file destination of first predetermined keyword ending;
The file to be matched is matched according to the second regular expression, obtain the second file, second file be with The file destination of second predetermined keyword ending.
3. the encoding statistics method of enterprises service platform as claimed in claim 2, which is characterized in that described to the target text Part is parsed, and target code is obtained, comprising:
First file is traversed, when traversing the object code comprising third predetermined keyword, obtains the object code;
The object code is parsed, Services Code is obtained;
Second file is parsed by default resolver, obtains consumption coding, the target code includes the Services Code It is encoded with the consumption.
4. the encoding statistics method of enterprises service platform as claimed in claim 3, which is characterized in that described to the target generation Code is parsed, and Services Code is obtained, comprising:
The object code is stored into default temporary table;
The default temporary table is traversed, the object code is matched according to third regular expression, the service of acquisition is compiled Code.
5. the encoding statistics method of enterprises service platform as claimed in claim 3, which is characterized in that described to pass through default parsing Device parses second file, obtains consumption coding, comprising:
Second file is parsed by the selector preset in resolver, obtains consumption coding.
6. the encoding statistics method of enterprises service platform as claimed in claim 3, which is characterized in that described to be taken from the enterprise Business administers platform and obtains original coding, compares the target code and original coding, after obtaining newly-increased coding, the enterprise The encoding statistics method of industry service platform further include:
The incidence relation between newly-increased Services Code and newly-increased consumption coding is configured, the newly-increased coding includes the newly-increased service Coding and the newly-increased consumption coding;
The newly-increased Services Code, the newly-increased consumption coding and the incidence relation are sent to production environment system, so that institute Production environment system is stated to be matched according to the newly-increased Services Code, the newly-increased consumption coding and incidence relation progress file It sets.
7. such as the encoding statistics method of enterprises service platform of any of claims 1-6, which is characterized in that described to obtain The submission record for taking enterprises service to administer in platform corresponding SVN code branch, extracts text to be matched from submission record Before part, the encoding statistics method of the enterprises service platform further include:
It scans enterprises service and administers platform corresponding SVN code branch, if scanning exists into SVN code branch submits note Record then executes the submission record that the acquisition enterprises service is administered in platform corresponding SVN code branch, records from the submission The step of middle extraction file to be matched.
8. a kind of encoding statistics equipment of enterprises service platform, which is characterized in that the encoding statistics of the enterprises service platform are set It is standby to include: memory, processor and be stored in the enterprises service platform that run on the memory and on the processor Encoding statistics program, realize when the encoding statistics program of the enterprises service platform is executed by the processor such as claim The step of encoding statistics method of enterprises service platform described in any one of 1 to 7.
9. a kind of storage medium, which is characterized in that the encoding statistics program of enterprises service platform is stored on the storage medium, It is realized as described in any one of claims 1 to 7 when the encoding statistics program of the enterprises service platform is executed by processor The step of encoding statistics method of enterprises service platform.
10. a kind of encoding statistics device of enterprises service platform, which is characterized in that the encoding statistics of the enterprises service platform fill It sets and includes:
Module is obtained, the submission record administered in platform corresponding SVN code branch for obtaining enterprises service, from the submission File to be matched is extracted in record;
Matching module obtains file destination for matching according to default regular expression to the file to be matched;
Parsing module obtains target code for parsing to the file destination;
Comparison module obtains original coding for administering platform from the enterprises service, compares the target code and the original There is coding, obtains newly-increased coding.
CN201811531185.3A 2018-12-14 2018-12-14 Coding statistical method, equipment, storage medium and device of enterprise service platform Active CN109783105B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811531185.3A CN109783105B (en) 2018-12-14 2018-12-14 Coding statistical method, equipment, storage medium and device of enterprise service platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811531185.3A CN109783105B (en) 2018-12-14 2018-12-14 Coding statistical method, equipment, storage medium and device of enterprise service platform

Publications (2)

Publication Number Publication Date
CN109783105A true CN109783105A (en) 2019-05-21
CN109783105B CN109783105B (en) 2024-04-09

Family

ID=66496920

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811531185.3A Active CN109783105B (en) 2018-12-14 2018-12-14 Coding statistical method, equipment, storage medium and device of enterprise service platform

Country Status (1)

Country Link
CN (1) CN109783105B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241254A (en) * 2019-07-16 2021-01-19 北京车和家信息技术有限公司 Code statistical method and device for Internet of vehicles multi-terminal system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647813A (en) * 2013-11-29 2014-03-19 中国物品编码中心 A method and an apparatus for analyzing Internet of Things unified identification codes
CN103699637A (en) * 2013-12-23 2014-04-02 国云科技股份有限公司 Code productivity statistic method and system
WO2014092694A1 (en) * 2012-12-11 2014-06-19 Hewlett-Packard Development Company, L.P. Provisioning tools for application development
CN105094851A (en) * 2015-09-06 2015-11-25 浪潮软件股份有限公司 Method for realizing code release at any time based on Git
CN106293701A (en) * 2016-07-26 2017-01-04 浪潮软件股份有限公司 Multi-tenant version management application engine design method based on cloud server
CN107894895A (en) * 2017-11-06 2018-04-10 网易(杭州)网络有限公司 Processing method, device, storage medium, processor and the server of code update
CN108234541A (en) * 2016-12-14 2018-06-29 陕西省地方电力(集团)有限公司 A kind of service management and system of enterprise's bus platform

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014092694A1 (en) * 2012-12-11 2014-06-19 Hewlett-Packard Development Company, L.P. Provisioning tools for application development
CN103647813A (en) * 2013-11-29 2014-03-19 中国物品编码中心 A method and an apparatus for analyzing Internet of Things unified identification codes
CN103699637A (en) * 2013-12-23 2014-04-02 国云科技股份有限公司 Code productivity statistic method and system
CN105094851A (en) * 2015-09-06 2015-11-25 浪潮软件股份有限公司 Method for realizing code release at any time based on Git
CN106293701A (en) * 2016-07-26 2017-01-04 浪潮软件股份有限公司 Multi-tenant version management application engine design method based on cloud server
CN108234541A (en) * 2016-12-14 2018-06-29 陕西省地方电力(集团)有限公司 A kind of service management and system of enterprise's bus platform
CN107894895A (en) * 2017-11-06 2018-04-10 网易(杭州)网络有限公司 Processing method, device, storage medium, processor and the server of code update

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241254A (en) * 2019-07-16 2021-01-19 北京车和家信息技术有限公司 Code statistical method and device for Internet of vehicles multi-terminal system
CN112241254B (en) * 2019-07-16 2024-02-02 北京车和家信息技术有限公司 Code statistics method and device for Internet of vehicles multi-terminal system

Also Published As

Publication number Publication date
CN109783105B (en) 2024-04-09

Similar Documents

Publication Publication Date Title
US10621211B2 (en) Language tag management on international data storage
CN104572114B (en) A kind of binding device, using updating device and method
US20080126439A1 (en) Change verification in a configuration management database
CN102236544B (en) Method and device for designing skins
US20110167332A1 (en) System and Method for Generating Web Pages
WO2012034440A1 (en) Method and device for generating database upgrading script
CN109657121A (en) A kind of Web page information acquisition method and device based on web crawlers
US20190147029A1 (en) Method and system for generating conversational user interface
CN103313289A (en) Wap system automatic test system and method
CN113448562B (en) Automatic logic code generation method and device and electronic equipment
CN108984632A (en) A kind of webpage setting method and device
CN110381363A (en) Video encoding/decoding method, device, server and storage medium
CN110888634B (en) Game floor page generation method, game floor page generation device, computer equipment and storage medium
CN108021580A (en) A kind of data synchronization updating method and its system
CN107426588B (en) Method, system and storage device for acquiring television set configuration information
CN107391528B (en) Front-end component dependent information searching method and equipment
CN111159040A (en) Test data generation method, device, equipment and storage medium
CN109460389B (en) OpenResty-based log recording method
CN112559525B (en) Data checking system, method, device and server
CN109783105A (en) Encoding statistics method, equipment, storage medium and the device of enterprises service platform
CN104461893A (en) Data processing method and data processing device
CN116450353A (en) Processor core matching method and device, electronic equipment and storage medium
WO2023077932A1 (en) Method and apparatus for automatically registering floor code, and storage medium
CN110837359A (en) MVC Web framework realized by GOLANG language
CN105808628A (en) Webpage transcoding method, apparatus and system

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
TA01 Transfer of patent application right

Effective date of registration: 20240305

Address after: Room 126, 1st Floor, Building 1, No.1 Qiaoyuan Road, Shilong Industrial Zone, Mentougou District, Beijing, 100000

Applicant after: Beijing Zhongfa Zhiyuan Artificial Intelligence Technology Development Co.,Ltd.

Country or region after: China

Address before: 518000 Room 201, building A, No. 1, Qian Wan Road, Qianhai Shenzhen Hong Kong cooperation zone, Shenzhen, Guangdong (Shenzhen Qianhai business secretary Co., Ltd.)

Applicant before: PING AN PUHUI ENTERPRISE MANAGEMENT Co.,Ltd.

Country or region before: China

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant