CN117806658A - Code online method of data center station and electronic equipment - Google Patents

Code online method of data center station and electronic equipment Download PDF

Info

Publication number
CN117806658A
CN117806658A CN202311746434.1A CN202311746434A CN117806658A CN 117806658 A CN117806658 A CN 117806658A CN 202311746434 A CN202311746434 A CN 202311746434A CN 117806658 A CN117806658 A CN 117806658A
Authority
CN
China
Prior art keywords
online
code
content
approval
code content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311746434.1A
Other languages
Chinese (zh)
Inventor
徐伟平
吴易谦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Dahua Technology Co Ltd
Original Assignee
Zhejiang Dahua Technology 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 Zhejiang Dahua Technology Co Ltd filed Critical Zhejiang Dahua Technology Co Ltd
Priority to CN202311746434.1A priority Critical patent/CN117806658A/en
Publication of CN117806658A publication Critical patent/CN117806658A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a code online method of a data center station and electronic equipment, wherein the code online method of the data center station comprises the following steps: responding to an online request submitted by a code development terminal for the code content to be online, and acquiring a business flow template corresponding to the code content to be online, wherein the code content to be online is developed by the code development terminal based on a development environment; generating an approval process corresponding to the code content to be online based on the business process template, and executing the approval process; if the approval process is successfully executed, the code content to be online is issued to an online environment for online processing. The method can combine the data center with the business process management, and examine and approve the code content before the code is online, so that the code online operation of the data center is standardized, online accidents caused by the random online development of the code are avoided, and the stability of online business operation is improved.

Description

