CN117289925A - Software modeling method and system based on component technology - Google Patents

Software modeling method and system based on component technology Download PDF

Info

Publication number
CN117289925A
CN117289925A CN202311227522.0A CN202311227522A CN117289925A CN 117289925 A CN117289925 A CN 117289925A CN 202311227522 A CN202311227522 A CN 202311227522A CN 117289925 A CN117289925 A CN 117289925A
Authority
CN
China
Prior art keywords
model
component
result
components
data
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
CN202311227522.0A
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.)
Zhengzhou University
Original Assignee
Zhengzhou University
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 Zhengzhou University filed Critical Zhengzhou University
Priority to CN202311227522.0A priority Critical patent/CN117289925A/en
Publication of CN117289925A publication Critical patent/CN117289925A/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/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3608Software analysis for verifying properties of programs using formal methods, e.g. model checking, abstract interpretation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to the technical field of modeling and simulation parties, in particular to a software modeling method and a system based on a component technology, wherein the method comprises the following steps: selecting components according to a target demand model, wherein the components are derived from a pre-constructed component library; invoking a model integrator, and integrating the components into an initial combined model by using the model integrator; calling a model executor, executing the initial combination model in the model executor, and acquiring an execution result; invoking a model checker, checking the execution result by using the model checker, and obtaining a checking result; and evaluating the validity of the initial combination model according to the test result. According to the invention, components are selected from the component library according to requirements, french combination and semantic detection are carried out on the components, a detection result is obtained, and the effectiveness of the components is analyzed based on the detection result, so that the model development time is shortened while different simulation requirements are met, and the purpose of rapid and flexible modeling is realized.

Description

