CN115390807A - Code design method for domain-oriented driver design and related equipment - Google Patents

Code design method for domain-oriented driver design and related equipment Download PDF

Info

Publication number
CN115390807A
CN115390807A CN202211102171.6A CN202211102171A CN115390807A CN 115390807 A CN115390807 A CN 115390807A CN 202211102171 A CN202211102171 A CN 202211102171A CN 115390807 A CN115390807 A CN 115390807A
Authority
CN
China
Prior art keywords
code
service
design
developed
scene
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211102171.6A
Other languages
Chinese (zh)
Inventor
张鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202211102171.6A priority Critical patent/CN115390807A/en
Publication of CN115390807A publication Critical patent/CN115390807A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to the technical field of computers, and provides a code design method for domain-oriented driver design and related equipment, wherein the method comprises the following steps: acquiring service scene characteristics corresponding to a code to be developed input by a user and analyzing the service scene characteristics to obtain a service application scene corresponding to the service scene characteristics, determining a design mode corresponding to the code to be developed according to the service application scene, and then determining field-driven design architecture information of the code to be developed based on a code structure preset by the design mode; generating an asset list corresponding to the code to be developed according to the field drive design architecture information of the code to be developed; and sending the asset list corresponding to the code to be developed to the user. According to the scheme of the embodiment of the application, the specification is forced before the code is developed, the asset list is firstly produced, and the design is advanced, so that the maximum multiplexing on the code design is realized, and the multiplexing rate of the field service in the code is improved.

Description