Code online method of data center station and electronic equipment
Technical Field
The application relates to the technical field of software development management, in particular to a code online method of a data center platform and electronic equipment.
Background
At present, along with the rapid development of a data center system, the data center has been rooted in various industries and various fields, and more business personnel begin to develop and use businesses such as data aggregation, data management, data mining and the like on the data center.
The problem that follows is that so many people develop on the data center, everyone can write tasks and submit operations, and the correctness of the development products cannot be guaranteed, so that the online business operation is affected after the problematic codes are online.
Disclosure of Invention
In order to solve the above problems, the present application provides at least a method for accessing codes of a data center and an electronic device.
The first aspect of the present application provides a method for online code of a data center, where the data center contains a development environment and an online environment, and the method is applied to an online code management end, and includes: responding to an online request submitted by a code development terminal for the code content to be online, and acquiring a business flow template corresponding to the code content to be online; the code content to be online is developed by a code development terminal based on a development environment; generating an approval process corresponding to the code content to be online based on the business process template, and executing the approval process; if the approval process is successfully executed, the code content to be online is issued to an online environment for online processing.
In an embodiment, the obtaining a business process template corresponding to the code content to be online in response to an online request submitted by a code development terminal and aiming at the code content to be online includes: determining a target application program corresponding to the code content to be online; inquiring a flow template associated with a target application program from a flow template library to obtain a business flow template corresponding to the code online request, wherein the flow template library is associated with and stores the application program and the flow template.
In an embodiment, generating an approval process corresponding to the code content to be online based on the business process template, and executing the approval process includes: generating a plurality of approval events based on the business process template; determining an event execution sequence between each approval event; and sequentially executing a plurality of approval events according to the event execution sequence.
In an embodiment, the approval events include code compiling, code auditing, and online review, and sequentially executing a plurality of approval events according to an event execution sequence, including: code compiling is carried out on the code content to be online to obtain a code compiling result; if the code compiling result shows that the code content to be online passes the compiling, the code content to be online is sent to a code auditing end for code auditing, and a code auditing result fed back by the code auditing end is obtained; if the code auditing result indicates that the code auditing of the code content to be online passes, the code content to be online is sent to an online review terminal for online review, and an online review result fed back by the online review terminal is obtained.
In an embodiment, if the code compiling result indicates that the code content to be online is compiled, sending the code content to be online to a code auditing end for code auditing, and obtaining a code auditing result fed back by the code auditing end, including: determining code content which covers the online code content in the code content to be online to obtain a first code segment; and taking the covered code content in the online code content as a second code segment; and displaying a code auditing page to the code auditing end, and comparing and displaying the first code segment and the second code segment in the code auditing page.
In an embodiment, if the code auditing result indicates that the code auditing of the code content to be online passes, sending the code content to be online to an online review terminal for online review, and after obtaining the online review result fed back by the online review terminal, further including: if the online review result shows that the online review of the code content to be online passes, the approval process is successfully executed; if the approval process is successfully executed, the code content to be online is issued to an online environment for online processing, including: and receiving the online parameters sent by the online review terminal, and releasing the content of the code to be online to an online environment according to the online parameters to carry out online processing.
In an embodiment, further comprising: if any examination and approval event fails to be executed, acquiring failure parameters of the examination and approval event which fails to be executed; the failure parameter is sent to the code development terminal, so that the code development terminal modifies the code content to be online based on the failure parameter; and responding to an instruction of the code development end for finishing the modification of the code content to be online, and continuing to execute the approval event of the execution failure based on the modified code content to be online.
The second aspect of the present application provides a method for online code of a data center, where the method is applied to a code development terminal, and includes: pulling a development environment of the data center, and executing code development operation based on the development environment to obtain code content to be online; and sending an online request aiming at the code content to be online to a code online management end so that the code online management end obtains a business flow template corresponding to the code content to be online, generates an approval flow corresponding to the code content to be online based on the business flow template, executes the approval flow, and issues the code content to be online to an online environment for online processing if the approval flow is successfully executed.
In one embodiment, the approval process includes a plurality of approval events; the method further comprises the steps of: receiving failure parameters returned by the code online management end aiming at the code content to be online; the failure parameters are parameters corresponding to approval events of the execution failure in the approval process; and modifying the code content to be online based on the failure parameter to obtain modified code content to be online so that the code online management end continues to execute the approval event of the execution failure based on the modified code content to be online.
The third aspect of the present application provides a code online device of a data center station, deployed at a code online management end, where the device includes: the template acquisition module is used for responding to an online request submitted by the code development terminal for the code content to be online and acquiring a business flow template corresponding to the code content to be online; the code content to be online is developed by a code development terminal based on a development environment; the approval executing module is used for generating an approval process corresponding to the code content to be online based on the business process template and executing the approval process; and the online processing module is used for issuing the code content to be online to an online environment for online processing if the approval process is successfully executed.
The fourth aspect of the present application provides a code online device of a data center, deployed at a code development end, where the device includes: the code development module is used for pulling the development environment of the data center platform, executing code development operation based on the development environment and obtaining the code content to be online; the online request module is used for sending an online request for the code content to be online to the code online management end so that the code online management end obtains a business flow template corresponding to the code content to be online, generates an approval flow corresponding to the code content to be online based on the business flow template, executes the approval flow, and issues the code content to be online to an online environment for online processing if the approval flow is executed successfully.
A fifth aspect of the present application provides an electronic device, including a memory and a processor, where the processor is configured to execute program instructions stored in the memory, so as to implement a code online method of the data center.
A sixth aspect of the present application provides a computer readable storage medium having stored thereon program instructions which, when executed by a processor, implement a code-on-line method for a data center as described above.
According to the scheme, the service flow template corresponding to the code content to be online is obtained by responding to the online request submitted by the code development terminal and aiming at the code content to be online, wherein the code content to be online is developed by the code development terminal based on the development environment; generating an approval process corresponding to the code content to be online based on the business process template, and executing the approval process; if the approval process is successfully executed, the code content to be online is issued to an online environment for online processing, the data center and the business process management can be combined, and the code content is approved before the code is online, so that the online operation of the code of the data center is standardized, online accidents caused by the random online development of the code are avoided, and the stability of online business operation is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and, together with the description, serve to explain the technical aspects of the application.
FIG. 1 is a schematic diagram of a data center station in the related art;
FIG. 2 is a schematic diagram of an implementation environment involved in a code-on-line method of a data center station according to an exemplary embodiment of the present application;
FIG. 3 is a flow chart of a method of code-on-line for a data center shown in an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of a code audit page shown in an exemplary embodiment of the present application;
FIG. 5 is a schematic diagram of a code on-line of a data center station shown in an exemplary embodiment of the present application;
FIG. 6 is a flow chart of a code-on-line method of a data center station shown in another exemplary embodiment of the present application;
FIG. 7 is a block diagram of a code-on-line device of a data center shown in an exemplary embodiment of the present application;
FIG. 8 is a block diagram of a code-on-line device of a data center shown in another exemplary embodiment of the present application;
FIG. 9 is a schematic diagram of an electronic device shown in an exemplary embodiment of the present application;
fig. 10 is a schematic structural view of a computer-readable storage medium shown in an exemplary embodiment of the present application.
Detailed Description
The following describes the embodiments of the present application in detail with reference to the drawings.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, interfaces, techniques, etc., in order to provide a thorough understanding of the present application.
The term "and/or" is herein merely an association information describing an associated object, meaning that three relationships may exist, e.g., a and/or B may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship. Further, "a plurality" herein means two or more than two. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Existing data kiosks are typically divided into development environments and online environments. Referring to fig. 1, fig. 1 is a schematic diagram of a data center in the related art, as shown in fig. 1, a service person develops a service in a development environment, for example: and writing structured query language (Structured Query Language, SQL), apache Spark, apache Flink, python and the like to perform service development, and when the service development is completed, debugging, unit testing and the like can be performed in a development environment. After completing one or more of the above steps, the business person may submit his task to the online environment, letting the code actually run based on the actual business data.
At present, the data center station does not have standard flow and action control for the action submitted to the online environment, so that developers can submit problematic code content to the online environment to influence the operation of online business.
In order to solve the above problems, the present application provides a code online method of a data center, an electronic device, and a computer-readable storage medium.
The method for accessing codes of the data center provided by the embodiment of the application is described below.
Referring to fig. 2, a schematic diagram of an implementation environment of the solution provided in one embodiment of the present application is shown. The implementation environment of the scheme may include a data center 210, a code-line management terminal 220, and a code-development terminal 230, where the data center 210, the code-line management terminal 220, and the code-development terminal 230 are communicatively connected to each other.
As shown in fig. 2, the code-line management end 220 may be integrally disposed with the data center 210, and it may be understood that the code-line management end 220 may also be disposed separately from the data center 210, and the deployment manner between the code-line management end 220 and the data center 210 is not limited in this application.
The data center 210 is configured to provide a development environment for the code development terminal 230 to develop a service and an online environment for publishing code contents for which the service development is completed to implement online running of the code contents.
The code online management end 220 is used for performing approval management on the code content to be issued to the online environment, so as to ensure the reliability of the code content issued to the online environment.
The data center 210 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), basic cloud computing services such as big data and artificial intelligence platforms.
The code line management end 220 may be a server, such as an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a terminal device, such as a tablet computer, a notebook computer, a desktop computer, a smart phone, or the like.
The number of the code development terminals 230 may be one or more, and the code development terminals 230 may be tablet computers, notebook computers, desktop computers, smart phones, etc., but are not limited thereto.
Referring to fig. 3, fig. 3 is a flowchart illustrating a code on-line method of a data center station according to an exemplary embodiment of the present application. The code online method of the data center can be applied to the implementation environment shown in fig. 2 and is specifically executed by the code online management end in the implementation environment.
As shown in fig. 3, the code online method of the data center station at least includes steps S310 to S330, which are described in detail as follows:
step S310: responding to an online request submitted by a code development terminal for the code content to be online, and acquiring a business flow template corresponding to the code content to be online; the code content to be online is developed by a code development terminal based on a development environment.
The online request is used for requesting to perform online processing on the code content to be online.
After detecting that the online request for the code content to be online submitted by the code development end exists, the code online management end enters a code online auditing step to detect the accuracy of the code content to be online.
Specifically, after entering a code online auditing step, a business process template corresponding to the code content to be online is obtained.
In some embodiments, a plurality of process templates may be preset, and the matched process templates are used as business process templates corresponding to the code content to be online by querying the preset process templates.
In an exemplary embodiment, a middle manager may log in a code online management end, and define a flow template in the code online management end in advance, so that after the code online management end detects an online request, the predefined flow template is used as a business flow template corresponding to the code content to be online of the online request.
In some embodiments, feature information of the code content to be online is obtained, and a business process template corresponding to the code content to be online is determined based on the feature information.
Illustrating: the business process policies corresponding to different characteristic information are pre-stored, all business process policies associated with the code content to be online are queried according to the characteristic information of the code content to be online, and the business process templates are obtained by combining all the business process policies.
For example, the type of the target application program (such as shopping class application program, game class application program, video playing class application program, etc.) corresponding to the code content to be online and the adopted programming language (such as SQL, python, java, etc.) of the code content to be online may be obtained as the feature information of the code content to be online, if the type of the target application program corresponding to the code content to be online belongs to the game class application program, the game class approval policy is queried based on the feature information, and if the programming language adopted by the code content to be online is SQL, the database code approval policy is queried based on the feature information, and then the service flow template is obtained by combining the game class approval policy and the database code approval policy.
Again by way of example: the association relation between different streams Cheng Moban and different importance levels may be pre-stored, the importance level of the code content to be online may be determined according to the feature information of the code content to be online, and the process template matched with the importance level may be obtained as the business process template corresponding to the code content to be online.
For example, a functional module (such as a login function, an image display function, a text editing function, etc.) for realizing the code content to be online is determined, and the importance level of the code content to be online is determined according to the implemented functional module, if the implemented functional module has the text editing function, the importance level is low, and if the implemented functional module has the login function and the image display function, the importance level is high, etc. And then, acquiring a matched flow template according to the importance level corresponding to the code content to be online as a business flow template corresponding to the code content to be online.
In some embodiments, a historical code development record of a developer corresponding to the code content to be online is obtained, and a business process template corresponding to the code content to be online is determined based on the historical code development record of the developer.
Illustrating: the historical code development record records the error rate (which can be the ratio of the number of error-reported code lines to the total number of code lines) of the code content of the submitting request on line in a preset time period, and the business process template corresponding to the code content to be on line is determined according to the error rate.
For example, if the error rate of the developer is lower than a first preset threshold, a first business process template is adopted; and if the error rate of the developer is not lower than the first preset threshold, adopting a second business process template. For another example, if there is a manual audit in the business process template, if the error rate of the developer is lower than a second preset threshold, selecting a first code auditor to execute the manual audit; and if the error rate of the developer is not lower than a second preset threshold, selecting a second code auditor to execute manual audit.
In some embodiments, an initial flow template corresponding to the code content to be online is obtained by querying a preset flow template, then feature information of the code content to be online and/or a historical code development record of a developer corresponding to the code content to be online are obtained, and based on the feature information of the code content to be online and/or the historical code development record of the developer corresponding to the code content to be online, the initial flow template is adjusted to obtain a final business flow template corresponding to the code content to be online.
By the method, an accurate business process template is obtained so as to provide the accuracy of the content approval of the subsequent on-line code.
Step S320: and generating an approval process corresponding to the code content to be online based on the business process template, and executing the approval process.
And creating a flow work order corresponding to the code content to be online according to the business flow template, wherein the flow work order contains approval flows to be executed, and executing the approval flows according to the flow work order.
It should be noted that the approval process may include an automatic approval process and a manual approval process, where the automatic approval process includes, but is not limited to, processes such as code compiling and unit detecting, and the manual approval process includes, but is not limited to, processes such as manual code auditing and manual online review.
In addition, the execution main body of each sub-process in the approval process may be a data center, a code online management end or other terminal devices, and the execution main body of each sub-process corresponds to the type of the sub-process, which is not limited in this application. For example, if the approval process includes a code compiling process, the approval process may be that the data center or the code online management end directly compiles the code content to be online to obtain an execution result of the code compiling process; if the approval process contains a unit detection process, the data center or the code online management end sends the code content to be online to the appointed detection end for unit detection, and an execution result of the unit detection process fed back by the appointed detection end is obtained; if the approval process includes a manual code auditing process, the data center or the code online management end can send the code content to be online to the designated code auditing end so that auditing personnel corresponding to the code auditing end conduct manual code auditing to acquire an execution result of the manual code auditing process fed back by the code auditing end.
Step S330: if the approval process is successfully executed, the code content to be online is issued to an online environment for online processing.
If the approval process is successfully executed, the accuracy of the code content to be online is indicated to meet the requirement, and the code content to be online is issued to an online environment for online processing.
It should be noted that, the successful execution of the approval process is that the approval results of each sub-process pass, if the approval result of any sub-process does not pass, the approval process is indicated to fail to execute, and the online of the code content to be online is prevented, so as to avoid the influence of the online service by the code content to be online.
The steps of the code-on-line method of the present application are described in further detail below.
In some embodiments, in step S310, in response to an online request submitted by a code development end for online code content, a business process template corresponding to the online code content is obtained, including:
step S311: and determining a target application program corresponding to the code content to be online.
Step S312: inquiring a flow template associated with a target application program from a flow template library to obtain a business flow template corresponding to the code online request, wherein the flow template library is associated with and stores the application program and the flow template.
Illustratively, a middlebox manager logs into the code-on-line management end, and then may define a code-on-line flow template for the application. The access of the flow templates of different application programs can be defined for the middle platform manager according to the different authorities of the middle platform manager.
The step of defining the flow template by the middle manager may include: defining a flow triggering condition, wherein the triggering condition is that an online request is detected; defining flow input contents, such as all code contents of input contents of a sub-flow 1, SQL code contents of input contents of a sub-flow 2, environment configuration information, scheduling information and the like of input contents of a sub-flow 3; and defining all flow types and flow execution parameters of the approval flow, such as the flow types are artificial code auditors, and the code auditors are personnel A.
And storing the flow template defined by the middle manager into a flow template library, and storing the association relation between the flow template and the application program. One application program can be associated with a plurality of process templates, and the process template which is most matched with the code content to be online can be selected as a business process template according to the characteristic information of the code content to be online and/or the historical code development record of a developer corresponding to the code content to be online; one flow template can also correspond to a plurality of application programs, for example, when the current application program sets the flow template, the flow template with high matching degree with the current application program can be selected from a flow template library, wherein the matching degree of the flow template can be determined through the similarity between the application programs, and further the flow template with high matching degree can be reused, so that the setting efficiency of the flow template is improved.
Further, for the current code content to be online, determining a target application program corresponding to the code content to be online, and inquiring a flow template associated with the target application program from a flow template library to obtain a business flow template corresponding to the code online request.
And then, generating approval flows corresponding to the code content to be online according to the business flow template, and executing the approval flows.
In some embodiments, in step S320, an approval process corresponding to the code content to be online is generated based on the business process template, and the approval process is executed, including:
step S321: a plurality of approval events are generated based on the business process template.
For example, approval events include code compilation, code auditing, and online reviews.
Step S322: an order of event execution between each approval event is determined.
The event execution sequence among each approval event can be determined according to the importance degree among different approval events and the execution logic relation of each approval event.
For example, code compilation is first performed, unit testing is performed if the code compilation passes, and manual code auditing is performed if the unit testing passes.
Step S323: and sequentially executing a plurality of approval events according to the event execution sequence.
And sequentially executing a plurality of approval events according to the event execution sequence so as to judge whether the approval process passes or not according to the execution result of each approval event.
Illustratively, taking an example that the approval event includes code compiling, code auditing and online review, sequentially executing a plurality of approval events according to the event execution sequence, including: code compiling is carried out on the code content to be online to obtain a code compiling result; if the code compiling result shows that the code content to be online passes the compiling, the code content to be online is sent to a code auditing end for code auditing, and a code auditing result fed back by the code auditing end is obtained; if the code auditing result indicates that the code auditing of the code content to be online passes, the code content to be online is sent to an online review terminal for online review, and an online review result fed back by the online review terminal is obtained.
Optionally, if the code compiling result indicates that the code content to be online is compiled, sending the code content to be online to a code auditing end for code auditing, and obtaining a code auditing result fed back by the code auditing end, including: determining code content which covers the online code content in the code content to be online to obtain a first code segment; and taking the covered code content in the online code content as a second code segment; and displaying a code auditing page to the code auditing end, and comparing and displaying the first code segment and the second code segment in the code auditing page.
Wherein, the online code content refers to the code content which is released in the online environment.
Referring to fig. 4, fig. 4 is a schematic diagram of a code audit page according to an exemplary embodiment of the present application, as shown in fig. 4, it is determined that a code content covering an online code content exists in the code content to be online, so as to obtain a first code segment, and the covered code content in the online code content is used as a second code segment, and the first code segment and the second code segment are compared and displayed in the code audit page, so that a code auditor can intuitively observe a difference between the first code segment and the second code segment, and the working efficiency of the code auditor is significantly improved.
Optionally, if the code auditing result indicates that the code auditing of the code content to be online passes, sending the code content to be online to an online review terminal for online review, and after obtaining the online review result fed back by the online review terminal, further including: if the online review result shows that the online review of the code content to be online passes, the approval process is successfully executed; if the approval process is successfully executed, the code content to be online is issued to an online environment for online processing, including: and receiving the online parameters sent by the online review terminal, and releasing the content of the code to be online to an online environment according to the online parameters to carry out online processing.
That is, the online review end may set an online parameter corresponding to the code content to be online, where the online parameter refers to a relevant parameter that needs to be used when the code content to be online is released to an online environment to perform online processing, for example, time when the code content to be online is released (such as releasing at a designated time), a releasing mode (such as releasing by using a gray scale test mode), and so on.
It may be understood that the online parameter may be generated by a code online management end, a data center, a code development end, or other end, in addition to being sent by the online review end, which is not limited in this application.
In some embodiments, the method for online code of the data center station may further include: if any examination and approval event fails to be executed, acquiring failure parameters of the examination and approval event which fails to be executed; the failure parameter is sent to the code development terminal, so that the code development terminal modifies the code content to be online based on the failure parameter; and responding to an instruction of the code development end for finishing the modification of the code content to be online, and continuing to execute the approval event of the execution failure based on the modified code content to be online.
Specifically, referring to fig. 5, fig. 5 is a schematic diagram of code online of a data center station according to an exemplary embodiment of the present application, and as shown in fig. 5, a code online management end is implemented based on a business process management (Business Process Management, BPM) system, and the BPM generates a plurality of approval events in response to an online request submitted by a code development end for code content to be online in a development environment. When each approval event is executed, if the approval event fails to be executed, an approval rejection prompt is fed back to the code development terminal, related parameters are obtained to obtain failure parameters of the approval event, and the failure parameters are fed back to the code development terminal to prompt the code development terminal to modify the content of the code to be online. If the execution result of each approval event is that the approval passes, the final execution result of the approval process is that the execution is successful, and the code content to be online is issued to the online environment for online processing, wherein the issued code content to be online comprises, but is not limited to, service codes, service operation configuration data and the like.
The failure parameter may include the type of approval event of the execution failure, the related code content, and the like, which are not limited in comparison.
Optionally, when there is an approval event execution failure, a modification suggestion may be fed back to the code development end, where the modification suggestion is used to indicate a manner of modifying the code content to be online, so as to improve the modification efficiency of the code. For example, according to the way of modifying the same or similar problems in the historical code content, a modification suggestion is obtained; or the approval event of the failure in execution is a manual audit, when the approval event is executed, the modification annotation added by related personnel aiming at the code to be online can be obtained, so that the modification suggestion is obtained according to the modification annotation.
Referring to fig. 6, fig. 6 is a flowchart illustrating a code-on-line method of a data center station according to another exemplary embodiment of the present application. The code online method of the data center can be applied to the implementation environment shown in fig. 2 and is specifically executed by a code development end in the implementation environment.
As shown in fig. 6, the code online method of the data center station at least includes steps S610 to S620, which are described in detail as follows:
step S610: and pulling the development environment of the data center, and executing code development operation based on the development environment to obtain the code content to be online.
The code development operation may be executed by a code developer, for example, the developer inputs code content by using a code development tool, or the code development operation may be automatically executed by a code development terminal, for example, the code content is automatically generated according to a document of a service requirement, which is not limited in the present application.
Step S620: and sending an online request aiming at the code content to be online to a code online management end so that the code online management end obtains a business flow template corresponding to the code content to be online, generates an approval flow corresponding to the code content to be online based on the business flow template, executes the approval flow, and issues the code content to be online to an online environment for online processing if the approval flow is successfully executed.
The specific implementation process of step S620 may refer to steps S310 to S330, which are not described herein.
In some embodiments, the approval process contains a plurality of approval events; the method further comprises the steps of: receiving failure parameters returned by the code online management end aiming at the code content to be online; the failure parameters are parameters corresponding to approval events of the execution failure in the approval process; and modifying the code content to be online based on the failure parameter to obtain modified code content to be online so that the code online management end continues to execute the approval event of the execution failure based on the modified code content to be online.
The code developer may modify the code content to be online, or the code development terminal may automatically modify the code content to be online, which is not limited in this application.
After the code content to be online is modified to obtain modified code content to be online, the code development end submits a request for continuing online approval aiming at the modified code content to be online, the code online management end executes the approval event of the execution failure of the modified code content to be online, namely, the code online management end stores the approval progress of the code content to be online, and when the resubmission of the code content to be online is detected, the approval event which is executed successfully before the execution is not repeated, but the execution is continued from the approval event which is executed unsuccessfully last time according to the approval progress, so that the approval efficiency is improved, and the resource waste is avoided.
According to the code online method of the data center, a business process template corresponding to code content to be online is obtained by responding to an online request submitted by a code development terminal for the code content to be online, wherein the code content to be online is developed by the code development terminal based on a development environment; generating an approval process corresponding to the code content to be online based on the business process template, and executing the approval process; if the approval process is successfully executed, the code content to be online is issued to an online environment for online processing, the data center and the business process management can be combined, and the code content is approved before the code is online, so that the online operation of the code of the data center is standardized, online accidents caused by the random online development of the code are avoided, and the stability of online business operation is improved.
Fig. 7 is a block diagram of a code-on-line device of a data center station, which is shown in an exemplary embodiment of the present application, deployed at a code-on-line management end. As shown in fig. 7, the code-on-line apparatus 700 of the exemplary data center station includes: a template acquisition module 710, an approval execution module 720, and an online processing module 730. Specifically:
the template acquisition module 710 is configured to acquire a business process template corresponding to the code content to be online in response to an online request submitted by the code development terminal for the code content to be online; the code content to be online is developed by a code development terminal based on a development environment;
the approval executing module 720 is configured to generate an approval process corresponding to the code content to be online based on the business process template, and execute the approval process;
and the online processing module 730 is configured to issue the code content to be online to an online environment for online processing if the approval process is successfully executed.
Fig. 8 is a block diagram of a code-on-line device of a data center station, which is shown in another exemplary embodiment of the present application, deployed at a code development end. As shown in fig. 8, the code-on-line apparatus 800 of the exemplary data center station includes: a code development module 810 and an online request module 820. Specifically:
The code development module 810 is configured to pull a development environment of the data center, perform a code development operation based on the development environment, and obtain code content to be online;
the online request module 820 is configured to send an online request for the code content to be online to the code online management end, so that the code online management end obtains a business process template corresponding to the code content to be online, generates an approval process corresponding to the code content to be online based on the business process template, and executes the approval process, and if the approval process is executed successfully, issues the code content to be online to an online environment for online processing.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an embodiment of an electronic device of the present application. The electronic device 900 comprises a memory 901 and a processor 902, the processor 902 being adapted to execute program instructions stored in the memory 901 to implement the steps in the code online method embodiment of any of the data center stations described above. In one particular implementation scenario, electronic device 900 may include, but is not limited to: the microcomputer and the server, and the electronic device 900 may also include mobile devices such as a notebook computer and a tablet computer, which are not limited herein.
In particular, the processor 902 is configured to control itself and the memory 901 to implement the steps in the code-on-line method embodiment of any of the above-described mid-data stations. The processor 902 may also be referred to as a central processing unit (Central Processing Unit, CPU). The processor 902 may be an integrated circuit chip having signal processing capabilities. The processor 902 may also be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 902 may be commonly implemented by an integrated circuit chip.
Referring to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of a computer readable storage medium of the present application. The computer readable storage medium 1000 stores program instructions 1010 that can be executed by a processor, the program instructions 1010 being configured to implement the steps in the code-on-line method embodiment of any one of the data center stations described above.
In some embodiments, functions or modules included in an apparatus provided by the embodiments of the present disclosure may be used to perform a method described in the foregoing method embodiments, and specific implementations thereof may refer to descriptions of the foregoing method embodiments, which are not repeated herein for brevity.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
In the several embodiments provided in the present application, it should be understood that the disclosed methods and apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical, or other forms.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units. The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all or part of the technical solution contributing to the prior art or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (10)

