CN115408009A - Code file generation method, device, equipment and storage medium - Google Patents

Code file generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN115408009A
CN115408009A CN202211203474.7A CN202211203474A CN115408009A CN 115408009 A CN115408009 A CN 115408009A CN 202211203474 A CN202211203474 A CN 202211203474A CN 115408009 A CN115408009 A CN 115408009A
Authority
CN
China
Prior art keywords
fields
resource
management system
field
mode
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
CN202211203474.7A
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202211203474.7A priority Critical patent/CN115408009A/en
Publication of CN115408009A publication Critical patent/CN115408009A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • 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/23Updating
    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • 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
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Abstract

The present disclosure provides a code file generation method, apparatus, device, storage medium, and program product, which can be applied to the field of computer technology. The generated code file is used for constructing a management system. The method comprises the following steps: acquiring a definition file for constructing a management system, wherein the definition file comprises M resource fields, M is more than or equal to 1, the resource fields correspond to resources to be managed in the management system, and the resources to be managed comprise business transaction information; generating N front-end modes and N back-end modes according to the M resource fields and the function information of the management system, wherein N is more than or equal to M, the front-end modes and the resource fields have unique mapping relations, and the back-end modes and the resource fields have unique mapping relations; and generating an object code file for constructing the management system by adding the N front-end modes and the N back-end modes to a front-end framework and a back-end framework of the management system respectively.

Description