Software modeling method and system based on component technology
Technical Field
The invention relates to the technical field of modeling and simulation parties, in particular to a software modeling method and system based on a component technology.
Background
Along with the continuous expansion of the complexity and application fields of the simulation system, the traditional simulation modeling method faces the problems of high maintenance cost, poor reusability, weak expansibility, insufficient flexibility and the like. The existing simulation model development modes are independent in development, lack of connection and sharing among the models, lack of loose coupling and standardized interfaces among the functional modules, so that code redundancy multiplexing is poor, and because the traditional simulation model is relatively fixed in architecture and function, flexible expansion and customization cannot be performed, diversified simulation requirements cannot be met, and accordingly the requirements and technical development which are continuously changed are difficult to adapt to, diversified simulation requirements cannot be met, and openness and expansibility are lacking.
The existing simulation modeling method cannot adapt to the requirements and development of a simulation system, so that a software modeling method for improving and improving the component technology is needed, maintainability, reusability, expandability and flexibility of the simulation modeling method are improved, an advanced, efficient and flexible simulation modeling technology is realized, development cost is reduced, code redundancy is reduced, and further development and application of the software modeling method are facilitated.
Disclosure of Invention
Aiming at the inadequacy of the existing method and the requirement of practical application, in order to improve the maintainability, reusability and expandability of the model, the software modeling method of the component technology is further optimized and perfected so as to realize an advanced, efficient and flexible simulation modeling technology. In one aspect, the invention provides a software modeling method based on a component technology, which comprises the following steps: selecting components according to a target demand model, wherein the components are derived from a pre-constructed component library; invoking a model integrator, and integrating the components into an initial combined model by using the model integrator; calling a model executor, executing the initial combination model in the model executor, and acquiring an execution result; invoking a model checker, checking the execution result by using the model checker, and obtaining a checking result; and evaluating the validity of the initial combination model according to the test result. According to the invention, the demand model is analyzed, the proper model component is selected from the existing component library, the component combination model is utilized to construct the composite model, and the feasibility of the combination model is checked, so that the expandability, flexibility and reusability of the component model development method are improved.
Optionally, the selecting a component according to the target demand model includes: setting a component descriptor; selecting a component through the component descriptor; and the component descriptors satisfy the following relationship:
wherein I is l Representing a set of component input data, S P Representing the current state of the component, Δt representing the duration of the component transition, cond n Representing the conversion conditions of the component S t Representing the state of the component after conversion, O l Representing the collection of output data after component conversion. The invention completes the selection of the required components through the component descriptor so as to ensure the feasibility of selecting the components and provide a basis for the subsequent component model.
Optionally, the components are derived from a pre-built component library comprising: pre-constructing a component library, wherein the component library comprises a basic component and a model component; different components of the component library are set to correspond to different indexes respectively. The component library stores basic components and model components, and each component corresponds to a unique index number so as to position, inquire and manage the model.
Optionally, the calling a model integrator, and integrating the components into an initial combined model by using the model integrator includes: and utilizing a model integrator to carry out grammar combination on the components and obtaining an initial combination model. The grammar combination comprises data alignment, and performs constraint detection on the source, the destination, the time, the type and the range of the input and output parameters so as to ensure the feasibility of a combination model.
Optionally, the syntactic combining of the components and obtaining the initial combined model by using a model integrator includes: setting a constraint checking function in the model integrator; inspecting the component using the constraint inspection function and obtaining an inspection result; and carrying out grammar combination on the components according to the checking result. The invention can reduce errors, improve modeling efficiency and enhance reliability of a combined model by restricting feasibility of checking grammar combination through a constraint checking function so as to realize accurate and rapid modeling.
Optionally, said inspecting said component using said constraint inspection function and obtaining an inspection result comprises: setting a first matching condition, a second matching condition and a third matching condition in the constraint checking function; and checking the assembly according to the first matching condition, the second matching condition and the third matching condition and obtaining a checking result. The constraint checking function is provided with different matching conditions, so that on one hand, the efficiency of constraint checking is improved, on the other hand, errors and abnormal conditions of different types or forms can be detected, the reliability and stability of the modeling method are improved, and the error rate of the modeling method is reduced.
Optionally, the calling the model executor, executing the initial combination model in the model executor, and obtaining an execution result includes: the model executor adopts container technology to execute the initial combination model and obtain an execution result. The container technology comprises an isolation technology, can run the combined model in an independent, safe and isolated environment, ensures that the models are not affected each other, and improves the safety and reliability of model management.
Optionally, the calling a model checker, checking the execution result with the model checker, and obtaining a checking result includes: carrying out semantic detection on the execution result by using the model checker and obtaining a semantic detection result; analyzing the interference degree of the initial combination model on other components through the semantic detection result; and obtaining a test result of the initial combination model according to the interference degree. According to the invention, the interference degree of the combined model on other components is analyzed through semantic inspection so as to know the mutual influence degree between different models, and the stability and reliability of the modeling method can be better managed and controlled.
Optionally, the evaluating the validity of the initial combination model according to the test result includes: comparing the test result with a standard result and obtaining a comparison result; and judging the effectiveness of the initial combination model according to the comparison result. The invention compares the test result with the standard result, evaluates the validity of the combined model based on the unified evaluation standard, can more objectively understand the actual performance and the operation effect of the combined model, avoids subjectivity and uncertainty of the evaluation result, and can improve the reliability of the combined model
In a second aspect, to enable efficient execution of a software modeling method based on component technology provided by the present invention, the present invention further provides a software modeling system based on component technology, where the system includes a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is configured to store a computer program, where the computer program includes program instructions, and where the processor is configured to invoke the program instructions to execute the software modeling method based on component technology according to the first aspect of the present invention. The software modeling system based on the component technology has compact structure and stable performance, and can stably execute the software modeling method based on the component technology, thereby improving the overall applicability and practical application capability of the invention.
Drawings
FIG. 1 is a flow chart of a software modeling method based on component technology of the present invention;
FIG. 2 is a schematic diagram of a component library architecture of a software modeling method of the present invention;
FIG. 3 is a schematic diagram of a component connector of the software modeling method of the present invention;
FIG. 4 is a schematic diagram of the construction of an initial combined model of the present invention;
FIG. 5 is a schematic diagram of an initial combined model of the software modeling method of the present invention;
FIG. 6 is a schematic diagram of a container architecture of a software modeling method of the present invention;
FIG. 7 is a system architecture diagram of a software modeling method based on component technology of the present invention.
Detailed Description
Specific embodiments of the invention will be described in detail below, it being noted that the embodiments described herein are for illustration only and are not intended to limit the invention. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one of ordinary skill in the art that: no such specific details are necessary to practice the invention. In other instances, well-known circuits, software, or methods have not been described in detail in order not to obscure the invention.
Throughout the specification, references to "one embodiment," "an embodiment," "one example," or "an example" mean: a particular feature, structure, or characteristic described in connection with the embodiment or example is included within at least one embodiment of the invention. Thus, the appearances of the phrases "in one embodiment," "in an embodiment," "one example," or "an example" in various places throughout this specification are not necessarily all referring to the same embodiment or example. Furthermore, the particular features, structures, or characteristics may be combined in any suitable combination and/or sub-combination in one or more embodiments or examples. Moreover, those of ordinary skill in the art will appreciate that the illustrations provided herein are for illustrative purposes and that the illustrations are not necessarily drawn to scale.
Referring to fig. 1, in order to further improve maintainability, reusability, expandability and flexibility of the component model, reduce modeling development cost and reduce code redundancy, further development and application of the software modeling method and system are realized. The invention provides a software modeling method based on a component technology, which is used for selecting, combining and detecting components based on a component library and model requirements so as to ensure the feasibility of a combined model, thereby meeting different model combination requirements and realizing quick and flexible modeling. The invention provides a software modeling method based on a component technology, which comprises the following steps:
s1, selecting components according to a target demand model, wherein the components are derived from a pre-constructed component library, and the specific implementation contents are as follows:
in the present embodiment, first, the problem to be solved by the software, the functions to be realized, the effects to be expected to be achieved, and the like are clarified. Obtaining user feedback and opinion to further understand the needs and desires of the user, including but not limited to face-to-face communication, questionnaire surveys, interviews, etc. to obtain model needs; the combined model requirements and desires are analyzed and consolidated including, but not limited to, sorting the different types of requirements, extracting primary solutions, and prioritizing.
The component is then selected based on the target demand model. In this embodiment, the selecting a component according to the target demand model further includes: setting a component descriptor; the component descriptor is used for selecting a component of the target demand model.
The above component descriptor refers to a tool or method for describing the characteristics and behavior of a component. Each component has its specific features of functions, attributes, parameters, etc. in the portfolio model, the features of each component are described and expressed by the component descriptors for efficient management and referencing of the components. The component descriptor may be a database, data structure, or data set containing detailed information for describing and recording various attributes and characteristics of the component, including but not limited to the type, scope, source, destination, or specific time interval of input parameters, as well as the function, performance, interface, parameters of the component, etc. On the one hand, the characteristics and behaviors of different components can be more easily known and analyzed through the component descriptors, and better decisions and choices are made when constructing the combined model. On the other hand, the component descriptors can help users identify and solve compatibility problems among components, reduce influence among combined models and improve quality and reliability of the combined models.
The behavior description of the component descriptors can be specifically described by a finite state machine, and the following relations are satisfied:
wherein I is l Representing a set of component input data, S P Representing the current state of the component, Δt representing the duration of the component transition, cond n Representation ofConversion conditions of the component S t Representing the state of the component after conversion, O l Representing the collection of output data after component conversion.
The collection of component input data has an important effect on the selection of components, and in embodiments, suitable components need to be selected according to factors such as the type, size, complexity, source, reliability, storage and management requirements of the data, and the like, so as to achieve the desired functions and improve the quality and reliability of the modeling method.
The current state and the converted state of the components are analyzed to realize the dynamic switching function among the components, avoid repeated rendering of the components, better manage the running period and state conversion of each component, be beneficial to maintaining the state of a component library, realize maintainability and expansibility of the components, and further improve the response speed and experience of the combined model.
According to the conversion duration of the analysis component, the conversion process of the component is analyzed, the conversion process can be monitored in real time based on the analysis component, abnormal conditions of conversion can be found in time, corresponding treatment measures are made, the problem can be solved in a targeted manner through the research of the conversion time, the software performance is optimized, and the user experience is improved.
Further, the application of the component descriptors and analysis of the relevant performance in this embodiment are only an optional condition of this embodiment, and in other or other embodiments, the component selection manner may be adjusted to obtain the best model component.
The components are derived from a pre-built component library, which in this embodiment is pre-built, and includes, but is not limited to, a base component and a model component, and further different components of the component library are set to respectively correspond to different indexes.
The component library stores basic components and model components, wherein the basic components refer to functional components obtained by splitting a general model according to functions, the functional components are bases for forming model components, and the basic components are mainly used for executing specific tasks and are not dependent on the complexity of the model or algorithm; the model component refers to a model component formed by combining a series of subsequent operations, in the embodiment, the base components can be combined according to a certain operation sequence to finally form an advanced component, and the model component is mainly used for solving the complex problem and can relate to the integration and the cooperation of a plurality of base components.
In the embodiment, the component adding modes of the component library mainly include two modes: one way is to manually develop and place them into the component library, and the other way is to place the combined model into the component library. The manual development can develop and adjust the components according to the requirements, and meanwhile, a message developer optimizes and improves the components, so that the components can be better annotated and understood, and the maintainability of codes can be improved; the combination model adds new component types, improves the expansibility of the system, optimizes the type classification standard of the components, simplifies the codes of the client, and makes the maintenance of the components easier. In addition to manual development and composition models, the actual application also comprises a programming interface integration component, a using script or automation tool addition component and a template creation component.
Further, different components of the component library are set to correspond to different indexes respectively. Please refer to fig. 2, in which each base component or model component in the component library corresponds to an index number, and the index number is unique. For example, the basic component A corresponds to the index number A, the model component a corresponds to the index number a, wherein the index number of each component can be used as a unique identifier, so that the components can be conveniently searched, tracked and managed in the system, unnecessary searching and adjusting work is reduced, when the components are updated, modified and replaced, the corresponding components can be quickly positioned by the index number, the maintenance difficulty and cost of the component library are reduced, and the method has a positive effect on improving the management efficiency of the component library.
In an embodiment, the useful information of the component features is extracted through a learning algorithm, wherein the algorithm comprises, but is not limited to, a classifier, a clustering algorithm and a regression algorithm, the useful information of each component is converted into a usable index structure, and a method for determining the index structure comprises, but is not limited to, an index, a forward index and a suffix tree. For different data types and specific application scenes, different feature extraction methods, learning algorithms and index structures can be flexibly selected to obtain better index effects, and the model positioning, query and management are facilitated.
Furthermore, the specific method for constructing the component library in this embodiment is only an optional condition of the present invention, and in other embodiments or some embodiments, the structure of the component library may be adjusted according to the operation situation and the user requirement, which is beneficial to positioning, querying and managing the components.
S2, calling a model integrator, and integrating the components into an initial combined model by using the model integrator, wherein the specific implementation steps and contents are as follows:
in this embodiment, the model integrator is utilized to make grammar combination on the components and obtain an initial combination model, which specifically includes the following steps:
the model integrator is a model fusion technology, and integrates a plurality of training models to improve the performance and generalization capability of the models, and the main function of the model integrator is to complete grammar combination of an initial combination model.
The grammar combination refers to the realizable state of the component combination, mainly solves the connection and communication between the components, reflects the interconnection and loose coupling relation of the components, and mainly checks whether the components meet the additional constraint condition of the input-output interface. In this embodiment, the grammar combination is mainly implemented by data alignment, and since the combination of components involves a series of constraints derived from the input/output interface, including but not limited to the source, destination, time, type and range of input/output parameters, the data alignment is to detect whether the constraints of the parameters between two connected components are satisfied, that is, whether the connectors between the components satisfy the constraints or the detection requirements, so as to implement the execution behavior of the subsequent combination model.
Wherein the connectors are bridges connecting between the components for data transfer between the components. Referring to fig. 3, L represents a connector between components, the connector is specifically formed by a plurality of first-in first-out message queues, the left component ID represents the left side of the connector, i.e. represents the source component, the right component ID represents the right side of the connector, i.e. represents the destination component, and the timestamp is used to record the transfer time of data. The component connector can reduce the mutual influence between component data, improve the data transmission performance and the transmission quality, provide high-speed and high-efficiency data transmission, shorten the data transmission time, improve the data transmission efficiency, ensure the reliability of data transmission, reduce the interruption and faults of data transmission, improve the stability of data transmission, and provide a flexible data transmission mode, thereby being suitable for different transmission protocols and standards and meeting the data transmission requirements of components with different purposes.
In this embodiment, in order to complete the grammar combination of the initial combination model, a constraint checking function is set in the model integrator, and the component is checked by using the constraint checking function and the checking result of the component is obtained; and carrying out grammar combination on the components according to the checking result.
Further, in the embodiment, in order to accurately obtain the inspection result of the constraint inspection function on the component, the matching condition of component inspection is set in the constraint inspection function, and the matching condition includes a first matching condition, a second matching condition and a third matching condition. Wherein the first matching condition refers to checking the data source and destination; the second matching condition refers to a data type check; the third matching condition refers to data range detection. In this embodiment, a plurality of matching conditions are set as a guide for checking, and by setting a plurality of matching conditions, the screened data can more meet specific requirements, so that data errors are reduced, working efficiency is improved, the data purposefulness is further enhanced, and an initial combination model can be obtained rapidly and flexibly.
Based on this, in this embodiment, the connection condition of the connectors between the components is checked according to the first matching condition, the second matching condition and the third matching condition, and the checking result is obtained, which is specifically implemented as follows:
the constraint checking function is called by Data alignment (left, right) to check Data alignment, including but not limited to checking each connector for both left and right components, typically for aligning the Data about the connector, and may also be used to adjust or align the left and right boundaries of the Data.
Where Data alignment refers to a Data preprocessing technique for aligning Data of different Data sets or Data sources, the above technique aims to correspond and match Data features or attributes in different Data sets or Data sources for better utilization of the Data in subsequent Data analysis and model training, including but not limited to Data alignment matching features in different Data sets or Data sources so that the same features in different Data sets or Data sources can be matched, or so that the Data in different Data sets or Data sources have the same scale and dimension, or so that the same time points or events in different Data sets or Data sources can be matched. Based on this, the effect and accuracy of the combined model may be improved, such that the combined model may better utilize data in different data sets or data sources.
Wherein left represents the ID of the component on the left side of the component connector, right represents the ID of the component on the right side of the component connector, that is, the source component and the destination component are connected, the specific inspection is performed on the alignment condition of the data of the components, and the implementation contents are as follows:
referring to fig. 4, based on the initial combination model of the selected component integration, a constraint checking function is used to make a checking determination on the connector of the initial combination model. Checking the data source and the destination of the component connector, and if the data source of the left component is different from the data source of the right component, indicating that the first matching condition is not met, and indicating that the component data fails to be aligned; otherwise, if the source of the left component data is the same as that of the right component data, the first matching condition is met, the successful matching of the component data is indicated, and then the second matching condition is entered for checking.
And secondly, after the first matching condition is met, checking the data type of the component connector. If the types of the component data on the left side and the right side are different, the second matching condition is not met, and the failure of component data alignment is indicated; otherwise, if the types of the component data on the left side and the right side are the same, the component data are proved to be successfully matched if the second matching condition is met, and then the third matching condition is checked.
Thirdly, after the component data simultaneously meet the first matching condition and the second matching condition, finally performing range inspection of the component data, wherein in the embodiment, the data range inspection of the component connector has no fixed judgment criterion, and judgment analysis needs to be performed according to actual requirements, including but not limited to that the parameter range of the left component is smaller than that of the right component, if the judgment criterion is not met, the third matching condition is not met, the failure of component data alignment is indicated, and the component data cannot be successfully integrated into an initial combination model; if the judging criterion is met, the third matching condition is met, the assembly data alignment is successful, the assembly is successfully integrated into an initial combination model, and the next initial combination model execution and checking steps are carried out.
Referring to fig. 5, where Z represents each component of the initial combined model, L represents a connector between the components, and the components are connected to each other by the connector, so as to finally form the required initial combined model.
Furthermore, the method for checking the initial combined model in this embodiment is only an optional condition of this embodiment, and its specific application may be adjusted and optimized according to the actual situation, so as to ensure the integrity and accuracy of the component data, and improve the quality, efficiency and maintainability of the component data processing.
S3, calling a model executor, executing the initial combination model in the model executor, and acquiring an execution result, wherein the specific implementation contents are as follows:
in this embodiment, the model executor executes the initial combined model by adopting a container technology, please refer to fig. 6, each container has its own system, space, network and other components, and finally forms a complete container, where the container technology has a relatively strong isolation, the container can implement multiple isolated container instances on a single physical machine or virtual machine, and the simulation models can run on the same machine without mutual interference, and the container also has the characteristics of rapid deployment and start, so that the component construction, deployment and test simulation scenarios can be rapidly performed.
To run the initial combined model in the container. It is first necessary to create a container image that includes, but is not limited to, all the environments, applications, and dependencies required to execute the model, either using existing container images or building a new image. When the mirror image is constructed, all necessary files such as required software, a system library, a frame, codes and the like are required to be packaged into the mirror image; secondly, constructing a container through the established container mirror image, wherein the method for constructing the container can be finished on a local machine or a cloud platform, and parameters such as network configuration, computing resources, storage volumes and the like are required to be designated for the container when the container is constructed; then, running the container and running the initial combination model, wherein input data is required to be sent to the container when the container is run, and commands for executing the model are designated, and the running comprises, but is not limited to, the mutual matching of a container engine, an operating system and the container; after the container finishes executing the initial combination model, an execution result of the initial combination model is obtained, in the embodiment, the execution result of the initial combination model can be obtained through a standard output or a standard error output stream of the container, or the execution result of the initial combination model can be stored in the container and then transmitted to a local machine or other systems for analysis and processing, and the execution result of the initial combination model is obtained based on the result.
The containerization technology in the embodiment can ensure that the initial combined model runs consistently in different environments and cannot be influenced by external environment changes or other factors, the stability of the running state of the combined model is improved, the containerization technology is easier to expand and contract, deployment and upgrading of application software are realized by creating and deploying new containers, and cross-platform migration of the application software is promoted, so that the working efficiency is improved.
Furthermore, the implementation of the initial combination model by the container technology in this embodiment is only an optional condition of the present invention, and in other embodiments or some embodiments, the operation technology may be replaced according to the operation environment and the user requirement, so as to ensure the accuracy and reliability of the implementation result of the initial combination model.
S4, calling a model checker, checking the execution result by using the model checker, and obtaining a checking result, wherein the specific implementation steps and contents are as follows:
in this embodiment, the semantic detection is performed on the execution result by using a model checker, after the component matching condition of the constraint checking function is checked, the output initial combination model has no grammar combination problem, the simulation is performed on the initial combination model, and whether the combination calculation of the initial combination model has feasibility is checked.
The model executor is an executor based on container technology for executing the built initial combined model. The implementation of the model executor in this embodiment is in the form of a shell script, and the specific implementation contents are as follows: firstly, starting a model executor, wherein a script sets elements required by an execution environment, including but not limited to variables, defining functions and configuring system resources; secondly, preprocessing the data according to script requirements, including reading the data from a file or a database, cleaning or converting the data and the like; then, executing verification on parameters such as a loading model code, an initialization model and the like of the initial combination model; and finally, obtaining a detection result of the semantic detection of the initial combination model.
In this embodiment, simulation training is performed on the model executor in advance, which includes, but is not limited to, reading training data, executing a training algorithm, updating model parameters, and the like. Collecting, cleaning, preprocessing, dividing and the like training data based on the component data of the component library; the explicit model executor needs to perform semantic detection on the component execution result, and selects a proper model according to the characteristics and the requirements of semantic detection behaviors, wherein the model of the embodiment comprises but is not limited to linear regression, logistic regression, decision trees, support vector machines, naive Bayes and a neural network; inputting training data into a model for simulation training to obtain a simulation training result, and collecting and recording the simulation training result in real time; and analyzing the results of the training model, and optimizing the model executor based on the analysis results of the simulation training to ensure the accuracy of the semantic detection results of the initial combined model.
The model executor can be better adapted to specific data sets and different scenes by simulation training, the performance of the model is improved, model parameters and algorithms can be adjusted according to the actual application requirements and the characteristics of a component library in the embodiment, the model is more accurate and reliable, the model can be further adjusted based on the simulation training effect, the execution effect of the model executor is improved, and the execution performance of the model is improved.
Furthermore, the training method of the model executor in this embodiment is only an optional condition of the present invention, and in other embodiments or some embodiments, the execution model may be specifically adjusted according to the content of the solution problem, so as to ensure the accuracy and effectiveness of the semantic detection result.
The interference degree of the initial combination model on other components is analyzed through the semantic detection result, and the implementation contents are as follows:
based on each component of the initial combination model, including but not limited to hardware, software and data of each component, interaction relations among the components, such as data flow, information flow, control flow and the like, are analyzed, then according to semantic detection results of the initial combination model, whether problems of data format mismatch, incomplete data or inconsistent data exist or not is analyzed according to semantic conflict conditions among the components, and finally the interference degree of the initial combination model on other components is determined according to the problems of data format mismatch, incomplete data, inconsistent data and the like.
And obtaining a test result of the initial combination model according to the interference degree. The data format mismatch can affect the correctness and reliability of the data, so that data processing tasks such as data analysis, data mining, machine learning and the like cannot output correct results, and when data processing is performed, whether the data format is matched or not needs to be checked, and if the data format is not matched, data cleaning and format conversion need to be performed; incomplete data can cause inaccurate and incomplete model training, thereby influencing the final analysis result and decision, and when data processing is performed, whether the data is complete needs to be checked, and if the data is missing, the data is required to be supplemented and perfected; the data inconsistency can damage the isolation of the system, and the concurrency result is caused, namely, one execution operation can output the execution result of another group of actions, so that the data result is disordered or misplaced, when the data processing is carried out, whether the data are consistent needs to be checked, if the database data are changed, the database data need to be updated in time to ensure the consistency, and the method can also be realized by executing the database checking or changing the database structure.
Furthermore, in this embodiment, the deep analysis of the semantic detection result is beneficial for the model checker to analyze and process the component data, so as to improve the performance of the component model and the feasibility of the software modeling method, and in other or some embodiments, the component model can be detected and analyzed together with the user according to the demand model, so as to ensure the feasibility and accuracy of the software modeling method.
S5, evaluating the effectiveness of the combined model according to the test result, wherein the concrete implementation contents are as follows:
in the embodiment, the test result is compared with a standard result and a comparison result is obtained; and judging the effectiveness of the initial combination model according to the comparison result.
Because the modeling simulation application fields are different, the data indexes of the initial combined model test results are different, each combined model has specific targets and purposes, for example, the test key point of the prediction model is the precision of the prediction result, the test core of the optimization model is the speed of finding the optimal solution, when the standard reference result is selected and the data indexes are formulated, the characteristics of the combined model to be solved, the complexity of the combined model, the quality of the combined data and other factors are considered, and the factors influence the output result of the combined model to a certain extent, so the data indexes of the combined model test results are set according to the targets and the purposes of the combined model.
According to requirements and application scenes in different fields, proper inspection data indexes are selected, so that the performance and effect of the combined model can be evaluated more accurately, and further, specific problems can be solved better; the quality and the reliability of the combined data can be known, the data processing method of the combined model can be better controlled and adjusted, and the processing effect of the combined model is improved; the decision process and the expected effect of the combined model can be known, the interpretability, the transparency, the robustness and other performances of the combined model are improved, and the application of the combined model and the solution of the practical problem are facilitated
Comparing the test result with the standard result, wherein the specific implementation content is as follows: in model verification, an allowable error range may be set to accept the difference between the results of the initial combined model and the standard results. Including but not limited to specifying that the error rate between the test result and the standard result is less than 5%, the combined model is effective. In this embodiment, the JSON format files corresponding to the verification result and the standard result are read respectively, the error of the result corresponding to each field of the initial combination model is calculated, the error is output according to the JSON format file, if the error of the output result and the standard result is smaller than or equal to the allowable error range, the verification is passed, and the initial combination model has validity at this time; if the error is greater than the allowable error range, the verification is not passed, and the initial combination model is not effective at this time, so that the problem cannot be solved.
In this embodiment, the combined model is generally composed of a plurality of single components, each component can have errors and deviations of motion, and an allowable error range is set to be acceptable and process the errors and deviations, so that the combined model is more robust, the error range can give the model more flexibility, when a certain component has poor performance, the combined model can automatically adjust strategies, the utilization rate of the problem components is reduced, the performance of the whole combined model is further ensured, the problem of overfitting of the combined model can be reduced, the robustness of the model is improved, the combined model can be better adapted to new data distribution, and the robustness, flexibility, robustness, interpretability, self-adaptability and the like of the combined model are further improved.
Furthermore, the method for checking and comparing the combined model in the embodiment is beneficial to improving the robustness, flexibility and robustness of the combined model, and in other or some embodiments, the method for checking the combined model can be adjusted according to specific implementation requirements, so that different tasks and scenes can be better adapted, the overall performance of the combined model is ensured, and the practical application of the software modeling method is further ensured.
Referring to fig. 7, in an alternative embodiment, to be able to efficiently execute the software modeling method based on the component technology provided by the present invention, the present invention further provides a software modeling system based on the component technology, where the system includes a processor, an input device, an output device, and a memory, where the processor, the input device, the output device, and the memory are connected to each other, where the memory is configured to store a computer program, where the computer program includes program instructions, where the processor is configured to invoke the program instructions to execute the specific steps of the related embodiment of the software modeling method based on the component technology as provided by the present invention. The software modeling system based on the component technology has complete, objective and stable structure, can efficiently execute the software modeling method based on the component technology, and improves the overall applicability and practical application capability of the software modeling system based on the component technology.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention, and are intended to be included within the scope of the appended claims and description.

