Business logic flow chart generation method and device, electronic equipment and storage medium
By automatically scanning and identifying code behavior types and key elements, and generating business logic flow charts, the problem of manual sorting of dependencies in the existing technology is solved, and the generation efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202510069524.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art relies heavily on manual sorting when generating business logic flow charts, resulting in low generation efficiency and low accuracy.
By automatically scanning the code content of program files, identifying code behavior types and key elements, and generating business logic flowcharts. The method includes determining a starting point when the scan reaches the start mark, ending the scan when the stop mark is encountered, and generating a flowchart based on the recorded code behavior type and key elements.
Improve the efficiency of the generation of business logic flow charts, reduce manual errors, and ensure the accuracy and completeness of the generated diagrams.
Smart Images

Figure CN119883361A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of financial technology, and in particular to a method, device, electronic device and storage medium for generating a business logic flowchart. Background Art
[0002] In the daily software development and maintenance process, when learning the source code logic of a newly handed over financial business system, especially the serial learning of different source code programs, it is usually necessary to manually read the code to comb the program logic, and then form a human-readable logic flow chart. However, this method of generating logic flow charts relies heavily on manual combing, which not only leads to low efficiency in generating logic flow charts, but also low accuracy of generated logic flow charts due to manual omissions and forgetfulness. Therefore, a new method for generating business logic flow charts is urgently needed. Summary of the invention
[0003] The present invention provides a method, device, electronic device, storage medium and computer program product for generating a business logic flow chart.
[0004] According to one aspect of the present invention, a method for generating a business logic flow chart is provided, comprising:
[0005] Scan the code content of the program file, and when a code comment including a start mark is scanned, determine the starting point of the business logic process;
[0006] When scanning the code content after the starting point, the code behavior type and the key elements corresponding to the code behavior type appearing in the code content are recorded, and the code content scanning is terminated when a code comment including a stop sign is encountered;
[0007] Generate a business logic flow chart based on the recorded code behavior types and the key elements corresponding to the code behavior types.
[0008] Optionally, a business logic flow chart is generated based on the recorded code behavior type and the key elements corresponding to the code behavior type, including:
[0009] Obtain a graph generation tool, and convert the code behavior type and key elements corresponding to the code behavior type into pseudo code adapted to the graph generation tool;
[0010] Input the pseudo code into the diagram generation tool to perform diagram generation processing to obtain the business logic flow chart.
[0011] Optionally, scan the code content of the program file, including:
[0012] In response to a code import operation triggered by a user in a visual window interface, an engineering code of a financial business system is obtained;
[0013] In response to a selection operation by a user in an engineering code directory of a financial business system, determining a program file that requires code scanning;
[0014] In response to the user completing the naming of the logic flow name and triggering the control to start generating the business logic flow chart, the code content of the program file is scanned.
[0015] Optionally, when scanning the code content after the starting point, the code behavior type and key elements corresponding to the code behavior type appearing in the code content are recorded, including:
[0016] When scanning the code content after the starting point, if a conditional judgment statement is identified, the code behavior type existing in the code content is recorded as branch logic, and the scanned branch conditions and branch processes are recorded as key elements.
[0017] Optionally, when scanning the code content after the starting point, the code behavior type and key elements corresponding to the code behavior type appearing in the code content are recorded, including:
[0018] When scanning the code content after the starting point, if a statement for operating the database is identified, the code behavior type existing in the code content is recorded as a database call;
[0019] The called database interaction interface, the method corresponding to the database interaction interface, the comments of the database interaction interface, and the comments of the method corresponding to the database interaction interface are recorded as key elements.
[0020] Optionally, when scanning the code content after the starting point, the code behavior type and key elements corresponding to the code behavior type appearing in the code content are recorded, including:
[0021] When scanning the code content after the starting point, if a call statement to an external interface is identified, the code behavior type existing in the code content is recorded as an external interface call;
[0022] The name, type, and comment information describing the external interface called are recorded as key elements.
[0023] Optionally, when scanning the code content after the starting point, the code behavior type and key elements corresponding to the code behavior type appearing in the code content are recorded, including:
[0024] When scanning the code content after the starting point, if a class method call statement is identified, the code behavior type existing in the recorded code content is a class method call;
[0025] Record the called class method name and the class method annotation information as key elements;
[0026] Jump to the target program file to which the class method belongs, continue to scan the code content, and record the code behavior type and key elements corresponding to the code behavior type appearing in the code content.
[0027] According to another aspect of the present invention, there is provided a device for generating a business logic flow chart, comprising:
[0028] A process starting point determination module is used to scan the code content of the program file and determine the starting point of the business logic process when a code comment including a start mark is scanned;
[0029] A recording module, used for recording the code behavior types and key elements corresponding to the code behavior types appearing in the code content when scanning the code content after the starting point, and ending the code content scanning when encountering a code comment including a stop mark;
[0030] The flowchart generation module is used to generate a business logic flowchart based on the recorded code behavior type and the key elements corresponding to the code behavior type.
[0031] Optionally, the flowchart generation module is specifically used for:
[0032] Obtain a graph generation tool, and convert the code behavior type and key elements corresponding to the code behavior type into pseudo code adapted to the graph generation tool;
[0033] Input the pseudo code into the diagram generation tool to perform diagram generation processing to obtain the business logic flow chart.
[0034] Optionally, the process starting point determination module is specifically used for:
[0035] In response to a code import operation triggered by a user in a visual window interface, an engineering code of a financial business system is obtained;
[0036] In response to a selection operation by a user in an engineering code directory of a financial business system, determining a program file that requires code scanning;
[0037] In response to the user completing the naming of the logic flow name and triggering the control to start generating the business logic flow chart, the code content of the program file is scanned.
[0038] Optionally, the logging module is also used to:
[0039] When scanning the code content after the starting point, if a conditional judgment statement is identified, the code behavior type existing in the code content is recorded as branch logic, and the scanned branch conditions and branch processes are recorded as key elements.
[0040] Optionally, the logging module is also used to:
[0041] When scanning the code content after the starting point, if a statement for operating the database is identified, the code behavior type existing in the code content is recorded as a database call;
[0042] The called database interaction interface, the method corresponding to the database interaction interface, the comments of the database interaction interface, and the comments of the method corresponding to the database interaction interface are recorded as key elements.
[0043] Optionally, the logging module is also used to:
[0044] When scanning the code content after the starting point, if a call statement to an external interface is identified, the code behavior type existing in the code content is recorded as an external interface call;
[0045] The name, type, and comment information describing the external interface called are recorded as key elements.
[0046] Optionally, the logging module is also used to:
[0047] When scanning the code content after the starting point, if a class method call statement is identified, the code behavior type existing in the recorded code content is a class method call;
[0048] Record the called class method name and the class method annotation information as key elements;
[0049] Jump to the target program file to which the class method belongs, continue to scan the code content, and record the code behavior type and key elements corresponding to the code behavior type appearing in the code content.
[0050] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0051] at least one processor; and
[0052] a memory communicatively connected to at least one processor; wherein,
[0053] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the business logic flow chart generation method of the embodiment of the present invention.
[0054] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the business logic flow chart generation method of an embodiment of the present invention when executed.
[0055] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, and when the computer program is executed by a processor, the steps in the above method are implemented.
[0056] The technical solution of the embodiment of the present invention automatically scans the code content in the program file, and records the code behavior types and key elements corresponding to the code behavior types in the code content, and then automatically generates a business logic flow chart based on the recorded code behavior types and key elements corresponding to the code behavior types. Compared with the method of manually combing the code program and drawing the business logic flow chart, the generation efficiency of the business logic flow chart can be effectively improved.
[0057] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0059] Figure 1 It is a flow chart of a method for generating a business logic flow chart provided by an embodiment of the present invention;
[0060] Figure 2 It is a flowchart of another method for generating a business logic flowchart provided by an embodiment of the present invention;
[0061] Figure 3 It is a structural schematic diagram of a business logic flow chart generating device provided by an embodiment of the present invention;
[0062] Figure 4 It is a structural schematic diagram of an electronic device for implementing the business logic flow chart generation method of an embodiment of the present invention. DETAILED DESCRIPTION
[0063] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0064] Embodiment 1
[0065] Figure 1 A flowchart of a business logic flowchart generation method provided in an embodiment of the present invention. This embodiment can be applied to a scenario in which a corresponding business logic flowchart is automatically generated according to the code content of a financial business system. The method can be executed by a business logic flowchart generation device. The business logic flowchart generation device can be implemented in the form of hardware and / or software. The business logic flowchart generation device can be configured in an electronic device.
[0066] like Figure 1 As shown, the business logic flow chart generation method includes:
[0067] S101. Scan the code content of the program file, and when a code comment including a start mark is scanned, determine the starting point of the business logic flow.
[0068] In this embodiment, the program file may be a component of the engineering code of the newly handed over financial business system; wherein the engineering code is the code part that constitutes the main function of the financial business system, which is responsible for implementing the various business logics of the software, such as the code for user registration and login, order processing and other functions. That is, the program file is the carrier of the specific function implementation in the engineering code. Each program file may contain one or more functions, classes or methods, which work together to complete a specific task. For the program file, the code content of the program file may be scanned line by line, and each time a line of code is read, the code comment containing the start identifier may be searched by string matching. Among them, the start identifier may be the character "begin", and the code comment including the start identifier is exemplarily: " / / XXXX begin XXXX". It should be noted that since the program file may be implemented based on different programming languages, the method for finding the start identifier may be adjusted according to the characteristics of its comment syntax. For example, judgment logic for comment syntax of different languages may be added to realize a general scanning function.
[0069] In the embodiment of the present invention, when a code comment containing a start mark is scanned, the line number of the line can be recorded as the starting point of the business logic flow. After determining the starting point, code scanning can be performed according to step S102.
[0070] S102: When scanning the code content after the starting point, the code behavior types and key elements corresponding to the code behavior types appearing in the code content are recorded, and the code content scanning is terminated when a code comment including a stop mark is encountered.
[0071] In the embodiment of the present invention, the code behavior type is a classification of different functions or operations exhibited by the program code during execution. By identifying and recording the code behavior type, it is helpful to understand the business logic and operation mechanism of the program. Different code behavior types correspond to their own unique key elements, which help to fully understand and record the specific operations and functions of the code during execution.
[0072] In an embodiment of the present invention, the code behavior type includes at least one of the following: branch logic, database call, external interface call, project class method call, and project custom node. The key elements of the logic branch may include branch conditions and branch processes; the key elements of the database call may include the database interaction interface, the method corresponding to the database interaction interface, etc.; the key elements corresponding to the external interface call may include the name and type of the external interface, etc.; the key elements corresponding to the project class method call may include the name of the called class method, the annotation information of the class method, the method input / output parameters, whether there is a sub-process, etc.; the project custom node is a supplement to a certain key logic, and the annotation of the node can be used as a key element.
[0073] In an embodiment of the present invention, when scanning the code content after the starting point line by line, the code behavior type and the key elements corresponding to the code behavior type appearing in the code content are recorded; during the scanning process, if a code comment including a stop sign is encountered, the code content scanning is terminated. The stop sign is exemplarily a string "end". Subsequently, a business logic flow chart can be generated based on the code behavior types and the key elements corresponding to the code behavior types appearing in the program file that are recorded in sequence.
[0074] S103: Generate a business logic flow chart according to the recorded code behavior types and key elements corresponding to the code behavior types.
[0075] In an optional implementation, a diagram generation tool is obtained, and the code behavior type and the key elements corresponding to the code behavior type are converted into pseudocode that is adapted to the diagram generation tool; wherein the diagram generation tool can be any tool that can generate a logical flow chart, and is not specifically limited here; and then the pseudocode is input into the diagram generation tool for diagram generation processing to obtain a business logic flow chart.
[0076] In another optional implementation, a business logic flowchart can be generated through a multimodal large language model according to the recorded code behavior types and the key elements corresponding to the code behavior types. For example, the constructed business logic flowchart generation instructions, the recorded code behavior types and the key elements corresponding to the code behavior types are input into the multimodal large language model together, and then the business logic flowchart is obtained according to the output of the multimodal large language model; wherein the business logic flowchart generation instructions are exemplified as: "The following data is the code behavior types and the key elements corresponding to the code behavior types that appear in sequence in the program file. Your task is to generate a business logic flowchart based on this data". By generating a business logic flowchart, developers who are not familiar with the program can quickly understand the key logic.
[0077] The technical solution of the embodiment of the present invention automatically scans the code content in the program file, and records the code behavior types and key elements corresponding to the code behavior types in the code content, and then automatically generates a business logic flow chart based on the recorded code behavior types and key elements corresponding to the code behavior types. Compared with the method of manually combing the code program and drawing the business logic flow chart, the generation efficiency of the business logic flow chart can be effectively improved. Moreover, by scanning and recording the code behavior types and key elements corresponding to the code behavior types that appear in the code content, compared with manual combing, there will be no omissions or forgetfulness, and the accuracy of the business logic flow chart finally generated can be guaranteed. In addition, the solution of the present invention can autonomously mark the code starting point and end point of a certain logic segment, and the intermediate logic is automatically generated, which is convenient for logic classification and segmented disassembly management.
[0078] Embodiment 2
[0079] Figure 2 A flowchart of a method for generating a business logic flowchart is provided for an embodiment of the present invention. Figure 2 , the method comprises the following steps:
[0080] S201. In response to a code import operation triggered by a user in a visual window interface, an engineering code of a financial business system is obtained.
[0081] S202: In response to a selection operation by a user in an engineering code directory of a financial business system, a program file requiring code scanning is determined.
[0082] S203, in response to the user completing the naming of the logic flow and triggering the control to start generating the business logic flow chart, the code content of the program file is scanned, and when the code comment including the start identifier is scanned, the starting point of the business logic flow is determined.
[0083] The program for implementing the business logic flowchart generation method of the present invention is a visual window interface operation program. The user can import the engineering code of the financial business system by triggering the file import function in the visual window interface provided by the program, which is the basis for implementing the business logic flowchart generation method of the present invention. In the visual window interface, the user can select the program file that needs to be scanned in the engineering code directory of the financial business system, and can also name the business logic flowchart to be generated, and then trigger the control to start generating the business logic flowchart, and then scan the code content of the program file selected by the user, and when the code comment including the start identifier is scanned, the starting point of the business logic process is determined. It can be understood that in the business logic flowchart generation method involved in the present invention, the user only needs to import the engineering code and select the program file to be scanned, and the user does not need to personally sort out the code content in the program file.
[0084] S204: When scanning the code content after the starting point, the code behavior types and key elements corresponding to the code behavior types appearing in the code content are recorded, and the code content scanning is terminated when a code comment including a stop mark is encountered.
[0085] In an embodiment of the present invention, when scanning the code content after the starting point, the code content can be parsed grammatically. If a conditional judgment statement (such as an if-else statement or a switch statement) is identified, the code behavior type existing in the code content is recorded as branch logic, and the scanned branch conditions and branch processes are recorded as key elements. Among them, the branch process can be the process included in the code block that is specifically executed under different branch conditions. When traversing the code blocks under the branch process, if the branch process contains other code behavior types such as database calls and method calls, the code behavior types and key elements involved in the recorded branch process are recorded to fully present the business logic trends under different conditions.
[0086] In an embodiment of the present invention, when scanning the code content after the starting point, the database class call code statement can be identified based on the specific syntax of the database operation and the library function calling method in the code. If the statement for operating the database is identified, the code behavior type existing in the code content is recorded as a database call; the called database interaction interface (the interface defines how to interact with the database), the method corresponding to the database interaction interface, the comments of the database interaction interface, and the comments of the method corresponding to the database interaction interface are recorded as key elements.
[0087] In an embodiment of the present invention, when scanning the code content after the starting point, the external interface call statement can be identified based on the specific library function, protocol-related syntax, etc. of the external interface call in the code content; if the call statement to the external interface is identified, the code behavior type existing in the code content is recorded as an external interface call; wherein the type of the external interface includes a hypertext transfer protocol interface, a remote procedure call interface, etc.; the name, type, and annotation information describing the external interface of the called external interface are recorded as key elements. In addition, the interface input / output parameters can be recorded by analyzing the parameter passing at the interface call in the code, and the interface input / output parameters can be recorded as key elements.
[0088] In an embodiment of the present invention, when scanning the code content after the starting point, the method call syntax in the code can be parsed to identify the class method call statement in the code content; if the class method call statement is identified, the code behavior type existing in the code content is recorded as a class method call; the name of the called class method and the annotation information of the class method are recorded as key elements; in addition, the parameter passing situation can be analyzed to take the method input / output parameters as key elements, and whether there is a sub-process as a key element. In the case of a class method call, it is also possible to jump to the target program file to which the class method belongs, continue scanning the code content, and record the code behavior type appearing in the code content and the key elements corresponding to the code behavior type.
[0089] In this hair style embodiment, when scanning the code content after the starting point, if a code comment including a custom node identifier is encountered, the code behavior type is recorded as a custom node, and the comment content of the custom node is recorded as key information.
[0090] It can be understood that, through the above process, the code behavior types and key elements corresponding to the code behavior types appearing in the code content are recorded sequentially, and the code content scanning is terminated when a code comment including a stop sign is encountered; wherein, scanning a code comment including a stop sign means the end of the business logic, and the business logic process needs to be generated.
[0091] S205: Generate a business logic flow chart according to the recorded code behavior types and key elements corresponding to the code behavior types.
[0092] Optionally, obtain a diagram generation tool, and convert the code behavior type and the key elements corresponding to the code behavior type into pseudocode that is suitable for the diagram generation tool; then input the pseudocode into the diagram generation tool for diagram generation processing to obtain a business logic flow chart.
[0093] The embodiment of the present invention automatically identifies and records the code behavior types and key elements corresponding to the code behavior types that appear in sequence in the code during the code scanning process, which improves efficiency compared to manually combing code files and provides a basis for the subsequent rapid and accurate generation of business logic flow charts. In addition, the solution of the present invention can autonomously mark the code starting point and end point of a certain logic segment, and automatically generate intermediate logic, which is convenient for logic classification and segmented disassembly management.
[0094] Embodiment 3
[0095] Figure 3 The present invention provides a schematic diagram of the structure of a business logic flow chart generation device. This embodiment can be applied to the scenario of automatically generating a corresponding business logic flow chart according to the code content of the financial business system. The device can execute any business logic flow chart generation method of the present invention. Figure 3 As shown, the business logic flow chart generating device includes:
[0096] The process starting point determination module 301 is used to scan the code content of the program file and determine the starting point of the business logic process when a code comment including a start mark is scanned;
[0097] The recording module 302 is used to record the code behavior types and key elements corresponding to the code behavior types appearing in the code content when scanning the code content after the starting point, and terminate the code content scanning when encountering a code comment including a stop mark;
[0098] The flowchart generation module 303 is used to generate a business logic flowchart according to the recorded code behavior types and key elements corresponding to the code behavior types.
[0099] Optionally, the flowchart generating module 303 is specifically used for:
[0100] Obtain a graph generation tool, and convert the code behavior type and key elements corresponding to the code behavior type into pseudo code adapted to the graph generation tool;
[0101] Input the pseudo code into the diagram generation tool to perform diagram generation processing to obtain the business logic flow chart.
[0102] Optionally, the process starting point determination module 301 is specifically used for:
[0103] In response to a code import operation triggered by a user in a visual window interface, an engineering code of a financial business system is obtained;
[0104] In response to a selection operation by a user in an engineering code directory of a financial business system, determining a program file that requires code scanning;
[0105] In response to the user completing the naming of the logic flow name and triggering the control to start generating the business logic flow chart, the code content of the program file is scanned.
[0106] Optionally, the recording module 302 is further used for:
[0107] When scanning the code content after the starting point, if a conditional judgment statement is identified, the code behavior type existing in the code content is recorded as branch logic, and the scanned branch conditions and branch processes are recorded as key elements.
[0108] Optionally, the recording module 302 is further used for:
[0109] When scanning the code content after the starting point, if a statement for operating the database is identified, the code behavior type existing in the code content is recorded as a database call;
[0110] The called database interaction interface, the method corresponding to the database interaction interface, the comments of the database interaction interface, and the comments of the method corresponding to the database interaction interface are recorded as key elements.
[0111] Optionally, the recording module 302 is further used for:
[0112] When scanning the code content after the starting point, if a call statement to an external interface is identified, the code behavior type existing in the code content is recorded as an external interface call;
[0113] The name, type, and comment information describing the external interface called are recorded as key elements.
[0114] Optionally, the recording module 302 is further used for:
[0115] When scanning the code content after the starting point, if a class method call statement is identified, the code behavior type existing in the recorded code content is a class method call;
[0116] Record the called class method name and the class method annotation information as key elements;
[0117] Jump to the target program file to which the class method belongs, continue to scan the code content, and record the code behavior type and key elements corresponding to the code behavior type appearing in the code content.
[0118] The business logic flowchart generation device provided in the embodiment of the present invention can execute the business logic flowchart generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0119] According to an embodiment of the present invention, the present invention also provides an electronic device, a readable storage medium and a computer program product.
[0120] Embodiment 4
[0121] Figure 4 The components, their connections and relationships, and their functions shown herein are merely examples and are not intended to limit implementation of the invention described and / or claimed herein.
[0122] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0123] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0124] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as executing a business logic flowchart generation method.
[0125] In some embodiments, the business logic flowchart generation method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the business logic flowchart generation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the business logic flowchart generation method in any other appropriate manner (e.g., by means of firmware).
[0126] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0127] The computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable business logic flow chart generating device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0128] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0129] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0130] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0131] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0132] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0133] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for generating a business logic flow chart, characterized in that: include: Scan the code content of the program file, and when a code comment including a start mark is scanned, determine the starting point of the business logic process; When scanning the code content after the starting point, the code behavior type and the key elements corresponding to the code behavior type appearing in the code content are recorded, and the code content scanning is terminated when a code comment including a stop mark is encountered; A business logic flow chart is generated according to the recorded code behavior type and the key elements corresponding to the code behavior type.
2. The method according to claim 1, characterized in that The generating a business logic flow chart according to the recorded code behavior type and the key elements corresponding to the code behavior type includes: Obtain a graph generation tool, and convert the code behavior type and the key elements corresponding to the code behavior type into pseudo code adapted to the graph generation tool; The pseudo code is input into the graph generation tool to perform graph generation processing to obtain a business logic flow chart.
3. The method according to claim 1, characterized in that The scanning of the code content of the program file includes: In response to a code import operation triggered by a user in a visual window interface, an engineering code of a financial business system is obtained; In response to a selection operation by a user in an engineering code directory of the financial business system, determining a program file requiring code scanning; In response to the user completing the naming of the logic flow name and triggering the control to start generating the business logic flow chart, the code content of the program file is scanned.
4. The method according to claim 1, characterized in that: When scanning the code content after the starting point, recording the code behavior type appearing in the code content and the key elements corresponding to the code behavior type, including: When scanning the code content after the starting point, if a conditional judgment statement is identified, it is recorded that the code behavior type existing in the code content is branch logic, and the scanned branch conditions and branch processes are recorded as key elements.
5. The method according to claim 1, characterized in that: When scanning the code content after the starting point, recording the code behavior type appearing in the code content and the key elements corresponding to the code behavior type, including: When scanning the code content after the starting point, if a statement for operating the database is identified, it is recorded that the code behavior type present in the code content is a database call; The called database interaction interface, the method corresponding to the database interaction interface, the comments of the database interaction interface, and the comments of the method corresponding to the database interaction interface are recorded as key elements.
6. The method according to claim 1, characterized in that When scanning the code content after the starting point, recording the code behavior type appearing in the code content and the key elements corresponding to the code behavior type, including: When scanning the code content after the starting point, if a call statement to an external interface is identified, then recording that the code behavior type present in the code content is an external interface call; The name, type, and comment information describing the external interface called are recorded as key elements.
7. The method according to claim 1, characterized in that When scanning the code content after the starting point, recording the code behavior type appearing in the code content and the key elements corresponding to the code behavior type, including: When scanning the code content after the starting point, if a class method call statement is identified, it is recorded that the code behavior type present in the code content is a class method call; Record the called class method name and the class method annotation information as key elements; Jump to the target program file to which the class method belongs, continue to scan the code content, and record the code behavior type appearing in the code content and the key elements corresponding to the code behavior type.
8. A business logic flow chart generating device, characterized in that: include: A process starting point determination module is used to scan the code content of the program file and determine the starting point of the business logic process when a code comment including a start mark is scanned; A recording module, used for recording the code behavior types and key elements corresponding to the code behavior types appearing in the code content when scanning the code content after the starting point, and ending the code content scanning when encountering a code comment including a stop mark; The flowchart generation module is used to generate a business logic flowchart according to the recorded code behavior type and the key elements corresponding to the code behavior type.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method according to any one of claims 1 to 7 when executed.
11. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 7.