1. The method for the code online of the data center station is characterized in that the data center station comprises a development environment and an online environment, and the method is applied to a code online management end and comprises the following steps:
responding to an online request submitted by a code development terminal for the code content to be online, and acquiring a business flow template corresponding to the code content to be online; the code content to be online is developed by the code development terminal based on the development environment;
generating an approval process corresponding to the code content to be online based on the business process template, and executing the approval process;
and if the approval process is successfully executed, the code content to be online is issued to the online environment for online processing.
2. The method of claim 1, wherein the obtaining, in response to an online request submitted by a code development terminal for code content to be online, a business process template corresponding to the code content to be online, includes:
determining a target application program corresponding to the code content to be online;
inquiring a flow template associated with the target application program from a flow template library to obtain a business flow template corresponding to the code online request, wherein the flow template library is associated with and stores the application program and the flow template.
3. The method of claim 1, wherein the generating an approval process corresponding to the code content to be online based on the business process template and executing the approval process comprise:
generating a plurality of approval events based on the business process template;
determining an event execution sequence between each approval event;
and executing the plurality of approval events in sequence according to the event execution sequence.
4. A method according to claim 3, wherein the approval events include code compilation, code auditing, and on-line review, and the sequentially executing the plurality of approval events in the event execution order comprises:
performing code compiling on the code content to be online to obtain a code compiling result;
if the code compiling result shows that the code content to be online passes compiling, the code content to be online is sent to a code auditing end for code auditing, and a code auditing result fed back by the code auditing end is obtained;
and if the code auditing result indicates that the code auditing of the code content to be online passes, the code content to be online is sent to an online review terminal for online review, and an online review result fed back by the online review terminal is obtained.
5. The method of claim 4, wherein if the code compiling result indicates that the code content to be online is compiled, sending the code content to be online to a code auditing end for code auditing, and obtaining a code auditing result fed back by the code auditing end, comprises:
determining code content which covers the online code content in the code content to be online to obtain a first code segment; and taking the covered code content in the online code content as a second code segment;
and displaying a code auditing page to the code auditing end, and comparing and displaying the first code segment and the second code segment in the code auditing page.
6. The method of claim 4, wherein after the code auditing result indicates that the code auditing of the code content to be online passes, sending the code content to be online to an online review terminal for online review, and obtaining an online review result fed back by the online review terminal, further comprising:
if the online review result shows that the online review of the code content to be online passes, the approval process is successfully executed;
If the approval process is successfully executed, the code content to be online is issued to the online environment for online processing, including:
and receiving the online parameters sent by the online review terminal, and releasing the content of the code to be online to the online environment for online processing according to the online parameters.
7. A method according to claim 3, further comprising:
if any examination and approval event fails to be executed, acquiring failure parameters of the examination and approval event which fails to be executed;
the failure parameter is sent to the code development terminal, so that the code development terminal modifies the code content to be online based on the failure parameter;
and responding to the instruction of the code development end for finishing the modification of the code content to be online, and continuously executing the approval event of the execution failure based on the modified code content to be online.
8. A method for code online of a data center, wherein the data center contains a development environment and an online environment, the method is applied to a code development terminal and comprises the following steps:
pulling a development environment of the data center, and executing code development operation based on the development environment to obtain code content to be online;
And sending an online request for the code content to be online to a code online management end, so that the code online management end obtains a business flow template corresponding to the code content to be online, generates an approval flow corresponding to the code content to be online based on the business flow template, and executes the approval flow, and if the approval flow is executed successfully, the code content to be online is issued to the online environment for online processing.
9. The method of claim 8, wherein the approval process contains a plurality of approval events; the method further comprises the steps of:
receiving a failure parameter returned by the code online management end for the code content to be online; the failure parameter is a parameter corresponding to an approval event of failure execution in the approval process;
and modifying the code content to be online based on the failure parameter to obtain modified code content to be online so that the code online management end continues to execute the approval event of the execution failure based on the modified code content to be online.
10. An electronic device comprising a memory and a processor for executing program instructions stored in the memory to implement the steps of the method according to any of claims 1-9.
CN202311746434.1A 2023-12-18 2023-12-18 Code online method of data center station and electronic equipment Pending CN117806658A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311746434.1A CN117806658A (en) 2023-12-18 2023-12-18 Code online method of data center station and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311746434.1A CN117806658A (en) 2023-12-18 2023-12-18 Code online method of data center station and electronic equipment