Code design method for domain-oriented driver design and related equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a code design method and related device for domain-oriented driver design.
Background
In the design link of channel middleware, an asset list representing the code engineering structure information is an important output of the whole link. With the continual iterative update of the domain-based system, the channel middleboxes have precipitated the relevant work for automatically generating asset lists, thereby reducing the labor maintenance cost.
However, in the current tool, according to the Jar packet uploaded by the user and each layer packet name path of the input software engineering structure, an asset list is generated reversely by scanning codes, namely the asset list is generated after the codes are firstly generated.
Disclosure of Invention
The embodiments of the present application mainly aim to provide a code design method and apparatus, an electronic device, and a computer-readable storage medium for domain-oriented driver design, which can improve the reuse rate of domain services in codes.
In order to achieve the above object, a first aspect of the embodiments of the present application provides a method for designing a domain-oriented driver design code, where the method includes:
acquiring service scene characteristics corresponding to a code to be developed input by a user;
analyzing the service scene characteristics to obtain a service application scene corresponding to the service scene characteristics;
determining a design mode of the code to be developed according to the business application scene;
determining the field drive design architecture information of the code to be developed based on the code structure preset by the design mode;
generating an asset list corresponding to the code to be developed according to the field drive design architecture information;
and sending the asset list corresponding to the code to be developed to the user.
According to the code design method for the domain-oriented driver design provided by some embodiments of the present invention, before the determining the design mode of the code to be developed according to the business application scenario, the method further includes:
acquiring a corresponding relation between the design mode and the service application scene, and storing the corresponding relation into a preset database;
the determining the design mode of the code to be developed according to the service application scene comprises the following steps:
and acquiring a design mode corresponding to the service scene characteristics from the database according to the service application scene.
According to the code design method for domain-oriented driver design provided by some embodiments of the present invention, the analyzing the service scene features to obtain the service application scene corresponding to the service scene features includes:
analyzing the service scene characteristics to obtain the matching degree of the service scene characteristics corresponding to a plurality of service application scenes;
sending the N service application scenes corresponding to the service scene characteristics to the user according to the matching degree from high to low;
acquiring a target service application scene selected by the user from the N service application scenes;
the determining the design mode of the code to be developed according to the service application scene comprises the following steps:
determining a design mode corresponding to the code to be developed according to the target service application scene;
wherein N is an integer greater than 1.
According to the code design method for domain-oriented driver design provided in some embodiments of the present invention, before the analyzing the service scene features to obtain the service application scene corresponding to the service scene features, the method includes:
acquiring analysis service constructed based on a micro-service architecture;
the analyzing the service scene characteristics to obtain the service application scene corresponding to the service scene characteristics includes:
and analyzing the service scene characteristics through the analysis service to obtain a service application scene corresponding to the service scene characteristics.
According to the code design method for the domain-oriented driver design provided by some embodiments of the present invention, the determining the domain-oriented driver design architecture information of the code to be developed based on the code structure preset by the design mode includes:
generating a corresponding first pseudo code template according to a code structure preset by the design mode;
sending the first pseudo code template to the user, and acquiring a second pseudo code template modified by the user based on the first pseudo code template;
and determining the field drive design architecture information of the code to be developed according to the second pseudo code template.
According to the code design method for domain-oriented driver design provided in some embodiments of the present invention, before the analyzing the service scene features to obtain the service application scene corresponding to the service scene features, the method further includes:
acquiring a corresponding relation between the service application scene and the software architecture style, and storing the corresponding relation into a preset database;
after the analyzing processing is performed on the service scene characteristics to obtain a service application scene corresponding to the service scene characteristics, the method further includes:
acquiring a software architecture style corresponding to the code to be developed from the database according to the service application scene;
the sending the asset list corresponding to the code to be developed to the user includes:
and sending the asset list and the software architecture style corresponding to the code to be developed to the user.
According to the code design method for the domain-oriented drive design provided by some embodiments of the present invention, the asset list includes service elements, functional elements, service processes, service scenes, asset relationships, an entity list, and an entity attribute list;
the business elements correspond to code element information of an interface layer in the field-driven design, the functional elements correspond to code element information of an application layer in the field-driven design, the business process corresponds to code element information of a field layer in the field-driven design, the business scene represents a calling relationship between the interface layer and the application layer, the asset relationship represents a calling relationship between the application layer and the field layer, and the entity list and the entity attribute list are field model design element information in the field layer.
To achieve the above object, a second aspect of the embodiments of the present application provides a code design apparatus for domain-oriented driver design, the apparatus including:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring the service scene characteristics corresponding to the code to be developed input by a user;
the analysis module is used for analyzing the service scene characteristics to obtain a service application scene corresponding to the service scene characteristics;
the first processing module is used for determining a design mode of the code to be developed according to the service application scene;
the second processing module is used for determining the domain-driven design architecture information of the code to be developed based on the code structure preset by the design mode;
a third processing module, configured to generate an asset list corresponding to the code to be developed according to the field-driven design architecture information of the code to be developed
And the sending module is used for sending the asset list corresponding to the code to be developed to the user.
To achieve the above object, a third aspect of the embodiments of the present application provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when executed by the processor, the computer program implements the method of the first aspect.
To achieve the above object, a fourth aspect of the embodiments of the present application proposes a storage medium, which is a computer-readable storage medium for computer-readable storage, and stores one or more computer programs, which are executable by one or more processors to implement the method of the first aspect.
The technical scheme includes that firstly, service scene characteristics of a code to be developed input by a user are obtained, then a design mode of the code to be developed is determined according to a service application scene corresponding to the service scene characteristics, and field drive design architecture information of the code to be developed is determined based on a code structure preset by the design mode, so that an asset list corresponding to the code to be developed is generated according to the field drive design architecture information, the asset list is sent to the user, the asset list is forcibly normalized and firstly generated before code development, the design is advanced, the maximum multiplexing on code design is realized, and the multiplexing rate of field services in the code is improved.
Drawings
Fig. 1 is a schematic flowchart of a code design method for domain-oriented driver design according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a code design method for domain-oriented driver design according to an embodiment of the present application;
fig. 3 is a schematic flowchart of a code design method for domain-oriented driver design according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a hierarchical architecture of a domain-driven design according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a code design apparatus for domain-oriented driver design according to an embodiment of the present application;
fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It is to be noted that, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the application.
In the design link of channel middleware, an asset list representing the code engineering structure information is an important output of the whole link. With the continual iterative update of the domain-based system, the channel middleboxes have precipitated the relevant work for automatically generating asset lists, thereby reducing the labor maintenance cost.
However, in the current tool, according to the Jar packet uploaded by the user and each layer packet name path of the input software engineering structure, an asset list is generated reversely by scanning codes, namely the asset list is generated after the codes are firstly generated.
Based on this, the embodiment of the application provides a code design method and device, an electronic device and a computer-readable storage medium for domain-oriented driver design, which can improve the reuse rate of domain services in codes.
Specifically, the following embodiments are provided to describe a code design method, a device, an electronic device, and a computer-readable storage medium for domain-oriented driver design, and first describe the code design method for domain-oriented driver design in the embodiments of the present application.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The code design method for the domain-oriented driver design provided by the embodiment of the application can be applied to a terminal, a server side and software running in the terminal or the server side. In some embodiments, the terminal may be a smartphone, tablet, laptop, desktop computer, or the like; the server side can be configured as an independent physical server, can also be configured as a server cluster or a distributed system formed by a plurality of physical servers, and can also be configured as a cloud server for providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, CDN (content distribution network) and big data and artificial intelligence platforms; the software may be an application or the like implementing a code design method of a domain-oriented driver design, but is not limited to the above form.
The application is operational with numerous general purpose or special purpose computing system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet-type devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for designing a domain-oriented driver design code according to an embodiment of the present application. As shown in fig. 1, the method for designing a domain-oriented driver design code includes, but is not limited to, steps S110 to S160:
step S110, acquiring the service scene characteristics corresponding to the code to be developed input by the user.
It can be understood that before code development, after a designer performs requirement analysis, a service scenario characteristic corresponding to a code to be developed is determined, and exemplarily, the service scenario characteristic is an algorithm or a policy existing in a function corresponding to the code to be developed, a payment mode needing docking adaptation, and the like.
In a specific embodiment, the obtaining of the service scene characteristics corresponding to the code to be developed, which is input by the user, includes:
and acquiring the service scene characteristics corresponding to the codes to be developed, which are input by the user based on the preset characteristic template.
It should be understood that the preset feature template for describing the features of the service scene may be provided to the user in a page manner, so as to further reduce the workload of the designer and speed up the code design process.
Step S120, analyzing the service scene characteristics to obtain a service application scene corresponding to the service scene characteristics.
It should be noted that after the service scene features input by the user are obtained, the service scene features are analyzed to obtain a service application scene corresponding to the service scene features, and specifically, based on a preset rule, the preset service application scene is obtained by using keyword information matching in the service scene features.
Step S130, determining the design mode of the code to be developed according to the service application scene.
In some embodiments, before the determining the design pattern of the code to be developed according to the business application scenario, the method further comprises:
acquiring a corresponding relation between the design mode and the service application scene, and storing the corresponding relation into a preset database;
the determining the design mode of the code to be developed according to the service application scene comprises the following steps:
and acquiring a design mode corresponding to the service scene characteristics from the database according to the service application scene.
It should be understood that the design mode of the software code includes a creation mode, a structural mode, a behavior mode, and the like; wherein the creation type mode comprises modes of singleton, prototype, factory method, abstract factory and constructor, the structural mode comprises modes of agent, orchestrator, bridge, decoration, appearance, share element and combination, and the behavior type mode comprises modes of template method, strategy, command, duty chain, state, observer, mediator, iterator, visitor, memo and interpreter.
Step S140, determining the domain-driven design architecture information of the code to be developed based on the code structure preset by the design mode.
For example, in the creation mode, the encapsulation is used to enable an object to be obtained through an interface, and correspondingly, in the code structure of the creation mode, that is, the layer including the layer dedicated to the encapsulation class and the layer dedicated to the interface call, the corresponding code engineering structure information is obtained by performing sub-packaging based on the code structure.
It can be understood that the code structure of the domain-oriented drive design is preset in each design mode, and based on the design mode applicable to the code to be developed, the domain-oriented drive design architecture information of the code to be developed, that is, the code engineering structure information of the domain-oriented drive design of the code to be developed, is determined.
It should be noted that the domain-driven design architecture information of the code to be developed includes information such as a domain-driven design-oriented hierarchical architecture, code elements in each layer of architecture, and a domain model design.
Referring to fig. 4, fig. 4 is a schematic diagram of a layered structure of a domain-driven design according to an embodiment of the present application. As shown in fig. 4, the layered architecture of the domain-driven design is divided into four layers: the system comprises an interface layer, an application layer, a field layer and a base layer, wherein the interface layer is responsible for displaying information and interpreting instructions to a user; the application layer is mainly responsible for acquiring input, assembling context, checking parameters or calling the field layer to perform business processing and other works, and can bypass the field layer and directly access the base layer; the domain layer mainly encapsulates core business logic, provides business entity or business logic calculation for the application layer by a domain service or domain object method, and comprises domain mode design elements such as entities, value objects, domain services and the like; the basic layer mainly provides general technical and basic service support for an interface layer, an application layer and a field layer, such as third-party tools, drivers, message middleware, gateways, databases and the like.
And S150, generating an asset list corresponding to the code to be developed according to the field drive design architecture information.
It can be understood that according to the domain-driven design architecture information including the hierarchical architecture, the code elements in each layer of architecture and the domain model design, the asset list corresponding to the code to be developed is generated.
In some embodiments, the inventory of assets includes business elements, functional elements, business processes, business scenarios, asset relationships, an entity inventory, and an entity attribute inventory;
the business elements correspond to code element information of an interface layer in the field-driven design, the functional elements correspond to code element information of an application layer in the field-driven design, the business process corresponds to code element information of a field layer in the field-driven design, the business scene represents a calling relationship between the interface layer and the application layer, the asset relationship represents a calling relationship between the application layer and the field layer, and the entity list and the entity attribute list are field model design element information in the field layer.
And step S160, sending the asset list corresponding to the code to be developed to the user.
In a specific embodiment, an asset list is generated in the form of an Excel file, and a business element, a functional element, a business process, a business scene, an asset relationship, an entity list and an entity attribute list in the asset list respectively correspond to a Sheet table.
Referring to fig. 2, fig. 2 is a schematic flowchart of a code design method for domain-oriented driver design according to an embodiment of the present application. As shown in fig. 2, the analyzing the service scenario feature to obtain the service application scenario corresponding to the service scenario feature includes, but is not limited to, steps S210 to S230:
step S210, analyzing the service scene characteristics to obtain the matching degrees of the service scene characteristics corresponding to a plurality of service application scenes;
step S220, sending N service application scenes corresponding to the service scene characteristics to the user according to the matching degree from high to low;
step S230, acquiring a target service application scenario selected by the user from the N service application scenarios;
the determining the design mode of the code to be developed according to the service application scenario includes:
determining a design mode corresponding to the code to be developed according to the target service application scene;
wherein N is an integer greater than 1.
Illustratively, for the service scene features [ a, B, C ], the matching degrees corresponding to the service application scenes α, β, γ are respectively obtained through analysis and are 50%, 55% and 60%, and according to the matching degrees from high to low, 2 service application scenes β, γ corresponding to the service scene features [ a, B, C ] are sent to the user for the user to select. And then acquiring a target service application scene selected by the user from the 2 service application scenes, and if the target service application scene is a service application scene gamma, determining a design mode corresponding to the code to be developed according to the target service application scene gamma.
In a specific embodiment, the analyzing the service scenario feature to obtain a service application scenario corresponding to the service scenario feature includes:
analyzing the service scene characteristics to obtain the matching degree of the service scene characteristics corresponding to a plurality of service application scenes;
the determining the design mode of the code to be developed according to the service application scene comprises the following steps:
determining a plurality of design modes of the code to be developed according to a plurality of service application scenes;
according to the matching degree, the design modes corresponding to the N service application scenes corresponding to the service scene characteristics are sent to the user;
acquiring a target design mode selected by the user from the N design modes;
the determining of the domain-driven design architecture information of the code to be developed based on the code structure preset by the design mode comprises the following steps:
and determining the field drive design architecture information of the code to be developed based on the code structure preset by the target design mode.
It can be understood that, in the above embodiment, after it is determined that the service scenario features correspond to the multiple service application scenarios, the design patterns corresponding to the multiple service application scenarios are further determined, and then, based on the matching degrees corresponding to the multiple service application scenarios, the design patterns corresponding to the N service application scenarios are sent to the user, so that the user can directly select the design pattern used by the code to be developed according to the matching degrees.
In another embodiment, the business application scenario and design pattern are a many-to-many relationship.
Under the condition that the service application scene and the design mode are in a many-to-many relationship, illustratively, the service scene characteristics [ A, B and C ] are analyzed to obtain service application scenes alpha, beta and gamma corresponding to the service scene characteristics [ A, B and C ], and the matching degrees of the service application scenes alpha, beta and gamma are respectively 30%, 40% and 50%; the business application scene alpha corresponds to design patterns a1 and a2, the business application scene beta corresponds to design patterns a3 and a4, and the business application scene gamma corresponds to a related pattern a2, so that the matching degrees of the design patterns a1, a2, a3 and a4 are respectively 30%, 80%, 40% and 40%, the design patterns a1, a3 and a4 can be selected to be sent to a user according to the sequence from high to low of the matching degrees, and the user can directly select the design patterns used by codes to be developed according to the matching degrees. And then acquiring a target design mode selected by the user from the 3 design modes, and if the design mode is the design mode a1, determining the domain-driven design architecture information of the code to be developed according to the target design mode a 1.
In some embodiments, before the analyzing the service scenario feature to obtain the service application scenario corresponding to the service scenario feature, the method includes:
acquiring analysis service constructed based on a micro-service architecture;
the analyzing the service scene characteristics to obtain the service application scene corresponding to the service scene characteristics includes:
and analyzing the service scene characteristics through the analysis service to obtain a service application scene corresponding to the service scene characteristics.
It can be understood that the availability of the scheme of the embodiment of the present application can be improved by constructing the analysis service for analyzing the service scene features based on the micro service architecture.
Referring to fig. 3, fig. 3 is a flowchart illustrating a code design method for domain-oriented driver design according to an embodiment of the present application. As shown in fig. 3, the determining the domain-driven design architecture information of the code to be developed based on the code structure preset by the design mode includes, but is not limited to, step S310 to step S320:
step S310, generating a corresponding first pseudo code template according to a code structure preset by the design mode;
step S320, sending the first pseudo code template to the user, and acquiring a second pseudo code template modified by the user based on the first pseudo code template;
and step S330, determining the domain drive design architecture information of the code to be developed according to the second pseudo code template.
It can be understood that the first pseudo code template generated according to the code structure preset by the design mode is sent to the user, on one hand, the code structure preset by the design mode is sent to the user in a pseudo code form, so that the user can modify interfaces, abstract class names and the like related to pseudo codes according to business requirements, and on the basis of a second pseudo code template obtained by modifying the user based on the first pseudo code template, the domain-driven design architecture information of the code to be developed is determined. On the other hand, the code structure is displayed in a pseudo code form, so that a user, namely a development designer can more quickly review and modify the code structure, and the software design efficiency is improved.
By generating the pseudo code template corresponding to the code structure, development designers can be pulled through to carry out review and modification, the field-driven design architecture information of the code to be developed is determined according to the agreed pseudo code, and a high-quality asset list is generated.
In some embodiments, before the analyzing the service scenario feature to obtain the service application scenario corresponding to the service scenario feature, the method further includes:
acquiring a corresponding relation between the service application scene and the software architecture style, and storing the corresponding relation into a preset database;
after the analyzing processing is performed on the service scene characteristics to obtain a service application scene corresponding to the service scene characteristics, the method further includes:
acquiring a software architecture style corresponding to the code to be developed from the database according to the service application scene;
the sending the asset list corresponding to the code to be developed to the user includes:
and sending the asset list and the software architecture style corresponding to the code to be developed to the user.
It should be noted that the software architecture style mainly includes a data stream style, a call/return style, a virtual machine style, a warehouse style, and other categories, and is a common mode for describing a system organization manner in a specific application field, and the software architecture style applicable to a service application scenario is acquired from a database after the service application scenario corresponding to the service scenario feature is obtained through analysis by storing the corresponding relationship between the service application scenario and the software architecture style in a preset database, and is sent to a user together with an asset list. The method can recommend users to develop by using a proper software architecture style under different business application scenes.
The following describes, by a specific embodiment, a code design method for domain-oriented driver design, which is applied to an asset list low-code development platform.
The asset list low-code development platform is constructed based on a high-availability microservice architecture, and is initialized in advance with design modes including a creation mode, a structural mode, a behavior mode and the like, business application scenes suitable for the design modes, corresponding code structures and software architecture styles.
The method comprises the steps that after a designer analyzes requirements of a business product, business scene characteristics corresponding to codes to be developed are determined, the platform obtains the business scene characteristics corresponding to the codes to be developed, which are input by the designer as a platform user, the business scene characteristics serve as entries, the business scene characteristics are analyzed by calling an analysis service constructed based on a micro-service framework, a business application scene of an initialization design mode is matched according to entry keywords, and a design mode used by the user is recommended according to the matching degree of keyword information and the business application scene.
The asset list low-code platform can send a pseudo-code template generated according to a code structure initialized by a design mode to a user, the user modifies information such as interfaces and abstract class names related to pseudo-codes according to actual service requirements, then determines field-driven design architecture information of codes to be developed according to the modified pseudo-code template, and generates an asset list comprising service elements, functional elements, service processes, service scenes, asset relationships, an entity list and an entity attribute list.
Meanwhile, the asset list low-code platform determines the software architecture style suitable for the code to be developed according to the corresponding relation between the pre-initialized service application scene and the software architecture style. And finally, the asset list low-code platform sends the asset list and the software architecture style information to the user.
Based on the asset list low-code platform provided by the embodiment, the output of the prior asset list can be forced to be regulated in the process execution sequence, so that the design is advanced; in the formal coding stage, the pseudo code template is sent to the user, so that the user can review and modify the pseudo code, the code design is multiplexed, the flexibility and the expandability of the program are increased, the field service multiplexing rate is improved, and the method of the same field layer is multiplexed in a plurality of service scenes as far as possible. For a user, namely a designer, by using the asset list low-code platform to design software, the structured and corresponding-oriented thinking logic can be improved, the theoretical knowledge in the aspect of architecture is increased, meanwhile, developers at different post positions can be aligned with the understanding of the domain-driven design hierarchical architecture code specification, and the coding and design capability of the user can be increased.
The method comprises the steps of firstly obtaining service scene characteristics of a code to be developed input by a user, then determining a design mode of the code to be developed according to a service application scene corresponding to the service scene characteristics, determining field drive design architecture information of the code to be developed based on a code structure preset by the design mode, generating an asset list corresponding to the code to be developed according to the field drive design architecture information, sending the asset list to the user, forcibly standardizing and generating the asset list before code development, and realizing maximum multiplexing on code design by leading the design to be advanced, so that the multiplexing rate of field services in the code is improved.
Referring to fig. 5, an embodiment of the present application further provides a device 100 for designing a domain-oriented driver, where the device 100 for designing a domain-oriented driver includes:
an obtaining module 110, configured to obtain a service scene feature corresponding to a code to be developed, which is input by a user;
the analysis module 120 is configured to analyze the service scene characteristics to obtain a service application scene corresponding to the service scene characteristics;
a first processing module 130, configured to determine a design mode of the code to be developed according to the service application scenario;
a second processing module 140, configured to determine, based on a code structure preset by the design pattern, domain-driven design architecture information of the code to be developed;
a third processing module 150, configured to generate an asset list corresponding to the code to be developed according to the domain-driven design architecture information of the code to be developed;
a sending module 160, configured to send the asset list corresponding to the code to be developed to the user.
In some embodiments, the parsing module 120 further comprises:
the characteristic analysis module is used for analyzing and processing the service scene characteristics to obtain the matching degrees of the service scene characteristics corresponding to a plurality of service application scenes;
the application scene sending module is used for sending the N service application scenes corresponding to the service scene characteristics to the user from high to low according to the matching degree;
and the application scene acquisition module is used for acquiring a target service application scene selected by the user from the N service application scenes.
In some embodiments, the second processing module 140 further comprises:
the template generating sub-module is used for generating a corresponding first pseudo code template according to a code structure preset by the design mode;
the template sending and acquiring module is used for sending the first pseudo code template to the user and acquiring a second pseudo code template modified by the user based on the first pseudo code template;
and the architecture information determining module is used for determining the domain drive design architecture information of the code to be developed according to the second pseudo code template.
The device firstly obtains service scene characteristics of a code to be developed input by a user through an obtaining module, then an analyzing module analyzes the service scene characteristics to obtain a service application scene corresponding to the service scene characteristics, a design mode of the code to be developed is determined according to the service application scene corresponding to the service scene characteristics through a first processing module, and field drive design framework information of the code to be developed is determined according to a code structure preset by the design mode through a second processing module, an asset list corresponding to the code to be developed is generated according to the field drive design framework information through a third processing module, and finally the asset list is sent to the user through a sending module.
It should be noted that, for the information interaction, execution process, and other contents between the modules of the apparatus, the specific functions and technical effects of the embodiments of the method are based on the same concept, and thus reference may be made to the section of the embodiments of the method specifically, and details are not described here.
Referring to fig. 6, fig. 6 shows a hardware structure of an electronic device according to an embodiment of the present application, where the electronic device includes:
the processor 210 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute a related computer program to implement the technical solution provided in the embodiments of the present Application;
the Memory 220 may be implemented in the form of a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a Random Access Memory (RAM). The memory 220 may store an operating system and other application programs, and when the technical solution provided in the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 220, and the processor 210 calls a code design method for executing the domain-oriented driver design according to the embodiments of the present application;
an input/output interface 230 for implementing information input and output;
the communication interface 240 is configured to implement communication interaction between the device and other devices, and may implement communication in a wired manner (e.g., USB, network cable, etc.) or in a wireless manner (e.g., mobile network, WIFI, bluetooth, etc.); and a bus 250 that transfers information between each of the components of the device (e.g., the processor 210, the memory 220, the input/output interface 230, and the communication interface 240);
wherein the processor 210, the memory 220, the input/output interface 230 and the communication interface 240 are communicatively coupled to each other within the device via a bus 250.
The embodiments of the present application further provide a storage medium, which is a computer-readable storage medium for computer-readable storage, where the storage medium stores one or more computer programs, and the one or more computer programs are executable by one or more processors to implement the above method for designing a code of a domain-oriented driver design.
The memory, which is a computer-readable storage medium, may be used to store software programs as well as computer-executable programs. Further, the memory may include high speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory located remotely from the processor, and these remote memories may be connected to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute limitations on the technical solutions provided in the embodiments of the present application, and it is obvious to those skilled in the art that the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems with the evolution of technologies and the emergence of new application scenarios.
The above described embodiments of the apparatus are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, may be located in one place, or may be distributed over a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
One of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
The terms "first," "second," "third," "fourth," and the like (if any) in the description of the present application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware, and also can be implemented in the form of software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of each embodiment of the present application. And the aforementioned storage medium includes: various media capable of storing programs, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The preferred embodiments of the present application have been described above with reference to the accompanying drawings, and the scope of the claims of the embodiments of the present application is not limited thereto. Any modifications, equivalents and improvements that may occur to those skilled in the art without departing from the scope and spirit of the embodiments of the present application are intended to be within the scope of the claims of the embodiments of the present application.

