CN110688098A - Method and device for generating system framework code, electronic equipment and storage medium - Google Patents

Method and device for generating system framework code, electronic equipment and storage medium Download PDF

Info

Publication number
CN110688098A
CN110688098A CN201910822826.9A CN201910822826A CN110688098A CN 110688098 A CN110688098 A CN 110688098A CN 201910822826 A CN201910822826 A CN 201910822826A CN 110688098 A CN110688098 A CN 110688098A
Authority
CN
China
Prior art keywords
machine learning
learning model
middleware
basic component
basic
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
CN201910822826.9A
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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910822826.9A priority Critical patent/CN110688098A/en
Publication of CN110688098A publication Critical patent/CN110688098A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/10Requirements analysis; Specification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Electrically Operated Instructional Devices (AREA)

Abstract

The application discloses a method, a device, electronic equipment and a storage medium for generating a system framework code, which relate to the field of intelligent decision making, wherein the method comprises the following steps: acquiring a demand label combination selected by each user terminal; inputting the requirement label combination into a machine learning model; returning the system framework code output by the machine learning model to each user terminal; obtaining scores fed back by a preset number of user terminals to the system frame codes, and further determining the comprehensive scores of the machine learning model; and if the comprehensive score is lower than a preset threshold value, acquiring parameters after the machine learning model is adjusted from a management terminal, and adjusting the parameters of the machine learning model until the comprehensive score fed back by each user terminal to the system frame code output by the machine learning model reaches the preset threshold value. The method improves the generation efficiency of the system framework code.

Description