Code file generation method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a code file generation method, apparatus, device, storage medium, and program product.
Background
The management system is used for performing processing operations such as adding, deleting, modifying and inquiring on the resource data and then dropping the processed resource data into the database. The management system may include a front-end management page and a back-end server, and the conventional development method is to combine operation codes written by front-end developers and back-end developers, respectively, to form the management system.
However, the code writing capabilities of different developers are different, and the operation codes have various compiling bugs or performance loss, so that a lot of time is consumed for checking the compiling bugs. In addition, the compiling process of the operation codes takes a lot of time, resulting in inefficient development of the management system.
Disclosure of Invention
In view of the above, the present disclosure provides a code file generation method, apparatus, device, storage medium, and program product.
According to a first aspect of the present disclosure, there is provided a code file generation method, a code file being used to construct a management system; the method comprises the following steps:
acquiring a definition file for constructing a management system, wherein the definition file comprises M resource fields, M is more than or equal to 1, the resource fields correspond to resources to be managed in the management system, and the resources to be managed comprise business transaction information;
generating N front-end modes and N back-end modes according to the M resource fields and the function information of the management system, wherein N is more than or equal to M, the front-end modes and the resource fields have unique mapping relations, and the back-end modes and the resource fields have unique mapping relations; and
generating an object code file for constructing the management system by adding the N front-end modes and the N back-end modes to a front-end framework and a back-end framework of the management system respectively.
According to the embodiment of the disclosure, the management functions of the management system include adding, deleting, modifying and inquiring, and the function information includes function execution rules; generating N front-end modes and N back-end modes according to the M resource fields and the function information of the management system, wherein the generation comprises the following steps:
traversing the M resource fields according to the field names of the M resource fields; and
and generating a front-end mode and a back-end mode corresponding to each resource field according to the function execution rule of the management system and the M resource fields to obtain N front-end modes and N back-end modes, wherein the front-end modes comprise a first new adding mode, a first deleting mode, a first modifying mode and a first inquiring mode, the back-end modes comprise a second new adding mode, a second deleting mode, a second modifying mode and a second inquiring mode, and N is less than or equal to 4M.
According to an embodiment of the present disclosure, the resource field includes a plurality of first fields for describing attributes of the resource field and a second field for defining the first field.
According to an embodiment of the present disclosure, the second field includes a newly added flag field and a value range field;
generating a front-end mode and a back-end mode corresponding to each resource field according to a function execution rule of a management system and M resource fields to obtain N front-end modes and N back-end modes, wherein the method comprises the following steps:
determining mth key name according to newly added mark field 1 K first fields including a newly added tag field in each resource field, K being greater than or equal to 1,m 1 Greater than or equal to 1 and less than or equal to M;
determining that key values of newly added mark fields are P non-empty first fields from the K first fields, wherein P is more than or equal to 1, and P is less than or equal to K;
according to the value range fields in the P first fields, parameters corresponding to the P first fields are verified to obtain a test result; and
generating and m-th in case of determining that the verification result is passed 1 A first new mode and a second new mode corresponding to each resource field.
According to an embodiment of the present disclosure, the second field includes a query tag field; generating a front-end mode and a back-end mode corresponding to each resource field according to a function execution rule of a management system and M resource fields to obtain N front-end modes and N back-end modes, wherein the method comprises the following steps:
determining mth key name according to the query mark field 2 Q first fields including a query mark field in the resource fields, wherein Q is more than or equal to 1; and
generating a query token field with a m-th key value 2 A first query pattern and a second query pattern corresponding to each resource field.
According to an embodiment of the present disclosure, the second query mode is used to create a database query statement from the query tag field and store the returned data to the cache database after the database query is completed.
According to an embodiment of the present disclosure, generating an object code file for constructing a management system by adding N front-end patterns and N back-end patterns to a front-end framework and a back-end framework of the management system, respectively, includes:
generating M services corresponding to the M resource fields according to the front-end framework and the rear-end framework;
creating N functional interfaces corresponding to the M services; and
and establishing calling relations between the N front-end modes and the N functional interfaces and between the N rear-end modes and the N functional interfaces to obtain the target code file.
A second aspect of the present disclosure provides a method for constructing a management system, including: and calling the target code file to generate a target management system, wherein the target management system is used for managing business transaction information, the business transaction information comprises account information and/or login information, and the target code file is determined according to the code file generation method.
A third aspect of the present disclosure provides a code file generation apparatus, the code file being used to construct a management system; the device comprises:
the acquisition module is used for acquiring a definition file for constructing a management system, wherein the definition file comprises M resource fields, M is more than or equal to 1, the resource fields correspond to resources to be managed in the management system, and the resources to be managed comprise service transaction information;
the first generation module is used for generating N front-end modes and N rear-end modes according to the M resource fields and the function information of the management system, wherein N is larger than or equal to M, the front-end modes and the resource fields have unique mapping relations, and the rear-end modes and the resource fields have unique mapping relations;
and the second generation module is used for generating an object code file for constructing the management system by respectively adding the N front-end modes and the N rear-end modes to a front-end framework and a rear-end framework of the management system.
A fourth aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the code file generation method described above.
The fifth aspect of the present disclosure also provides a computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the code file generation method described above.
A sixth aspect of the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the code file generation method described above.
According to the technical scheme, the resource fields in the definition file and the function information of the management system to be constructed are combined together based on the definition file, the front-end mode and the rear-end mode matched with the functions of the management system are generated together, and the automatic generation of the function codes of the management system is realized. After generating N front-end patterns and N back-end patterns corresponding to the M resource fields, an object code file including the entire set of management system is generated by adding the generated N front-end patterns and N back-end patterns to the front-end framework and the back-end framework. Because the definition file acquired by the method is predetermined according to the resource to be managed, the configuration information does not need to be determined through the interactive operation of developers. In addition, in the process of generating the front-end mode and the back-end mode according to the resource fields in the definition file and the function information of the management system, code editing operation and page element dragging operation of a code developer do not exist. Therefore, the method provided by the disclosure can reduce the participation of developers in the process of constructing the management system, is beneficial to avoiding compiling bugs and performance loss caused by the code writing of the developers, and improves the safety of the management system. In addition, because the whole target code file is generated without manual coding, the development time for constructing the management system can be reduced, and the development efficiency can be improved.
Drawings
The foregoing and other objects, features and advantages of the disclosure will be apparent from the following description of embodiments of the disclosure, which proceeds with reference to the accompanying drawings, in which:
fig. 1 schematically illustrates an application scenario of a code file generation method according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a code file generation method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a front-end mode and back-end mode generation method according to an embodiment of the disclosure;
FIG. 4 schematically shows a flow chart of a first and second incremental pattern generation method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a code file generation flow diagram according to an embodiment of the present disclosure;
FIG. 6 schematically shows a block diagram of a code file generation apparatus according to an embodiment of the present disclosure; and
fig. 7 schematically shows a block diagram of an electronic device adapted for a code file generation determination method according to an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is illustrative only and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. Moreover, in the following description, descriptions of well-known structures and techniques are omitted so as to not unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It is noted that the terms used herein should be interpreted as having a meaning that is consistent with the context of this specification and should not be interpreted in an idealized or overly formal sense.
Where a convention analogous to "at least one of A, B, and C, etc." is used, in general such a construction is intended in the sense one having skill in the art would understand the convention (e.g., "a system having at least one of A, B, and C" would include but not be limited to systems that have A alone, B alone, C alone, A and B together, A and C together, B and C together, and/or A, B, and C together, etc.).
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure, application and other processing of the related data (such as including but not limited to the personal information of the user) are all in accordance with the regulations of related laws and regulations, and necessary security measures are taken without violating the customs of the public order.
In the related art, generally, a front-end developer and a back-end developer independently write an operation code of a management system, and the written front-end operation code and the written back-end operation code are combined to construct the management system. Because the writing work of the codes is finished by a plurality of developers, and the code writing habits and writing abilities of different developers are different, the difficulty of combining the front-end operation codes and the back-end operation codes is increased. In addition, it takes time to check the correctness of a plurality of operation codes. The above operations all cause problems of long development time, low development efficiency, high human participation and the like.
In addition, in the related art, writing and generation of the front-end operation codes and the back-end operation codes depend on a plurality of development tools and interactive operations such as editing and dragging of developers. The final code merge may rely on new merge tools, resulting in complex writing and merging operations of the entire code. Due to the fact that the variety of the adopted development tools is wide, the development efficiency of the management system is affected.
The embodiment of the disclosure provides a code file generation method, wherein a code file is used for constructing a management system; the method comprises the following steps: acquiring a definition file for constructing a management system, wherein the definition file comprises M resource fields, M is more than or equal to 1, the resource fields correspond to resources to be managed in the management system, and the resources to be managed comprise business transaction information; generating N front-end modes and N back-end modes according to the M resource fields and the function information of the management system, wherein N is more than or equal to M, the front-end modes and the resource fields have unique mapping relations, and the back-end modes and the resource fields have unique mapping relations; and generating an object code file for constructing the management system by adding the N front-end modes and the N back-end modes to a front-end frame and a back-end frame of the management system, respectively.
Fig. 1 schematically illustrates an application scenario of a code file generation method according to an embodiment of the present disclosure.
As shown in fig. 1, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using at least one of the first terminal device 101, the second terminal device 102, the third terminal device 103, to receive or send messages or the like. Various code compilation tools and the like (by way of example only) may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103.
The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and the like.
The server 105 may be a server providing various services, such as a background management server (for example only) providing support for websites browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and otherwise process data such as the received code call request, and feed back a processing result (e.g., a code text obtained or generated according to a user request) to the terminal device.
It should be noted that the code file generation method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the code file generation apparatus provided by the embodiments of the present disclosure may be generally disposed in the server 105. The code file generation method provided by the embodiment of the present disclosure may also be executed by a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103 and/or the server 105. Correspondingly, the code file generating apparatus provided in the embodiment of the present disclosure may also be disposed in a server or a server cluster that is different from the server 105 and is capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and/or the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The code file generation method of the disclosed embodiment will be described in detail below with fig. 2 to 5 based on the scenario described in fig. 1.
FIG. 2 schematically shows a flow chart of a code file generation method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S210 to S250.
In operation S210, a definition file for constructing the management system is acquired, the definition file including M resource fields.
According to an embodiment of the present disclosure, a management system to be built may be used to manage a variety of resources. The resource to be managed comprises business transaction information, such as transaction amount, transaction time and the like. Basic information, such as account basic information, balance information, account name, etc., may also be included.
According to an embodiment of the present disclosure, a definition file is used to describe resources to be managed of a management system to be built. Specifically, the definition file includes M resource fields, the resource fields correspond to resources to be managed in the management system, and M is greater than or equal to 1. For example, the "user" resource field corresponds to an account name resource.
According to the embodiment of the disclosure, the definition file may be generated by analyzing the data table of the resource to be managed, or may be pre-filled by a developer according to the resource to be managed. The format of the resource field in the definition file corresponds to the resource to be managed and accords with the definition standard of the resource to be managed.
According to an embodiment of the present disclosure, the definition file includes a proto file, and the method of acquiring the definition file includes: and calling the proto file under the preset address into the code file generation tool through a plug-in calling command of the open source protoc. The code file generation tool can analyze the acquired definition file to obtain M resource fields. The code file generation tool may be a protoc-based plug-in tool.
In operation S220, N front-end modes and N back-end modes are generated according to the M resource fields and the function information of the management system, where N is greater than or equal to M.
According to the embodiment of the disclosure, the management system can perform data operation on the resource to be managed. Specifically, the function information of the management system includes a management function and a function execution rule corresponding to the management function. Specifically, the management functions of the management system include operations of adding, modifying, deleting, querying, and the like.
According to an embodiment of the present disclosure, for each resource field, there are N front-end modes and N back-end modes that uniquely correspond to functions of the management system. For example, for a management system including four operations of adding, modifying, deleting and querying, N front-end modes and N back-end modes corresponding to M resource fields are generated accordingly, where N is equal to or less than 4M.
According to an embodiment of the present disclosure, the front-end mode refers to a code method for implementing a certain management function of the resource field at the front end. Front-end modes include, but are not limited to: the element distribution logic of the front-end page and the interaction logic of the front-end page and the back-end code.
The back-end mode refers to a code method for implementing a certain management function of the resource field at the back end. Wherein, the backend mode includes but is not limited to: interactive logic of front-end request and back-end call, calling logic of back-end call and database, calling logic of back-end and cache database, etc.
The front-end mode and the resource field have a unique mapping relation, and the back-end mode and the resource field have a unique mapping relation. And, for the same management function of the same resource field, the front-end mode and the back-end mode are matched.
According to an embodiment of the present disclosure, the front-end mode and the back-end mode are code statements automatically generated according to the M resource fields and the function information of the management system. For example, for an SQL database, the front-end schema and the back-end schema are SQL statements, and can embody the implementation logic of the resource field.
In operation S230, an object code file for constructing the management system is generated by adding the N front-end patterns and the N back-end patterns to the front-end framework and the back-end framework of the management system, respectively.
According to the embodiment of the disclosure, after the N front-end modes and the N back-end modes are generated, the N front-end modes are added to the front-end frame of the management system, and the N back-end modes are added to the back-end frame of the management system, so that a whole set of object code file fusing the front-end modes and the back-end modes and the frame is obtained. The target code file can be stored as a finished functional plug-in at a preset address. Under the condition that the management system to be constructed needs to be applied, the construction of the management system can be directly realized by calling the target code file without writing the realization code by using other code writing tools.
According to embodiments of the present disclosure, the backend frame includes, but is not limited to: GRPC services based on Remote Procedure Calls (RPCs). Front-end frameworks include, but are not limited to, the Ant Design framework.
According to an embodiment of the present disclosure, a method of adding front and back modes to front and back end frames includes: and acquiring a front-end base code and a rear-end base code on the front-end frame and the rear-end frame, and then respectively associating the generated front-end mode and the generated rear-end mode with the front-end base code and the rear-end base code to generate an object code file comprising the construction method of the whole management system.
The method and the device are based on the definition file, combine the resource field in the definition file with the function information of the management system to be constructed, and jointly generate the front-end mode and the rear-end mode which are matched with the functions of the management system, so that the automatic generation of the function codes of the management system is realized. After generating N front-end patterns and N back-end patterns corresponding to the M resource fields, an object code file including the entire set of management system is generated by adding the generated N front-end patterns and N back-end patterns to the front-end framework and the back-end framework. Because the definition file acquired by the method is predetermined according to the resource to be managed, the configuration information does not need to be determined through the interactive operation of developers. In addition, in the process of generating the front-end mode and the back-end mode according to the resource fields in the definition file and the function information of the management system, code editing operation and page element dragging operation of a code developer do not exist. Therefore, the method provided by the disclosure can reduce the participation of developers in the process of constructing the management system, is beneficial to avoiding compiling bugs and performance loss caused by the fact that the developers write codes, and improves the safety of the management system. In addition, because the whole target code file is generated without manual coding, the development time for constructing the management system can be reduced, and the development efficiency can be improved.
In addition, as the generated object code file is the building code comprising the whole management system, when the management system is applied, the non-deployment can be completed only by calling the object code file, and the deployment code does not need to be rewritten. Therefore, the method provided by the disclosure also helps to simplify the subsequent management system deployment process and improve the efficiency from development to deployment.
Fig. 3 schematically shows a flow chart of a front-end mode and back-end mode generation method according to an embodiment of the present disclosure.
As shown in fig. 3, the generation method of this embodiment includes operations S321 to S322, which may be a specific embodiment of operation S220.
In operation S321, the M resource fields are traversed according to their field names.
According to an embodiment of the present disclosure, there is one front-end mode and one back-end mode for each management function within each resource field. Correspondingly, under each resource field, there will be one front-end mode and one back-end mode corresponding to at least one management function, thereby obtaining N front-end modes and N back-end modes corresponding to M resource fields.
The resource fields are distinguished by field names. And traversing the M resource fields according to the field names of the resource fields, and then processing each resource field. Specifically, the processing for each resource field includes generating a plurality of front-end modes and back-end modes corresponding to the management functions of the management system according to the constraint condition for the resource field.
In operation S322, according to the function execution rule of the management system and the M resource fields, a front-end mode and a back-end mode corresponding to each resource field are generated to obtain N front-end modes and N back-end modes, where the front-end mode includes a first adding mode, a first deleting mode, a first modifying mode and a first querying mode, and the back-end mode includes a second adding mode, a second deleting mode, a second modifying mode and a second querying mode, where N is not greater than 4 × M.
According to an embodiment of the present disclosure, the function information of the management system includes a management function and a function execution rule. Wherein, the management functions comprise adding, deleting, modifying and inquiring. The function execution rules correspond to the management functions one to one.
For each of the M resource fields, a new execution logic corresponding to the new function exists, for example, new data is checked. And the newly added execution logic comprises front end execution logic and back end execution logic which are matched with each other so as to generate a corresponding newly added front end mode and a newly added back end mode.
According to the embodiment of the present disclosure, since the resource to be managed corresponding to the resource field is different, there may be a difference in the management function corresponding to the resource field accordingly. For example, for two resource fields of an account name and an account balance, the management functions corresponding to the account name include adding, modifying, deleting and querying; management functions corresponding to account balances include add, delete, and query. Correspondingly, the first modification mode and the second modification mode corresponding to the account name accord with the modification function execution rule; the first modification mode and the second modification mode corresponding to the account balance are null, or the account balance does not have the first modification mode and the second modification mode.
According to an embodiment of the present disclosure, the management function corresponding to each resource field includes at least one of: addition, modification, deletion and query. Thus, the N front-end patterns and N back-end patterns generated correspond to M resource fields, N ≦ 4 × M.
According to an embodiment of the present disclosure, the resource field includes a plurality of first fields for describing attributes of the resource field and a second field for defining the first field.
According to the embodiment of the disclosure, each resource field corresponds to one functional module in the management system to be built. And each functional module comprises a limiting condition and an implementation mode for the resource field, for example, a first field corresponds to the implementation mode, and a second field corresponds to the limiting condition.
Specifically, the first field may be multiple types of information of the resource field, such as name, remark, creation time, and the like. The second field is a limited field of the first field, for example, in the case that the first field is a name, the second field may be a field type of a string and a field value range.
For example, for the "user" resource field, the first field includes user _ id, username, password, sex, create _ time, and update _ time, and the second field includes desc, search, show, name, min, max, modify, create, cache. The desc can be displayed at the front end of the constructed management system and is used for describing database fields; the search may be a field used by the management system to perform the query function; show represents whether the management system needs to be exposed; name represents the name of the database field and the name of the biographical reference of the front end and the back end; min and max represent the sum value range of the first field, the integer type represents the value range of the value, and the character string type represents the field length range; modify indicates whether the first field can be modified; create represents the field of the required band for the management system to create a single instance; cache represents the primary key of the Cache index. Wherein, the key value 0 represents no, and 1 represents yes.
For example, user _ id: desc = "user id", search =1, show =1, name = "uid", min =0, max =100000000, modify =0, create =0, cache =0;
the username: desc = "user name", search =1, show =1, name = "username", min =0, max =200, modify =1, create =1, cache =1;
and (2) sex: desc = "sex", show =1, name = "sex", min =0, max =1, modify =1, create =1, cache =0, and the like.
According to the embodiment of the present disclosure, the first field and the second resource may further include an extended supplemental field, so that the definition file is updated according to the resource to be managed, and data of the first field and the second field may be fixed or determined by the field to be managed.
Fig. 4 schematically shows a flow chart of a first and a second incremental pattern generation method according to an embodiment of the present disclosure.
As shown in fig. 4, the method of this embodiment includes operations S4221 to S4224, which may be a specific embodiment of operation S322.
In operation S4221, the mth key is determined according to the primary key name of the newly added tag field 1 The K first fields of the newly added tag field are included in the resource fields.
According to an embodiment of the present disclosure, the second field includes a newly added flag field and a value range field. The add flag field may indicate whether the first field requires an add-on. The field name of the newly added mark field is 'create', and the value range field comprises 'min' and 'max'.
According to the embodiment of the disclosure, in the case that the management function is newly added, the M-th resource field in the M resource fields is added 1 The resource fields are analyzed. Specifically, according to the name of the primary key of the newly added mark field, the m-th key is marked 1 Screening all first fields in the resource fields, and determining K first fields including newly added mark fields, wherein K is greater than or equal to 1,m 1 1 or more and M or less.
In operation S4222, it is determined from the K first fields that the key value of the newly added flag field is non-null P first fields.
According to the embodiment of the disclosure, after K first fields including newly-added mark fields are screened out from all the first fields, key values of the K first fields are obtained, the key values of the K first fields are judged, P first fields with non-empty key values are determined, P is larger than or equal to 1, and P is smaller than or equal to K.
For example, for the first fields user _ id and sex, the key values of the newly added flag field create are 0 and 1, respectively, which indicate that the user id cannot include the newly added parameter, and the user gender may include the newly added parameter.
In operation S4223, parameters corresponding to the P first fields are checked according to the value range fields in the P first fields, so as to obtain a check result.
According to the embodiment of the disclosure, after P first fields with non-empty key values of the newly added mark field are obtained, parameters corresponding to the P first fields are checked according to the key values of the value range field, and a check result is obtained.
For example, the parameters corresponding to the P first fields may be an additional user table generated from 12 months 1 to 12 months 7 days, and the additional user table includes user ids of a plurality of additional users. The verification of the new user table includes verifying whether the field type is correct, whether the field length conforms to the range and the like.
In operation S4224, in case that it is determined that the verification result is pass, generating a parity m 1 A first new mode and a second new mode corresponding to each resource field.
According to the embodiment of the disclosure, the verification result is that the parameter corresponding to the first field meets the data requirement through representation. Generating and m-th in case of determining that the verification result is passed 1 A first new mode and a second new mode corresponding to each resource field.
The generated first new adding mode comprises a front-end execution code and front-end page elements which correspond to the new adding execution logic, and the page elements comprise new adding buttons, so that the web end can realize a new adding function by clicking the new adding buttons; the second add-on mode includes generating a back-end execution code, such as a created sql statement, corresponding to the add-on execution logic and writing the back-end execution code to the database.
According to an embodiment of the present disclosure, the second adding mode further includes regenerating an sql statement that writes the added data to a cache database after the backend execution code is written to the database, and the cache database may be a redis cluster.
According to the method, after the plurality of first fields are determined through the names of the main keys of the newly added mark fields, the newly added method is generated after data verification, automatic generation of the newly added method is achieved, and development efficiency is improved.
According to an embodiment of the present disclosure, the second field includes a query tag field. Generating a front-end mode and a back-end mode corresponding to each resource field according to a function execution rule and M resource fields of a management system to obtain N front-end modes and N back-end modes, wherein the method comprises the following steps:
determining mth key name according to the main key name of the query mark field 2 Q first fields of the query mark field are included in the resource fields, and Q is greater than or equal to 1; and
generating a query token field with a m-th key value in the case that the key value of the query token field is determined to be non-null 2 A first query pattern and a second query pattern corresponding to each resource field.
According to an embodiment of the present disclosure, the primary key name of the query tag field may be "search". In the case that the management function is inquiry, the m-th management function is selected 2 And screening all the first fields under the resource fields to obtain Q first fields comprising the query mark fields. Then, the first fields with the key values of the query mark fields in the Q first fields being non-null are screened out, and the query function is realized according to the first fields with the query mark fields being non-null.
The code of the first query mode corresponding to the execution logic further comprises a first field returning the query mark field as non-empty to the back end after the execution logic.
According to an embodiment of the present disclosure, the second query mode is used to create a database query statement from the query token field and store the returned data to the cache database after the database query is completed. Specifically, the second query mode includes a code corresponding to the execution logic, and after the execution logic, an sql statement is created according to the first field, where the search field is not empty, the database query function is completed, and the returned data is created as a new redis cache.
According to the second query method, a call relation chain between the database and the code and a call relation between the cache database and the data query method are established, query logic is achieved, and meanwhile the cache database is beneficial to improving the query efficiency of the management system.
According to an embodiment of the present disclosure, the second field includes a deletion marker field. In the case where the management function is delete, from the m-th key name, according to the delete flag field 3 Screening a plurality of first fields including a deletion mark field from the resource fields, and then determining that the key value of the deletion mark field is non-emptyUnder the condition of generating the m-th 3 A first deletion mode and a second deletion mode corresponding to each resource field.
The delete mark field comprises the cache and other mark fields. Specifically, the cache represents an index field, and when deleting operation is performed, the currently deleted field can be determined according to the cache, and the index is completed according to the cache, so that a deleting function is realized. It should be noted that the cache is used as an index field, and is only used as a deletion marker field in a deletion scene, and is used for indexing a field to be deleted.
In particular, the first deletion mode includes transmitting a deletion field to the backend in response to a deletion request. And the second deletion mode comprises the steps of creating a deleted sql statement according to a deletion field provided by the front end so as to delete the deletion field from the database, and organizing a redis command according to the cache field to delete data from the cache after the deletion is successful.
According to an embodiment of the present disclosure, the second field includes a modification flag field. In the case where the management function is modification, according to the primary key name of the modification flag field, from m 4 Screening a plurality of first fields including a modification mark field from the resource fields, checking whether a key value of the modification mark field is non-null, and generating an m < th > field in the case of non-null 4 A first modification mode and a second modification mode corresponding to each resource field.
The first modification mode comprises codes corresponding to the execution logic and page elements of a modification button, and after modification is completed, data is requested to the back end through the modification interface. The second modification mode comprises the steps of creating an update statement of sql according to the modification field, and realizing the modification of the database; and after the database is successfully modified, indexing the modified field from the redis cache according to the cache field, and deleting the modified field from the redis cache.
According to an embodiment of the present disclosure, generating an object code file for constructing a management system by adding N front-end patterns and N back-end patterns to a front-end framework and a back-end framework of the management system, respectively, includes:
generating M services corresponding to the M resource fields according to the front-end framework and the rear-end framework;
creating N functional interfaces corresponding to the M services; and
and establishing calling relations between the N front-end modes and the N functional interfaces and between the N rear-end modes and the N functional interfaces to obtain the target code file.
For example, the front frame is an anti frame, and the rear frame is a grpc frame. And calling the corresponding code template according to the overall architecture of the anti frame and the grpc frame to generate M services corresponding to the M resource fields. Then, according to the front end framework and the back end framework, N functional interfaces corresponding to the M services are created. There are multiple functional interfaces corresponding to management functions under each service. The functional interface may be created by calling the base code of the front-end framework and the back-end framework. And finally, after the interfaces and the services are created, establishing calling relations between the N front-end modes and the N functional interfaces and between the N back-end modes and the N functional interfaces to obtain the target code file.
For example, if the resource field is "message", the created Service name is "message" Service ", and the created function interfaces include a new interface" Create "message", a Delete interface "Delete" message ", a Modify interface" Modify "message", and a Query interface "Query" message ". The front end creates corresponding operations such as page element generation operation and front end page execution logic according to the message name, and the creating method comprises calling a preset code template. The operation created by the front end is associated with the operation created by the back end through the functional interface of the back end.
The method and the system generate corresponding services through the front-end framework and the back-end framework, and realize the combination of the method and the framework through the interface so as to generate the target code file to be applied of the whole set of management system, and subsequently, a calling code program does not need to be compiled, so that the complete management system can be directly constructed, the manual participation is reduced, and the development efficiency is improved.
FIG. 5 schematically shows a code file generation flow diagram according to an embodiment of the disclosure.
As shown in fig. 5, the generation flow 500 includes 501 to 506.
According to an embodiment of the present disclosure, the definition file 501 may be obtained from a management repository. The definition file 501 is then parsed to obtain M resource fields within the definition file 501. According to a plurality of first fields in the M resource fields and second fields limiting the first fields, a front-end mode and a back-end mode corresponding to the purchased resource fields are generated, and finally a front-end mode 502 and a back-end mode 503 corresponding to the M resource fields are obtained.
After the front-end schema 502 and the back-end schema 503 corresponding to the M resource fields are generated, a front-end service 504 and a back-end service 505 corresponding to the M resource fields are respectively created according to the characteristics of the front-end framework and the back-end framework. Then, a plurality of functional interfaces corresponding to the management functions are created under the front-end service 504 and the back-end service 505, the front-end mode, the back-end mode and the functional interfaces are connected to form a complete calling chain, and finally, an object code file 506 including the whole set of management system is generated.
The present disclosure also provides a method for constructing a management system, including:
and calling the object code file to generate an object management system, wherein the object management system is used for managing business transaction information, the business transaction information comprises account information and/or login information, and the object code file is determined according to the code file generation method. The object code file may be a Proto file. The Proto file can also be used as an interface document stream to be transferred to a service system.
Specifically, after an object code file for constructing account information and/or login information is generated, the object code file is called from a preset address, so that an object management system can be directly generated on the terminal device, and developers do not need to implement deployment of the management system through other interactive operations such as editing, dragging and the like. Therefore, the method provided by the disclosure can reduce the participation of developers in the process of constructing the management system, is beneficial to avoiding compiling bugs and performance loss caused by the fact that the developers write codes, and improves the safety of the management system.
Fig. 6 schematically shows a block diagram of a code file generation apparatus according to an embodiment of the present disclosure.
As shown in fig. 6, the code file generating apparatus 600 of this embodiment includes an obtaining module 610, a first generating module 620, and a second generating module 630.
An obtaining module 610, configured to obtain a definition file for constructing a management system, where the definition file includes M resource fields, M is greater than or equal to 1, the resource fields correspond to resources to be managed in the management system, and the resources to be managed include service transaction information. In an embodiment, the obtaining module 610 may be configured to perform the operation S210 described above, which is not described herein again.
The first generating module 620 is configured to generate N front-end modes and N back-end modes according to the M resource fields and the function information of the management system, where N is greater than or equal to M, the front-end mode has a unique mapping relationship with the resource fields, and the back-end mode has a unique mapping relationship with the resource fields. In an embodiment, the first generating module 620 may be configured to perform the operation S220 described above, which is not described herein again.
A second generating module 630, configured to generate an object code file for constructing the management system by adding the N front-end patterns and the N back-end patterns to the front-end framework and the back-end framework of the management system, respectively. In an embodiment, the second generating module 630 may be configured to perform the operation S230 described above, which is not described herein again.
According to an embodiment of the present disclosure, the first generation module 620 includes a first determination unit and a second determination unit.
The first determining unit is used for traversing the M resource fields according to the field names of the M resource fields. In an embodiment, the first determining unit may be configured to perform the operation S321 described above, which is not described herein again.
The second determining unit is used for generating a front-end mode and a back-end mode corresponding to each resource field according to the function execution rule of the management system and the M resource fields to obtain N front-end modes and N back-end modes, wherein the front-end modes comprise a first new adding mode, a first deleting mode, a first modifying mode and a first inquiring mode, the back-end modes comprise a second new adding mode, a second deleting mode, a second modifying mode and a second inquiring mode, and N is less than or equal to 4M. In an embodiment, the second determining unit may be configured to perform the operation S322 described above, which is not described herein again.
According to an embodiment of the present disclosure, the second determination unit includes a first determination subunit, a second determination subunit, a third determination subunit, and a fourth determination subunit.
The first determining subunit is used for determining the mth key name according to the primary key name of the newly added mark field 1 K first fields including a newly added tag field in each resource field, K being greater than or equal to 1,m 1 1 or more and M or less. In an embodiment, the first determining subunit may be configured to perform operation S4221 described above, and details are not repeated herein.
The second determining subunit is configured to determine, from the K first fields, that the key values of the newly added mark field are P non-empty first fields, where P is greater than or equal to 1, and P is less than or equal to K. In an embodiment, the second determining subunit may be configured to perform operation S4222 described above, and details are not repeated herein.
And the third determining subunit is used for verifying the parameters corresponding to the P first fields according to the value range fields in the P first fields to obtain a detection result. In an embodiment, the third determining subunit may be configured to perform operation S4223 described above, which is not described herein again.
The fourth determining subunit is used for generating the m-th check result when the verification result is determined to be passed 1 A first new mode and a second new mode corresponding to each resource field. In an embodiment, the third determining subunit may be configured to perform operation S4224 described above, and details are not repeated here.
According to an embodiment of the present disclosure, the second determination unit further includes a fifth determination subunit and a sixth determination subunit.
A fifth determining subunit for determining the mth key name according to the primary key name of the query tag field 2 Q first fields of the query mark field are included in the resource fields, and Q is greater than or equal to 1.
The sixth determining subunit is used for generating a query token field according to the current status information of the query token field, and generating a query token field according to the current status information of the query token field and the current status information of the query token field 2 A first query pattern and a second query pattern corresponding to each resource field.
According to an embodiment of the present disclosure, the second generation module 630 includes a first generation unit, a second generation unit, and a third generation unit.
The first generating unit is used for generating M services corresponding to the M resource fields according to the front-end framework and the back-end framework.
The second generating unit is used for creating N functional interfaces corresponding to the M services.
The third generating unit is used for creating calling relations between the N front-end modes and the N functional interfaces and between the N rear-end modes and the N functional interfaces to obtain the target code file.
According to the embodiment of the present disclosure, the present disclosure further includes a constructing device, configured to invoke an object code file, to generate an object management system, where the object management system is configured to manage business transaction information, and the business transaction information includes account information and/or login information, where the object code file is determined according to the code file generating method.
According to an embodiment of the present disclosure, any plurality of the obtaining module 610, the first generating module 620, and the second generating module 630 may be combined into one module to be implemented, or any one of the modules may be split into a plurality of modules. Alternatively, at least part of the functionality of one or more of these modules may be combined with at least part of the functionality of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the obtaining module 610, the first generating module 620, and the second generating module 630 may be implemented at least partially as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented by hardware or firmware in any other reasonable manner of integrating or packaging a circuit, or implemented by any one of three implementations of software, hardware, and firmware, or any suitable combination of any of the three. Alternatively, at least one of the obtaining module 610, the first generating module 620 and the second generating module 630 may be implemented at least in part as a computer program module, which when executed, may perform a corresponding function.
Fig. 7 schematically shows a block diagram of an electronic device adapted to a code file generation determination method according to an embodiment of the present disclosure.
As shown in fig. 7, an electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 702 or a program loaded from a storage section 708 into a Random Access Memory (RAM) 703. The processor 701 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or associated chipset, and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), among others. The processor 701 may also include on-board memory for caching purposes. The processor 701 may comprise a single processing unit or a plurality of processing units for performing the different actions of the method flows according to embodiments of the present disclosure.
In the RAM 703, various programs and data necessary for the operation of the electronic apparatus 700 are stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. The processor 701 performs various operations of the method flows according to the embodiments of the present disclosure by executing programs in the ROM 702 and/or the RAM 703. It is noted that the programs may also be stored in one or more memories other than the ROM 702 and RAM 703. The processor 701 may also perform various operations of method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
Electronic device 700 may also include input/output (I/O) interface 705, which input/output (I/O) interface 705 also connects to bus 704, according to an embodiment of the present disclosure. The electronic device 700 may also include one or more of the following components connected to the I/O interface 705: an input portion 706 including a keyboard, a mouse, and the like; an output section 707 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 708 including a hard disk and the like; and a communication section 709 including a network interface card such as a LAN card, a modem, or the like. The communication section 709 performs communication processing via a network such as the internet. A drive 710 is also connected to the I/O interface 705 as needed. A removable medium 711 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 710 as necessary, so that the computer program read out therefrom is mounted in the storage section 708 as necessary.
The present disclosure also provides a computer-readable storage medium, which may be embodied in the device/apparatus/system described in the above embodiments; or may exist alone without being assembled into the device/apparatus/system. The computer-readable storage medium carries one or more programs which, when executed, implement the method according to an embodiment of the disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the above-described ROM 702 and/or RAM 703 and/or one or more memories other than the ROM 702 and RAM 703.
Embodiments of the present disclosure also include a computer program product comprising a computer program containing program code for performing the method illustrated in the flow chart. When the computer program product runs in a computer system, the program code is used for causing the computer system to realize the code file generation method provided by the embodiment of the disclosure.
The computer program performs the above-described functions defined in the system/apparatus of the embodiments of the present disclosure when executed by the processor 701. The above described systems, devices, modules, units, etc. may be implemented by computer program modules according to embodiments of the present disclosure.
In one embodiment, the computer program may be hosted on a tangible storage medium such as an optical storage device, a magnetic storage device, and the like. In another embodiment, the computer program may also be transmitted in the form of a signal on a network medium, distributed, downloaded and installed via the communication section 709, and/or installed from the removable medium 711. The computer program containing program code may be transmitted using any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 709, and/or installed from the removable medium 711. The computer program, when executed by the processor 701, performs the above-described functions defined in the system of the embodiment of the present disclosure. The systems, devices, apparatuses, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the present disclosure.
In accordance with embodiments of the present disclosure, program code for executing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, these computer programs may be implemented using high level procedural and/or object oriented programming languages, and/or assembly/machine languages. The programming language includes, but is not limited to, programming languages such as Java, C + +, python, the "C" language, or the like. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that various combinations and/or combinations of features recited in the various embodiments and/or claims of the present disclosure can be made, even if such combinations or combinations are not expressly recited in the present disclosure. In particular, various combinations and/or combinations of the features recited in the various embodiments and/or claims of the present disclosure may be made without departing from the spirit or teaching of the present disclosure. All such combinations and/or associations are within the scope of the present disclosure.
The above-described embodiments, objects, technical solutions and advantages of the present disclosure are further described in detail, it should be understood that the above-described embodiments are only examples of the present disclosure, and should not be construed as limiting the present disclosure, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.

