CN109783105B - Coding statistical method, equipment, storage medium and device of enterprise service platform - Google Patents

Coding statistical method, equipment, storage medium and device of enterprise service platform Download PDF

Info

Publication number
CN109783105B
CN109783105B CN201811531185.3A CN201811531185A CN109783105B CN 109783105 B CN109783105 B CN 109783105B CN 201811531185 A CN201811531185 A CN 201811531185A CN 109783105 B CN109783105 B CN 109783105B
Authority
CN
China
Prior art keywords
code
file
target
enterprise service
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.)
Active
Application number
CN201811531185.3A
Other languages
Chinese (zh)
Other versions
CN109783105A (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
Beijing Zhongfa Zhiyuan Artificial Intelligence Technology Development 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 Beijing Zhongfa Zhiyuan Artificial Intelligence Technology Development Co ltd filed Critical Beijing Zhongfa Zhiyuan Artificial Intelligence Technology Development 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 a coding statistical method, equipment, a storage medium and a device of an enterprise service platform, wherein the method comprises the following steps: acquiring a submitting record in an SVN code branch corresponding to an enterprise service management platform, and extracting a file to be matched from the submitting record; matching the files to be matched according to a preset regular expression to obtain a target file; analyzing the target file to obtain a target code; and acquiring an original code from the enterprise service management platform, and comparing the target code with the original code to acquire a new code. According to the invention, the target file is matched through the regular expression, the target file is analyzed based on data processing, the target code is obtained, and the target code is compared with the original code, so that the new code of the enterprise service management platform is accurately obtained, omission during manual statistics is avoided, and further, the situations that version reporting is wrong, the production environment cannot be started or functions cannot be used are avoided.

Description

Coding statistical method, equipment, storage medium and device of enterprise service platform
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a coding statistical method, device, storage medium, and apparatus for an enterprise service platform.
Background
Currently, when an enterprise service management platform (Enterprise service governance, ESG) server side transmits a edition each time, the ESG consumption code and the service code which need to be transmitted at this time are counted and collected manually by a edition manager, when the ESG service code and the consumption code which need to be transmitted at this time are relatively more, a certain service code or consumption code is frequently lost, but cannot be found in time, so that errors are reported when the edition is transmitted, the production environment cannot be started or functions cannot be used, and the edition transmission efficiency is reduced. Therefore, how to improve the accuracy of coding statistics, so as to improve the plate making efficiency is a technical problem to be solved.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a coding statistical method, equipment, a storage medium and a device of an enterprise service platform, and aims to solve the technical problem of low coding statistical accuracy of the enterprise service management platform in the prior art.
In order to achieve the above object, the present invention provides a coding statistical method for an enterprise service platform, where the coding statistical method for an enterprise service platform includes the following steps:
acquiring a submitting record in an SVN code branch corresponding to an enterprise service management platform, and extracting a file to be matched from the submitting record;
matching the files to be matched according to a preset regular expression to obtain a target file;
analyzing the target file to obtain a target code;
and acquiring an original code from the enterprise service management platform, and comparing the target code with the original code to acquire a new code.
Preferably, the matching the files to be matched according to a preset regular expression to obtain a target file includes:
matching the files to be matched according to a first regular expression to obtain a first file, wherein the first file is a target file ending with a first preset keyword;
and matching the files to be matched according to a second regular expression to obtain a second file, wherein the second file is a target file ending with a second preset keyword.
Preferably, the parsing the target file to obtain a target code includes:
traversing the first file, and acquiring an object code containing a third preset keyword when traversing the object code;
analyzing the target code to obtain a service code;
and analyzing the second file through a preset analyzer to obtain a consumption code, wherein the target code comprises the service code and the consumption code.
Preferably, the parsing the object code to obtain a service code includes:
storing the target codes into a preset temporary list;
and traversing the preset temporary list, and matching the target codes according to a third regular expression to obtain service codes.
Preferably, the parsing, by a preset parser, the second file to obtain a consumption code includes:
and analyzing the second file through a selector in a preset analyzer to obtain the consumption code.
Preferably, after the second file is parsed by a preset parser to obtain the consumption code, the code statistics method of the enterprise service platform further includes:
configuring an association relation between a new service code and a new consumption code, wherein the new code comprises the new service code and the new consumption code;
and sending the new service code, the new consumption code and the association relation to a production environment system so that the production environment system performs file configuration according to the new service code, the new consumption code and the association relation.
Preferably, the method for coding statistics of the enterprise service management platform further includes:
scanning SVN code branches corresponding to an enterprise service management platform, and executing the step of acquiring the submitted records in the SVN code branches corresponding to the enterprise service management platform and extracting files to be matched from the submitted records if the submitted records exist in the SVN code branches.
In addition, in order to achieve the above object, the present invention also proposes an encoding and statistics device for an enterprise service platform, where the encoding and statistics device for an enterprise service platform includes a memory, a processor, and an encoding and statistics program for an enterprise service platform stored on the memory and capable of running on the processor, where the encoding and statistics program for an enterprise service platform is configured to implement the steps of the encoding and statistics method for an enterprise service platform as described above.
In addition, in order to achieve the above object, the present invention further proposes a storage medium, on which a coding statistics program of an enterprise service platform is stored, the coding statistics program of the enterprise service platform implementing the steps of the coding statistics method of the enterprise service platform as described above when being executed by a processor.
In addition, in order to achieve the above object, the present invention further provides a coding statistics device of an enterprise service platform, where the coding statistics device of the enterprise service platform includes:
the acquisition module is used for acquiring a submitting record in the SVN code branch corresponding to the enterprise service management platform and extracting a file to be matched from the submitting record;
the matching module is used for matching the files to be matched according to a preset regular expression to obtain target files;
the analysis module is used for analyzing the target file to obtain a target code;
and the comparison module is used for acquiring the original code from the enterprise service management platform, and comparing the target code with the original code to acquire a new code.
According to the invention, the file to be matched is extracted from the submitting records by acquiring the submitting records in the SVN code branches corresponding to the enterprise service management platform, and the file extraction is carried out on each submitting record so as to ensure that each newly added code can be counted in time; matching the files to be matched according to a preset regular expression to obtain a target file, analyzing the target file to obtain a target code, obtaining an original code from the enterprise service management platform, comparing the target code with the original code to obtain a new code, and processing based on data, so that the new code is accurately obtained, the plate-distributing efficiency is improved, omission is avoided during manual statistics, plate-distributing and error-reporting is further caused, and the conditions that the production environment cannot be started or functions cannot be used occur.
Drawings
FIG. 1 is a schematic diagram of a coding statistics device of an enterprise service platform of a hardware running environment according to an embodiment of the present invention;
FIG. 2 is a flowchart of a first embodiment of a coding statistics method of an enterprise service platform according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of an encoding statistical method of an enterprise service platform according to the present invention;
FIG. 4 is a flowchart illustrating a third embodiment of an encoding statistical method of an enterprise service platform according to the present invention;
fig. 5 is a block diagram of a first embodiment of an encoding statistics device of an enterprise service platform according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of an encoding statistical device structure of an enterprise service platform of a hardware running environment according to an embodiment of the present invention.
As shown in fig. 1, the coding statistics device of the enterprise service platform may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display (Display), and the optional user interface 1003 may also include a standard wired interface, a wireless interface, and the wired interface for the user interface 1003 may be a USB interface in the present invention. The network interface 1004 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) Memory or a stable Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the structure shown in fig. 1 does not constitute a limitation of the coding statistics device of the enterprise service platform, and may include more or fewer components than shown, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and an encoding statistics program of an enterprise service platform may be included in a memory 1005, which is a type of computer storage medium.
In the coding statistics device of the enterprise service platform shown in fig. 1, the network interface 1004 is mainly used for connecting a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting user equipment; the coding statistics device of the enterprise service platform calls the coding statistics program of the enterprise service platform stored in the memory 1005 through the processor 1001, and executes the coding statistics method of the enterprise service platform provided by the embodiment of the invention.
Based on the hardware structure, the embodiment of the coding statistical method of the enterprise service platform is provided.
Referring to fig. 2, fig. 2 is a flowchart of a first embodiment of an encoding statistical method of an enterprise service platform according to the present invention, and the first embodiment of the encoding statistical method of the enterprise service platform according to the present invention is provided.
In a first embodiment, the coding statistics method of the enterprise service platform includes the following steps:
step S10: and acquiring a submitting record in the SVN code branch corresponding to the enterprise service management platform, and extracting a file to be matched from the submitting record.
It should be understood that the execution body of the embodiment is an encoding statistical device of the enterprise service platform, where the encoding statistical device of the enterprise service platform may be an electronic device such as a personal computer or a server. The SVN code branch is a version control system of open source code, SVN is short for Subversion, it adopts branch management system, SVN is the purpose of commonly developing same project for several persons, and the central code management core is server, all developers must obtain code from server before starting new day of work, enter own branch, then develop, finally resolve conflict and submit. All versions of the file information are placed on the server. The files to be matched can be all types of files in the commit record or at least comprise files with file names ending with java and configuration files with file names ending with xml.
Step S20: and matching the files to be matched according to a preset regular expression to obtain a target file.
It will be appreciated that, typically, the service code will exist in the file ending with the java, and the preset regular expression may be set to "[ a-zA-Z ]. Java $", and the target file includes all files ending with the java according to the preset regular expression matching to all files ending with the java in the files to be matched. Service codes can be obtained by parsing all java-ending files.
In a specific implementation, the common consumption code will exist in the configuration files ending with the xml, and the preset regular expression can be set as "[ a-zA-Z ]. Times.xml $", and all the configuration files ending with the xml in the files to be matched are matched according to the preset regular expression, and the target file comprises all the configuration files ending with the xml. The consumer code may be obtained by parsing all configuration files ending in xml.
Step S30: and analyzing the target file to obtain a target code.
It should be noted that, the object code includes the service code and the consumption code, where the consumption code and the service code are terms on an ESG platform, and the ESG platform includes two systems: the service system comprises a service party, a consumer and a service party, wherein the consumer code is a unique fixed code of the consumer and is used for configuring the association relation with the service code on an ESG platform, and the service code is a unique fixed code provided by the service party and is configured on the ESG platform and is used for associating with the consumer code. The service code and the consumption code are newly added before the ESG platform is transmitted, and the consumption code and the service code of the transmitted version are required to be counted before the transmission of the ESG platform, so that the correctness of the transmission content is ensured.
It should be understood that the object files include all java-ending files and all xml-ending configuration files. And analyzing the file ending with java, reading the file content by one row, finding out an object code starting with @ PA_API, and scanning the object code to acquire the service code. The configuration file ending in xml can be parsed by a Jso parser, which is a Java hypertext markup language (HyperText Markup Language, HTML) parser that can directly parse certain Uniform resource locator (Uniform Resource Locator, URL) addresses or HTML text content, which provides a very labor-saving set of application programming interfaces (Application Programming Interface, APIs) that can fetch and manipulate data through document object models (Document Object Model, DOM), cascading style sheets (Cascading Style Sheets, CSS) and in a manner similar to very fast (jQuery) operation to obtain the consumption code. And counting the obtained service codes and consumption codes, and adjusting the publishing contents of the ESG platform according to the counted service codes and consumption codes, so that the correctness of publishing is ensured, and the publishing efficiency is improved.
Step S40: and acquiring an original code from the enterprise service management platform, and comparing the target code with the original code to acquire a new code.
It can be understood that, when counting service codes and consumption codes, corresponding labels can be marked on the service codes and the consumption codes, and then the original codes of the enterprise service management platform can be found through the labels, wherein the original codes are all the service codes and consumption codes existing in the last version of the enterprise service management platform. Comparing the target code obtained by analysis from the submitted record with the original code, and if the target code does not appear in the original code, determining that the target code which does not appear in the original code is a new code. The service code in the target code is generally compared with the service code in the original code, and if the service codes are inconsistent, the service code can be identified as a newly added service code. And comparing the consumption code in the target code with the consumption code in the original code, and if the consumption code is inconsistent with the consumption code in the original code, determining the consumption code as a newly added consumption code.
In this embodiment, a file to be matched is extracted from a commit record in an SVN code branch corresponding to an enterprise service administration platform, and file extraction is performed on each commit record, so as to ensure that each newly added code can be counted in time; matching the files to be matched according to a preset regular expression to obtain a target file, analyzing the target file to obtain a target code, obtaining an original code from the enterprise service management platform, comparing the target code with the original code to obtain a new code, and processing based on data, so that the new code is accurately obtained, the plate-distributing efficiency is improved, omission is avoided during manual statistics, plate-distributing and error-reporting is further caused, and the conditions that the production environment cannot be started or functions cannot be used occur.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second embodiment of the coding statistics method of the enterprise service platform according to the present invention, and based on the first embodiment shown in fig. 2, the second embodiment of the coding statistics method of the enterprise service platform according to the present invention is provided.
In a second embodiment, the step S20 includes:
step S201: and matching the files to be matched according to a first regular expression to obtain a first file, wherein the first file is a target file ending with a first preset keyword.
It can be understood that the first regular expression may be "[ a-zA-Z ]. Java $", and the files to be matched are matched, so that all the first files ending with java in the files to be matched are matched, and the first preset keyword is java. Service codes can be obtained by parsing all java-ending files.
Step S202: and matching the files to be matched according to a second regular expression to obtain a second file, wherein the second file is a target file ending with a second preset keyword.
It should be appreciated that the second regular expression may be "[ a-zA-Z ]. Times.xml $", and the matching files are matched, so that all second files ending in. Xml in the files to be matched are matched, and the second preset keyword is. Xml. The consumer code may be obtained by parsing all configuration files ending in xml.
In a second embodiment, the step S30 includes:
step S301: and traversing the first file, and acquiring target codes containing third preset keywords when traversing the target codes.
It should be noted that, the third preset keyword is @ pa_api, and the code of the normal service code includes the fixed third preset keyword, and the first file may be traversed, and a line reads the content of the first file, and if the target code beginning with the third preset keyword is traversed, the target code is only required to be further parsed, so that the service code may be obtained.
Step S302: and analyzing the target code to obtain the service code.
In a specific implementation, the target code may be stored in a preset temporary list, and then the data in the temporary list is circulated, that is, the preset temporary list is traversed, the service code is matched according to a third regular expression "\" (. In this embodiment, the step S302 includes: storing the target codes into a preset temporary list; and traversing the preset temporary list, and matching the target codes according to a third regular expression to obtain service codes.
Step S303: and analyzing the second file through a preset analyzer to obtain a consumption code, wherein the target code comprises the service code and the consumption code.
It should be appreciated that the preset parser may be a Jsoup parser, the second file may be parsed by a selector in the Jsoup parser, and data may be extracted from the second file by a Document object model (Document ObjectModel, DOM), cascading style sheets (Cascading Style Sheets, CSS), and a manner of operation similar to very fast (jQuery), to obtain the consumption code.
In this embodiment, the step S303 includes: and analyzing the second file through a selector in a preset analyzer to obtain the consumption code.
It may be appreciated that the preset parser may be a Jsoup parser, where a selector in the Jsoup parser parses the second file, may search for an element through a tag in a namespace, may search for an element through an attribute name prefix, may search for an element through an attribute value, may search for an element through a matching attribute value beginning, ending or including an attribute value, may search for an element through an attribute value matching regular expression, may search for an element through a combination of the above, may search for an element matching the element including an element by the selector, may search for an element not matching the selector, may search for an element including a given text, may search for an element directly including a given text, may search for a text matching specified regular expression of which elements may search for, and may search for an element itself including a text matching specified regular expression.
It should be noted that, the selector in the Jsoup parser is typically element select, and the corresponding consumption code is searched by element select, and a set of Elements is returned, and a set of methods is provided to extract and process the result, where the search rule is as follows:
“bean[class=\"com.paic.esg.config.spring.ReferenceBean\"]>property>value”。
in this embodiment, the first file is traversed, and when an object code including a third preset keyword is traversed, the object code is obtained, the object code is parsed to obtain a service code, the second file is parsed by a preset parser to obtain a consumption code, and the object code includes the service code and the consumption code, so that the newly added service code and the newly added consumption code in the submitted record are automatically counted, the condition that omission occurs due to manual statistics is avoided, and the coding statistics efficiency and accuracy are improved.
Referring to fig. 4, fig. 4 is a flowchart illustrating a third embodiment of the coding statistics method of the enterprise service platform according to the present invention, and based on the second embodiment shown in fig. 3, a third embodiment of the coding statistics method of the enterprise service platform according to the present invention is provided.
In a third embodiment, after the step S303, the method further includes:
step S50: configuring an association relation between a new service code and a new consumption code, wherein the new code comprises the new service code and the new consumption code;
it is understood that both the consumption code and the service code are terms on an ESG platform that includes two systems: the system comprises a service party and a consumer, wherein the service party and the consumer interact, the consumer code is a unique fixed code of the consumer and is used for configuring the association relation with the service code on the ESG platform, the service code is a unique fixed code provided by the service party and is configured on the ESG platform and is used for associating with the consumer code. And counting the newly-added service codes and the newly-added consumption codes of the ESG platform from the submitted records, wherein the association relation between the newly-added service codes and the newly-added consumption codes is required to be configured before the edition is issued, and a production environment system which is in butt joint with the ESG platform carries out file configuration depending on the newly-added service codes and the newly-added consumption codes, so that the newly-added consumption codes and the newly-added service codes which are obtained from the submitted records in an analysis mode can be counted before the edition is issued.
Step S60: and sending the new service code, the new consumption code and the association relation to a production environment system so that the production environment system performs file configuration according to the new service code, the new consumption code and the association relation.
It should be understood that, the new service code and the new consumption code are counted, and the association relationship between the new service code and the new consumption code is configured, and the production environment system docked with the ESG platform performs file configuration depending on the new service code, the new consumption code and the association relationship, so that the new service code, the new consumption code and the association relationship are sent to the production environment system before the edition is released, so that the production environment system performs file configuration according to the new service code, the new consumption code and the association relationship, thereby avoiding missing a certain service code or consumption code, resulting in error reporting when the edition is released, and the production environment cannot be started or functions cannot be used.
In a third embodiment, before the step S10, the method further includes:
and scanning SVN code branches corresponding to the enterprise service management platform, and executing the step S10 if the SVN code branches are scanned to have submitting records.
It should be noted that, in order to find the new service code and the new consumption code in time, real-time or timing scanning may be performed on the SVN code branches, if a commit record exists in the SVN code branches, a commit record in the SVN code branches corresponding to the enterprise service administration platform is obtained, and a file to be matched is extracted from the commit record, so that the new service code and the new consumption code can be counted in time, and omission is avoided.
In this embodiment, by configuring the association relationship between the new service code and the new consumption code, the new service code, the new consumption code and the association relationship are sent to a production environment system, so that the production environment system performs file configuration according to the new service code, the new consumption code and the association relationship, thereby avoiding the occurrence of the situation that when a certain service code or consumption code is lost, the error is reported when a edition is released, and the production environment cannot be started or functions cannot be used.
In addition, the embodiment of the invention also provides a storage medium, wherein the storage medium stores an encoding statistical program of the enterprise service platform, and the encoding statistical program of the enterprise service platform realizes the steps of the encoding statistical method of the enterprise service platform when being executed by a processor.
In addition, referring to fig. 5, an embodiment of the present invention further provides an encoding statistics device of an enterprise service platform, where the encoding statistics device of the enterprise service platform includes:
the acquisition module 10 is used for acquiring a submitting record in the SVN code branch corresponding to the enterprise service management platform and extracting a file to be matched from the submitting record;
the matching module 20 is configured to match the files to be matched according to a preset regular expression, so as to obtain a target file;
the parsing module 30 is configured to parse the target file to obtain a target code;
and the comparison module 40 is used for acquiring an original code from the enterprise service management platform, and comparing the target code with the original code to acquire a new code.
It should be understood that the SVN code branch is a version control system of open source code, SVN is a short term of Subversion, it adopts a branch management system, SVN is a goal for multiple persons to commonly develop the same project and share resources, and the core of centralized code management is a server, all developers must acquire codes from the server before starting the work of the new day, enter own branch, then develop, finally resolve conflicts, and commit. All versions of the file information are placed on the server. The files to be matched can be all types of files in the commit record or at least comprise files with file names ending with java and configuration files with file names ending with xml.
It will be appreciated that, typically, the service code will exist in the file ending with the java, and the preset regular expression may be set to "[ a-zA-Z ]. Java $", and the target file includes all files ending with the java according to the preset regular expression matching to all files ending with the java in the files to be matched. Service codes can be obtained by parsing all java-ending files.
In a specific implementation, the common consumption code will exist in the configuration files ending with the xml, and the preset regular expression can be set as "[ a-zA-Z ]. Times.xml $", and all the configuration files ending with the xml in the files to be matched are matched according to the preset regular expression, and the target file comprises all the configuration files ending with the xml. The consumer code may be obtained by parsing all configuration files ending in xml.
It should be noted that, the object code includes the service code and the consumption code, where the consumption code and the service code are terms on an ESG platform, and the ESG platform includes two systems: the service system comprises a service party, a consumer and a service party, wherein the consumer code is a unique fixed code of the consumer and is used for configuring the association relation with the service code on an ESG platform, and the service code is a unique fixed code provided by the service party and is configured on the ESG platform and is used for associating with the consumer code. The service code and the consumption code are newly added before the ESG platform is transmitted, and the consumption code and the service code of the transmitted version are required to be counted before the transmission of the ESG platform, so that the correctness of the transmission content is ensured.
It should be understood that the object files include all java-ending files and all xml-ending configuration files. And analyzing the file ending with java, reading the file content by one row, finding out an object code starting with @ PA_API, and scanning the object code to acquire the service code. The configuration file ending in xml can be parsed by a Jso parser, which is a Java hypertext markup language (HyperText Markup Language, HTML) parser that can directly parse certain Uniform resource locator (Uniform Resource Locator, URL) addresses or HTML text content, which provides a very labor-saving set of application programming interfaces (Application Programming Interface, APIs) that can fetch and manipulate data through document object models (Document Object Model, DOM), cascading style sheets (Cascading Style Sheets, CSS) and in a manner similar to very fast (jQuery) operation to obtain the consumption code. And counting the obtained service codes and consumption codes, and adjusting the publishing contents of the ESG platform according to the counted service codes and consumption codes, so that the correctness of publishing is ensured, and the publishing efficiency is improved.
It can be understood that, when counting service codes and consumption codes, corresponding labels can be marked on the service codes and the consumption codes, and then the original codes of the enterprise service management platform can be found through the labels, wherein the original codes are all the service codes and consumption codes existing in the last version of the enterprise service management platform. Comparing the target code obtained by analysis from the submitted record with the original code, and if the target code does not appear in the original code, determining that the target code which does not appear in the original code is a new code. The service code in the target code is generally compared with the service code in the original code, and if the service codes are inconsistent, the service code can be identified as a newly added service code. And comparing the consumption code in the target code with the consumption code in the original code, and if the consumption code is inconsistent with the consumption code in the original code, determining the consumption code as a newly added consumption code.
In this embodiment, a file to be matched is extracted from a commit record in an SVN code branch corresponding to an enterprise service administration platform, and file extraction is performed on each commit record, so as to ensure that each newly added code can be counted in time; matching the files to be matched according to a preset regular expression to obtain a target file, analyzing the target file to obtain a target code, obtaining an original code from the enterprise service management platform, comparing the target code with the original code to obtain a new code, and processing based on data, so that the new code is accurately obtained, the plate-distributing efficiency is improved, omission is avoided during manual statistics, plate-distributing and error-reporting is further caused, and the conditions that the production environment cannot be started or functions cannot be used occur.
In an embodiment, the matching module 20 is further configured to match the files to be matched according to a first regular expression, so as to obtain a first file, where the first file is a target file ending with a first preset keyword;
the matching module 20 is further configured to match the file to be matched according to a second regular expression, so as to obtain a second file, where the second file is a target file ending with a second preset keyword.
In an embodiment, the coding statistics device of the enterprise service platform further comprises:
the traversing module is used for traversing the first file, and acquiring an object code containing a third preset keyword when traversing the object code;
the parsing module 30 is further configured to parse the object code to obtain a service code;
the parsing module 30 is further configured to parse the second file through a preset parser to obtain a consumption code, where the target code includes the service code and the consumption code.
In an embodiment, the coding statistics device of the enterprise service platform further comprises:
the storage module is used for storing the target codes into a preset temporary list;
the traversing module is further configured to traverse the preset temporary list, and match the target code according to a third regular expression, so as to obtain a service code.
In an embodiment, the parsing module 30 is further configured to parse the second file through a selector in a preset parser to obtain a consumption code.
In an embodiment, the coding statistics device of the enterprise service platform further comprises:
the configuration module is used for configuring the association relation between the newly added service code and the newly added consumption code, wherein the newly added code comprises the newly added service code and the newly added consumption code;
the sending module is used for sending the new service code, the new consumption code and the association relation to a production environment system so that the production environment system can carry out file configuration according to the new service code, the new consumption code and the association relation.
In an embodiment, the coding statistics device of the enterprise service platform further comprises:
and the scanning module is used for scanning SVN code branches corresponding to the enterprise service management platform, and executing the step of acquiring the submitted records in the SVN code branches corresponding to the enterprise service management platform and extracting files to be matched from the submitted records if the submitted records exist in the SVN code branches.
Other embodiments or specific implementation manners of the coding statistics device of the enterprise service platform according to the present invention may refer to the above method embodiments, and are not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the terms first, second, third, etc. do not denote any order, but rather the terms first, second, third, etc. are used to interpret the terms as labels.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. read only memory mirror (Read Only Memory image, ROM)/random access memory (Random Access Memory, RAM), magnetic disk, optical disk), comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (8)