Method and device for generating system framework code, electronic equipment and storage medium
Technical Field
The present invention relates to the field of intelligent decision making, and in particular, to a method and an apparatus for generating a system framework code, an electronic device, and a storage medium.
Background
When a system framework is constructed, a user needs to select corresponding basic components and middleware according to the requirements of the system so as to generate the system framework. But due to the rapidly evolving technologies today, new components are constantly being developed or new versions of components are being released. This results in a user being faced with a variety of cumbersome components that are poorly understood, resulting in a less efficient system framework being built.
Disclosure of Invention
Based on this, in order to solve the technical problem of how to generate the system framework code more efficiently from the technical aspect in the related art, the invention provides a method, an apparatus, an electronic device and a storage medium for generating the system framework code.
In a first aspect, a method for generating system framework code is provided, which includes:
acquiring a demand label combination selected by each user terminal;
inputting the requirement label combination into a machine learning model, so that the machine learning model encapsulates a basic component and a middleware for generating a system frame code according to the requirement label combination, and further generates a corresponding system frame code;
returning the system framework code output by the machine learning model to each user terminal;
obtaining scores fed back by a preset number of user terminals to the system frame codes, and further determining the comprehensive scores of the machine learning model;
and if the comprehensive score is lower than a preset threshold value, acquiring parameters after the machine learning model is adjusted from a management terminal, and adjusting the parameters of the machine learning model until the comprehensive score fed back by each user terminal to the system frame code output by the machine learning model reaches the preset threshold value.
In an exemplary embodiment of the present disclosure, the base component is selected by the machine learning model from a base component library that is periodically updated, wherein each base component is labeled with an attribute in advance for selection by the machine learning model;
the middleware is selected by the machine learning model from a periodically updated middleware library, wherein each middleware is labeled with an attribute label in advance for selection by the machine learning model.
In an exemplary embodiment of the present disclosure, the periodically updating the base component library includes:
determining each basic component updated in the current period in the basic component library as a first basic component, and placing the first basic component in a first basic component queue, wherein the first basic component is a basic component which is not used for generating a system frame code with a comprehensive score reaching a preset threshold value;
and determining each basic component except the first basic component in the basic component library as a second basic component, and placing the second basic component in a second basic component queue, wherein the second basic component is the basic component which is used for generating the system framework code with the comprehensive score reaching a preset threshold value.
In an exemplary embodiment of the present disclosure, the encapsulating, by the machine learning model, a basic component and a middleware for generating a system framework code according to the requirement label combination, and then generating a corresponding system framework code includes:
the machine learning model determines a basic component which accords with the requirement label combination from the basic component library based on the current machine learning model parameters;
the machine learning model determines the middleware which accords with the requirement label combination from the middleware library based on the current machine learning model parameters;
and packaging the basic component and the middleware by the machine learning model to generate a corresponding system frame code.
In an exemplary embodiment of the disclosure, the machine learning model determining, from the base component library, a base component that meets the requirement label combination based on current machine learning model parameters includes:
the machine learning model selects a second basic component from the basic component library based on the current machine learning model;
the machine learning model selects a first basic component matched with the second basic component according to the matching of the attribute labels;
a machine learning model determines the first base component as a base component that conforms to the demand label combination.
In an exemplary embodiment of the disclosure, after obtaining scores fed back by a predetermined number of user terminals to the system framework code and further determining a composite score of the machine learning model, the method includes:
and if the composite score reaches a preset threshold value, removing the selected first basic assembly from the first basic assembly queue and placing the selected first basic assembly in the second basic assembly queue.
According to a second aspect of the present disclosure, there is provided an apparatus for generating system framework code, comprising:
the first acquisition module is used for acquiring the demand label combination selected by each user terminal;
the input module is used for inputting the requirement label combination into a machine learning model, so that the machine learning model encapsulates a basic component and a middleware which are used for producing a system frame code according to the requirement label combination to generate a corresponding system frame code;
the return module is used for returning the system framework code output by the machine learning model to each user terminal;
the second acquisition module is used for acquiring scores fed back by a preset number of user terminals to the system framework codes so as to determine the comprehensive scores of the machine learning model;
and the adjusting module is used for acquiring parameters after the machine learning model is adjusted from a management end if the comprehensive score is lower than a preset threshold value, and adjusting the parameters of the machine learning model until the comprehensive score fed back by each user terminal to the system frame code output by the machine learning model reaches the preset threshold value.
According to a third aspect of the present disclosure, there is provided an electronic device that generates a system framework code, including:
a memory configured to store executable instructions;
a processor configured to execute executable instructions stored in the memory to implement the above-described method.
According to a fourth aspect of the present disclosure, there is provided a computer readable storage medium storing computer program instructions which, when executed by a computer, cause the computer to perform the method described above.
According to the method and the device, the corresponding basic components and middleware are dynamically selected from the regularly updated basic component library and the regularly updated middleware library through the machine learning model according to the requirement label combination of the user terminal, and the system framework code is generated. And then, the machine learning model is adjusted according to the feedback of the user terminal to the system frame code, so that the efficient generation of the system frame code is realized.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
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 disclosure.
Drawings
FIG. 1 shows a flow diagram for generating system framework code according to an example embodiment of the present disclosure.
FIG. 2 shows a block diagram of an apparatus for generating system framework code according to an example embodiment of the present disclosure.
FIG. 3 illustrates a system architecture diagram for generating system framework code according to an example embodiment of the present disclosure.
FIG. 4 illustrates a diagram of an electronic device that generates system framework code according to an example embodiment of the present disclosure.
FIG. 5 illustrates a computer-readable storage medium diagram for generating system framework code according to an example embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and the like. In other instances, well-known technical solutions have not been shown or described in detail to avoid obscuring aspects of the present disclosure.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
An object of the present disclosure is to improve the efficiency of generating system framework code from a technical aspect. The method for generating the system framework code comprises the following steps: acquiring a demand label combination selected by each user terminal; inputting the requirement label combination into a machine learning model, so that the machine learning model encapsulates a basic component and a middleware for generating a system frame code according to the requirement label combination, and further generates a corresponding system frame code; returning the system framework code output by the machine learning model to each user terminal; obtaining scores fed back by a preset number of user terminals to the system frame codes, and further determining the comprehensive scores of the machine learning model; and if the comprehensive score is lower than a preset threshold value, acquiring parameters after the machine learning model is adjusted from a management terminal, and adjusting the parameters of the machine learning model until the comprehensive score fed back by each user terminal to the system frame code output by the machine learning model reaches the preset threshold value. According to the method and the device, the corresponding basic components and middleware are dynamically selected from the regularly updated basic component library and the regularly updated middleware library through the machine learning model according to the requirement label combination of the user terminal, and the system framework code is generated. And then, the machine learning model is adjusted according to the feedback of the user terminal to the system frame code, so that the efficient generation of the system frame code is realized.
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
FIG. 1 shows a flow diagram for generating system framework code according to an example embodiment of the present disclosure:
step S100: acquiring a demand label combination selected by each user terminal;
step S110: inputting the requirement label combination into a machine learning model, so that the machine learning model encapsulates a basic component and a middleware for generating a system frame code according to the requirement label combination, and further generates a corresponding system frame code;
step S120: returning the system framework code output by the machine learning model to each user terminal;
step S130: obtaining scores fed back by a preset number of user terminals to the system frame codes, and further determining the comprehensive scores of the machine learning model;
step S140: and if the comprehensive score is lower than a preset threshold value, acquiring parameters after the machine learning model is adjusted from a management terminal, and adjusting the parameters of the machine learning model until the comprehensive score fed back by each user terminal to the system frame code output by the machine learning model reaches the preset threshold value.
Hereinafter, each step of generating the system framework code described above in the present exemplary embodiment will be explained and explained in detail with reference to the drawings.
In step S100, a requirement tag combination selected by each user terminal is acquired.
The requirement label is a label selected by the user terminal according to the performance requirement of the user terminal on the system frame. For example, if the user terminal wants the system framework to satisfy the performance of high concurrency, the label "high concurrency" selected by the user terminal is a requirement label.
In an embodiment, the server displays each requirement label in a pull-down menu form on a requirement label selection interface of each user terminal for the user terminal to click and select. In response to a selection instruction (for example, clicking on a demand label) of the user terminal to each demand label, the server takes each demand label selected by the user terminal as a demand label combination selected by the user terminal together.
This embodiment has the advantage that each user terminal is enabled to quickly select a desired tag combination.
The following describes a process of generating a system framework code after acquiring a requirement tag combination selected by a user terminal.
In step S110, the requirement label combination is input into a machine learning model, so that the machine learning model encapsulates the basic component and the middleware for producing the system frame code according to the requirement label combination, and further generates a corresponding system frame code.
Basic components refer to components that provide services for operating system basic functions, such as: redis component, zookeeper component … … to provide data storage protocol services for operating systems
Middleware refers to components that provide services for applications outside the basic functions of an operating system, i.e., various components that can be woven, reused, and are unrelated to business logic.
The system framework code is obtained by encapsulating each basic component and middleware.
In the embodiment of the present disclosure, after the machine learning model obtains the requirement tag combination, each basic component and each middleware are selected and encapsulated based on the current machine learning model parameter, so as to generate a system frame code that the machine learning model considers to meet the performance corresponding to the requirement tag combination under the current machine learning model parameter.
In one embodiment, the base component is selected by the machine learning model from a periodically updated base component library, wherein each base component is labeled with an attribute in advance for selection by the machine learning model.
The attribute tags characterize the attributes of the corresponding base component, such as: service type, applicable system type … …
In one embodiment, the base components in the base component library are periodically updated by: adding the basic components with updated versions in the current updating period into a basic component library; the newly published base components are added to the base component library within the current update. After the machine learning model receives the requirement label combination, the basic components forming the system framework are selected from the basic component library which is updated regularly.
The embodiment has the advantage that the base component library is updated regularly, so that when the machine learning model generates the system framework code, the updating of the base component can be adapted in time, and the system framework code with more excellent performance is generated.
In one embodiment, the periodically updating the base component library comprises:
determining each basic component updated in the current period in the basic component library as a first basic component, and placing the first basic component in a first basic component queue, wherein the first basic component is a basic component which is not used for generating a system frame code with a comprehensive score reaching a preset threshold value;
and determining each basic component except the first basic component in the basic component library as a second basic component, and placing the second basic component in a second basic component queue, wherein the second basic component is the basic component which is used for generating the system framework code with the comprehensive score reaching a preset threshold value.
In one embodiment, every predetermined time period (for example, one week), adding each basic component updated in the time period into the basic component library, and placing the updated basic components as the first basic components in the first basic component queue; meanwhile, other basic components except the first basic component are used as second basic components and placed in a second basic component queue.
The first base component in the first base component queue is a base component that has not been used to generate system framework code for which the composite score reaches a predetermined threshold, such as: a base component that was never used to generate system framework code, or a base component that was used to generate system framework code but whose composite score of the generated system framework code did not meet a predetermined threshold. For the basic component which is used for generating the system frame code once but the comprehensive score of the generated system frame code does not reach the preset threshold, it is indicated that the machine learning model cannot make an accurate judgment on the performance of the basic component, so that the system frame code generated by using the basic component cannot meet the requirements of the user (specifically, the comprehensive score does not reach the preset threshold), therefore, although the basic component is "practiced" by the machine learning model, the machine learning model cannot make an accurate judgment on the performance of the basic component, and the basic component which is never used for generating the system frame code are considered as the first basic component.
The second base component in the second base component queue is the base component that was used to generate the system framework code having a composite score that reaches the predetermined threshold, as opposed to the first base component.
The embodiment has the advantage that the basic components in the basic component library are divided into two parts according to whether the basic components are updated or not, so that the machine learning model obtained by training can adapt to the updating of the basic components in a more timely manner in subsequent processing.
In one embodiment, the middleware is selected by the machine learning model from a periodically updated middleware library, wherein each middleware is labeled with an attribute in advance for selection by the machine learning model.
In one embodiment, the middleware in the middleware library is periodically updated by: adding the middleware with the updated version into a middleware library in the current updating period; and adding the published brand-new middleware into the middleware library in the current updating period. After the machine learning model receives the requirement label combination and selects the basic component, the middleware which forms the system framework is selected from the regularly updated middleware library.
The embodiment has the advantage that the middleware library is updated regularly, so that when the machine learning model generates the system framework code, the update of the middleware can be adapted in time, and the system framework code with more excellent performance is generated.
In one embodiment, the periodically updating the middleware library includes:
determining each middleware updated in the current period in the middleware library as a first middleware, and placing the first middleware in a first middleware queue, wherein the first middleware is a middleware which is not used for generating system frame codes with a comprehensive score reaching a preset threshold value;
determining each middleware except the first middleware in the middleware library as a second middleware and placing the second middleware in a second middleware queue, wherein the second middleware is the middleware which is used for generating the system framework code with the comprehensive score reaching the preset threshold value.
In one embodiment, every predetermined time period (for example, one week), adding each piece of middleware updated in the time period into a middleware library, and placing the updated middleware in a first middleware queue as a first middleware; meanwhile, other middleware except the first middleware is used as second middleware and is placed in a second middleware queue.
The first middleware in the first middleware queue is middleware that has not been used to generate system framework code whose composite score reaches a predetermined threshold, such as: middleware that was never used to generate system framework code, or middleware that was used to generate system framework code but whose composite score of the generated system framework code did not reach a predetermined threshold. For the middleware which is used for generating the system frame codes once but the comprehensive score of the generated system frame codes does not reach the preset threshold, the machine learning model cannot accurately judge the performance of the middleware, so that the system frame codes generated by using the middleware cannot meet the requirements of users (specifically, the comprehensive score does not reach the preset threshold), therefore, although the middleware is practiced by the machine learning model, the machine learning model cannot accurately judge the performance of the middleware, and the middleware which is never used for generating the system frame codes are considered as the first middleware.
The second middleware in the second middleware queue is the middleware that was used to generate the system framework code whose composite score meets the predetermined threshold, as opposed to the first middleware.
The embodiment has the advantage that the middleware in the middleware library is divided into two parts according to whether the middleware is updated or not, so that the machine learning model obtained by training can adapt to the updating of the middleware more timely in subsequent processing.
The following describes a process of encapsulating the basic component and the middleware by the machine learning model to generate a corresponding system framework code.
In an embodiment, the encapsulating, by the machine learning model, the basic component and the middleware for generating the system framework code according to the requirement label combination, so as to generate the corresponding system framework code, includes:
the machine learning model determines a basic component which accords with the requirement label combination from the basic component library based on the current machine learning model parameters;
the machine learning model determines the middleware which accords with the requirement label combination from the middleware library based on the current machine learning model parameters;
and packaging the basic component and the middleware by the machine learning model to generate a corresponding system frame code.
In one embodiment, each training of the machine learning model adaptively adjusts the parameters of the machine learning model, which correspond to the "knowledge" of the machine learning model. When the requirement label combination is obtained, the machine learning model selects a basic component which accords with the requirement label combination from the basic component library according to the current machine learning model parameters, selects a middleware which accords with the requirement label combination from the middleware library, and then packages the selected basic component and the middleware to generate a corresponding system frame code.
The process of the machine learning model selecting the base component is described below.
In one embodiment, the machine learning model determines, from the base component library, a base component that meets the requirement label combination based on current machine learning model parameters, comprising:
selecting a second basic component from the basic component library by the machine learning model based on the current machine learning model parameters;
the machine learning model selects a first basic component matched with the second basic component according to the matching of the attribute labels;
a machine learning model determines the first base component as a base component that conforms to the demand label combination.
In one embodiment, the basic components in the basic component library are divided into a first basic component and a second basic component, wherein the first basic component is a basic component updated in the current period and has not been used and practiced by the machine learning model; the second base component is a base component that has been used, practiced, by the machine learning model.
When the machine learning model selects a base component from the base component library for generating the system framework, a second base component that satisfies the requirement label combination is selected according to the current machine learning model parameters (i.e., corresponding to the "knowledge" obtained from past training). In order to adapt to the updated basic component library in time, the machine learning model selects a first basic component matched with the second basic component attribute, and determines the first basic component as the basic component conforming to the requirement label combination for packaging.
This embodiment has the advantage that the machine learning model preferentially selects the base component for generating the system framework code from the updated first base component, which can be adapted to the updated base component library in time.
In one embodiment, the selecting, by the machine learning model, a first base component that matches the second base component attribute based on the matching of the attribute labels includes:
for each first base component, determining a union of the attribute tags of the first base component and the attribute tags of the second base component;
determining an intersection of the property label of the first base component and the property label of the second base component;
dividing the number of the intersection elements by the number of the union elements to obtain a matching value of the first basic assembly and the second basic assembly;
and determining the first basic component which is the largest and exceeds a preset threshold value and corresponds to the matching value as the first basic component matched with the second basic component attribute.
In one embodiment, the attribute tags of the base component characterize the performance of the system on which the base component is built, for example: the attribute labels of a basic component are 'high concurrency' and 'high compatibility', which indicates that the performance of a system constructed by the basic component is more prone to 'high concurrency' and 'high compatibility'. Therefore, the similarity of performance between the basic components can be measured through the matching of the attribute labels.
In one embodiment, for the purpose of "learning" preferentially, after selecting a second basis component, the machine learning model selects a first basis component that matches the performance of the second basis component to "practice" whether the actual performance of the first basis component matches the prediction of the current machine learning model parameters.
In this embodiment, the machine learning model performs performance matching on each first basis component in the first basis component queue with the selected second basis component: for each first basic assembly, determining union set and intersection set of the attribute label of the first basic assembly and the attribute label of the second basic assembly, and dividing the number of the elements of the intersection set by the number of the elements of the union set to obtain the matching value of the first basic assembly and the second basic assembly. From the first base components with matching values exceeding a predetermined threshold (e.g., 0.95), the first base component with the largest matching value is selected as the first base component matched with the second base component, so that the machine learning model uses the first base component to generate the system framework.
This embodiment has the advantage that by comparison of the attribute tags, the first base component to generate the system framework can be quickly determined.
In an embodiment, the dividing the number of elements of the intersection by the number of elements of the union to obtain a matching value of the first base component and the second base component includes:
and if the matching value of each first basic assembly and the second basic assembly does not reach a preset threshold value, determining the selected second basic assembly as the basic assembly used for generating the system framework code.
In one embodiment, if the matching value of each of the first base components and the second base components does not reach a predetermined threshold (e.g., 0.95), it indicates that each of the first base components is not suitable for generating the system framework in the preliminary determination. While the present embodiment aims to make the machine learning model "learn", "practice" (i.e., make the most use of the updated first base component to generate the system framework code) as much as possible to perfect its own "knowledge" (i.e., machine learning model parameters), it is premised on the capability to meet the requirements of the user terminal. If the matching value does not reach the preset threshold value, the system framework code generated by each first basic component cannot meet the requirement of the user terminal, and therefore, in the case, the machine learning model does not use the first basic component to generate the system framework code.
The embodiment has the advantage that the system framework code is generated without selecting the first basic component of which the matching value does not reach the preset threshold value, thereby ensuring that the system framework code can meet the requirements of the user terminal.
The process of the machine learning model selection middleware is described below.
In one embodiment, the machine learning model determines, from the middleware library, middleware that meets the requirement label combination based on current machine learning model parameters, comprising:
selecting a second middleware from the middleware library by the machine learning model based on the current machine learning model parameters;
the machine learning model selects a first middleware matched with the second middleware according to the matching of the attribute labels;
a machine learning model determines the first middleware as a middleware that conforms to the combination of demand labels.
The specific implementation process and advantages of this embodiment are the same as the corresponding process in the machine learning model selection basic component, and therefore, are not described herein again.
In one embodiment, the selecting, by the machine learning model, a first middleware that matches the second middleware attribute based on matching of the attribute tags includes:
for each first middleware, determining a union of the attribute labels of the first middleware and the attribute labels of the second middleware;
determining an intersection of the property label of the first middleware and the property label of the second middleware;
dividing the number of the intersection elements by the number of the union elements to obtain a matching value of the first middleware and the second middleware;
and determining the first middleware which is the largest and exceeds a preset threshold value and corresponds to the matching value as the first middleware matched with the second middleware attribute.
The specific implementation process and advantages of this embodiment are the same as the corresponding process in the machine learning model selection basic component, and therefore, are not described herein again.
In an embodiment, the dividing the number of elements of the intersection by the number of elements of the union to obtain a matching value of the first middleware and the second middleware includes:
and if the matching value of each first middleware and the second middleware does not reach a preset threshold value, determining the selected second middleware as the middleware used for generating the system framework code.
The specific implementation process and advantages of this embodiment are the same as the corresponding process in the machine learning model selection basic component, and therefore, are not described herein again.
The following describes a process of the machine learning model encapsulating the selected basic components and middleware to generate corresponding system framework codes.
In step S120, the system framework code output by the machine learning model is returned to each user terminal.
In the embodiment of the present disclosure, the system framework code generated by the machine learning model is generated by selecting the basic component and the middleware that the machine learning model considers to be capable of meeting the requirements of the user terminal according to the current machine learning model parameters, and then encapsulating the basic component and the middleware. It is not yet determined whether the requirements of the user terminal can be met or not. Therefore, after the machine learning model generates the system frame codes of each user terminal, each system frame code is returned to the corresponding user terminal so as to obtain the feedback scores of the user terminal on the system frame codes received by the user terminal, and whether the machine learning model needs to be adjusted is determined according to the feedback of the user terminal.
In step S130, scores fed back by a predetermined number of user terminals to the system framework code are obtained, and a composite score of the machine learning model is determined.
In one embodiment, after receiving scores fed back by a predetermined number (for example, 20) of user terminals, the server determines a composite score of the machine learning model by the user terminals, so that the performance of the machine learning model in the face of updated basic components and middleware can be measured according to the composite score.
In an embodiment, the obtaining scores fed back by a predetermined number of user terminals to the system framework code, and further determining a composite score of the machine learning model includes:
and removing one highest score and one lowest score in the scores, and determining the average score obtained by the calculation as the comprehensive score of the machine learning model.
The process after determining the composite score for the machine learning model is described below.
In step S140, if the composite score is lower than a predetermined threshold, obtaining the adjusted parameter of the machine learning model from the management terminal, and adjusting the parameter of the machine learning model until the composite score fed back by each user terminal to the system frame code output by the machine learning model reaches the predetermined threshold.
In one embodiment, if the composite score is lower than a predetermined threshold (e.g., 90 points), indicating that the updated infrastructure component, middleware is faced, the machine learning model cannot make an accurate determination based on the current machine learning model parameters, so that the requirements of each ue cannot be met. Therefore, the parameters of the machine learning model need to be adjusted so that the machine learning model can meet the requirements of each user terminal.
In an embodiment, if the composite score is lower than a predetermined threshold, the adjusted parameters of the machine learning model are obtained from the management terminal, and the parameters of the machine learning model are adjusted. And putting the machine learning model into the generation of the system frame codes until the machine learning model can generate the system frame codes meeting the requirements of each user terminal.
The embodiment has the advantages that the performance of the machine learning model is evaluated in real time according to the feedback of the user terminal, so that the parameters of the machine learning model can be adjusted in time, and the high quality and the high efficiency of generating the system framework code by the machine learning model are ensured.
The processing of the selected first base component to achieve the composite score to the predetermined threshold is described below.
In one embodiment, if the composite score reaches a predetermined threshold, the selected first base component is removed from the first base component queue and placed in the second base component queue.
In this embodiment, if the composite score reaches a predetermined threshold (e.g., 90 points), it indicates that the machine learning model can make a sufficiently accurate decision selection in the face of updated basic components and middleware, so as to generate a system framework code meeting the requirements of each user terminal.
Therefore, it is stated that: the first base component selected during the system framework code generation process has been "practiced" by the machine learning model in accordance with its "knowledge" (i.e., machine learning model parameters), which enables an accurate decision selection to be made by the machine learning model for this selected first base component. Thus, the first base component is removed from the first base component queue and placed in the second base component queue.
The embodiment has the advantages that the basic components which are subjected to practice are placed in the second basic component queue, the repeated trial process of the machine learning model is omitted, and the efficiency of generating the system framework code is improved.
In one embodiment, the removing the selected first base component from the first base component queue and placing the selected first base component in the second base component queue includes:
and if the first basic assembly is a completely new basic assembly, removing the first basic assembly from the first basic assembly queue and storing the first basic assembly and each second basic assembly in the second basic assembly queue together.
In one embodiment, the removing the selected first base component from the first base component queue and placing the selected first base component in the second base component queue includes:
if the first base component is an updated version of a second base component in the second base component queue, removing the first base component from the first base component queue and covering a corresponding second base component in the second base component queue.
In this embodiment, the selected first basic component is a new version of a second basic component, and after the selection of the machine learning model and the generation of the system framework code are performed, and the requirements of each user terminal are met, the first basic component is placed in a second basic component queue in a manner of covering the corresponding second basic component.
The processing of the selected first middleware when the composite score reaches the predetermined threshold is described below.
In one embodiment, if the composite score reaches a predetermined threshold, the selected first middleware is removed from the first middleware queue and placed in the second middleware queue.
The specific implementation process and advantages of this embodiment are the same as the corresponding process in the processing process of the selected first basic component when the composite score reaches the predetermined threshold, and therefore are not described herein again.
In one embodiment, the removing the selected first middleware from the first middleware queue and placing the selected first middleware in the second middleware queue includes:
and if the first middleware is a brand-new middleware, removing the first middleware from the first middleware queue, and storing the first middleware and each second middleware in the second middleware queue together.
The specific implementation process and advantages of this embodiment are the same as the corresponding process in the processing process of the selected first basic component when the composite score reaches the predetermined threshold, and therefore are not described herein again.
In one embodiment, the removing the selected first middleware from the first middleware queue and placing the selected first middleware in the second middleware queue includes:
if the first middleware is an updated version of a second middleware in the second middleware queue, removing the first middleware from the first middleware queue, and covering the corresponding second middleware in the second middleware queue.
The specific implementation process and advantages of this embodiment are the same as the corresponding process in the processing process of the selected first basic component when the composite score reaches the predetermined threshold, and therefore are not described herein again.
In an embodiment, as shown in fig. 2, there is provided an apparatus for generating a system framework code, which specifically includes:
a first obtaining module 210, configured to obtain a requirement tag combination selected by each user terminal;
an input module 220, configured to input the requirement label combination into a machine learning model, so that the machine learning model encapsulates, according to the requirement label combination, a basic component and a middleware for producing a system frame code, and generates a corresponding system frame code;
a returning module 230, configured to return the system framework code output by the machine learning model to each user terminal;
a second obtaining module 240, configured to obtain scores fed back by a predetermined number of user terminals to the system framework code, and further determine a comprehensive score of the machine learning model;
and an adjusting module 250, configured to, if the composite score is lower than a predetermined threshold, obtain, from a management terminal, parameters of the machine learning model after adjustment, and adjust parameters of the machine learning model until the composite score fed back by each user terminal to the system frame code output by the machine learning model reaches the predetermined threshold.
The implementation processes of the functions and actions of each module in the apparatus are specifically described in the implementation processes of the corresponding steps in the method for generating the system frame code, and are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of the methods of the present disclosure are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
FIG. 3 illustrates a system architecture diagram for generating system framework code according to an example embodiment of the present disclosure. The system architecture includes: user terminal 310, server 320, base component library 330, middleware library 340.
In one embodiment, the base component library 330 and the middleware library 340 are updated periodically. After receiving the requirement label combination selected by the user terminal 310 on the predetermined interface, the server 320 inputs the requirement label combination into the machine learning model, so that the machine learning model selects a basic component and a middleware from the basic component library 330 and the middleware library 340 for encapsulation, and generates a corresponding system framework code. Wherein the machine learning model is part of the server 320. The server 320 returns the system framework code to the user terminal 310, obtains the score fed back by the user terminal 310, and further adjusts the machine learning model according to the score, so that the machine learning model can meet the requirements of each user terminal 310 when facing the base component library 330 and the middleware library 340 which are updated regularly.
From the above description of the system architecture, those skilled in the art will readily understand that the system architecture described herein can implement the functions of the respective modules in the apparatus for generating system framework code shown in fig. 2.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 400 according to this embodiment of the invention is described below with reference to fig. 4. The electronic device 400 shown in fig. 4 is only an example and should not bring any limitation to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 4, electronic device 400 is embodied in the form of a general purpose computing device. The components of electronic device 400 may include, but are not limited to: the at least one processing unit 410, the at least one memory unit 420, and a bus 430 that couples various system components including the memory unit 420 and the processing unit 410.
Wherein the storage unit stores program code that is executable by the processing unit 410 to cause the processing unit 410 to perform steps according to various exemplary embodiments of the present invention as described in the above section "exemplary methods" of the present specification. For example, the processing unit 410 may perform step S100 as shown in fig. 1: acquiring a demand label combination selected by each user terminal; step S110: inputting the requirement label combination into a machine learning model, so that the machine learning model encapsulates a basic component and a middleware for generating a system frame code according to the requirement label combination, and further generates a corresponding system frame code; step S120: returning the system framework code output by the machine learning model to each user terminal; step S130: obtaining scores fed back by a preset number of user terminals to the system frame codes, and further determining the comprehensive scores of the machine learning model; step S140: and if the comprehensive score is lower than a preset threshold value, acquiring parameters after the machine learning model is adjusted from a management terminal, and adjusting the parameters of the machine learning model until the comprehensive score fed back by each user terminal to the system frame code output by the machine learning model reaches the preset threshold value.
The storage unit 420 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)4201 and/or a cache memory unit 4202, and may further include a read only memory unit (ROM) 4203.
The storage unit 420 may also include a program/utility 4204 having a set (at least one) of program modules 4205, such program modules 4205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 430 may be any bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 400 may also communicate with one or more external devices 500 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 400, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 400 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interfaces 450. Also, the electronic device 400 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 460. As shown, the network adapter 460 communicates with the other modules of the electronic device 400 over the bus 430. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 5, a program product 600 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a 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.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and 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).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (9)

