CN110764753A - Business logic code generation method, device, equipment and storage medium - Google Patents

Business logic code generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN110764753A
CN110764753A CN201910880858.4A CN201910880858A CN110764753A CN 110764753 A CN110764753 A CN 110764753A CN 201910880858 A CN201910880858 A CN 201910880858A CN 110764753 A CN110764753 A CN 110764753A
Authority
CN
China
Prior art keywords
component
data
user
output channel
logic code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910880858.4A
Other languages
Chinese (zh)
Other versions
CN110764753B (en
Inventor
徐平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yaxin Innovation Technology Nanjing Co Ltd
Original Assignee
Yaxin Innovation Technology Nanjing 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 Yaxin Innovation Technology Nanjing Co Ltd filed Critical Yaxin Innovation Technology Nanjing Co Ltd
Priority to CN201910880858.4A priority Critical patent/CN110764753B/en
Publication of CN110764753A publication Critical patent/CN110764753A/en
Application granted granted Critical
Publication of CN110764753B publication Critical patent/CN110764753B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

A business logic code generating method, device, equipment and storage medium, through encapsulating the data source, logic operation, data output channel into visual data source component, logic operation component, data output channel component separately in advance for users to choose; acquiring a data source component, a logic operation component and a data output channel component selected by a user; receiving component parameters which are set by a user and correspond to a data source component, a logic operation component and a data output channel component; connecting a data source component, a logic operation component and a data output channel component according to the operation of a user to form a flow chart; converting the flow chart into a character string corresponding to the flow chart; and analyzing the character string to generate a service logic code. The method and the device enable the development configuration, componentization and visualization of the business logic codes, and can complete the code development of most business scenes only by simple dragging operation of a user, shield the underlying technology, reduce the development threshold and enable the development to be easier and easier.

Description

Business logic code generation method, device, equipment and storage medium
Technical Field
The invention relates to the field of computers, in particular to a method, a device, equipment and a storage medium for generating a business logic code.
Background
With the continuous progress of internet technology, the amount of data generated by some enterprises and individuals is increasing, and large data stream calculation and complex event processing are carried out in order to process massive data. The big data flow computing technology can acquire and excavate huge values from massive big data in real time, the big data flow computing technology is more representative in use in an event-driven application scene, and complex event processing is used for processing massive data generated in an information system from an event-driven viewpoint and can be used for detecting, processing, analyzing and excavating real-time event flows.
More and more mature technical frameworks in the field of streaming computing appear in the open source world, such as Storm, Heron, Spark, Samza, Flink, etc. The streaming technology is rapidly developed by the characteristics of persistence, low delay and event triggering, and now, rich computing grammar and semantics, event time-based computing, unified integration access abstraction and the like are supported.
The existing streaming processing technology still uses an independent department or outsourcing company to put forward the demand by product personnel in the development stage, and completes customized development and maintenance and operation and maintenance of online business after repeatedly communicating with professional big data developers. This development has many drawbacks, such as: the method has the advantages of high labor cost, long online period, low efficiency, low reusability, high service maintenance cost, high resource consumption and the like.
Disclosure of Invention
In view of this, in order to solve the above defects in the prior art, the present application provides a method for simply dragging and pulling the packaged components to complete the development of the service logic codes without using a professional developer, and this method shields the underlying technology, simplifies the development of the big data, and reduces the development threshold, so that most of the streaming real-time big data processing application scenarios become easier, controllable, and reliable.
According to a first aspect, an embodiment of the present invention provides a method for generating a business logic code, including: the data source, the logic operation channel and the data output channel are respectively packaged into a visual data source component, a visual logic operation component and a visual data output channel component in advance for a user to select; acquiring a data source component, a logic operation component and a data output channel component selected by a user; receiving component parameters which are set by a user and correspond to the data source component, the logic operation component and the data output channel component; connecting the data source component, the logic operation component and the data output channel component according to the operation of a user to form a flow chart; converting the flow chart into a character string corresponding to the flow chart; and analyzing the character string to generate a service logic code.
With reference to the first aspect, in a first implementation manner of the first aspect, the flowchart is converted into a character string corresponding to the flowchart, and the step includes: acquiring component parameters of components in the flow chart, data transmission paths among the components and a data processing mode; and automatically assembling the components into a regular character string according to the component parameters of the components in the flow chart, the data transmission paths among the components and the data processing mode.
With reference to the first aspect, in a second implementation manner of the first aspect, the logic operation includes: data preprocessing, data processing rules and custom functions.
With reference to the first aspect, in a third implementation manner of the first aspect, the setting of the component parameter is performed by the user for each selected component, and includes: field, operation type.
With reference to the first aspect or any implementation manner of the first aspect, in a fourth implementation manner of the first aspect, the business logic code includes SQL, and the generated business logic is used to process streaming data.
With reference to the first aspect, in a fifth implementation manner of the first aspect, after the generating of the business logic code, the method further includes: debugging the service logic code, which is used for detecting the correctness of the generated service logic code; service logic resource allocation for setting the service logic operation parameters; and displaying the service logic operation information, and judging whether the service logic achieves the expectation or not according to the displayed operation content.
According to a second aspect, an embodiment of the present invention provides a business logic code generating apparatus, including: the packaging unit is used for respectively packaging the data source, the logic operation channel and the data output channel into a visual data source component, a visual logic operation component and a visual data output channel component for selection by a user; the acquisition unit is used for acquiring a data source component, a logical operation component and a data output channel component selected by a user and component parameters which correspond to the data source component, the logical operation component and the data output channel component and are set by the user; the receiving unit is used for receiving component parameters which are set by a user and correspond to the data source component, the logic operation component and the data output channel component; the connection unit is used for connecting the data source component, the logic operation component and the data output channel component according to the operation of a user to form a flow chart; the conversion unit is used for converting the flow chart into a character string corresponding to the flow chart; and the analysis unit is used for analyzing the character string to generate a service logic code.
With reference to the second aspect, in a first embodiment of the second aspect, the conversion unit further comprises: the acquisition subunit is used for acquiring component parameters of the components in the flow chart, data transmission paths among the components and a data processing mode; and the assembling subunit is used for automatically assembling the regular character strings according to the component parameters of the components in the flow chart, the data transmission paths among the components and the data processing mode.
With reference to the second aspect, in a second embodiment of the second aspect, the parsing unit further includes: the service logic code debugging unit is used for detecting the correctness of the generated service logic code; a service logic resource configuration unit, configured to set the service logic operation parameter; and the service logic operation information display unit is used for judging whether the service logic achieves the expectation or not according to the displayed operation content.
According to a third aspect, an embodiment of the present invention provides a business logic code generating apparatus, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the business logic code generating method according to the first aspect or any embodiment of the first aspect when executing the program.
According to a fourth aspect, an embodiment of the present invention provides a storage medium, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the generation method of the business logic code generation method according to the first aspect or any embodiment of the first aspect are implemented.
The advantages of the embodiments of the invention are as follows:
the invention provides a method for generating a business logic code, which comprises the steps of respectively packaging a data source, a logic operation channel and a data output channel into a visual data source component, a logic operation component and a data output channel component, placing the components into canvas in a dragging and pulling mode for connection to form a flow chart, automatically converting character strings according to the flow chart, and finally analyzing the character strings into the business logic code to realize the componentization, visualization and configuration of the business logic, shield the underlying technology, realize the development of the business logic without the need of mastering professional skills of a user, and greatly reduce the development threshold. In addition, the business logic code formed by the invention does not need repeated communication and learning between business personnel and developers, even professional developers, thereby reducing the communication and learning cost and shortening the business development period.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a method for generating a service logic code according to embodiment 1 of the present invention;
fig. 2 is a schematic connection operation diagram of a service logic code generation method in embodiment 1 of the present invention;
fig. 3 is a flowchart of a specific example of a business logic code generation method S15 in embodiment 1 of the present invention;
fig. 4 is a flowchart of a specific example after the business logic code generation method S16 in embodiment 1 of the present invention
Fig. 5 is a schematic block diagram of a specific example of a service logic code generation apparatus in embodiment 2 of the present invention;
fig. 6 is a schematic block diagram of a specific example of the conversion unit 25 of the business logic code generation apparatus in embodiment 2 of the present invention;
fig. 7 is a schematic block diagram of a specific example after the parsing unit 26 of the service logic code generation apparatus in embodiment 2 of the present invention;
fig. 8 is a schematic block diagram of the generation device and the storage medium in embodiments 3 and 4 of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; the two elements may be directly connected or indirectly connected through an intermediate medium, or may be communicated with each other inside the two elements, or may be wirelessly connected or wired connected. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
Example 1
The embodiment provides a method for generating business logic codes, which is used for processing streaming data and real-time complex events, and as shown in fig. 1, the method includes the following steps:
s11: respectively encapsulating a data source, a logic operation channel and a data output channel into a visual data source component, a logic operation component and a data output channel component in advance for a user to select, wherein the data source comprises kafka, sokect, MYSQL, HBase, Redis and the like, and the MYSQL, the HBase and the Redis are regarded as special data sources and are called as dimension tables; the dimension table corresponds to the fact table, the fact table is used for storing the measurement of the fact and the foreign key value pointing to each dimension, and the dimension table is used for storing the metadata of the dimension; the data output channel Sink can be Oracle, HTTP, ES, MYSQL, etc. In addition, the embodiment also provides a preset SQL template and a template stored by a user in a customized manner, which are different from the packaging component, the two templates are flow charts which are completed in advance according to different service scenarios, such as a service logic flow chart for short message marketing, and only corresponding parameters need to be modified when the template is used.
As a further embodiment, the logical operations further comprise: data preprocessing, data processing rules and custom functions. The data preprocessing specifically comprises association, filtering, selection and the like, the processing rule of the data comprises logical grouping, sorting, output strategy, matching mode and the like, and the custom function comprises some functions which are very common in normal business but are not carried by SQL, such as TopN.
S12: the method comprises the steps that a data source component, a logic operation component and a data output channel component selected by a user are obtained, and the user selects the data source component, the logic operation component and the data output channel component which are packaged in a visual operation interface in a dragging and pulling mode in the visual operation interface and places the data source component, the logic operation component and the data output channel component in an operation interface canvas. Such as: when data in kafka are processed in real time, a user needs to select and place a kafka data source component and a MYSQL component into a canvas in a dragging mode so as to obtain the data source and establish a dimension table or a sink table; if the data is to be preprocessed, for example, the data is to be specifically filtered, the filter component is placed into the canvas by dragging and pulling. In addition, if the preset SQL template or the template which is stored by the user in a self-defined way exists in the kafka data real-time processing template, the template is placed into the canvas in a dragging and pulling way.
S13: receiving component parameters which are set by a user and correspond to a data source component, a logic operation component and a data output channel component, and setting corresponding parameters for each type of component placed in the canvas by the user. If a preset SQL template or a template stored by user definition is used, the setting of the component parameters needs to be carried out in the same way.
As a further embodiment, the component parameters are information settings made by the user for each selected component, including: field, operation type. Such as: after putting into the canvas with filter assembly through dragging the mode of dragging and dragging, still need the user to set up corresponding parameter to filter assembly, include: field, operation type, filter condition number. And other components placed into the canvas by the user also need to be subjected to different parameter settings, and the detailed description is omitted here.
S14: and connecting the data source component, the logic operation component and the data output channel component according to the operation of a user to form a flow chart. The operations herein include connecting the components, and the connection process is performed according to the processing requirements of the user on the streaming data, for example, processing the kafka data, as shown in fig. 2, connecting the kafka data source component and the special data source-dimension table component to the data preprocessing component respectively to perform data preprocessing on the data source, connecting the data preprocessing component to the rule component, performing data processing on the streaming data after data preprocessing according to the streaming data processing rule, and finally connecting the rule component to the data output channel component, which forms a complete flow chart.
S15: and converting the flow chart into a character string corresponding to the flow chart, and automatically assembling the character string in a regular json format by the computer according to the parameters set by each component of the flow chart, the data transmission path among the components and the data processing mode after forming the flow chart.
As a further embodiment, as shown in fig. 3, S15 further includes the following steps:
s151: the method comprises the steps of obtaining component parameters of components in a flowchart, data transmission paths among the components and a data processing mode, wherein the component parameters are information settings which are carried out on each component in a canvas by a user and comprise fields, operation types and the like, the data transmission paths among the components represent sources and flow directions of data, and the data processing mode is a specific processing mode and a rule which are passed by the data in a transmission process, such as filtering or a certain output strategy.
S152: and automatically assembling the components into a regular character string according to the component parameters of the components, the data transmission paths among the components and the data processing mode in the flow chart, and automatically assembling the obtained component parameters, the data transmission paths among the components and the data processing mode into a regular json character string.
S16: and analyzing the character string to generate a service logic code. After generating the character string in the json format, analyzing the character string in the json format to generate business logic SQL codes, wherein the generated business logic SQL codes are used for processing streaming data.
As a further embodiment, as shown in fig. 4, S16 is followed by:
s17: debugging the business logic code, which is used for detecting the correctness of the generated business logic code; the debugging of the business logic code is to avoid the occurrence of errors in operation in a formal environment and the unnecessary waste of resources, and the debugging is carried out on the newly-built business logic code, wherein the newly-built business logic can be submitted to a test cluster to operate, in the test environment, a user can upload data in a self-defined mode, the test data generated by online sampling can also be used after parameter information is set by a data source component, the operation is simulated, at the moment, an output channel adopts a Console mode, namely, an output result is output to a page preview so as to verify the accuracy of the business logic, and the business logic operation parameters can adopt default configuration parameters during debugging.
S18: service logic resource allocation, which is used for setting service logic operation parameters; the service logic resource configuration is resource configuration performed after the service logic is debugged and verified to be correct, that is, after parameter information such as a required memory size, a parallel line number, a Checkpoint and other parameters are set and stored, the service logic is submitted to the formal environment cluster to be operated.
S19: and displaying the service logic operation information, and judging whether the service logic achieves the expectation or not according to the displayed operation content. The service logic operation information comprises:
(1) and the details of the business logic can be checked after the user creates the business logic and performs resource configuration, wherein the details of the business logic comprise SQL statements and operation parameter information.
(2) And (4) monitoring the service logic, wherein a user can check detailed information of input and output of service logic data through a dashboard, including an instantaneous value of service logic operation, an RPS with input and output, operation time and the like.
(3) And (4) executing the plan by the service logic, and knowing the operator flow direction of the service logic in operation by looking up the operation topological graph of the service logic.
(4) The service logic task list enables a user to check detailed information of each task in the service logic operation, for example, when the service logic is submitted to the formal environment cluster for operation, the operation state of the service logic can be checked in the list, if the service logic is successfully submitted, the state is changed from 'newly built' to 'submitted' to 'operated', and if the state is changed to 'submitted failed' or 'operated failed', the service logic is submitted or operated in a failed manner, and besides, the start time, the number of bytes for receiving and sending, the operation duration and the like of the task can be checked.
(5) The user can check the operation records of the business logic, such as the creation, submission, running, stopping and other operation records of the business logic, and check the fault of the business logic running abnormally by checking the running log, for example, when the business logic fails to submit or run, the abnormal fault can be eliminated according to the running log.
(6) And displaying data in a Sink (such as Oracle) stream in a list mode in real time through a page as a service logic result, wherein a user can visually check an operation result without connecting a specific Sink.
After the business logic code is generated, the embodiment also provides corresponding management operations, including receiving an editing instruction, a starting instruction, a stopping instruction and a deleting instruction of a user.
The editing instruction can edit the created business logic code, such as: modifying SQL sentences, business logic names, configuration information and the like; providing a page SQL editor aiming at the editing instruction, wherein the editor has the following auxiliary functions: the grammar checking function, the intelligent prompting function and the grammar highlighting function provide grammar highlighting functions of different colors aiming at different keywords; SQL formatting ensures that SQL is clear in structure and high in readability; starting the created service logic or the stopped service logic by the starting instruction; a stop instruction, when the user does not need to run a certain service logic, the service logic in running can be stopped; and deleting the service logic which is not needed any more when the user does not need a certain service logic any more.
The embodiment has the following advantages:
1. according to the business logic code generation method, the data source, the logic operation and the data output channel are respectively packaged into the visual data source component, the logic operation component and the data output channel component, the corresponding components are dragged into the canvas, the component parameters are set and connected, and the SQL code is generated, so that the componentization, configuration and visualization of big data development are realized, the threshold of big data development is greatly reduced, most of the stream-type business scenes can be completed in a simple dragging mode, the stream-type business scenes do not need development of professionals, the labor cost is reduced, meanwhile, the online period of demand is greatly shortened, and self-service and automation of writing business logic codes by enterprises and individuals are realized.
2. The method for generating the business logic code can directly use the template in the specific business logic by directly modifying the preset SQL template or the template parameters stored by the user in a customized way, so that the creation of the business logic is simpler and more convenient, and the time of the user is saved.
3. According to the business logic code generation method, the provided business logic operation information is displayed, the operation content can be displayed, a user can conveniently check the operation information, whether the operation state of the business logic is healthy or not is judged, whether the operation state of the business logic is expected or not is judged, faults can be eliminated according to the displayed error information, and the maintainability of the business logic is improved.
4. The business logic code generation method aims at a page SQL editor provided by an editing instruction in management operation, the editor has a syntax checking function, an intelligent prompting function, a syntax highlighting function and an SQL formatting function, and the auxiliary functions can help people with an SQL base to better compile SQL sentences, improve the working efficiency and reduce the error probability.
Example 2
This embodiment provides a service logic code generating apparatus, as shown in fig. 5, specifically including:
the packaging unit 21 is configured to package the data source, the logical operation component, and the data output channel into a visual data source component, a visual logical operation component, and a visual data output channel component, respectively, for selection by a user; the specific implementation is shown in S11 in example 1, and is not described herein again.
The acquiring unit 22 is used for acquiring a data source component, a logic operation component and a data output channel component selected by a user; the specific implementation is shown in S12 in example 1, and is not described herein again.
A receiving unit 23, configured to receive component parameters corresponding to a data source component, a logical operation component, and a data output channel component, which are set by a user; the specific implementation is shown in S13 in example 1, and is not described herein again.
A connection unit 24, configured to connect the data source component, the logical operation component, and the data output channel component according to a user operation to form a flowchart; the specific implementation is shown in S14 in example 1, and is not described herein again.
A conversion unit 25, configured to convert the flowchart into a character string corresponding to the flowchart; the specific implementation is shown in S15 in example 1, and is not described herein again.
Preferably, as shown in fig. 6, the conversion unit 25 further includes:
an obtaining subunit 251, configured to obtain component parameters of components in the flowchart, data transmission paths between the components, and a data processing manner; the specific implementation is shown in S151 in example 1, and details are not repeated here.
The assembling subunit 252 is configured to automatically assemble a regular character string according to the component parameters of the components in the flowchart, the data transmission paths between the components, and the data processing manner. The specific implementation is shown in S152 in example 1, and is not described herein again.
And the analysis unit 26 is used for analyzing the character string to generate the service logic code. The specific implementation is shown in S16 in example 1, and is not described herein again.
As shown in fig. 7, the analysis unit 26 preferably further includes:
a service logic code debugging unit 27, configured to detect correctness of generating the service logic code; the specific implementation is shown in S17 in example 1, and is not described herein again.
A service logic resource configuration unit 28, configured to set service logic operation parameters; the specific implementation is shown in S18 in example 1, and is not described herein again.
And the service logic operation information display unit 29 is used for judging whether the service logic achieves the expectation or not according to the displayed operation content. The specific implementation is shown in S19 in example 1, and is not described herein again.
The embodiment further provides a corresponding management operation receiving unit after the service logic code is generated, and the instructions received by the management operation receiving unit include an editing instruction, a starting instruction, a stopping instruction, and a deleting instruction.
The editing instruction can edit the created business logic code, such as: modifying SQL sentences, business logic names, configuration information and the like; providing a page SQL editor aiming at the editing instruction, wherein the editor has the following auxiliary functions: the grammar checking function, the intelligent prompting function and the grammar highlighting function provide grammar highlighting functions of different colors aiming at different keywords; SQL formatting ensures that SQL is clear in structure and high in readability; starting the created service logic or the stopped service logic by the starting instruction; a stop instruction, when the user does not need to run a certain service logic, the service logic in running can be stopped; and deleting the service logic which is not needed any more when the user does not need a certain service logic any more.
The embodiment has the following advantages:
1. the business logic code generation device comprises a packaging unit, an acquisition unit, a receiving unit, a conversion unit and an analysis unit, wherein the packaging unit is used for packaging each component, the acquisition unit is used for acquiring a packaging component selected by a user, the receiving unit is used for receiving a component parameter set by the user, the connecting unit is used for connecting the components to form a flow chart, the conversion unit is used for converting the flow chart into a corresponding character string, and the analysis unit is used for analyzing the character string into a. The method has the advantages that componentization, configuration and visualization of big data development are realized, the threshold of big data development is greatly reduced, most stream type business scenes can be completed in a simple dragging mode, development of professionals is not needed for the stream type business scenes, the online period of demand is greatly shortened, enterprises and individuals can realize self-help writing of business logic, combination of bottom codes is completed through a computer, and automation is realized.
2. The business logic code generating device can directly use the template in the specific business logic by directly modifying the preset SQL template or the template parameters stored by the user in a customized way, so that the creation of the business logic is simpler and more convenient, and the time of the user is saved.
3. The service logic operation information display unit provided by the service logic code generation device can display the operation content, so that a user can conveniently check the operation information, judge whether the operation state of the service logic is healthy or not and achieve the expectation or not, and can remove faults according to the displayed error information, thereby improving the maintainability of the service logic.
4. The business logic code generating device is a page SQL editor provided for editing instructions in the management operation receiving unit, the editor has a syntax checking function, an intelligent prompting function, a syntax highlighting function and an SQL formatting function, and the auxiliary functions can help people with an SQL base to better compile SQL sentences, so that the working efficiency is improved, and the error probability is reduced.
Example 3
The present embodiment provides a business logic code generating apparatus, as shown in fig. 8, including a memory 31 and a processor 32, where the processor 32 is configured to read instructions stored in the memory 31 to implement the steps of the business logic code generating method in embodiment 1 when executing a program.
Example 4
The present embodiment provides a storage medium, as shown in fig. 8, including a memory 31 and a processor 32, on which computer instructions are stored, and when the instructions are executed by the processor, the steps of the generation method of the business logic code generation method described in embodiment 1 are implemented. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard disk (Hard disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), or the like.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (11)

1. A method for generating business logic code, comprising:
the data source, the logic operation channel and the data output channel are respectively packaged into a visual data source component, a visual logic operation component and a visual data output channel component in advance for a user to select;
acquiring a data source component, a logic operation component and a data output channel component selected by a user;
receiving component parameters which are set by a user and correspond to the data source component, the logic operation component and the data output channel component;
connecting the data source component, the logic operation component and the data output channel component according to the operation of a user to form a flow chart;
converting the flow chart into a character string corresponding to the flow chart;
and analyzing the character string to generate a service logic code.
2. The business logic code generation method according to claim 1, wherein the flowchart is converted into a character string corresponding to the flowchart, and the steps include:
acquiring component parameters of components in the flow chart, data transmission paths among the components and a data processing mode;
and automatically assembling the components into a regular character string according to the component parameters of the components in the flow chart, the data transmission paths among the components and the data processing mode.
3. The business logic code generation method of claim 1, wherein the logical operation comprises: data preprocessing, data processing rules and custom functions.
4. The business logic code generation method of claim 1, wherein the component parameter is an information setting made by a user for each selected component, comprising: field, operation type.
5. The business logic code generation method of any one of claims 1 to 4, wherein the business logic code comprises SQL, and the business logic generated by the method is used for processing streaming data.
6. The method for generating business logic code according to claim 1, further comprising, after the generating of the business logic code:
debugging the service logic code, which is used for detecting the correctness of the generated service logic code;
service logic resource allocation for setting the service logic operation parameters;
and displaying the service logic operation information, and judging whether the service logic achieves the expectation or not according to the displayed operation content.
7. A business logic code generation apparatus, comprising:
the packaging unit is used for respectively packaging the data source, the logic operation channel and the data output channel into a visual data source component, a visual logic operation component and a visual data output channel component for selection by a user;
the acquisition unit is used for acquiring a data source component, a logical operation component and a data output channel component selected by a user and component parameters which correspond to the data source component, the logical operation component and the data output channel component and are set by the user;
the receiving unit is used for receiving component parameters which are set by a user and correspond to the data source component, the logic operation component and the data output channel component;
the connection unit is used for connecting the data source component, the logic operation component and the data output channel component according to the operation of a user to form a flow chart;
the conversion unit is used for converting the flow chart into a character string corresponding to the flow chart;
and the analysis unit is used for analyzing the character string to generate a service logic code.
8. The business logic code generation apparatus of claim 7, wherein the translation unit further comprises:
the acquisition subunit is used for acquiring component parameters of the components in the flow chart, data transmission paths among the components and a data processing mode;
and the assembling subunit is used for automatically assembling the regular character strings according to the component parameters of the components in the flow chart, the data transmission paths among the components and the data processing mode.
9. The apparatus of claim 7, wherein the parsing unit is followed by:
the service logic code debugging unit is used for detecting the correctness of the generated service logic code;
a service logic resource configuration unit, configured to set the service logic operation parameter;
and the service logic operation information display unit is used for judging whether the service logic achieves the expectation or not according to the displayed operation content.
10. A business logic code generating apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the business logic code generating method of any one of claims 1 to 6 when executing the program.
11. A storage medium having stored thereon computer instructions, characterized in that the instructions, when executed by a processor, implement the steps of the generation method of the business logic code generation method of any one of claims 1 to 6.
CN201910880858.4A 2019-09-18 2019-09-18 Business logic code generation method, device, equipment and storage medium Active CN110764753B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910880858.4A CN110764753B (en) 2019-09-18 2019-09-18 Business logic code generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910880858.4A CN110764753B (en) 2019-09-18 2019-09-18 Business logic code generation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110764753A true CN110764753A (en) 2020-02-07
CN110764753B CN110764753B (en) 2023-08-25

Family

ID=69330414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910880858.4A Active CN110764753B (en) 2019-09-18 2019-09-18 Business logic code generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110764753B (en)

Cited By (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352616A (en) * 2020-02-20 2020-06-30 苏宁云计算有限公司 Real-time calculation visualization development system and application method thereof
CN111459924A (en) * 2020-03-24 2020-07-28 上海携程商务有限公司 Data acquisition method, system, electronic device, and medium
CN111831718A (en) * 2020-07-16 2020-10-27 北京思特奇信息技术股份有限公司 Data extraction method, device and medium
CN111966356A (en) * 2020-08-25 2020-11-20 珠海格力电器股份有限公司 Program code generation method, program code generation device, storage medium, and electronic device
CN112000326A (en) * 2020-08-20 2020-11-27 第四范式(北京)技术有限公司 Service providing method and device, electronic equipment and storage medium
CN112181477A (en) * 2020-09-02 2021-01-05 广州市双照电子科技有限公司 Complex event processing method and device and terminal equipment
CN112328220A (en) * 2020-11-06 2021-02-05 江苏云坤信息科技有限公司 Stream data processing system based on dragging arrangement mode and processing method thereof
CN112333171A (en) * 2020-10-28 2021-02-05 腾讯科技(深圳)有限公司 Service data processing method and device and computer equipment
CN112394922A (en) * 2020-12-02 2021-02-23 成都新希望金融信息有限公司 Decision configuration method, business decision method and decision engine system
CN112506497A (en) * 2020-11-30 2021-03-16 北京九章云极科技有限公司 Data processing method and data processing system
CN112732795A (en) * 2021-01-19 2021-04-30 华东师范大学 Big data visualization method and system
CN112749194A (en) * 2020-06-03 2021-05-04 腾讯科技(深圳)有限公司 Visualized data processing method and device, electronic equipment and readable storage medium
CN113259358A (en) * 2021-05-21 2021-08-13 杭州海康威视系统技术有限公司 Data anomaly identification method and device
CN113434130A (en) * 2021-06-25 2021-09-24 平安科技(深圳)有限公司 SQL automatic generation method and device
CN113535134A (en) * 2021-08-20 2021-10-22 华润电力技术研究院有限公司 System, method and device for processing wind turbine data middling platform and storage medium
CN113590087A (en) * 2020-04-30 2021-11-02 深圳中砼物联网科技有限公司 Method for quickly developing software, computer equipment and storage medium
CN113656007A (en) * 2021-08-23 2021-11-16 斑马网络技术有限公司 Scene construction method, device, equipment and storage medium
CN113703748A (en) * 2021-09-02 2021-11-26 北京优锘科技有限公司 Method, device and equipment for visualizing running logic in configuration web application program
CN113741876A (en) * 2020-05-29 2021-12-03 奇安信科技集团股份有限公司 Project state management method and device, electronic equipment and storage medium
CN113792093A (en) * 2021-08-25 2021-12-14 通号城市轨道交通技术有限公司 Signal system interface service creating and executing method, device and electronic equipment
CN113867600A (en) * 2021-08-25 2021-12-31 上海浦东发展银行股份有限公司 Development method and device for processing streaming data and computer equipment
CN113934416A (en) * 2021-10-26 2022-01-14 山东同圆数字科技有限公司 Operation and maintenance management method and system based on graphical semantic policy programming
CN113966502A (en) * 2020-02-24 2022-01-21 深圳中砼物联网科技有限公司 Graphical code-free programming method, computer equipment and storage medium
CN114398032A (en) * 2021-12-20 2022-04-26 北京时空墨科技有限公司 Program writing method, apparatus and medium
CN114830080A (en) * 2020-11-18 2022-07-29 京东方科技集团股份有限公司 Data distribution flow configuration method and device, electronic equipment and storage medium
CN114880015A (en) * 2021-07-26 2022-08-09 深圳前海微众银行股份有限公司 Task configuration method, device, equipment and storage medium
CN116501386A (en) * 2023-03-31 2023-07-28 中国船舶集团有限公司第七一九研究所 Automatic calculation program solving method based on data pool and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761848B1 (en) * 2005-03-15 2010-07-20 Open Invention Network, Llc Code generator tool for building software applications with reusable components
CN104169871A (en) * 2011-09-23 2014-11-26 艾买提·拉扎 Method and apparatus for developing software
CN107621934A (en) * 2017-07-28 2018-01-23 中国人民解放军国防信息学院 Based on modularization, the evaluation index computational methods of graphical operator and device
CN109840083A (en) * 2018-12-27 2019-06-04 杭州亚信云信息科技有限公司 Web pages component template construction method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761848B1 (en) * 2005-03-15 2010-07-20 Open Invention Network, Llc Code generator tool for building software applications with reusable components
CN104169871A (en) * 2011-09-23 2014-11-26 艾买提·拉扎 Method and apparatus for developing software
CN107621934A (en) * 2017-07-28 2018-01-23 中国人民解放军国防信息学院 Based on modularization, the evaluation index computational methods of graphical operator and device
CN109840083A (en) * 2018-12-27 2019-06-04 杭州亚信云信息科技有限公司 Web pages component template construction method, device, computer equipment and storage medium

Cited By (34)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111352616A (en) * 2020-02-20 2020-06-30 苏宁云计算有限公司 Real-time calculation visualization development system and application method thereof
CN113966502A (en) * 2020-02-24 2022-01-21 深圳中砼物联网科技有限公司 Graphical code-free programming method, computer equipment and storage medium
CN111459924A (en) * 2020-03-24 2020-07-28 上海携程商务有限公司 Data acquisition method, system, electronic device, and medium
CN113590087A (en) * 2020-04-30 2021-11-02 深圳中砼物联网科技有限公司 Method for quickly developing software, computer equipment and storage medium
CN113741876A (en) * 2020-05-29 2021-12-03 奇安信科技集团股份有限公司 Project state management method and device, electronic equipment and storage medium
CN112749194A (en) * 2020-06-03 2021-05-04 腾讯科技(深圳)有限公司 Visualized data processing method and device, electronic equipment and readable storage medium
CN111831718A (en) * 2020-07-16 2020-10-27 北京思特奇信息技术股份有限公司 Data extraction method, device and medium
CN112000326A (en) * 2020-08-20 2020-11-27 第四范式(北京)技术有限公司 Service providing method and device, electronic equipment and storage medium
CN111966356A (en) * 2020-08-25 2020-11-20 珠海格力电器股份有限公司 Program code generation method, program code generation device, storage medium, and electronic device
CN112181477B (en) * 2020-09-02 2024-05-10 广州市双照电子科技有限公司 Complex event processing method and device and terminal equipment
CN112181477A (en) * 2020-09-02 2021-01-05 广州市双照电子科技有限公司 Complex event processing method and device and terminal equipment
CN112333171A (en) * 2020-10-28 2021-02-05 腾讯科技(深圳)有限公司 Service data processing method and device and computer equipment
CN112333171B (en) * 2020-10-28 2023-11-28 腾讯科技(深圳)有限公司 Service data processing method and device and computer equipment
CN112328220A (en) * 2020-11-06 2021-02-05 江苏云坤信息科技有限公司 Stream data processing system based on dragging arrangement mode and processing method thereof
US11868361B2 (en) 2020-11-18 2024-01-09 Beijing Zhongxiangying Technology Co., Ltd. Data distribution process configuration method and apparatus, electronic device and storage medium
CN114830080B (en) * 2020-11-18 2023-03-14 京东方科技集团股份有限公司 Data distribution flow configuration method and device, electronic equipment and storage medium
CN114830080A (en) * 2020-11-18 2022-07-29 京东方科技集团股份有限公司 Data distribution flow configuration method and device, electronic equipment and storage medium
CN112506497A (en) * 2020-11-30 2021-03-16 北京九章云极科技有限公司 Data processing method and data processing system
CN112506497B (en) * 2020-11-30 2021-08-24 北京九章云极科技有限公司 Data processing method and data processing system
CN112394922A (en) * 2020-12-02 2021-02-23 成都新希望金融信息有限公司 Decision configuration method, business decision method and decision engine system
CN112732795A (en) * 2021-01-19 2021-04-30 华东师范大学 Big data visualization method and system
CN113259358A (en) * 2021-05-21 2021-08-13 杭州海康威视系统技术有限公司 Data anomaly identification method and device
CN113434130A (en) * 2021-06-25 2021-09-24 平安科技(深圳)有限公司 SQL automatic generation method and device
CN114880015A (en) * 2021-07-26 2022-08-09 深圳前海微众银行股份有限公司 Task configuration method, device, equipment and storage medium
CN113535134A (en) * 2021-08-20 2021-10-22 华润电力技术研究院有限公司 System, method and device for processing wind turbine data middling platform and storage medium
CN113656007A (en) * 2021-08-23 2021-11-16 斑马网络技术有限公司 Scene construction method, device, equipment and storage medium
CN113867600A (en) * 2021-08-25 2021-12-31 上海浦东发展银行股份有限公司 Development method and device for processing streaming data and computer equipment
CN113792093A (en) * 2021-08-25 2021-12-14 通号城市轨道交通技术有限公司 Signal system interface service creating and executing method, device and electronic equipment
CN113703748A (en) * 2021-09-02 2021-11-26 北京优锘科技有限公司 Method, device and equipment for visualizing running logic in configuration web application program
CN113934416A (en) * 2021-10-26 2022-01-14 山东同圆数字科技有限公司 Operation and maintenance management method and system based on graphical semantic policy programming
CN114398032B (en) * 2021-12-20 2022-08-09 北京时空墨科技有限公司 Program writing method, apparatus and medium
CN114398032A (en) * 2021-12-20 2022-04-26 北京时空墨科技有限公司 Program writing method, apparatus and medium
CN116501386A (en) * 2023-03-31 2023-07-28 中国船舶集团有限公司第七一九研究所 Automatic calculation program solving method based on data pool and related device
CN116501386B (en) * 2023-03-31 2024-01-26 中国船舶集团有限公司第七一九研究所 Automatic calculation program solving method based on data pool and related device

Also Published As

Publication number Publication date
CN110764753B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
CN110764753B (en) Business logic code generation method, device, equipment and storage medium
CN103092761B (en) Method and device of recognizing and checking modifying code blocks based on difference information file
CN107844424B (en) Model-based testing system and method
US20120116561A1 (en) Program testing apparatus, method of testing a program, and program testing program
KR101637371B1 (en) System for testing an application use for a smart device and method therefor
US10789049B2 (en) Recipe program code generation method and recipe compiling cloud platform system
US11385898B2 (en) Task orchestration method for data processing, orchestrator, device and readable storage medium
CN104035873A (en) Method and device for generating testing codes
CN108459951B (en) Test method and device
CN107480036A (en) Automatic test approach, device, storage medium and the terminal of iOS Mobile solutions
CN111158656B (en) Test code generation method and device based on fruit tree method
CN110765010B (en) Method and device for online debugging visual development based on Flink
US20180004648A1 (en) Defect reporting in application testing
CN108228173A (en) A kind of visual data-interface development system and method
CN111966587A (en) Data acquisition method, device and equipment
CN108874649B (en) Method and device for generating automatic test script and computer equipment thereof
CN106933572B (en) Measurement model based on LLVM intermediate representation program slice
CN114185791A (en) Method, device and equipment for testing data mapping file and storage medium
CN104317580A (en) Integrated development environment for virtual test application (APP)
JP5294675B2 (en) Software migration system and method
CN109902013B (en) Payload testing method and system based on configuration testing sequence
CN109508204B (en) Front-end code quality detection method and device
CN116383061A (en) Method and related device for testing basic platform interface of substation control system
CN114297057A (en) Design and use method of automatic test case
CN109885483A (en) Log method for visualizing and system for operating status in Real-time Feedback game

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
GR01 Patent grant
GR01 Patent grant