Claims (12)

1. A code file generation method, the said code file is used for building the administrative system; the method comprises the following steps:
acquiring a definition file for constructing a management system, wherein the definition file comprises M resource fields, M is more than or equal to 1, the resource fields correspond to resources to be managed in the management system, and the resources to be managed comprise service transaction information;
generating N front-end modes and N back-end modes according to the M resource fields and the function information of the management system, wherein N is more than or equal to M, the front-end modes and the resource fields have unique mapping relations, and the back-end modes and the resource fields have unique mapping relations; and
and generating an object code file for constructing the management system by respectively adding the N front-end modes and the N back-end modes to a front-end framework and a back-end framework of the management system.
2. The method of claim 1, wherein the management functions of the management system include addition, deletion, modification, and inquiry, and the function information includes function execution rules; generating N front-end modes and N back-end modes according to the M resource fields and the function information of the management system, wherein the generating comprises the following steps:
traversing the M resource fields according to the field names of the M resource fields; and
and generating a front-end mode and a back-end mode corresponding to each resource field according to the function execution rule of the management system and the M resource fields to obtain N front-end modes and N back-end modes, wherein the front-end modes comprise a first new adding mode, a first deleting mode, a first modifying mode and a first inquiring mode, the back-end modes comprise a second new adding mode, a second deleting mode, a second modifying mode and a second inquiring mode, and N is less than or equal to 4M.
3. The method of claim 2, wherein the resource field comprises a plurality of first fields for describing attributes of the resource field and a second field for describing the first fields for defining the first fields.
4. The method of claim 3, wherein the second field comprises a newly added flag field and a value range field;
generating a front-end mode and a back-end mode corresponding to each resource field according to the function execution rule of the management system and the M resource fields to obtain N front-end modes and N back-end modes, including:
determining the mth key name according to the newly added mark field 1 K first fields including the newly added tag field in one resource field, K being greater than or equal to 1,m 1 Greater than or equal to 1 and less than or equal to M;
determining that key values of the newly added mark fields are P non-empty first fields from the K first fields, wherein P is greater than or equal to 1, and P is less than or equal to K;
checking parameters corresponding to the P first fields according to the value range fields in the P first fields to obtain a checking result; and
generating an m-th checksum in case that the verification result is determined to be passed 1 A first new mode and a second new mode corresponding to each resource field.
5. The method of claim 3, wherein the second field comprises a query tag field; generating a front-end mode and a back-end mode corresponding to each resource field according to the function execution rule of the management system and the M resource fields to obtain N front-end modes and N back-end modes, including:
determining the mth key name according to the main key name of the query mark field 2 Q first fields of the query mark field are included in the resource fields, and Q is greater than or equal to 1; and
generating a query token field with a m-th key value if the query token field is determined to be non-null 2 A first query mode and a second query mode corresponding to each resource fieldFormula (II) is shown.
6. The method of claim 5, wherein the second query pattern is used to create a database query statement from the query token field and to store the returned data to a cache database after completion of a database query.
7. The method of claim 1, wherein the generating an object code file for building the management system by adding N of the front-end patterns and N of the back-end patterns to a front-end framework and a back-end framework of the management system, respectively, comprises:
generating M services corresponding to the M resource fields according to the front-end framework and the back-end framework;
creating N functional interfaces corresponding to the M services; and
and establishing calling relations between the N front-end modes and the N functional interfaces and between the N back-end modes and the N functional interfaces to obtain a target code file.
8. A method of construction of a management system comprising:
calling the object code file to generate an object management system, wherein the object management system is used for managing business transaction information, the business transaction information comprises account information and/or login information,
wherein the object code file is determined according to any one of the methods of claims 1 to 7.
9. A code file generation apparatus, the said code file is used for building the administrative system; the device comprises:
the system comprises an acquisition module, a management module and a management module, wherein the acquisition module is used for acquiring a definition file for constructing a management system, the definition file comprises M resource fields, M is greater than or equal to 1, the resource fields correspond to resources to be managed in the management system, and the resources to be managed comprise business transaction information;
the first generation module is used for generating N front-end modes and N back-end modes according to the M resource fields and the function information of the management system, wherein N is larger than or equal to M, the front-end modes and the resource fields have unique mapping relations, and the back-end modes and the resource fields have unique mapping relations;
and the second generation module is used for generating an object code file for constructing the management system by respectively adding the N front-end modes and the N rear-end modes to a front-end framework and a rear-end framework of the management system.
10. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-8.
11. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 8.
12. 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 8.
CN202211203474.7A 2022-09-29 2022-09-29 Code file generation method, device, equipment and storage medium Pending CN115408009A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211203474.7A CN115408009A (en) 2022-09-29 2022-09-29 Code file generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211203474.7A CN115408009A (en) 2022-09-29 2022-09-29 Code file generation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115408009A true CN115408009A (en) 2022-11-29