1. A method of generating system framework code, the method comprising:
acquiring a demand label combination selected by each user terminal;
inputting the requirement label combination into a machine learning model, so that the machine learning model encapsulates a basic component and a middleware for generating a system frame code according to the requirement label combination, and further generates a corresponding system frame code;
returning the system framework code output by the machine learning model to each user terminal;
obtaining scores fed back by a preset number of user terminals to the system frame codes, and further determining the comprehensive scores of the machine learning model;
and if the comprehensive score is lower than a preset threshold value, acquiring parameters after the machine learning model is adjusted from a management terminal, and adjusting the parameters of the machine learning model until the comprehensive score fed back by each user terminal to the system frame code output by the machine learning model reaches the preset threshold value.
2. The method of claim 1, wherein the base component is selected by the machine learning model from a periodically updated base component library, wherein each base component is labeled with an attribute in advance for selection by the machine learning model;
the middleware is selected by the machine learning model from a periodically updated middleware library, wherein each middleware is labeled with an attribute label in advance for selection by the machine learning model.
3. The method of claim 2, wherein periodically updating the base component library comprises:
determining each basic component updated in the current period in the basic component library as a first basic component, and placing the first basic component in a first basic component queue, wherein the first basic component is a basic component which is not used for generating a system frame code with a comprehensive score reaching a preset threshold value;
and determining each basic component except the first basic component in the basic component library as a second basic component, and placing the second basic component in a second basic component queue, wherein the second basic component is the basic component which is used for generating the system framework code with the comprehensive score reaching a preset threshold value.
4. The method of claim 2, wherein the machine learning model encapsulates basic components and middleware used for generating system framework codes according to the requirement label combination, and further generates corresponding system framework codes, comprising:
the machine learning model determines a basic component which accords with the requirement label combination from the basic component library based on the current machine learning model parameters;
the machine learning model determines the middleware which accords with the requirement label combination from the middleware library based on the current machine learning model parameters;
and packaging the basic component and the middleware by the machine learning model to generate a corresponding system frame code.
5. The method of claim 3, wherein the machine learning model determines, based on current machine learning model parameters, a base component from the base component library that meets the requirement label combination, comprising:
selecting a second basic component from the basic component library by the machine learning model based on the current machine learning model parameters;
the machine learning model selects a first basic component matched with the second basic component according to the matching of the attribute labels;
a machine learning model determines the first base component as a base component that conforms to the demand label combination.
6. The method of claim 3, after obtaining scores of a predetermined number of user terminals fed back to the system framework code and determining a composite score of the machine learning model, comprising:
and if the composite score reaches a preset threshold value, removing the selected first basic assembly from the first basic assembly queue and placing the selected first basic assembly in the second basic assembly queue.
7. An apparatus for generating system framework code, comprising:
the first acquisition module is used for acquiring the demand label combination selected by each user terminal;
the input module is used for inputting the requirement label combination into a machine learning model, so that the machine learning model encapsulates a basic component and a middleware which are used for producing a system frame code according to the requirement label combination to generate a corresponding system frame code;
the return module is used for returning the system framework code output by the machine learning model to each user terminal;
the second acquisition module is used for acquiring scores fed back by a preset number of user terminals to the system framework codes so as to determine the comprehensive scores of the machine learning model;
and the adjusting module is used for acquiring parameters after the machine learning model is adjusted from a management end if the comprehensive score is lower than a preset threshold value, and adjusting the parameters of the machine learning model until the comprehensive score fed back by each user terminal to the system frame code output by the machine learning model reaches the preset threshold value.
8. An electronic device that generates system framework code, comprising:
a memory configured to store executable instructions;
a processor configured to execute executable instructions stored in the memory to perform the method of any of claims 1-6.
9. A computer-readable storage medium, characterized in that it stores computer program instructions which, when executed by a computer, cause the computer to perform the method according to any one of claims 1-6.
CN201910822826.9A 2019-09-02 2019-09-02 Method and device for generating system framework code, electronic equipment and storage medium Pending CN110688098A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910822826.9A CN110688098A (en) 2019-09-02 2019-09-02 Method and device for generating system framework code, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910822826.9A CN110688098A (en) 2019-09-02 2019-09-02 Method and device for generating system framework code, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110688098A true CN110688098A (en) 2020-01-14

