CN116501311A - Code generation method, device, computing and storage medium and electronic equipment - Google Patents

Code generation method, device, computing and storage medium and electronic equipment Download PDF

Info

Publication number
CN116501311A
CN116501311A CN202310343082.9A CN202310343082A CN116501311A CN 116501311 A CN116501311 A CN 116501311A CN 202310343082 A CN202310343082 A CN 202310343082A CN 116501311 A CN116501311 A CN 116501311A
Authority
CN
China
Prior art keywords
configuration component
code
calling
target
maintenance
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
CN202310343082.9A
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310343082.9A priority Critical patent/CN116501311A/en
Publication of CN116501311A publication Critical patent/CN116501311A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Abstract

The application discloses a code generation method, a code generation device, a calculation and storage medium and electronic equipment. Relates to the technical field of information. The method comprises the following steps: acquiring a service flow in a target scene and a calling method for calling an application program interface in the service flow; determining a technical configuration component for realizing the service function in the target scene and an operation and maintenance configuration component for realizing operation and maintenance on the service operation in the target scene; based on the business flow, a method is called, a technology configuration component and an operation and maintenance configuration component are used for generating target codes under a target scene. By the method and the device, the problem that the high-efficiency customized code development cannot be performed according to the service requirements in the related technology is solved.

Description