Claims (10)

1. A software modeling method based on a component technology, comprising the steps of:
selecting components according to a target demand model, wherein the components are derived from a pre-constructed component library;
invoking a model integrator, and integrating the components into an initial combined model by using the model integrator;
calling a model executor, executing the initial combination model in the model executor, and acquiring an execution result;
invoking a model checker, checking the execution result by using the model checker, and obtaining a checking result;
and evaluating the validity of the initial combination model according to the test result.
2. The component technology-based software modeling method of claim 1, wherein the selecting the component according to the target demand model comprises:
setting a component descriptor;
selecting a component through the component descriptor;
and the component descriptors satisfy the following relationship:
wherein I is l Representing a set of component input data, S P Representing the current state of the component, Δt representing the duration of the component transition, cond n Representing the conversion conditions of the component S t Representing the state of the component after conversion, O l Representing the collection of output data after component conversion.
3. The component technology-based software modeling method of claim 1, wherein the component is derived from a pre-built component library comprising:
pre-constructing a component library, wherein the component library comprises a basic component and a model component;
different components of the component library are set to correspond to different indexes respectively.
4. The component technology-based software modeling method of claim 1, wherein the invoking the model integrator, the integrating the component into an initial combined model with the model integrator comprises:
and utilizing a model integrator to carry out grammar combination on the components and obtaining an initial combination model.
5. The component technology based software modeling method of claim 4, wherein the syntactically combining the components with a model integrator and obtaining an initial combined model comprises:
setting a constraint checking function in the model integrator;
inspecting the component using the constraint inspection function and obtaining an inspection result;
and carrying out grammar combination on the components according to the checking result.
6. The component technology-based software modeling method of claim 5, wherein the inspecting the component using the constraint inspection function and obtaining inspection results comprises:
setting a first matching condition, a second matching condition and a third matching condition in the constraint checking function;
and checking the assembly according to the first matching condition, the second matching condition and the third matching condition and obtaining a checking result.
7. The component technology-based software modeling method of claim 1, wherein the invoking the model executor, executing the initial combined model in the model executor, and obtaining the execution result comprises:
the model executor adopts container technology to execute the initial combination model and obtain an execution result.
8. The component technology-based software modeling method of claim 1, wherein the calling a model checker, checking the execution result with the model checker, and obtaining a check result includes:
carrying out semantic detection on the execution result by using the model checker and obtaining a semantic detection result;
analyzing the interference degree of the initial combination model on other components through the semantic detection result;
and obtaining a test result of the initial combination model according to the interference degree.
9. The component technology-based software modeling method of claim 1, wherein the evaluating the validity of the initial combined model according to the inspection result comprises:
comparing the test result with a standard result and obtaining a comparison result;
and judging the effectiveness of the initial combination model according to the comparison result.
10. A software modeling system based on component technology, characterized in that the system comprises a processor, an input device, an output device and a memory, which are connected to each other, wherein the memory is adapted to store a computer program comprising program instructions, the processor being configured to invoke the program instructions to execute the software modeling method based on component technology according to any of the claims 1-9.
CN202311227522.0A 2023-09-22 2023-09-22 Software modeling method and system based on component technology Pending CN117289925A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311227522.0A CN117289925A (en) 2023-09-22 2023-09-22 Software modeling method and system based on component technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311227522.0A CN117289925A (en) 2023-09-22 2023-09-22 Software modeling method and system based on component technology