Family

ID=69107617

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910822826.9A Pending CN110688098A (en) 2019-09-02 2019-09-02 Method and device for generating system framework code, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110688098A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111290785A (en) * 2020-03-06 2020-06-16 北京百度网讯科技有限公司 Method and device for evaluating deep learning framework system compatibility, electronic equipment and storage medium
CN116560631A (en) * 2023-07-12 2023-08-08 百融云创科技股份有限公司 Method and device for generating machine learning model code
CN116893805A (en) * 2023-07-31 2023-10-17 红石阳光(北京)科技股份有限公司 Code generation method meeting customization demand

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111290785A (en) * 2020-03-06 2020-06-16 北京百度网讯科技有限公司 Method and device for evaluating deep learning framework system compatibility, electronic equipment and storage medium
CN111290785B (en) * 2020-03-06 2023-06-06 北京百度网讯科技有限公司 Method, device, electronic equipment and storage medium for evaluating compatibility of deep learning framework system
CN116560631A (en) * 2023-07-12 2023-08-08 百融云创科技股份有限公司 Method and device for generating machine learning model code
CN116560631B (en) * 2023-07-12 2023-10-17 百融云创科技股份有限公司 Method and device for generating machine learning model code
CN116893805A (en) * 2023-07-31 2023-10-17 红石阳光(北京)科技股份有限公司 Code generation method meeting customization demand
CN116893805B (en) * 2023-07-31 2024-03-15 红石阳光(北京)科技股份有限公司 Code generation method meeting customization demand