Claims (10)

1. A code design method for domain-oriented driver design is characterized by comprising the following steps:
acquiring service scene characteristics corresponding to a code to be developed input by a user;
analyzing the service scene characteristics to obtain a service application scene corresponding to the service scene characteristics;
determining a design mode of the code to be developed according to the service application scene;
determining the field drive design architecture information of the code to be developed based on the code structure preset by the design mode;
generating an asset list corresponding to the code to be developed according to the field drive design architecture information;
and sending the asset list corresponding to the code to be developed to the user.
2. The method of claim 1, wherein before determining the design pattern of the code to be developed according to the business application scenario, the method further comprises:
acquiring a corresponding relation between the design mode and the service application scene, and storing the corresponding relation into a preset database;
the determining the design mode of the code to be developed according to the service application scenario includes:
and acquiring a design mode corresponding to the service scene characteristics from the database according to the service application scene.
3. The method according to claim 1, wherein the parsing the service scenario feature to obtain a service application scenario corresponding to the service scenario feature includes:
analyzing the service scene characteristics to obtain the matching degree of the service scene characteristics corresponding to a plurality of service application scenes;
sending the N service application scenes corresponding to the service scene features to the user according to the matching degree from high to low;
acquiring a target service application scene selected by the user from the N service application scenes;
the determining the design mode of the code to be developed according to the service application scene comprises the following steps:
determining a design mode corresponding to the code to be developed according to the target service application scene;
wherein N is an integer greater than 1.
4. The method for designing a code for a domain-oriented driver design according to claim 1, before the analyzing the service scenario features to obtain a service application scenario corresponding to the service scenario features, the method includes:
acquiring analysis service constructed based on a micro-service architecture;
the analyzing the service scene characteristics to obtain the service application scene corresponding to the service scene characteristics includes:
and analyzing the service scene characteristics through the analysis service to obtain a service application scene corresponding to the service scene characteristics.
5. The method for designing code facing to domain-driven design according to claim 1, wherein the determining the domain-driven design architecture information of the code to be developed based on the code structure preset by the design mode comprises:
generating a corresponding first pseudo code template according to a code structure preset by the design mode;
sending the first pseudo code template to the user, and acquiring a second pseudo code template modified by the user based on the first pseudo code template;
and determining the field drive design architecture information of the code to be developed according to the second pseudo code template.
6. The method of claim 1, wherein before the analyzing the service scenario features to obtain the service application scenario corresponding to the service scenario features, the method further comprises:
acquiring a corresponding relation between the business application scene and the software architecture style, and storing the corresponding relation into a preset database;
after the analyzing processing is performed on the service scene characteristics to obtain a service application scene corresponding to the service scene characteristics, the method further includes:
acquiring a software architecture style corresponding to the code to be developed from the database according to the service application scene;
the step of sending the asset list corresponding to the code to be developed to the user comprises the following steps:
and sending the asset list and the software architecture style corresponding to the code to be developed to the user.
7. The domain-driven design-oriented code design method according to claim 1, wherein the asset list comprises business elements, functional elements, business processes, business scenarios, asset relationships, an entity list, and an entity attribute list;
the business elements correspond to code element information of an interface layer in the field-driven design, the functional elements correspond to code element information of an application layer in the field-driven design, the business process corresponds to code element information of a field layer in the field-driven design, the business scene represents a calling relationship between the interface layer and the application layer, the asset relationship represents a calling relationship between the application layer and the field layer, and the entity list and the entity attribute list are field model design element information in the field layer.
8. A code design apparatus for domain-oriented driver design, the apparatus comprising:
the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring the service scene characteristics corresponding to the code to be developed input by a user;
the analysis module is used for analyzing the service scene characteristics to obtain a service application scene corresponding to the service scene characteristics;
the first processing module is used for determining a design mode of the code to be developed according to the business application scene;
the second processing module is used for determining the domain-driven design architecture information of the code to be developed based on the code structure preset by the design mode;
a third processing module, configured to generate an asset list corresponding to the code to be developed according to the domain-driven design architecture information of the code to be developed
And the sending module is used for sending the asset list corresponding to the code to be developed to the user.
9. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program for execution by the at least one processor to enable the at least one processor to perform the domain-oriented driver designed code design method of any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the code design method for domain-oriented driver design according to any one of claims 1 to 7.
CN202211102171.6A 2022-09-09 2022-09-09 Code design method for domain-oriented driver design and related equipment Pending CN115390807A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211102171.6A CN115390807A (en) 2022-09-09 2022-09-09 Code design method for domain-oriented driver design and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211102171.6A CN115390807A (en) 2022-09-09 2022-09-09 Code design method for domain-oriented driver design and related equipment