Family

ID=84168643

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211203474.7A Pending CN115408009A (en) 2022-09-29 2022-09-29 Code file generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115408009A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116382703A (en) * 2023-06-07 2023-07-04 建信金融科技有限责任公司 Software package generation method, code development method and device, electronic equipment and medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116382703A (en) * 2023-06-07 2023-07-04 建信金融科技有限责任公司 Software package generation method, code development method and device, electronic equipment and medium
CN116382703B (en) * 2023-06-07 2023-08-22 建信金融科技有限责任公司 Software package generation method, code development method and device, electronic equipment and medium

Similar Documents

Publication Publication Date Title
US11100154B2 (en) Data integration tool
US7441188B1 (en) Web construction framework presentation tier
US20090254881A1 (en) Code generation techniques for administrative tasks
US10970052B2 (en) System and method for enhancing component based development models with auto-wiring
US20050268280A1 (en) Encapsulating changes to a software application
CN114036425A (en) Page access method, client, server and system
CN115016978A (en) Data verification method and device, computer storage medium and electronic equipment
CN115599386A (en) Code generation method, device, equipment and storage medium
CN109992496A (en) A kind of data processing method and device for automatic test
CN115408009A (en) Code file generation method, device, equipment and storage medium
CN113238739A (en) Plug-in development and data acquisition method, device, electronic equipment and medium
CN111061522B (en) Method, device, equipment and storage medium for generating front-end card assembly based on back end
CN113094776A (en) Method and system for constructing visual component model data and electronic equipment
CN112416349A (en) Form page generation method, system, equipment and storage medium
CN115422202A (en) Service model generation method, service data query method, device and equipment
CN109634500B (en) User data filling method and device, terminal equipment and storage medium
CN117009397A (en) Data query method, data query device, electronic equipment and storage medium
CN114297704A (en) Data desensitization method and device, storage medium and electronic equipment
CN113448578A (en) Page data processing method, processing system, electronic device and readable storage medium
CN113609014A (en) Interface field checking method and device, storage medium and electronic equipment
US7496843B1 (en) Web construction framework controller and model tiers
CN110489180A (en) One kind burying a report method, device, medium and electronic equipment
US20040249940A1 (en) System and method for asynchronous resource management
US10733192B1 (en) Expression evaluation infrastructure
US20220138644A1 (en) System and method for leveraging a completeness graph

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