CN117149153A - Method, device, computer equipment and medium for generating business data model - Google Patents

Method, device, computer equipment and medium for generating business data model Download PDF

Info

Publication number
CN117149153A
CN117149153A CN202210562541.8A CN202210562541A CN117149153A CN 117149153 A CN117149153 A CN 117149153A CN 202210562541 A CN202210562541 A CN 202210562541A CN 117149153 A CN117149153 A CN 117149153A
Authority
CN
China
Prior art keywords
data model
service
service data
field
names
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
CN202210562541.8A
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.)
Guangzhou Shizhen Information Technology Co Ltd
Original Assignee
Guangzhou Shizhen Information Technology 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 Guangzhou Shizhen Information Technology Co Ltd filed Critical Guangzhou Shizhen Information Technology Co Ltd
Priority to CN202210562541.8A priority Critical patent/CN117149153A/en
Publication of CN117149153A publication Critical patent/CN117149153A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • 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
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

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

Abstract

The application relates to a method, a device, a computer device and a storage medium for generating a business data model, wherein the method comprises the following steps: responding to the triggering operation of generating the business data model, and displaying a business data model configuration interface; acquiring service data model configuration information configured on the service data model configuration interface; the service data model configuration information comprises service data model names, a plurality of service field names and characteristic information of each service field; and performing code conversion on the data model names, the service field names and the characteristic information corresponding to each service field to obtain a service data model, so that the service data model is automatically generated according to the service data model configuration information, the codes are not required to be written by a developer one by one, the service development period is shortened, and the service development efficiency is improved.

Description