1. The coding statistical method of the enterprise service platform is characterized by comprising the following steps of:
acquiring a submitting record in an SVN code branch corresponding to an enterprise service platform, and extracting a file to be matched from the submitting record;
matching the files to be matched according to a preset regular expression to obtain a target file;
analyzing the target file to obtain a target code;
acquiring an original code from the enterprise service platform, and comparing the target code with the original code to acquire a new code;
the matching of the files to be matched according to the preset regular expression is carried out to obtain a target file, and the method comprises the following steps:
matching the files to be matched according to a first regular expression to obtain a first file, wherein the first file is a target file ending with a first preset keyword;
matching the files to be matched according to a second regular expression to obtain a second file, wherein the second file is a target file ending with a second preset keyword;
the analyzing the target file to obtain a target code includes:
traversing the first file, and acquiring an object code containing a third preset keyword when traversing the object code;
analyzing the target code to obtain a service code;
and analyzing the second file through a preset analyzer to obtain a consumption code, wherein the target code comprises the service code and the consumption code.
2. The method for coding statistics of the enterprise service platform according to claim 1, wherein said parsing the object code to obtain a service code comprises:
storing the target codes into a preset temporary list;
and traversing the preset temporary list, and matching the target codes according to a third regular expression to obtain service codes.
3. The method for counting the codes of the enterprise service platform according to claim 1, wherein the parsing the second file by a preset parser to obtain the consumption codes comprises:
and analyzing the second file through a selector in a preset analyzer to obtain the consumption code.
4. The method for counting codes of an enterprise service platform according to claim 1, wherein the method for counting codes of an enterprise service platform further comprises, after obtaining a new code by comparing the target code with the original code by obtaining an original code from the enterprise service platform:
configuring an association relation between a new service code and a new consumption code, wherein the new code comprises the new service code and the new consumption code;
and sending the new service code, the new consumption code and the association relation to a production environment system so that the production environment system performs file configuration according to the new service code, the new consumption code and the association relation.
5. The method for coding statistics of an enterprise service platform according to any one of claims 1-4, wherein the obtaining a commit record in an SVN code branch corresponding to the enterprise service platform, before extracting a file to be matched from the commit record, further comprises:
and scanning SVN code branches corresponding to the enterprise service platform, and if the SVN code branches are scanned to have commit records, executing the step of acquiring the commit records in the SVN code branches corresponding to the enterprise service platform, and extracting files to be matched from the commit records.
6. An encoding statistical device of an enterprise service platform, wherein the encoding statistical device of the enterprise service platform comprises: memory, a processor and an enterprise service platform code statistics program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the enterprise service platform code statistics method as claimed in any of claims 1 to 5.
7. A storage medium, wherein the storage medium has stored thereon an encoding statistics program of an enterprise service platform, the encoding statistics program of the enterprise service platform, when executed by a processor, implementing the steps of the encoding statistics method of the enterprise service platform as claimed in any one of claims 1 to 5.
8. An encoding statistical device of an enterprise service platform, wherein the encoding statistical device of the enterprise service platform comprises:
the acquisition module is used for acquiring a submitting record in the SVN code branch corresponding to the enterprise service platform and extracting a file to be matched from the submitting record;
the matching module is used for matching the files to be matched according to a preset regular expression to obtain target files;
the analysis module is used for analyzing the target file to obtain a target code;
the comparison module is used for acquiring an original code from the enterprise service platform, comparing the target code with the original code and acquiring a new code;
the matching module is further configured to match the files to be matched according to a first regular expression, so as to obtain a first file, where the first file is a target file ending with a first preset keyword; matching the files to be matched according to a second regular expression to obtain a second file, wherein the second file is a target file ending with a second preset keyword;
the analysis module is used for traversing the first file, and acquiring an object code containing a third preset keyword when traversing the object code; analyzing the target code to obtain a service code; and analyzing the second file through a preset analyzer to obtain a consumption code, wherein the target code comprises the service code and the consumption code.
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 CN109783105A (en) 2019-05-21
CN109783105B true 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112241254B (en) * 2019-07-16 2024-02-02 北京车和家信息技术有限公司 Code statistics 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 momentarily issuing codes based on Git
CN106293701A (en) * 2016-07-26 2017-01-04 浪潮软件股份有限公司 The application engine method for designing of many tenants version management 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 momentarily issuing codes based on Git
CN106293701A (en) * 2016-07-26 2017-01-04 浪潮软件股份有限公司 The application engine method for designing of many tenants version management 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