Publications (1)

Publication Number Publication Date
CN115390807A true CN115390807A (en) 2022-11-25

Family

ID=84127377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211102171.6A Pending CN115390807A (en) 2022-09-09 2022-09-09 Code design method for domain-oriented driver design and related equipment

Country Status (1)

Country Link
CN (1) CN115390807A (en)

Similar Documents

Publication Publication Date Title
TWI757743B (en) Mini program generation method and device
CN100444158C (en) Web page rendering mechanism using external programmatic themes
EP3931684B1 (en) Workflow engine tool
CN109086126B (en) Task scheduling processing method and device, server, client and electronic equipment
CN114020846A (en) Processing method and device capable of changing NFT (network File transfer) works
CN102999608A (en) System and method for tree table demonstration of large data
Balasubramaniam et al. Situated software: Concepts, motivation, technology, and the future
CN107146095B (en) Method and device for processing display information of mail and mail system
JP2021131846A (en) Query and response robot generating method and apparatus
CN107341027A (en) The generation method and generating means of user interface
WO2020070758A2 (en) Systems and methods for simulation of humans by human twin
CN115422334A (en) Information processing method, device, electronic equipment and storage medium
CN115081623A (en) Forgetting learning method, device, equipment and medium
CN114253798A (en) Index data acquisition method and device, electronic equipment and storage medium
CN110888672A (en) Metadata architecture-based expression engine implementation method and system
CN113703734A (en) Applet generation method and device, electronic equipment and storage medium
CN117520514A (en) Question-answering task processing method, device, equipment and readable storage medium
CN114491354A (en) Page generation method and device and computer readable storage medium
US8589475B2 (en) Modeling a cloud computing system
CN115390807A (en) Code design method for domain-oriented driver design and related equipment
CN115982452A (en) Information recommendation method and device, electronic equipment and storage medium
CN105338104A (en) Business request responding method, analysis method and analysis system
CN115034177A (en) Presentation file conversion method, device, equipment and storage medium
CN114089999A (en) Front-end page generation method and system
CN113297258A (en) Customized information pushing method and device based on target crowd data extraction

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