Method, device, computer equipment and medium for generating business data model
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for generating a service data model, a computer device, and a storage medium.
Background
Currently, in order to realize a service function, after acquiring a service requirement, a developer needs to program a manual code of the service function, then test, deploy and put on line, the whole service development period is very long, and more than one week is generally needed after one service development process is finished. In the development process, if the service function needs to be adjusted or changed, for example, a function is newly added in the existing service function, or the existing service function is modified. In this case, the existing code cannot be used, and a developer is required to rewrite the code, and test, deploy and put the rewritten code on line, so that the period required to be consumed is long, and the development efficiency is low.
Disclosure of Invention
Accordingly, an object of the present application is to provide a method, apparatus, computer device, and storage medium for generating a business data model, which have advantages of shortening a business development period and improving business development efficiency.
According to a first aspect of an embodiment of the present application, there is provided a method for generating a service data model, including the steps of:
responding to the triggering operation of generating the business data model, and displaying a business data model configuration interface;
acquiring service data model configuration information configured on the service data model configuration interface; the service data model configuration information comprises service data model names, a plurality of service field names and characteristic information of each service field;
and transcoding the data model name, the service field names and the characteristic information corresponding to each service field to obtain a service data model.
According to a second aspect of an embodiment of the present application, there is provided a generating apparatus of a service data model, including:
the configuration interface display module is used for responding to the triggering operation of generating the service data model and displaying a service data model configuration interface;
the configuration information acquisition module is used for acquiring service data model configuration information configured on the service data model configuration interface; the service data model configuration information comprises service data model names, a plurality of service field names and characteristic information of each service field;
and the data model obtaining module is used for carrying out code conversion on the data model name, the service field names and the characteristic information corresponding to each service field to obtain a service data model.
According to a third aspect of an embodiment of the present application, there is provided a computer apparatus comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method of generating a business data model according to any one of the preceding claims.
According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of generating a business data model as described in any one of the above.
The embodiment of the application displays a service data model configuration interface by responding to the triggering operation of generating the service data model; acquiring service data model configuration information configured on the service data model configuration interface; the service data model configuration information comprises service data model names, a plurality of service field names and characteristic information of each service field; and performing code conversion on the data model names, the service field names and the characteristic information corresponding to each service field to obtain a service data model, so that the service data model is automatically generated according to the service data model configuration information, code handwriting by a developer is not needed, the service development period is shortened, and the service development efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
For a better understanding and implementation, the present application is described in detail below with reference to the drawings.
Drawings
Fig. 1 is a flow chart of a method for generating a business data model according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a process for obtaining a service data model by performing transcoding on the data model name, a plurality of service field names and feature information corresponding to each service field according to an embodiment of the present application;
fig. 3 is a schematic flow chart of a process for obtaining a service data model by transcoding the data model name, a plurality of service field names and feature information corresponding to each service field according to another embodiment of the present application;
FIG. 4 is a block diagram of a device for generating a business data model according to an embodiment of the present application;
FIG. 5 is a block diagram illustrating a data model acquisition module according to one embodiment of the present application;
FIG. 6 is a block diagram illustrating a data model acquisition module according to another embodiment of the present application;
fig. 7 is a schematic block diagram 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 following detailed description of the embodiments of the present application will be given with reference to the accompanying drawings.
It should be understood that the described embodiments are merely some, but not all, embodiments of the application. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of embodiments of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application as set forth in the appended claims. In the description of this application, it should be understood that the terms "first," "second," "third," and the like are used merely to distinguish between similar objects and are not necessarily used to describe a particular order or sequence, nor should they be construed to indicate or imply relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art according to the specific circumstances.
Furthermore, in the description of the present application, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or".
The method for generating the service data model provided in the embodiment of the application can be executed by the generating device of the service data model, the generating device of the service data model can be realized in a software and/or hardware mode, and the generating device of the service data model can be formed by two or more physical entities or one physical entity. The generating device of the business data model can be any electronic device provided with data processing software, and the electronic device can be intelligent devices such as a computer, a mobile phone, a tablet or an interactive tablet.
Example 1
Fig. 1 is a flowchart of a method for generating a business data model according to an embodiment of the application. The method for generating the business data model provided by the embodiment of the application comprises the following steps:
s10: and responding to the triggering operation of generating the business data model, and displaying a business data model configuration interface.
The business data model is a basic operation object for adding, deleting and modifying business data, and different business data can correspond to different business data models.
In the embodiment of the application, the clicking operation of the developer on the service data model management menu is detected, and the service data model configuration interface is displayed to the developer, wherein the service data model configuration interface can be a popup page. The service data model configuration interface comprises a plurality of service data model configuration information input boxes for a developer to input configuration information of the service data model. The service data model configuration information input box comprises one or more of a service data model name input box, a service field name input box and a service field characteristic information input box.
S20: acquiring service data model configuration information configured on the service data model configuration interface; the service data model configuration information comprises service data model names, a plurality of service field names and characteristic information of each service field.
The service data model name is used for uniquely identifying the service data model, the service field has service properties and is used for reflecting the attribute of the service data, the service field name is used for uniquely identifying the service field, and the characteristic information of the service field is used for carrying out condition restriction on the service field. For example, if the service data model to be generated is a book information management data model, the book information is a service data model name, the name, price, description information and classification label of the book are service fields, and the maximum value and the minimum value of the corresponding character length of the service field, which is the name of the book, are feature information of the service field.
Receiving service data model configuration information input by a developer on a service data model configuration interface, specifically receiving a service model name defined by the developer on a service data model name input box, receiving a service field name defined by the developer on a service field name input box, and receiving characteristic information of a service field defined by the developer on a characteristic information input box of the service field. Wherein, the service model name and the service field name can be represented by English words, english word abbreviations or a combination of English words and special characters (such as dash lines), and the characteristic information of each service field can be represented by a key value pair.
S30: and performing code conversion on the data model name, the field names and the characteristic information corresponding to each field to obtain a service data model.
After the developer inputs the service data model configuration information in the service data model configuration interface, a preset program generates the service data model from the service data model configuration information. Specifically, the preset program may be a code generator, and the service data model configuration interface is provided with a code generation button, and when detecting that a developer clicks the code generation button, the code generator converts the data model name, a plurality of field names and feature information corresponding to each field into a data model code, so as to obtain the service data model.
By applying the embodiment of the application, the service data model configuration interface is displayed by responding to the triggering operation of generating the service data model; acquiring service data model configuration information configured on the service data model configuration interface; the service data model configuration information comprises service data model names, a plurality of service field names and characteristic information of each service field; and performing code conversion on the data model names, the service field names and the characteristic information corresponding to each service field to obtain a service data model, so that the service data model is automatically generated according to the service data model configuration information, the codes are not required to be written by a developer one by one, the service development period is shortened, and the service development efficiency is improved.
In an alternative embodiment, referring to fig. 2, the feature information of the service field includes a field type and field verification information, and the step S30 includes S301 to S303, specifically as follows:
s301: obtaining a class name of the class according to the data model name;
s302: obtaining a plurality of attribute names of the class according to the plurality of field names; obtaining the type of the corresponding attribute according to the field type of each field; obtaining a check function of the corresponding attribute according to the check information of each field;
s303: and generating a business data model according to the class name, the attribute names, the types of the corresponding attributes and the check functions of the corresponding attributes.
The characteristic information of the service field includes field type and field check information, and the field type includes one or more of character type, integer type, long integer type, floating point type, boolean type, date type, object type and array type. For example, the service field is "name", and the corresponding field type is "string"; the service field is "price", and the corresponding field type is "int". The field check information is used for limiting the condition of the service field, for example, when the service field is "name", the field type is a character string, and the corresponding field check information may be a limiting condition of the character length in the character string, including a maximum value and a minimum value of the character length.
Classes are the basis for object-oriented programming to implement information encapsulation, each class including class attributes and class functions, an instance of a class being referred to as an object.
In the embodiment of the application, the data model name can be converted into the class name of the class according to the preset conversion rule, and the preset conversion rule can be: the data model name is directly used as the class name of the class, or the first letter after the underline in the data model name is capitalized and the underline is removed to be used as the class name of the class. For example, the data model name is Book information "book_info", and the class name corresponding to the generated class is Book info.
Traversing the field names of all the service fields, and taking the field name of each service field as the attribute name of the class. Traversing the field types of all the service fields, and taking the field type of each service field as the attribute type of the class. The field verification information of all the service fields is traversed, and the field verification information of each service field is converted into a class verification function by means of a code generator. And combining the class name, the attribute names, the types of the corresponding attributes and the check functions of the corresponding attributes, thereby automatically and quickly obtaining the business data model.
In an alternative embodiment, the field check information includes one or more of an index, a default value, a maximum value, a minimum value, an enumerated list, and a matching rule.
In the embodiment of the present application, if the service field name is "name", the corresponding field verification information is: "name": { "isIndex": true, "isNull": false, "max":10, "min":1}. Where "isIndex" indicates whether an index exists and "true" indicates that the service field "name" exists with an index. "isNull" indicates whether or not null, and "false" indicates that the service field "name" cannot be null, and "max":10 denotes that the longest length of the service field "name" is 10 characters long, "min":1 indicates that the shortest length of the service field "name" is 1 character length. The field check information corresponding to different service fields may be different, and will not be described in detail herein.
In an alternative embodiment, referring to fig. 3, the step S30 includes steps S304 to S305, which are specifically as follows:
s304: acquiring parent class information of the data model; wherein the parent class information includes common attribute information and common verification information;
s305: and performing code conversion according to the data model name, the service field names, the characteristic information corresponding to each service field, the public attribute and the public method to obtain a service data model.
In object-oriented programming, when a class is defined, it can be inherited from a certain existing class, the inherited class is called a child class, and the inherited class is called a parent class. In the embodiment of the application, the parent class information comprises public attribute information and public verification information, the public attribute information comprises public attribute ID, and the public attribute ID can be used for unified management of service data, for example, book information service data can be quickly searched according to the public attribute ID. The common verification information includes a common verification function verify, which may be used for unified verification of the service data, for example, to verify whether the service data conforms to the feature information corresponding to the service field. The parent class information can be inherited through the keyword extension, so that the public attribute information and the public check information of the parent class are inherited, and the service data model is automatically and quickly generated. Meanwhile, the repeated utilization rate of codes corresponding to parent class information is improved, and the development efficiency is improved.
In an alternative embodiment, after the step S30, S41 to S43 are included, which is specifically as follows:
s41: responding to the operation of adding, deleting and modifying the business data model, and displaying the data model configuration interface; the data model configuration interface is configured with the service data model configuration information;
s42: receiving the operation of adding, deleting and modifying the service data model configuration information on the service data model configuration interface to obtain updated service data model configuration information;
s43: and updating the business data model according to the updated data model configuration information.
In the embodiment of the application, if a developer needs to change book information, for example, a "book classification" is added to the book information. Detecting clicking operation of a developer on a service data model management menu, displaying a service data model configuration interface to the developer, wherein the developer can add service fields of book classification and corresponding field types and field verification information in the service data model configuration interface, and correspondingly adding the attributes of the book classification and the corresponding class attribute types in the updated service data model. According to the updated data model configuration information, the service data model is automatically and rapidly updated without handwriting codes, and the service development efficiency is improved.
In an alternative embodiment, after the step S30, S51 to S53 are included, which specifically includes the following steps:
s51: receiving an access request to the service data model to acquire service data; the service data comprises a target service data model name, a plurality of target field names and corresponding target field values;
s52: obtaining a corresponding target service data model according to the name of the target service data model;
s53: and instantiating the target business data model according to the target field names and the corresponding target field values to obtain a business data model object.
In the embodiment of the application, a developer can access the business data model through the interface of the business data model. Specifically, service data input by the developer through the interface of the service data model is obtained, for example, the input service data may be: { "name": "prince", "price": "32", wherein the target service field names are name and price, and the corresponding target service field values are prince and 32. Traversing the attribute names of the service data model, searching the attribute names which are the same as the names of the target service fields, and assigning the attributes corresponding to the attribute names to generate the service data model object. The verification function of the service data model is used for verifying the service data model object, for example, verifying the attribute name in the service data model object, judging whether the character length of the 'small prince' is more than 1 and less than 10, if so, passing the verification; if not, returning verification failure notification information to the developer to prompt the developer to re-input the service data. By instantiating the business data model as a business data model object, the business data model can be utilized to perform data operation on the business data and to verify the accuracy of the business data.
In an alternative embodiment, after the step S30, S61 to S62 are included, which is specifically as follows:
s61: analyzing the business data model into a machine code, and storing the machine code into a cache;
s62: the machine code is retrieved from the cache to load the data model in response to an access request to the data model.
In the embodiment of the application, after the service data model is generated, the service data model can be compiled into the machine code and stored in the cache. When the service data model needs to be loaded next time, for example, adding, deleting and modifying operations or instantiations are carried out on the service data model, the machine code is directly read from the cache, and therefore the loading efficiency of the service data model is improved.
Example 2
The following are examples of the apparatus of the present application that may be used to perform the method of example 1 of the present application. For details not disclosed in the device embodiment of the present application, please refer to the method in embodiment 1 of the present application.
Fig. 4 is a schematic structural diagram of a device for generating a service data model according to an embodiment of the present application. The generating device 7 of the service data model provided in the embodiment of the present application includes:
a configuration interface display module 71 for displaying a service data model configuration interface in response to a trigger operation for generating a service data model;
a configuration information obtaining module 72, configured to obtain service data model configuration information configured at the service data model configuration interface; the service data model configuration information comprises service data model names, a plurality of service field names and characteristic information of each service field;
the data model obtaining module 73 is configured to transcode the data model name, the service field names, and the feature information corresponding to each service field to obtain a service data model.
By applying the embodiment of the application, the service data model configuration interface is displayed by responding to the triggering operation of generating the service data model; acquiring service data model configuration information configured on the service data model configuration interface; the service data model configuration information comprises service data model names, a plurality of service field names and characteristic information of each service field; and performing code conversion on the data model names, the service field names and the characteristic information corresponding to each service field to obtain a service data model, so that the service data model is automatically generated according to the service data model configuration information, the codes are not required to be written by a developer one by one, the service development period is shortened, and the service development efficiency is improved.
In one embodiment of the present application, referring to fig. 5, the data model generating module 73 includes:
a class name obtaining unit 731, configured to obtain a class name of a class according to the data model name;
an attribute name obtaining unit 732, configured to obtain a plurality of attribute names of the class according to a plurality of service field names; obtaining the type of the corresponding attribute according to the field type of each service field; obtaining a check function of the corresponding attribute according to the check information of each service field;
the data model generating unit 733 is configured to generate a service data model according to the class name, the attribute names, the types of the corresponding attributes, and the check functions of the corresponding attributes.
In one embodiment of the present application, referring to fig. 6, the data model generating module 73 includes:
a parent information obtaining unit 734 configured to obtain parent information of the data model; wherein the parent class information includes common attribute information and common check information;
the data model obtaining unit 735 is configured to perform transcoding according to the data model name, the service field names, the feature information corresponding to each service field, the public attribute, and the public method, to obtain a service data model.
Example 3
The following are examples of the apparatus of the present application that may be used to perform the method of example 1 of the present application. For details not disclosed in the embodiment of the apparatus of the present application, please refer to the method in embodiment 1 of the present application.
Referring to fig. 7, the present application further provides an electronic device 300, which may be specifically a computer, a mobile phone, a tablet computer, an interactive tablet, etc., in an exemplary embodiment of the present application, the electronic device 300 is an interactive tablet, and the interactive tablet may include: at least one processor 301, at least one memory 302, at least one display, at least one network interface 303, a user interface 304, and at least one communication bus 305.
The user interface 304 is mainly used for providing an input interface for a user, and acquiring data input by the user. Optionally, the user interface may further include a standard wired interface, a wireless interface.
The network interface 303 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the communication bus 305 is used to enable connection communications between these components.
Wherein the processor 301 may comprise one or more processing cores. The processor uses various interfaces and lines to connect various portions of the overall electronic device, perform various functions of the electronic device, and process data by executing or executing instructions, programs, code sets, or instruction sets stored in memory, and invoking data stored in memory. Alternatively, the processor may be implemented in hardware in at least one of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display layer; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor and may be implemented by a single chip.
The Memory 302 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The memory may be used to store instructions, programs, code sets, or instruction sets. The memory may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described various method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory may optionally also be at least one storage device located remotely from the aforementioned processor. As shown in fig. 7, an operating system, a network communication module, a user interface module, and an operating application program may be included in a memory as one type of computer storage medium.
The processor may be configured to invoke an application program of the method for generating the service data model stored in the memory, and specifically execute the method steps of the foregoing embodiment 1, and the specific execution process may refer to the specific description shown in embodiment 1, which is not repeated herein.
Example 4
The present application further provides a computer readable storage medium, on which a computer program is stored, where the instructions are adapted to be loaded by a processor and execute the method steps of the above-described embodiment 1, and the specific execution process may refer to the specific description shown in the embodiment, which is not repeated herein. The storage medium can be an electronic device such as a personal computer, a notebook computer, a smart phone, a tablet personal computer and the like.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The above described embodiments of the apparatus are merely illustrative, wherein the components illustrated as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e. 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 objectives of the present application. Those of ordinary skill in the art will understand and implement the present application without undue burden.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer readable media, as defined herein, does not include transitory computer readable media (transmission media), such as modulated data signals and carriers.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the application are to be included in the scope of the claims of the present application.

Claims (10)

1. The method for generating the business data model is characterized by comprising the following steps:
responding to the triggering operation of generating the business data model, and displaying a business data model configuration interface;
acquiring service data model configuration information configured on the service data model configuration interface; the service data model configuration information comprises service data model names, a plurality of service field names and characteristic information of each service field;
and transcoding the data model name, the service field names and the characteristic information corresponding to each service field to obtain a service data model.
2. The method for generating a business data model according to claim 1, wherein:
the characteristic information of the service field comprises field type and field verification information;
the step of transcoding the data model name, the service field names and the feature information corresponding to each service field to obtain a service data model includes:
obtaining a class name of the class according to the data model name;
obtaining a plurality of attribute names of the class according to a plurality of service field names; obtaining the type of the corresponding attribute according to the field type of each service field; obtaining a check function of the corresponding attribute according to the check information of each service field;
and generating a business data model according to the class name, the attribute names, the types of the corresponding attributes and the check functions of the corresponding attributes.
3. The method for generating a business data model according to claim 2, wherein:
the field check information includes one or more of an index, a default value, a maximum value, a minimum value, an enumerated list, and a matching rule.
4. The method for generating a business data model according to claim 1, wherein:
the step of transcoding the data model name, the service field names and the feature information corresponding to each service field to obtain a service data model includes:
acquiring parent class information of the data model; wherein the parent class information includes common attribute information and common check information;
and performing code conversion according to the data model name, the service field names, the characteristic information corresponding to each service field, the public attribute and the public method to obtain a service data model.
5. The method for generating a business data model according to any one of claims 1 to 4, characterized in that:
the step of performing transcoding on the data model name, the service field names and the feature information corresponding to each service field to obtain a service data model includes:
responding to the operation of adding, deleting and modifying the business data model, and displaying the data model configuration interface; the data model configuration interface is configured with the service data model configuration information;
receiving the operation of adding, deleting and modifying the service data model configuration information on the service data model configuration interface to obtain updated service data model configuration information;
and updating the business data model according to the updated data model configuration information.
6. The method for generating a business data model according to any one of claims 1 to 4, characterized in that:
the step of performing transcoding on the data model name, the service field names and the feature information corresponding to each service field to obtain a service data model includes:
receiving an access request to the service data model to acquire service data; the service data comprises a target service data model name, a plurality of target service field names and corresponding target service field values;
obtaining a corresponding target service data model according to the name of the target service data model;
and instantiating the target service data model according to the target service field names and the corresponding target service field values to obtain a data model object.
7. The method for generating a business data model according to claim 6, wherein:
the step of performing transcoding on the data model name, the service field names and the feature information corresponding to each service field to obtain a service data model includes:
analyzing the business data model into a machine code, and storing the machine code into a cache;
and responding to the access request of the business data model, acquiring the machine code from the cache to load the business data model.
8. A device for generating a business data model, comprising:
the configuration interface display module is used for responding to the triggering operation of generating the service data model and displaying a service data model configuration interface;
the configuration information acquisition module is used for acquiring the service data model configuration information configured on the service data model configuration interface; the service data model configuration information comprises service data model names, a plurality of service field names and characteristic information of each service field;
and the data model obtaining module is used for carrying out code conversion on the data model name, the service field names and the characteristic information corresponding to each service field to obtain a service data model.
9. A computer device, comprising: a processor, a memory and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 7.
CN202210562541.8A 2022-05-23 2022-05-23 Method, device, computer equipment and medium for generating business data model Pending CN117149153A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210562541.8A CN117149153A (en) 2022-05-23 2022-05-23 Method, device, computer equipment and medium for generating business data model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210562541.8A CN117149153A (en) 2022-05-23 2022-05-23 Method, device, computer equipment and medium for generating business data model

Publications (1)

Publication Number Publication Date
CN117149153A true CN117149153A (en) 2023-12-01

Family

ID=88897353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210562541.8A Pending CN117149153A (en) 2022-05-23 2022-05-23 Method, device, computer equipment and medium for generating business data model

Country Status (1)

Country Link
CN (1) CN117149153A (en)

Similar Documents

Publication Publication Date Title
CN112395483B (en) Page rendering method and device based on tree structure
US9262850B2 (en) Descriptive framework for data visualization
US20170255445A1 (en) Translation of natural language into user interface actions
CN111722839A (en) Code generation method and device, electronic equipment and storage medium
US8843836B2 (en) Model driven content development
CN106951231B (en) Computer software development method and device
EP2973047A1 (en) Methods for managing applications using semantic modeling and tagging and devices thereof
WO2016190973A1 (en) Data binding dependency analysis
CN107622080B (en) Data processing method and equipment
CN112214210A (en) Logistics business rule engine and configuration method, device, equipment and storage medium thereof
JP2018520452A (en) Techniques for constructing generic programs using controls
CN111581920A (en) Document conversion method, device, equipment and computer storage medium
CN112068911B (en) Electronic form generation method, device, system, equipment and medium
CN115599386A (en) Code generation method, device, equipment and storage medium
US10241899B2 (en) Test input information search device and method
CN111967269A (en) Business risk identification method and device and electronic equipment
CN115618363B (en) Vulnerability path mining method and related equipment
CN115629763A (en) Target code generation method and NPU instruction display method and device
CN117149153A (en) Method, device, computer equipment and medium for generating business data model
CN114625372A (en) Automatic component compiling method and device, computer equipment and storage medium
CN112925523A (en) Object comparison method, device, equipment and computer readable medium
CN114594945A (en) Method, device, system, equipment and medium for generating advanced popup selection frame
CN112068814A (en) Method, device, system and medium for generating executable file
US20240061658A1 (en) Method and system for creating application user interface within integrated development environment
CN114594948A (en) Method, device, system, equipment and medium for generating dynamic drop-down box control

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