Code generation method, device, computing and storage medium and electronic equipment
Technical Field
The present invention relates to the field, and in particular, to a code generation method, a code generation device, a computer and storage medium, and an electronic device.
Background
In the related art, there are tools that can directly output a code scaffold, i.e., a meta-programming method can be adopted to directly generate a code frame based on a specification of how a database is used provided by a programmer, but the method cannot output a customized business code for a business scenario in one-stop.
Aiming at the problem that the efficient and customized code development cannot be carried out according to the service requirement in the related technology, no effective solution is proposed at present.
Disclosure of Invention
The application provides a code generation method, a code generation device, a calculation and storage medium and electronic equipment, so as to solve the problem that in the related art, efficient and customized code development cannot be performed according to service requirements.
According to one aspect of the present application, a code generation method is provided. The method comprises the following steps: acquiring a service flow in a target scene and a calling method for calling an application program interface in the service flow; determining a technical configuration component for realizing the service function in the target scene and an operation and maintenance configuration component for operating and maintaining the service operation in the target scene; based on the business flow, a method is called, a technology configuration component and an operation and maintenance configuration component are used for generating target codes under a target scene.
Optionally, acquiring the service flow under the target scene and a calling method for calling the application program interface in the service flow, including: acquiring an association relation between services in a target scene; receiving a drag operation instruction; based on the drag operation instruction, displaying the logic arrangement of the association relation between the businesses to obtain business processes and calling methods.
Optionally, after determining the technology configuration component for implementing the service function in the target scenario and the operation and maintenance configuration component for implementing operation and maintenance on the service operation in the target scenario, the method further includes: registering a technology configuration component and/or an operation and maintenance configuration component; and under the condition that a component upgrading instruction is received, performing isolation upgrading on the registered technical configuration component and/or the operation and maintenance configuration component.
Optionally, based on the business process, the calling method, the technology configuration component and the operation and maintenance configuration component, generating the target code in the target scene includes: calling an application program interface based on the service flow and the calling method; and generating target codes based on the technical configuration component and the operation and maintenance configuration component under the condition that the calling result of the application program interface is successful calling.
Optionally, generating the object code based on the technology configuration component and the operation and maintenance configuration component includes: invoking a technology configuration component; calling the operation and maintenance configuration component under the condition that the calling result of the technical configuration component is successful calling; and generating target codes based on the calling result of the operation and maintenance configuration component.
Optionally, generating the object code based on the calling result of the operation and maintenance configuration component includes: connecting to a target database; under the condition that the calling result of the operation and maintenance configuration component is successful calling, generating a code test case corresponding to the target database based on the service flow, the calling method, the technical configuration component, the operation and maintenance configuration component and the target database, and generating a back-end code and a front-end code; based on the code test cases, the back-end code and the front-end code, an object code is determined.
Optionally, the method further comprises: receiving a batch modification requirement under the condition that the target code adopts a batch development framework; determining a reconstruction configuration component based on the batch reconstruction requirements; bulk reforms are performed on the object code based on the reform configuration component.
According to another aspect of the present application, a code generating apparatus is provided. The device comprises: the acquisition module is used for acquiring the service flow in the target scene and a calling method for calling the application program interface in the service flow; the determining module is used for determining a technical configuration component for realizing the service function in the target scene and an operation and maintenance configuration component for realizing operation and maintenance on the service operation in the target scene; the generating module is used for generating the target code in the target scene based on the business process, the calling method, the technical configuration component and the operation and maintenance configuration component.
According to another aspect of the embodiment of the present invention, there is also provided a computer storage medium for storing a program, where the program when run controls a device in which the computer storage medium is located to execute a code generation method.
According to another aspect of embodiments of the present invention, there is also provided an electronic device including one or more processors and a memory; the memory has stored therein computer readable instructions for execution by the processor, wherein the computer readable instructions when executed perform a code generation method.
Through the application, the following steps are adopted: acquiring a service flow in a target scene and a calling method for calling an application program interface in the service flow; determining a technical configuration component for realizing the service function in the target scene and an operation and maintenance configuration component for realizing operation and maintenance on the service operation in the target scene; based on the business flow, the method is called, the technical configuration component and the operation and maintenance configuration component generate the target code under the target scene, and the problem that the high-efficiency and customized code development cannot be carried out according to the business requirements in the related technology is solved. And further, the effect of fast generating the code with strong functionality, standardization and customization aiming at the service scene is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application, illustrate and explain the application and are not to be construed as limiting the application. In the drawings:
FIG. 1 is a flow chart of a code generation method provided according to an embodiment of the present application; and
FIG. 2 is a schematic diagram of call logic grooming provided in accordance with an alternative embodiment of the present application;
FIG. 3 is a schematic flow diagram of a building block assembly development scenario provided in accordance with an alternative embodiment of the present application;
Fig. 4 is a schematic diagram of a code generating apparatus provided according to an embodiment of the present application.
Detailed Description
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the present application described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, related information (including, but not limited to, user equipment information, user personal information, etc.) and data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present disclosure are information and data authorized by a user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
It should be noted that the code generation method, apparatus, computing and storage medium and electronic device determined in the present disclosure may be used in the field of information technology, and may also be used in any field other than the field of information technology, and the application fields of the code generation method, apparatus, computing and storage medium and electronic device determined in the present disclosure are not limited.
In order to solve the problem that the related technology cannot perform efficient and customized code development according to service requirements, the related technology has the following method: the method of meta programming is adopted to directly generate a code frame based on the specification of how to use a database provided by a programmer, namely, tools capable of outputting scaffolds exist in the related art, but the related art is only limited to outputting scaffolds, and no one-stop output of ecology is formed for the development of a scene service code or the formation of a systematic connection.
Based on this, the present application intends to provide a solution to the above technical problem, the details of which will be explained in the following embodiments.
For convenience of description, the following will describe some terms or terms related to the embodiments of the present application:
low code development, which is a visual application development method. With low code development, even business personnel who do not understand programming can create enterprise applications using visual modeling and drag-and-drop components through a graphical user interface.
Software as a service (Software as a Service, saaS), also known as "on demand software", is a mode of software delivery. In this delivery mode, the software is only required to be used through a network without the need for conventional installation steps, and the software and its associated data are centrally hosted in the cloud service. Users typically use thin clients, typically accessing software, i.e. services, via a web browser, with the biggest feature that the software itself is not downloaded to the user's hard disk, but rather stored at the provider's cloud or server.
An application program interface (application programming interface, API), which is a computing interface that defines interactions between multiple software intermediaries, as well as the types of calls or requests that may be made, how calls or requests are made, the data formats that should be used, the conventions that should be followed, etc. It may also provide an extension mechanism so that a user may extend existing functionality in various ways to varying degrees. An API may be fully custom designed for a component or designed based on industry standards to ensure interoperability. Through information hiding, the API enables modular programming, allowing users to implement independent use of the interface.
According to an embodiment of the present application, a code generation method is provided.
Fig. 1 is a flowchart of a code generation method provided according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S102, acquiring a service flow in a target scene and a calling method for calling an application program interface in the service flow;
step S104, determining a technical configuration component for realizing the service function in the target scene and an operation and maintenance configuration component for operating and maintaining the service operation in the target scene;
step S106, based on the business flow, calling the method, the technical configuration component and the operation and maintenance configuration component, and generating the target code in the target scene.
When the business process under the target scene is acquired, the business type can be determined according to the target scene, for example, the business field can be insurance, education, finance, authority center, process center and the like, then the business type can be continuously determined according to the business field, for example, the application parameter verification, company application service, order generation service, policy generation service, commission fee generation and the like, different business processes can be specifically related to different business types, on one hand, a preset business process frame can be respectively set for different business fields or business types, a user can adopt the business process, and on the other hand, the business process can be adjusted based on the preset business process frame, and on the other hand, the business process can be completely subjected to custom setting by the user so as to meet the more diversified and customized business requirements.
When a calling method of an application program interface call is required to be performed in a business process, a calling method can be determined according to one or more parameters returned by an Application Program Interface (API) aiming at a target scene, for example, the parameter returned by the first called API in the business process can be used as a calling necessary condition of the second called API in the business process, and the calling code of the API in the target code can be determined based on the calling necessary condition.
According to the embodiment of the application, the technical configuration component and the operation and maintenance configuration component can be introduced by one key through the custom rule, and a user only needs to determine the technical configuration component and the operation and maintenance configuration component which are needed to be used in a target scene. The technical configuration component is used for realizing service functions in the target scene, for example, the technical configuration component can be an application portrait log standardization component, a general log, an online transaction monitoring log technical component, an OCR (optical character recognition) quick embedded scene connector, file uploading and downloading, a Mysql database obtaining serial number component and the like, and the operation and maintenance configuration component is used for operating and maintaining service operation in the target scene, for example, the operation and maintenance configuration component can be a security component, a self-isolation component, a current limiting center, an application portrait, an AMC monitoring component, a Hangzhou research log construction, paaS one-key cloud, man-machine password separation and the like.
When generating the target code in the target scene based on the business flow, the method, the technical configuration component and the operation and maintenance configuration component, the target code adapting to the target scene can be directly output by adopting a low code development mode.
Based on the above-mentioned code generation flow, the embodiments of the present application may integrate each part of the above-mentioned flow, and finally perform the assembled generation of the code in the form of a building block. For example, service building blocks, technology building blocks, operation and maintenance building blocks, and low code building blocks may be provided. The technical building block is used for integrating a technical configuration component for realizing the service function in the target scene, the operation and maintenance building block is used for integrating an operation and maintenance configuration component for operating and maintaining the service operation in the target scene, and the low-code building block is used for generating the target code in the target scene based on the service flow, the calling method, the technical configuration component and the operation and maintenance configuration component. Through setting up above-mentioned each building block, the embodiment of the application through assembling each building block, can accomplish the high-efficient, the customization of object code under the target scene fast and generate.
It should be noted that, in the code generation process or in the output standardization of each building block, the embodiments of the present application are convenient for generating the standard target code, improving the generating efficiency of the target code, for example, the data fields may be unified, the interface standard may be unified, the UI style may be unified, and so on.
Optionally, in the code generating method provided in the embodiment of the present application, a service flow under a target scene and a calling method for calling an application program interface in the service flow are obtained, including: acquiring an association relation between services in a target scene; receiving a drag operation instruction; based on the drag operation instruction, displaying the logic arrangement of the association relation between the businesses to obtain business processes and calling methods.
When the service flow and the calling method in the target scene are acquired, various modes can be adopted, for example, the service flow and the calling method in the target scene can be described by utilizing voice or text, the description is converted into a flow chart by utilizing voice recognition or text recognition, and the service flow and the calling method are correspondingly determined based on the flow chart. For example, the user can directly set the service flow and the calling method, the specific services can be directly dragged on the operation interface, the operation interface correspondingly displays the logic arrangement of the specific services on the interface after responding to the dragging operation instruction, and the calling method of the service flow and the application interface can be logically combed more intuitively through the visual logic arrangement, so that the user operation is simplified, and the use threshold of the user is reduced.
Optionally, in the code generating method provided in the embodiment of the present application, after determining a technology configuration component for implementing a service function in a target scenario and an operation and maintenance configuration component for implementing operation and maintenance on a service operation in the target scenario, the method further includes: registering a technology configuration component and/or an operation and maintenance configuration component; and under the condition that a component upgrading instruction is received, performing isolation upgrading on the registered technical configuration component and/or the operation and maintenance configuration component.
In the embodiment of the application, the selected technical configuration component and the operation and maintenance configuration component can be directly introduced, the object code is integrally generated, the complicated component access time is saved, meanwhile, the embodiment of the application also carries out the registration operation on the selected technical configuration component and the operation and maintenance configuration component, and under the condition of receiving the component upgrading instruction, only the registered technical configuration component and/or operation and maintenance configuration component can be upgraded according to the registration result without affecting other components.
Similarly, by registering different components, it is also possible to implement different processes for different components separately, for example, it is also possible to perform registration processing for components introduced after the object code is generated, to influence the original components by the tape by isolating the upgrade when the components are upgraded, and so on.
Optionally, in the code generation method provided in the embodiment of the present application, based on a service flow, a calling method, a technology configuration component and an operation and maintenance configuration component, generating an object code in a target scenario includes: calling an application program interface based on the service flow and the calling method; and generating target codes based on the technical configuration component and the operation and maintenance configuration component under the condition that the calling result of the application program interface is successful calling.
In the embodiment of the application, after the application program interface is called based on the service flow and the calling method, the calling result of the application program interface is judged first, and the object code is generated based on the technical configuration component and the operation and maintenance configuration component only when the calling result of the application program interface is successful call, if the calling result of the application program interface is call failure, the object code is not generated based on the technical configuration component and the operation and maintenance configuration component any more, the code generation process is directly ended, and according to the actual application requirement, the corresponding error code can be returned according to the reason of the call failure of the application program interface at this time, so that a user can check the service flow and the calling method of the application program interface in the object scene, and alarm information can be directly sent out, so that the user can be reminded that the application program interface at this time is call failure, the object code cannot be generated, and the like.
Optionally, in the code generating method provided in the embodiment of the present application, generating the object code based on the technology configuration component and the operation and maintenance configuration component includes: invoking a technology configuration component; calling the operation and maintenance configuration component under the condition that the calling result of the technical configuration component is successful calling; and generating target codes based on the calling result of the operation and maintenance configuration component.
In the embodiment of the application, after the technical configuration component is called, the calling result of the technical configuration component is judged first, and only if the calling result of the technical configuration component is successful call, the operation and maintenance configuration component is continuously called, and the target code is generated, if the calling result of the technical configuration component is call failure, the operation and maintenance configuration component is not continuously called, but the code generation process is directly ended, and at the moment, according to the actual application requirement, a corresponding error code can be returned according to the reason that the calling of the technical configuration component fails, so that a user can check the calling process of the technical configuration component, and alarm information can also be directly sent, so that the user is reminded that the technical configuration component fails to call at the moment, the operation and maintenance configuration component cannot be continuously called, the target code is generated, and the like.
Optionally, in the code generating method provided in the embodiment of the present application, generating the object code based on the call result of the operation and maintenance configuration component includes: connecting to a target database; under the condition that the calling result of the operation and maintenance configuration component is successful calling, generating a code test case corresponding to the target database based on the service flow, the calling method, the technical configuration component, the operation and maintenance configuration component and the target database, and generating a back-end code and a front-end code; based on the code test cases, the back-end code and the front-end code, an object code is determined.
For different service scenarios, the data entities required for generating the codes are different, so in the embodiment of the application, before generating the target codes, a target database corresponding to the target scenario is determined, and a connection relationship is established with the target database.
In the embodiment of the application, after the operation and maintenance configuration component is called, the calling result of the operation and maintenance configuration component is judged first, and the object code is continuously generated only when the calling result of the operation and maintenance configuration component is successful call, if the calling result of the operation and maintenance configuration component is call failure, the code generation process is directly ended, and according to the actual application requirement, a corresponding error code can be returned according to the reason of the call failure of the operation and maintenance configuration component at this time, so that a user can check the calling process of the operation and maintenance configuration component, and alarm information can also be directly sent out, so that the user is reminded that the operation and maintenance configuration component call fails at this time, the object code cannot be continuously generated, and the like.
After the operation and maintenance configuration component is successfully invoked, object codes can be generated according to the connected object database. It should be noted that, in this embodiment of the present application, a low code development manner may be adopted, and code contents of relevant scenarios such as corresponding domain services may be directly generated according to a target database, where the code contents include generating corresponding unit automation test cases for entity data in a selected target database, a back end code, a front end code, and so on, and based on the code test cases, the back end code and the front end code may determine the target code corresponding to the target scenario.
In the process of generating the target code by using the low-level code development, the code generation flow is as follows: entity selection, object service, business service, unit test and generation of a standard code structure.
Optionally, in the code generation method provided in the embodiment of the present application, the method further includes: receiving a batch modification requirement under the condition that the target code adopts a batch development framework; determining a reconstruction configuration component based on the batch reconstruction requirements; bulk reforms are performed on the object code based on the reform configuration component.
In this embodiment of the present application, the target code may be adjusted according to the received batch modification requirement under the condition that the target code adopts a batch development framework, for example, the target code may be enabled to implement different functions by increasing or decreasing the replacement configuration component, or the target code may be modified in batch by introducing the modification configuration component, for example, the Hangzhou-research log is constructed, paaS is cloud-on-key, man-machine password separation, MYSQL import and export, data cleaning, and so on.
Correspondingly, in the application embodiment, batch building blocks, such as DBF batch building blocks, may be provided to enable batch modification of the code based on the assembled code generation.
According to the code generation method provided by the embodiment of the application, the service flow in the target scene and the calling method for calling the application program interface in the service flow are obtained; determining a technical configuration component for realizing the service function in the target scene and an operation and maintenance configuration component for realizing operation and maintenance on the service operation in the target scene; based on the business flow, the method is called, the technical configuration component and the operation and maintenance configuration component generate the target code under the target scene, and the problem that the high-efficiency and customized code development cannot be carried out according to the business requirements in the related technology is solved. And further, the effect of fast generating the code with strong functionality, standardization and customization aiming at the service scene is achieved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
In accordance with the foregoing embodiments and optional embodiments, an optional embodiment mode is further provided, and the optional embodiment mode is described below.
The optional implementation mode of the application provides a building block type assembled development device based on scene rapid creation, and aims to realize one-stop output aiming at development and business functions, form ecological scenes, realize standardization and promote scenes.
The building block type assembled development device based on scene rapid creation, which is provided by the optional embodiment of the application, is based on an 'assembled' programming development idea, and uses a service fusion package, operation and maintenance building blocks and low codes as platform keywords to create a mode similar to the construction of a music altitude.
The apparatus creates around four core building blocks, comprising: the service building blocks, the technical building blocks, the low-code building blocks and the operation building blocks are respectively described below.
(1) Service building block
The method mainly aims at the SaaS scene call, performs service logic arrangement, performs visual module logic association in a dragging mode, can realize barriers before calling of different SaaS scene APIs, and judges scene parameters of the SaaSApi to call codes in an assembled development device.
And the data standard conversion and the service output of external unified standards (including and limited to unified data fields, unified interface standards and unified UI style conversion) are supported, and the quick output capability of the product is improved.
FIG. 2 is a schematic diagram of call logic combing provided in accordance with an alternative embodiment of the present application, as shown in FIG. 2, call logic combing for SaaSAPI may be accomplished in a service building block.
(2) Technical building block
Through some custom rules, the technical components are introduced by one key, so that configuration integrated output is realized, secondary operation is not needed, and the configuration integrated output is used after being unpacked.
And the data standard conversion and the service output of external unified standards (including and limited to unified data fields, unified interface standards and unified UI style conversion) are supported, and the quick output capability of the product is improved.
(3) Low-code building block
And the low code capacity is adopted, the generated code accords with a standard engineering code structure, different data entities can be connected by application in a self-defined mode, and corresponding field service and other relevant scene building block contents are automatically generated based on the entities. Including generating corresponding unit automation test cases for selected entity data, backend code front end code, and the like.
(4) Operation building block
And the operation and maintenance building blocks are introduced to improve the standardization of the product scene. The one-key introduction of the operation and maintenance assembly is realized by making standardized operation and maintenance building block rules, and all configuration containing classes are synchronously and integrally generated. And the complicated access time of the operation and maintenance component is removed, and the access application realizes the leap of the use time from day to hour. Besides, the application introducing component can register, so that the influence of component upgrading (including jar package upgrading, class upgrading and other scenes) on the original accessed application is greatly reduced.
In addition, besides the four core building blocks, DBF batch building blocks can be further arranged in the device provided by the optional implementation mode of the application, and the device is mainly used for batch reconstruction of domestic DBF frames, conversion assistance for domestic database, construction re-establishment of projects, better use of an assembly platform, various components such as Hangzhou-research log construction, paaS one-key cloud, human-computer password separation, MYSQL import and export, data cleaning and the like can be introduced under the building blocks.
The following examples are presented to illustrate the use of alternative embodiments of the present application.
Taking the following usage scenario as an example: the login function of a background management system is realized, the first-layer login authentication operation is carried out through the existing SaaS-api, ocr face recognition is carried out after success, and database recording is carried out after verification is passed. And after successful login, entering a user management page to display a table. Fig. 3 is a schematic flow chart of a building block assembly development scenario provided according to an alternative embodiment of the present application, as shown in fig. 3, the flow chart includes the following steps:
(1) Firstly, calling logic carding of SaaSAPI is carried out through a service building block, and SaaS-API is selected in a dragged flow chart to carry out ecological authentication login. And when the arrangement is successful, the return result is realized, and the failure directly exits.
(2) And (3) judging whether the technical building block-OCR face recognition call is to be performed or not through judging the return result in the step (1). In the development process, the components required to be used can be integrated in technical building blocks only by selecting the components in a component selection interface, for example, an portrait log standardization component, a general log, an online transaction monitoring log technical component, an OCR (optical character recognition) quick embedded scene connector, file uploading and downloading, a Mysql database for acquiring a serial number component and the like, and configuration types required by engineering are contained, logic judgment is started, and the components are selected for use and are portable.
(3) And (2) introducing an amc monitoring component in the operation and maintenance building block after the step (2) to monitor the database change value, wherein the application value cannot exceed a threshold value, and if the application value exceeds the threshold value, a warning is given. Similar to the technical building blocks, the components can be selected through a component selection interface, and after the corresponding components are selected, the corresponding component configuration can be integrated in a development device, such as a safety component, a self-isolation component, a current limiting center, an application portrait, an AMC monitoring component, a Hangzhou-research log construction, paaS one-key cloud, human-computer password separation and the like.
(4) On the basis of the step (3), the database table structure needing home page display is identified through the database connection by the low-code building blocks, an entity is generated in the device, corresponding adding, deleting, checking, front end and back end codes are automatically generated, and the corresponding adding, deleting, checking, front end and back end codes are introduced into a development device to realize the requirements.
In summary, alternative embodiments of the present application have the following prominent advantages:
(1) One-key quick construction application foundation framework
According to the method and the device, the solution for the client-side to-end is formed rapidly through the provided service scene multiplexing standard output and technical assembly capability, the building block ecological system is formed through building block assembly, the production efficiency is improved to be close to 15%, and the code standardized output is achieved.
(2) Scenariod business capability multiplexing
The optional implementation mode of the application faces ecological clients, the ecological base provides data sharing access capability, an ecological scene barrier is opened, a portal product solution is unified, user management is unified, and a tenant management capability service is unified. And the ecological service capability is enriched, and the user experience is improved.
(3) Building block type standard low code lifting standardization capability
According to the method and the device, the standardized building blocks meeting the research and development standards can be uniformly generated, the code quality is guaranteed, the code standardization capacity is improved, and the operation and maintenance building blocks are introduced to improve the product scene standardization.
The embodiment of the application also provides a code generation device, and the code generation device of the embodiment of the application can be used for executing the code generation method provided by the embodiment of the application. The following describes a code generating device provided in an embodiment of the present application.
Fig. 4 is a schematic diagram of a code generating apparatus provided according to an embodiment of the present application. As shown in fig. 4, the apparatus includes: the acquisition module 41, the determination module 42 and the generation module 43, the device will be described below.
The acquiring module 41 is configured to acquire a service flow in a target scenario and a calling method in the service flow, where an application program interface call needs to be performed; a determining module 42, connected to the obtaining module 41, configured to determine a technology configuration component for implementing a service function in a target scenario, and an operation and maintenance configuration component for implementing operation and maintenance on a service operation in the target scenario; the generating module 43 is connected to the determining module 42, and is configured to generate the object code in the object scenario based on the business process, the calling method, the technology configuration component and the operation and maintenance configuration component.
Optionally, in the code generating apparatus provided in the embodiment of the present application, the obtaining module 41 includes: the acquisition unit is used for acquiring the association relation between the businesses in the target scene; the first receiving unit is used for receiving a drag operation instruction; and the display unit is used for displaying the logic arrangement of the association relation between the businesses based on the dragging operation instruction to obtain business processes and calling methods.
Optionally, in the code generating apparatus provided in the embodiment of the present application, the determining module 42 includes: a registration unit for registering the technical configuration component and/or the operation and maintenance configuration component; and the upgrading unit is used for carrying out isolation upgrading on the registered technical configuration component and/or the operation and maintenance configuration component under the condition of receiving the component upgrading instruction.
Optionally, in the code generating apparatus provided in the embodiment of the present application, the generating module 43 includes: the first calling unit is used for calling the application program interface based on the service flow and the calling method; the first generation unit is used for generating the target code based on the technical configuration component and the operation and maintenance configuration component under the condition that the calling result of the application program interface is successful calling.
Optionally, in the code generating device provided in the embodiment of the present application, the first generating unit includes: the second calling unit is used for calling the technical configuration component; the third calling unit is used for calling the operation and maintenance configuration component under the condition that the calling result of the technical configuration component is successful calling; and the second generating unit is used for generating the target code based on the calling result of the operation and maintenance configuration component.
Optionally, in the code generating apparatus provided in the embodiment of the present application, the second generating unit includes: a connection unit for connecting to a target database; the third generating unit is used for generating a code test case corresponding to the target database based on the service flow, the calling method, the technical configuration component, the operation and maintenance configuration component and the target database under the condition that the calling result of the operation and maintenance configuration component is that the calling is successful; and the first determining unit is used for determining the target code based on the code test case, the back-end code and the front-end code.
Optionally, in the code generating device provided in the embodiment of the present application, the device further includes: the second receiving unit is used for receiving the batch reconstruction requirement under the condition that the target code adopts a batch development framework; the second determining unit is used for determining a reconstruction configuration component based on the batch reconstruction requirement; and the transformation unit is used for transforming the target codes in batches based on the transformation configuration component.
The code generating device provided by the embodiment of the application obtains the service flow in the target scene and the calling method for calling the application program interface in the service flow; determining a technical configuration component for realizing the service function in the target scene and an operation and maintenance configuration component for realizing operation and maintenance on the service operation in the target scene; based on the business flow, the method is called, the technical configuration component and the operation and maintenance configuration component generate the target code under the target scene, and the problem that the high-efficiency and customized code development cannot be carried out according to the business requirements in the related technology is solved. And further, the effect of fast generating the code with strong functionality, standardization and customization aiming at the service scene is achieved.
The code generating device includes a processor and a memory, and the acquiring module 41, the determining module 42, the generating module 43, and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor includes a kernel, and the kernel fetches the corresponding program unit from the memory. The kernel can set one or more than one, and the service flow under the target scene and the calling method for calling the application program interface in the service flow are obtained by adjusting the kernel parameters; determining a technical configuration component for realizing the service function in the target scene and an operation and maintenance configuration component for realizing operation and maintenance on the service operation in the target scene; based on the business flow, the method is called, the technical configuration component and the operation and maintenance configuration component generate the target code under the target scene, and the problem that the high-efficiency and customized code development cannot be carried out according to the business requirements in the related technology is solved. And further, the effect of fast generating the code with strong functionality, standardization and customization aiming at the service scene is achieved.
The memory may include volatile memory, random Access Memory (RAM), and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM), among other forms in computer readable media, the memory including at least one memory chip.
An embodiment of the present invention provides a computer-readable storage medium having stored thereon a program which, when executed by a processor, implements the code generation method.
The embodiment of the invention provides a processor for running a program, wherein the code generation method is executed when the program runs.
The embodiment of the invention provides an electronic device, which comprises a processor, a memory and a program stored on the memory and capable of running on the processor, wherein the following steps are realized when the processor executes the program: acquiring a service flow in a target scene and a calling method for calling an application program interface in the service flow; determining a technical configuration component for realizing the service function in the target scene and an operation and maintenance configuration component for realizing operation and maintenance on the service operation in the target scene; based on the business flow, a method is called, a technology configuration component and an operation and maintenance configuration component are used for generating target codes under a target scene. The device herein may be a server, PC, PAD, cell phone, etc.
The present application also provides a computer program product adapted to perform, when executed on a data processing device, a program initialized with the method steps of: acquiring a service flow in a target scene and a calling method for calling an application program interface in the service flow; determining a technical configuration component for realizing the service function in the target scene and an operation and maintenance configuration component for realizing operation and maintenance on the service operation in the target scene; based on the business flow, a method is called, a technology configuration component and an operation and maintenance configuration component are used for generating target codes under a target scene.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. 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 apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A code generation method, comprising:
acquiring a service flow under a target scene, and calling a calling method which needs to be called by an application program interface in the service flow;
determining a technical configuration component for realizing the service function in the target scene and an operation and maintenance configuration component for operating and maintaining the service operation in the target scene;
and generating the target code under the target scene by the technology configuration component and the operation and maintenance configuration component based on the business flow and the calling method.
2. The method according to claim 1, wherein the obtaining the service flow under the target scenario and the calling method in the service flow requiring the application program interface call comprise:
acquiring an association relation between services in the target scene;
Receiving a drag operation instruction;
and displaying logic arrangement of the association relation between the businesses based on the dragging operation instruction to obtain the business flow and the calling method.
3. The method of claim 1, further comprising, after said determining a technology configuration component for implementing a service function in the target scenario and an operation and maintenance configuration component for implementing operation and maintenance on a service operation in the target scenario:
registering the technical configuration component and/or the operation and maintenance configuration component;
and under the condition that a component upgrading instruction is received, performing isolation upgrading on the registered technical configuration component and/or operation and maintenance configuration component.
4. The method of claim 1, wherein the generating the object code in the object scenario based on the business process, the calling method, the technology configuration component, and the operation and maintenance configuration component comprises:
calling the application program interface based on the business process and the calling method;
and generating the target code based on the technical configuration component and the operation and maintenance configuration component under the condition that the calling result of the application program interface is successful calling.
5. The method of claim 4, wherein the generating the object code based on the technology configuration component and the operation and maintenance configuration component comprises:
invoking the technology configuration component;
calling the operation and maintenance configuration component under the condition that the calling result of the technical configuration component is successful calling;
and generating the target code based on the calling result of the operation and maintenance configuration component.
6. The method of claim 5, wherein generating the object code based on the invocation result of the operation and maintenance configuration component comprises:
connecting to a target database;
under the condition that the calling result of the operation and maintenance configuration component is successful calling, based on the business flow, the calling method, the technology configuration component, the operation and maintenance configuration component and the target database generate a code test case corresponding to the target database, a back end code and a front end code;
the target code is determined based on the code test case, the back-end code, and the front-end code.
7. The method according to any one of claims 1 to 6, further comprising:
Receiving a batch modification requirement under the condition that the target code adopts a batch development framework;
determining a retrofit configuration component based on the batch retrofit requirement;
and carrying out batch reconstruction on the target codes based on the reconstruction configuration component.
8. A code generating apparatus, comprising:
the acquisition module is used for acquiring a business flow in a target scene and a calling method for calling an application program interface in the business flow;
the determining module is used for determining a technical configuration component for realizing the service function in the target scene and an operation and maintenance configuration component for realizing operation and maintenance on the service operation in the target scene;
the generating module is used for generating the target code in the target scene based on the business process, the calling method, the technical configuration component and the operation and maintenance configuration component.
9. A computer storage medium for storing a program, wherein the program when run controls a device in which the computer storage medium is located to perform the code generation method of any one of claims 1 to 7.
10. An electronic device comprising one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the code generation method of any of claims 1-7.
CN202310343082.9A 2023-03-31 2023-03-31 Code generation method, device, computing and storage medium and electronic equipment Pending CN116501311A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310343082.9A CN116501311A (en) 2023-03-31 2023-03-31 Code generation method, device, computing and storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310343082.9A CN116501311A (en) 2023-03-31 2023-03-31 Code generation method, device, computing and storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN116501311A true CN116501311A (en) 2023-07-28