Also Published As

Publication number Publication date
CN109783105A (en) 2019-05-21

Similar Documents

Publication Publication Date Title
US8132095B2 (en) Auditing a website with page scanning and rendering techniques
US8365062B2 (en) Auditing a website with page scanning and rendering techniques
CA2684822C (en) Data transformation based on a technical design document
EP3343411A1 (en) Sql auditing method and apparatus, server and storage device
US20140082482A1 (en) Rule-based validation of websites
CN111857880B (en) Dialogue configuration item information management method, device, equipment and storage medium
CN111190807B (en) Buried point testing method and equipment
CN108920691B (en) Front-end static resource management method and device, computer equipment and storage medium
CN111125213A (en) Data acquisition method, device and system
CN109783105B (en) Coding statistical method, equipment, storage medium and device of enterprise service platform
CN111767213B (en) Database check point testing method and device, electronic equipment and storage medium
WO2021262283A1 (en) Reduced processing loads via selective validation specifications
CN112365192A (en) Method for establishing flow model in manufacturing execution system, electronic device and method for analyzing flow model
CN110188106B (en) Data management method and device
CN114371870A (en) Code scanning and submitting method, code scanning server, client and server
CN112256365B (en) Method and terminal for automatically managing multi-language versions
CN113672233A (en) Server out-of-band management method, device and equipment based on Redfish
CN113343159B (en) Method and system for rapidly acquiring data from any channel, analyzing and storing data
CN116644035B (en) File batch warehousing method, device, equipment and storage medium
CN111221846B (en) Automatic translation method and device for SQL sentences
CN112965993B (en) Data processing system, method, device and storage medium
US20030192009A1 (en) Method and system for representing text using markup language
CN112579466B (en) Method and device for generating test cases and computer readable storage medium
CN111177501B (en) Label processing method, device and system
CN117370202A (en) Method, device, equipment and storage medium for testing full link of multiple bins

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
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

GR01 Patent grant
GR01 Patent grant