Publications (1)

Publication Number Publication Date
CN117289925A true CN117289925A (en) 2023-12-26

Family

ID=89256460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311227522.0A Pending CN117289925A (en) 2023-09-22 2023-09-22 Software modeling method and system based on component technology

Country Status (1)

Country Link
CN (1) CN117289925A (en)

Similar Documents

Publication Publication Date Title
Camargo et al. Automated discovery of business process simulation models from event logs
US10162612B2 (en) Method and apparatus for inventory analysis
US20050160398A1 (en) Method and apparatus for dataflow creation and execution
CN101887365B (en) Method and system for constructing executable code for component-based applications
CN106227654B (en) A kind of test platform
EP2510433B1 (en) Canonicalized versions of reuse candidates in graphical state diagrams
EP3674918A2 (en) Column lineage and metadata propagation
CN101866315B (en) Test method and system of software development tool
CN112416369B (en) Intelligent deployment method oriented to heterogeneous mixed environment
CN114564726A (en) Software vulnerability analysis method and system based on big data office
Sahlabadi et al. Process Mining Discovery Techniques for Software Architecture Lightweight Evaluation Framework.
Dowdeswell et al. TORUS: Tracing complex requirements for large cyber-physical systems
CN116088846A (en) Processing method, related device and equipment for continuous integrated code format
Krummacker et al. Digital Twin Development: Mathematical Modeling
CN112559525A (en) Data checking system, method, device and server
US20230153081A1 (en) Methods and systems for correlating source code commitments and model result records during model development
CN116467219A (en) Test processing method and device
CN117289925A (en) Software modeling method and system based on component technology
Rongrong et al. A method for identifying and recommending reconstructed clones
You Multi-channel data flow software fault detection for social internet of things with system assurance concerns
Kerzel et al. Towards Tracking Provenance from Machine Learning Notebooks.
Schmidts et al. Continuously evaluated research projects in collaborative decoupled environments
US20220207416A1 (en) System and method of providing correction assistance on machine learning workflow predictions
Fraternali et al. Almost rerere: An approach for automating conflict resolution from similar resolved conflicts
US20240134777A1 (en) Graphical Neural Network for Error Identification

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