Similar Documents

Publication Publication Date Title
CN110704518B (en) Business data processing method and device based on Flink engine
US7774404B2 (en) Managing software component versions within a service oriented architecture
CN110688098A (en) Method and device for generating system framework code, electronic equipment and storage medium
US11150896B2 (en) Automated generation of service definitions for message queue application clients
CN113342345A (en) Operator fusion method and device of deep learning framework
US11645122B2 (en) Method, device, and computer program product for managing jobs in processing system
CN114205230B (en) Configuration method, system, medium and electronic equipment of cloud primary network element
US20230139106A1 (en) Conversion method and apparatus for deep learning model, server, and storage medium
CN111045911A (en) Performance test method, performance test device, storage medium and electronic equipment
CN110781180A (en) Data screening method and data screening device
WO2024082853A1 (en) Method and system for application performance optimization in high-performance computing
CN110716763B (en) Automatic optimization method and device for web container, storage medium and electronic equipment
CN113141407B (en) Page resource loading method and device and electronic equipment
CN115757304A (en) Log storage method, device and system, electronic equipment and storage medium
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN110532304B (en) Data processing method and device, computer readable storage medium and electronic device
CN109272180B (en) Cloud manufacturing service implementation method and device and cloud manufacturing service platform
CN113778658A (en) Task allocation method and device, electronic equipment and storage medium
CN110727457A (en) Component management method, device, storage medium and electronic equipment
CN113900734B (en) Application program file configuration method, device, equipment and storage medium
CN114822005B (en) Remote control intention prediction method, device, equipment and medium based on artificial intelligence
CN113688603B (en) Model file processing method and device, storage medium and electronic equipment
CN111680032B (en) Method and device for processing information sending task and electronic equipment
CN114416156A (en) Pod management method and device in container cloud platform and electronic equipment
CN117933334A (en) Model processing method, device, electronic equipment and storage medium

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