Publications (1)

Publication Number Publication Date
CN117806658A true CN117806658A (en) 2024-04-02

Family

ID=90426724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311746434.1A Pending CN117806658A (en) 2023-12-18 2023-12-18 Code online method of data center station and electronic equipment

Country Status (1)

Country Link
CN (1) CN117806658A (en)

Similar Documents

Publication Publication Date Title
WO2019100576A1 (en) Automated test management method and apparatus, terminal device, and storage medium
US8060532B2 (en) Determining suitability of entity to provide products or services based on factors of acquisition context
WO2019100577A1 (en) Automated test management method and apparatus, terminal device, and storage medium
CN109901968A (en) A kind of automation page data method of calibration and device
CN113076104A (en) Page generation method, device, equipment and storage medium
CN107862425B (en) Wind control data acquisition method, device and system and readable storage medium
CN112529575B (en) Risk early warning method, equipment, storage medium and device
US20220327452A1 (en) Method for automatically updating unit cost of inspection by using comparison between inspection time and work time of crowdsourcing-based project for generating artificial intelligence training data
CN113032834A (en) Database table processing method, device, equipment and storage medium
CN109711849B (en) Ether house address portrait generation method and device, electronic equipment and storage medium
CN110647523A (en) Data quality analysis method and device, storage medium and electronic equipment
CN112181482B (en) Version verification method and device, electronic equipment and storage medium
CN117495544A (en) Sandbox-based wind control evaluation method, sandbox-based wind control evaluation system, sandbox-based wind control evaluation terminal and storage medium
CN112651716A (en) Data processing method, device and storage medium
CN111966600A (en) Webpage testing method and device, computer equipment and computer readable storage medium
CN111651500A (en) User identity recognition method, electronic device and storage medium
CN111639903A (en) Review processing method for architecture change and related equipment
CN115080827B (en) Sensitive data processing method and device
CN117806658A (en) Code online method of data center station and electronic equipment
CN113935847A (en) Online process risk processing method, device, server and medium
CN114115628A (en) U shield display information acquisition method, device, equipment, medium and program product applied to U shield test
CN112632391A (en) Data processing method, device and storage medium
CN106169158A (en) A kind of finance account assets information analysis and Control system and method
US20220197945A1 (en) Computer-implemented method for analyzing a transaction log
CN115328812B (en) UI (user interface) testing method, device, equipment and medium based on web crawler

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