Family

ID=87320945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310343082.9A Pending CN116501311A (en) 2023-03-31 2023-03-31 Code generation method, device, computing and storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN116501311A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117047781A (en) * 2023-10-10 2023-11-14 机器时代(北京)科技有限公司 Robot control method and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117047781A (en) * 2023-10-10 2023-11-14 机器时代(北京)科技有限公司 Robot control method and equipment

Similar Documents

Publication Publication Date Title
US20210073051A1 (en) Late connection binding for bots
US9934003B2 (en) System and method for creating a development and operational platform for mobile applications
US20190132264A1 (en) Generation of a chatbot interface for an application programming interface
US10949196B2 (en) Composite instance patching
US10523662B2 (en) In-memory database advanced programming model
US11163906B2 (en) Adaptive redaction and data releasability systems using dynamic parameters and user defined rule sets
CN111221739A (en) Service testing method, device and system
CN104572263A (en) Page data interaction method, related device and system
US8812429B2 (en) Decision tree creation and execution in an interactive voice response system
US20200401465A1 (en) Apparatuses, systems, and methods for providing healthcare integrations
US11695774B2 (en) System and method for federated identity functionality for API development
US20200233699A1 (en) Platform-based change management
WO2022095518A1 (en) Automatic interface test method and apparatus, and computer device and storage medium
US20220413842A1 (en) Hosting event-based applications
CN116501311A (en) Code generation method, device, computing and storage medium and electronic equipment
CN111314355B (en) Authentication method, device, equipment and medium of VPN (virtual private network) server
US11379191B2 (en) Presentation oriented rules-based technical architecture display framework
CN114816361A (en) Method, device, equipment, medium and program product for generating splicing project
CN106778193B (en) Client and UI interaction method
US11449186B2 (en) System and method for optimized generation of a single page application for multi-page applications
CN112947963A (en) Interface operation and maintenance method and device, computer equipment and storage medium
KR101328981B1 (en) Apparatus of executing services provided in different operation environments in different terminals
CN113961468A (en) Digital certificate filling method, device, equipment, medium and program product applied to U shield test
de Matos Santos API Management Platform-Based on OutSystems
CN117609165A (en) Data processing method, device, electronic equipment and computer readable medium

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