Model-based cross-organizational cross-hierarchical system modeling and optimization method

By combining natural language processing and large-scale language models with SysML, the layout of electromechanical control system units is automatically optimized, solving the problem of unit isolation in cross-organizational and cross-level system modeling and improving modeling efficiency and accuracy.

CN116594304BActive Publication Date: 2026-01-27ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310603951.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-26
Publication Date
2026-01-27
Estimated Expiration
2043-05-26

AI Technical Summary

Technical Problem

In existing cross-organizational and cross-level system modeling, when modeling domain knowledge, there are too many isolated units that cannot be directly associated with the semantics and features of natural language, resulting in low modeling efficiency and a high risk of errors.

Method used

Using a SysML-based approach, through word segmentation lexicon, word indexing mechanism, word vector similarity distance function, character number distribution index and large-scale natural language model, we automatically optimize the unit arrangement and construct a directed acyclic graph across organizations and levels to realize the semantic and causal relationship association of units.

Benefits of technology

It improves the efficiency of cross-organizational and cross-level system modeling, automatically establishes appropriate unit layouts, reduces potential errors during implementation, and enhances system reusability and semantic relevance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116594304B_ABST
    Figure CN116594304B_ABST
Patent Text Reader

Abstract

The application relates to the field of software engineering design, and proposes a model-based cross-organization and cross-level system modeling and optimization method, which comprises the following steps: modeling an electromechanical control system to obtain modeling based on natural language description and modeling based on domain knowledge, establishing a word segmentation library, and performing word segmentation on each modeled unit; obtaining an effective matching result and a candidate set composed of invalid isolated units, constructing an association body for behavior modeling and corresponding units of structure modeling; respectively further associating domain knowledge keywords based on a large natural language model, enabling the association body and units not participating in the association body to obtain word labels, and then obtaining a global correlation space; further constructing a cause-and-effect question to obtain corpus arranged according to a time line, and then constructing a cross-organization and cross-level directed acyclic graph to automatically display and arrange the optimization of model presentation. The application aims to automatically optimize unit arrangement during system modeling to improve work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software engineering design, specifically to a model-based method for cross-organizational and cross-level system modeling and optimization. Background Technology

[0002] The emergence of SysML has greatly enriched the semantic expression capabilities of systems engineering and modeling. Its added requirement modeling part makes the management, tracking and analysis of requirements more convenient and reduces the probability of going astray in system design and modeling. The added parameter modeling part and the extended structural modeling part enable the system to incorporate domain-related knowledge, simplify modeling operations and improve the reusability of the system.

[0003] Typically, system modeling platforms support multi-faceted and multi-angle modeling, such as requirement modeling, structural modeling, and parametric modeling. Therefore, when modeling cross-organizational and cross-level systems, it is necessary to span and manage too many units. A method that automatically combines semantics is needed to automatically optimize the arrangement of units to improve modeling efficiency and reduce the risk of errors during implementation. Summary of the Invention

[0004] This invention provides a model-based method for cross-organizational and cross-level system modeling and optimization to address the problem that existing domain knowledge modeling methods result in too many isolated and interconnected units across organizations and levels, making it impossible to directly link them with the semantics and features of natural language in requirements modeling. The specific technical solution adopted is as follows:

[0005] One embodiment of the present invention provides a model-based method for modeling and optimizing cross-organizational and cross-hierarchical systems, the method comprising the following steps:

[0006] Modeling of electromechanical control systems yields models based on natural language description and models based on domain knowledge. A word segmentation lexicon is established, and each modeled unit is segmented into words, with a word indexing mechanism constructed.

[0007] The similarity distance function between word vectors in different models is obtained based on the word indexing mechanism. The character number distribution index is obtained based on the number of characters in each unit of each organization or level. The pairwise matching distance is obtained based on the similarity distance function and the character number distribution index. The effective matching results are obtained through minimum distance matching. Invalid matches are included as isolated units in the candidate set. The metric function is constructed based on the effective matching results and the candidate set to obtain the cross-organization and cross-level associations.

[0008] Based on a large-scale natural language model, domain knowledge keywords are associated, and the associative body and units not involved in the associative body are given word labels. The global association space is obtained through the word labels.

[0009] By constructing causal questions based on the global relational space, we obtain corpora arranged according to timeline, and then construct a directed acyclic graph across organizations and levels, automatically optimizing the display layout of the model.

[0010] Optionally, the specific method for obtaining the similarity distance function between word vectors of different models based on the word indexing mechanism includes:

[0011] F1(Obj a Obj b ) = (1 + Word) IoU (Obj a Obj b )) -1

[0012] Where F1 is the similarity metric function, Obj a Obj b For any two units, Word IoU It is the intersection-union ratio between a set of word indices of one unit and a set of word indices of another unit.

[0013] Optionally, the specific method for obtaining the character number distribution index based on the number of characters in each unit of each organization or level includes:

[0014] The ratio of the minimum to the median number of characters in each unit of an organization or hierarchy is calculated, and a ratio less than 1 is obtained as an indicator of the character distribution in each unit.

[0015] Optionally, the specific method for obtaining the pairwise matching distance includes:

[0016]

[0017] Where F is the pairwise matching distance, F1 is the similarity metric function, and Obj a Obj b For any two units, V a and V b V refers to the character distribution index of the organization or level to which a and b belong; a and b refer to the indexes of each unit.

[0018] Optionally, the specific method for constructing the metric function based on the valid matching results and the candidate set includes:

[0019] F2(a,b) = XOR Word IoU (Obj a Obj b )

[0020] Where F2 is the metric function, XOR Word IoUIt is an XOR mechanism, Obj a Obj b For any two units, Word IoU The intersection-union ratio (IUU) is the ratio of the number of word indices in one unit to the number of word indices in another unit.

[0021] The XOR mechanism is that if Obj... a Obj b One method is to remove the matched parts of the words in one side of the associative body, leaving the words that differ in the associative body, which are used as words for calculating the intersection-union ratio between the words and the words in the candidate set C.

[0022] Optionally, the specific method for obtaining the global association space through word tags includes:

[0023] The spatial distance between an associative word and other associative words is calculated by subtracting the cross-union ratio of their word tags T from 1, as the spatial distance between the two associative words.

[0024] Establish a graph relationship in space based on spatial distance, denoted as the global associative space.

[0025] The beneficial effects of this invention are as follows: Based on SysML, this invention combines natural language processing and large-scale language models to propose an adaptive iterative optimization method for typical electromechanical control systems. By analyzing the content of the units in the electromechanical system, it automatically establishes questions and prompts. Then, combined with the natural language description of the requirements modeling, it performs semantic and causal relationship associations on different units across organizations and levels that contain domain knowledge. Finally, it uses DAG (Directed Acyclic Graph) to determine the arrangement relationships in the organization or level, thereby finding suitable arrangement positions for each unassociated unit across organizations and levels and pre-establishing edge relationships, thus improving the efficiency of large-scale system modeling. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 A schematic diagram of a model-based cross-organizational and cross-hierarchical system modeling and optimization method provided in an embodiment of the present invention;

[0028] Figure 2 A diagram illustrating the modeling of requirements and use cases;

[0029] Figure 3 A schematic diagram for domain modeling;

[0030] Figure 4 A schematic diagram for modeling domain knowledge;

[0031] Figure 5 This is a schematic diagram of the associated corpus A1;

[0032] Figure 6 This is a schematic diagram of corpus A2 arranged according to the timeline. Detailed Implementation

[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0034] Please see Figure 1 The diagram illustrates a flowchart of a model-based cross-organizational and cross-hierarchical system modeling and optimization method provided by an embodiment of the present invention. The method includes the following steps:

[0035] Step S001: Model the electromechanical control system to obtain modeling based on natural language description and modeling based on domain knowledge, establish a word segmentation lexicon, and perform word segmentation for each modeled unit.

[0036] For the electromechanical system described above, this embodiment takes the inverted pendulum system as an example. The overall system modeling is carried out based on natural language description and domain knowledge, respectively. The complete natural language description modeling and several unrelated units under various organizations or levels in the domain knowledge are constructed to obtain a cross-organization and cross-level prototype.

[0037] In this embodiment, the typicality of the inverted pendulum system lies in the fact that it consists of two systems: a mechanical subsystem and a control subsystem. The two systems feed back to each other in a cyclical manner, simply and plainly expressing the process of a control system. Therefore, implementers can use this paradigm to model systems in other fields or scenarios. In this embodiment, the inverted pendulum system is used as an example only to illustrate the necessary elements of system modeling.

[0038] In this embodiment, system modeling is first performed across organizations and levels based on SysML. The first type is modeling based on natural language description, specifically requirement and use case modeling. The others are modeling based on domain knowledge, specifically including structural modeling, such as physical quantities and dimensions, input-output relationships; and parametric modeling, i.e., formulas and algorithms, as well as other levels of modeling. Among them, requirement and use case modeling is a modeling process that uses SysML modeling methods and text as the presentation method to conceptually describe the system prototype in natural language. Structural modeling and parametric modeling are system modeling based on domain knowledge.

[0039] In this embodiment, the inverted pendulum is used to demonstrate cross-organizational and cross-level modeling. Implementers can perform requirement and use case modeling based on natural language description and several types of modeling based on domain knowledge, according to specific tasks and needs. In this embodiment, the necessary and several types of modeling based on domain knowledge include physical quantity modeling, including at least structural modeling and parameter modeling. It should be noted that for the several types of modeling based on domain knowledge, the specific content and modeling perspective are uncertain, but the connotation of domain knowledge is certain, namely physics and control theory. Therefore, the several types of modeling based on domain knowledge are all established around determinable theories and principles.

[0040] Specifically, implementers construct complete requirements and use case models. The specific requirement is that the model must be a tree model. Please refer to [link / reference]. Figure 2 It should be noted that this embodiment... Figure 2 The provided diagram is based on UML. Figure 2 The characters and shapes shown are well-known concepts defined in UML, and will not be described further in this embodiment. Figure 2 The specific meanings are for illustrative purposes only. The establishment of the tree model to which the requirements and use case modeling belongs is to provide content for human-oriented communication, which is a well-known technology in the field and will not be elaborated upon in this embodiment. The purpose of requirements and use case modeling is to show the role of each system component, rather than to elaborate on specific and unique technical means. Specifically, the tree model describes the purpose and effect of the model at the root node. Since it is an electromechanical automatic control system, the next level should extend to the influencing factors and results brought about by each disturbance, or directly describe the role of each subsystem within the system. It should be noted that the implementer only needs to fill in the content that is normally readable and understandable by humans according to the progressive and subdivided approach, and directly describe the various components of the system hierarchically according to the causal relationship or the role of the system. The complete requirements and use case modeling refers to the modeling relationships and statements that the implementer can provide with a normal level of detail. The implementer does not need to make too much linguistic description of domain knowledge.

[0041] Furthermore, implementers model content from different perspectives based on domain knowledge; please refer to [link / reference]. Figure 3 It should be noted that this embodiment... Figure 3 The provided diagram is based on UML. Figure 3 The characters and shapes shown are well-known concepts defined in UML, and will not be described further in this embodiment. Figure 3 The specific meanings are for illustrative purposes only. For modeling content from different perspectives, from the perspective of electromechanical automatic control, the necessary perspectives are: structural modeling and parametric modeling. Other extended perspectives will not be elaborated upon in this embodiment. To build the model, the implementer needs to connect each unit through lines during the later system modeling process, thereby representing the interaction between each unit and other units. In the initial modeling stage, hastily connecting units while listing them may lead to chaotic layout and arrangement of diagrams later. Therefore, in the modeling process of this embodiment, since the tree model to which the requirements and use cases belong, as well as the semantics of the units, will be automatically combined later, only the units need to be listed, without connecting them. The modeling process is based on SysML. Generally, a unit corresponds to a closed area on the diagram, such as a box, or has other shapes or patterns. For structural modeling, the implementer needs to list the physical quantities in detail. For example, in an inverted pendulum system, the length of the rod, the mass of the center of mass model, the angular velocity of the pendulum, etc., all need to be described in the units. The core idea is similar to variable declaration in a program, but the units of the physical quantities also need to be described in each unit, just like variable name-variable type.

[0042] Furthermore, for other levels, since they all belong to domain knowledge, the connotations represented by each unit are elements constituting the model. Implementers only need to describe and define them in a way that conforms to conventional practices. For example, in the parameter modeling of this embodiment, please refer to [link to relevant documentation]. Figure 4 It shows the parameter modeling unit of this embodiment:

[0043] It should be noted that this embodiment Figure 4 The provided diagram is based on UML. Figure 4 The characters and shapes shown are well-known concepts defined in UML, and will not be described further in this embodiment. Figure 4 The specific meaning is for illustrative purposes only.

[0044] Parametric modeling requires combining the system's principles and related theories, such as fundamental physics, classical control theory, and modern control theory, to construct the model based on domain knowledge. For example, in an inverted pendulum system, the necessary units for parametric modeling include:

[0045] (1) PID gain unit, such as FeedbackGainEqn, including K value, input value and observation value, etc.;

[0046] (2) PID differential unit, such as TimeDifferentEqn, which includes the difference in time value and time length, etc.

[0047] (3) Displacement calculation unit, such as Linear Displacement, including displacement length, velocity and pendulum rod length, etc.

[0048] (4) Digital conversion unit, such as Count2Rad (encoder counting angle), including count value and radian value, etc.;

[0049] (5) Markov process units, such as Multiplex (state transition calculation), such as observations, displacement length, radians, velocity and rotation speed.

[0050] Since the inverted pendulum system is a classic research object in the field of automatic control, including most of the commonly used and necessary elements of automatic control and electromechanical systems, those skilled in the art are extremely familiar with the mechanical and control principles of the inverted pendulum. This embodiment will not elaborate on the unit establishment process of parameter modeling. The core idea of ​​the process is to list the various analytical expressions in the system. In the process of unit establishment, it is also necessary to describe the name and symbol of each parameter in the form of fields. In SysML technology, the technique of implementing each unit and adding necessary attribute fields to the unit has been around for a long time. The specific implementation methods are diverse and well known. This embodiment will not elaborate on them.

[0051] At this point, the implementer has completed the initial modeling of the inverted cross-organizational and cross-level system. Due to space limitations, this embodiment only performs structural and parametric modeling on the inverted system to obtain the various units in these two organizations or levels. Among them, apart from the units of requirement and use case modeling being completely and correctly associated, the remaining domain knowledge-related units are merely exhaustively listed without being associated or modeled. The implementer should know that domain knowledge-related units can be further exhaustively constructed from different perspectives according to a certain organization or level. This embodiment only performs structural and parametric modeling.

[0052] Furthermore, a dedicated word segmentation lexicon is constructed for domain knowledge. This lexicon is a set of words for word segmentation, specifically built based on domain knowledge and the modeling industry. It may include commonly used words. Implementers do not need to construct a very detailed word set; they only need to construct word sets for the most critical keywords in the modeling process. In this embodiment, the keywords for domain knowledge are mainly physical quantities, dimensions, and some nouns. For example, in the case of an inverted pendulum, the speed and angular velocity of the pendulum need to be observed; therefore, a dedicated word set is constructed for speed and angular velocity. For example, in terms of speed, besides speed, there are words like velocity; therefore, the name in the velocityEqn unit is divided into velocity and Eqn. And in terms of angular velocity, besides angular velocity, there are words like angular and rad; therefore, count2rad is divided into count and rad.

[0053] This embodiment designs a general-to-specific relationship for the word segmentation lexicon, called a word indexing mechanism. The difference from a regular word segmentation lexicon is that it constructs the same word index for synonyms such as "speed" and "velocity." Each word index is divided into multiple words, so after word segmentation, the segmented texts are different, but because they are synonyms, the word indexes are the same. It should be noted that an index that uses words or phrases with retrieval significance in the main text of a document as headings and is arranged alphabetically is called a term index. Its characteristic is that, except for articles and a few words without retrieval significance in the main text, almost every word is indexed; it is essentially a keyword index. Based on the construction of a set of words based on domain knowledge, some units can be linked by words across organizations and levels.

[0054] Step S002: Obtain valid matching results and a candidate set consisting of invalid and isolated units, and construct an association body for behavioral modeling and its corresponding units with structural modeling.

[0055] It should be noted that this embodiment is based on natural language processing technology, which measures the features of words and word distribution in the text of requirement and use case modeling, as well as in structural modeling, behavioral modeling, and parameter modeling, and automatically constructs keyword matching relationships based on the KM algorithm.

[0056] Specifically, the KM algorithm is used to construct a word similarity metric between different models, and to perform pairwise matching across organizations and levels between different units. This searches for as many corresponding relationships between units as possible caused by words, serving as seed information S for generating a global association space. S is a matching result of the KM algorithm, and the specific matching method is as follows:

[0057] (1) First, establish the similarity distance measurement function F1 of word vectors; the word indexing mechanism of the word segmentation lexicon has been explained in step S001. A unit can contain multiple word indexes or one word index. For units without word indexes, the distance between this unit and any other unit is considered to be NaN.

[0058] F1(Obj a Obj b ) = (1 + Word) IoU (Obj a Obj b )) -1

[0059] Among them Obj a Obj b For any two units, Word IoU The intersection-union ratio is the ratio of the number of intersections of word indices in one unit to the number of unions of word indices in another unit.

[0060] (2) Then, establish a measurement pattern for the modeling distribution differences; since the distribution and meaning of different words in different units are different, the number of units in different organizations or levels may vary greatly. Since it is a system modeling, the word meaning distribution can represent the information distribution of all units in this organization or level. Therefore, a distribution feature is constructed for the level where the unit is located; based on each unit of an organization or level, the number of characters in each unit is first analyzed to obtain the character number distribution index V. The specific method is as follows:

[0061] 1) The character quantity refers to the number of text characters. By statistically analyzing the ratio of the minimum to the median number of characters in each unit of an organization or hierarchy, a ratio value V less than 1 is obtained. This value can represent the difference in information quantity between various units in the entire organization or hierarchy.

[0062] 2) The larger V is, the smaller the difference in information content is considered. In subsequent cross-organization or level matching, the matching result is more likely to be reasonable. Conversely, when V is small, the matching process may be more likely to match units with more characters. Therefore, F1 needs to be corrected to avoid matching units of this organization or level at the beginning, thus affecting the establishment of subsequent space.

[0063] (3) Based on F1 and V, the final pairwise matching distance F can be obtained:

[0064]

[0065] Where V a and V bF refers to the character distribution index V of the organization or level to which a and b belong; a and b refer to the indexes of each unit. If a and b belong to the same organization or level, then F is NaN.

[0066] (4) Based on the F calculated in the above manner, the KM algorithm is used to perform minimum distance allocation; for the results of the matching pair, if F is NaN, it is considered an invalid match; this will produce valid allocation and invalid allocation, and invalid matches are included in the candidate set C as isolated units.

[0067] At this point, the valid matching result is called M1. Valid matching represents an explicit matching relationship. Its purpose is to build a reference matching relationship for the subsequent generation of association space, thereby achieving the effect of preliminary cross-organization and cross-level matching and ensuring that the subsequent space construction results are as correct as possible.

[0068] It should be further noted that, based on the effective matching result M1 obtained above, it only represents the potential association between pairs of levels. In order to obtain the global association space, this embodiment further constructs an associative body for behavioral modeling and its corresponding units with structural modeling by combining the other levels with the matching pairs.

[0069] Specifically, for a matching pair in M1, it can be seen that in the candidate set C, after excluding other units contained in the hierarchy or organization of the matching pair, there are some remaining units. These units have a metric function F2 for the matching pair. Further matching is performed between the candidate set and the set in C that has already formed an association. In the candidate set C, there are the following situations: they can match, but belong to the same organization or hierarchy; they cannot match because F1 is NaN; they can match, but are isolated due to the mechanism of matching pairs. Therefore, a metric function F2 is constructed so that isolated units that belong to the same organization or hierarchy can also form an association.

[0070] Furthermore, the reason for initially using F to avoid matches within the same organization or hierarchy is that, in information and text, directly matching based on F1 can easily lead to matching pairs all belonging to the same organization or hierarchy. Therefore, it is necessary to avoid this situation initially in order to form an association across organizations or hierarchies. To obtain a more complete association, F2 is used as the metric function.

[0071] F2(a,b) = XOR Word IoU (Obj a Obj b )

[0072] Among them, XORWord IoU It is an XOR mechanism, that is, if Obj a Obj bOne approach is to discard the parts of the words that have already been matched in one of the previous associations, leaving only the words that differ in the association. These words are then used to calculate the intersection-union ratio (IUU) with the words of a unit in the candidate set C. The purpose is to ensure the diversity of the associations, thereby avoiding the matching of words like "unit" which could lead to local optima. For example, if an association contains the word "speed," and the unit to be matched contains the word "angular velocity," and if the word "speed" has already been used in a previous association match (i.e., both previous matches contained the word "speed"), then "speed" is considered different from the unit containing "angular velocity." Words are no longer included in the intersection-union ratio calculation, meaning that the word "speed" is considered to not exist in the associative body that the unit to be matched is facing. For intersections that are empty, F2 is NaN. Thus, based on the minimum distance assignment of KM, if F2 is NaN, it is considered an invalid match. The valid matching result obtained at this time is called M2. Specifically, some matching pairs in M1 are combined into triples, while some that cannot be combined are isolated and do not constitute matching pairs, so they are still doubles. The characteristic of M2 is that the number of matching pairs is not reduced compared to M1, and some doubles are merged into triples, which can better reflect the potential associations between organizations and levels.

[0073] At this point, based on the above method, we can obtain an associative body with a maximum of three tuples. The role of the associative body is to associate units between different organizations or levels as much as possible based on a heuristic merging method; it plays a role in combining cross-organizational and cross-level semantics for the subsequent allocation and arrangement of information in each unit. It should be noted that if there are enough organizations or levels, we can also merge four tuples or even higher levels based on M2 and the remaining unmatched candidate set C, according to the minimum distance allocation of the F2 and KM algorithms. However, in this embodiment, there are three organizations and levels, namely requirement and use case modeling, structural modeling, and parameter modeling, so we cannot continue merging and proceed to the next step. Similarly, when the candidate set C is empty, we also cannot merge and proceed to the next step.

[0074] Thus, some associative entities were obtained, and the units of these associative entities are cross-organizational and cross-level.

[0075] Step S003: Based on a large-scale natural language model, further associate the domain knowledge keywords, so that the associative body and the units that do not participate in the associative body can obtain word labels, thereby obtaining the global association space.

[0076] It should be noted that at this point, multiple associative bodies have been constructed based on the explicit textual meaning. These associative bodies are cross-organizational or hierarchical and represent the initial form of the optimization results. However, in the process of cross-organizational and cross-hierarchical modeling, many semantic connections are still lacking. Therefore, based on the text of each unit modeled according to requirements and use cases, a question Q1 is generated for the large-scale natural language question answering model. The word labels T of the associative bodies and the units of the candidate set C can be further updated based on the corpus A1 of the answers.

[0077] Specifically, firstly, corresponding word tags T are established for all associative bodies and units of the candidate set C; for an associative body, the decomposable words of each unit constitute the word tag T of the associative body, and T contains multiple words; for units of the candidate set, since there are no matching words at this time, the word tag T is an empty set.

[0078] It should be further explained that, due to the incompleteness of word labels T and the existence of an empty set, it is necessary to complete word labels T in order to initialize the global association space G.

[0079] Specifically, firstly, a large-scale natural language question-answering model can be used to further inspire keywords for possible relationships. The implementer can use pre-trained large-scale natural language models such as GENQA, GPT2, and GPT3 to train and fine-tune downstream tasks. For example, in this embodiment, the corpus related to pendulum and control theory is used; therefore, the system is trained and fine-tuned for the natural language-related domain of the pendulum system, thereby generating question Q1 and keyword prompts H1 according to the question format, and obtaining the answer corpus A1. Preferably, for advanced large-scale models such as GPT2 and GPT3 with a very large number of parameters, sufficiently accurate results can still be obtained without training and fine-tuning. Taking the GTP3 model davinci003 as an example, the content is input and completed according to the relationship of domain knowledge, based on the text in the requirements and use case modeling. It should be noted that, due to the pre-training of a large amount of corpus, some large natural language models can directly use the form of natural language description to build questions without further fine-tuning based on domain knowledge. It should also be noted that, since natural language models do not have general human cognitive ability, they actually reorganize the tokens in the prediction and are a kind of generative model, which cannot fully guarantee the rigor of logic. This embodiment utilizes this characteristic, and regardless of the correctness of the logic and theory, it can unify the units of domain knowledge and the natural language description of system modeling requirements into a space.

[0080] This embodiment proposes a method based on SysML content, using a modeled tree structure and following a Depth-First Search (DFS) approach to construct question statements and prompts. Specifically, to obtain the expected and accurate results, this embodiment establishes question Q1 and keyword prompt H1 according to the following logic and format, where question Q1 contains keyword prompt H1, in the following format:

[0081] (1) The text of question Q1 is: "System modeling requirements: {the permutation and combination of various units of requirements and use case modeling}.

[0082] What {H1} needs to be considered?

[0083] (2) The arrangement and combination of each unit of the requirement and use case modeling, that is, the content of the first curly brace, is the requirement natural statement in each unit of the requirement and use case modeling. The corpus is arranged according to DFS, that is, depth-first search, and then the obtained statements are separated by semicolons.

[0084] (3) The keyword prompt, i.e. the content of the second curly brace, is the keyword reflected in the domain knowledge modeling, which is related to the domain knowledge and serves as a prompt word; specifically, the prompt word is the superordinate concept of the domain knowledge, and the superordinate concept is as subdivided as possible. Taking this embodiment as an example, the superordinate concept of the modeling content of the unit of domain knowledge is physical quantity, dimension, etc., then the prompt word H1 is: physical quantity, dimension.

[0085] (4) Finally, we arrive at question Q1, which states: "System modeling requirements: The pendulum should be kept upright by the horizontal movement of the cart, even under external disturbances. Users can also modify the feedback coefficients. The pendulum may be affected by external interference. The pendulum system will keep the pendulum upright, and the cart will move horizontally. The pendulum system will keep the pendulum upright, and the angle of the pendulum should be maintained."

[0086] It must be kept within a certain range; users can modify the parameters. What physical quantities and dimensions need to be considered?

[0087] (5) Please refer to Figure 5 The result A1 is shown.

[0088] At this point, based on the obtained result A1 as the associated corpus, specifically, A1 contains several bigram results that can associate "the location of the car" and "meters" together; among them, "the location of the car" can be segmented into a set of keyword bigrams W1 through the previous word segmentation lexicon; the result of word segmentation of W1 obtained here is that "the location of the car" and the corresponding "meters" are decomposed into three results: "car", "location", and "meters".

[0089] Furthermore, based on the keyword tuple set W1, the word tags T contained in the units of the associative body and candidate set C are further matched and expanded. The word tags T of the units in the associative body and candidate set C are made as non-empty and as complete as possible according to the keyword tuple set W1. At the same time, since it is a tuple, as long as a word of a unit or associative body is related to a word in the keyword tuple set W1, the existing word and several corresponding words after word segmentation in the keyword tuple set W1 will be added to T. It should be noted that the previous matching relationship only used the text in the requirement and use case modeling, because the text volume in the units related to domain knowledge modeling is relatively small. For example, based on the question Q1 of the higher-level concept, the corpus result A1 generated by the language model can be used to obtain the meaning and corpus between the text and domain knowledge related to the text in the unit used for bridging requirement and use case modeling. For example, in the associative T, if it previously contained the word "cow", it now also contains "external," "disturbance," and "force." For example, if the label of the unit T was previously empty, and the unit's own words included "meter" and "second," it now also includes "car," "position," "swing," and "angular velocity." It can be clearly seen that the unit is suitable for domain knowledge, and T is enriched. If the unit's own words are "current," etc., which are not in the above corpus, then T is still an empty set.

[0090] Furthermore, a graph relationship is established in the global association space G to obtain the global association space G. First, for the distance between an associative entity and other associative entities, the spatial distance between the two associative entities is calculated by subtracting the value of the intersection-union ratio of their word tags T from 1, according to the calculation method of the intersection-union ratio of the word tags T. The calculation method of the intersection-union ratio is the same as that of F1, except that T contains more words at this time, and it can construct distance relationships between units and associative entities in the domain knowledge.

[0091] Specifically, the distance is:

[0092] (1) For the unit in the associative body and candidate set, calculate the crossover ratio between the word of the unit and the associative body T;

[0093] (2) For associative bodies and associative bodies, calculate the crossover-union ratio between associative bodies T;

[0094] (3) For two units, if both units' T are non-empty, the crossover-union ratio between T can be calculated.

[0095] (4) For units whose T is not empty, the candidate set C is cleared and units whose T is not empty are included in the set. The remaining associations and units can form a global association space G because there is a measurable distance between them.

[0096] Step S004: Further construct causal questions to obtain corpus arranged according to the timeline, and then construct a directed acyclic graph across organizations and levels to automatically optimize the display arrangement of the model.

[0097] Specifically, first, problem Q1 is combined using Depth-First Search (DFS) to remove statements from H2, resulting in a new problem Q2. Then, a keyword hint statement H2 is added to problem Q2. Problem Q1 consists of natural requirement statements from various units of requirement and use case modeling, arranged according to DFS. To preserve contextual information, problem Q2 is a combination of these statements using DFS. The difference lies in the parent node of the two units: "The inverted pendulum system will keep the pendulum pointing upwards" and "The angle of the inverted pendulum remains within a certain range." Q2 then generates two sentences based on DFS: "The inverted pendulum system will keep the pendulum pointing upwards, and the car will move horizontally"; and "The inverted pendulum system will keep the pendulum pointing upwards, and the angle of the inverted pendulum remains within a certain range." The hint statement H2 in problem Q2 is: "Explain the causal relationship in chronological order," or other questions that fit this semantic meaning. Please refer to [link to relevant documentation]. Figure 6 The output A2 shows the result obtained. At this point, the output A2 will contain corpus that conforms to the timeline. For GPT2 or other language models, it may be necessary to divide it into sentences according to periods. At the same time, due to the constraint of the question, each sentence will be expanded according to the timeline. It should be noted that the language model only uses the corpus to regenerate information and does not make strict logical inferences. Because the language model cannot ensure the correctness of the logic and the output has a certain degree of randomness, the subsequent processing methods in this embodiment do not rely on the correctness of the result A2, but rather on the sequential features of the words in the text generated by the language model.

[0098] It should be further explained that a DAG is constructed based on the KM matching results between the associative text and A2, and automatic arrangement optimization is performed for cross-organizational and cross-level system modeling. At this time, each sentence of the output result A2 of the large natural language question answering model is regarded as a step, and in the corresponding keyword W2, the associative text is roughly arranged in chronological order.

[0099] Specifically, based on the word segmentation results of each short sentence, the KM allocation is first performed on the associative bodies in the global association space G: for an associative body, it has several words in the word tag T, and the word segmentation results of the short sentence also have several words. By calculating the intersection-union ratio of the words, the optimal allocation with the largest intersection-union ratio is performed based on the KM algorithm; thus, the associative bodies are roughly arranged in chronological order.

[0100] Furthermore, the DAGs for each organization or level are constructed row by row from left to right:

[0101] (1) Start with the first line to get the associated text corresponding to the first short sentence;

[0102] (2) Place the corresponding units in the first row of each organization or level in the association of the first short sentence. If multiple units need to be placed in an organization or level, arrange them horizontally from left to right according to the first letter or the first letter of the pinyin.

[0103] (3) Based on the above method, organize the associative body of each short sentence or place the units in the hierarchy. The Nth short sentence corresponds to the Nth row in the organization or hierarchy.

[0104] (4) Place the unit in the global association space G according to the distance between the unit and the association body that is not in the association body; because the distance between a unit and the association body is known in the global association space G, by selecting the closest association body, the unit is placed at the end of the row of the corresponding organization or level; in this way, the unit that does not constitute an association body can be placed on the appropriate row according to the row position of each unit of the association body in the organization or level.

[0105] (5) For cells in the candidate set C, place them directly at the end of the last row of the organization or hierarchy of each cell.

[0106] Furthermore, construct a Directed Acyclic Graph (DAG) for each row of cells within an organization or hierarchy:

[0107] (1) First, for a row in an organization or hierarchy, there are multiple units. Let the unit belonging to the associative body have the word tag T of the associative body, and the units have the word tag T that already exists in the global association space G.

[0108] (2) Find the unit whose word label T can cover the number of words in the word labels T of the other units in the row, and use it as the first node of the first depth in this row;

[0109] (3) Further search for the unit in the row whose word tag T can cover the number of words in the word tags T of the other units in the row. If the unit belongs to the associative body, it is the second node of the first depth in this row, and so on. Otherwise, it is the child node of the second depth.

[0110] (4) For nodes of the second depth, calculate the IoU of each node of the first depth with respect to the word label T, find the first depth node with the largest IoU and use it as its child node. If several first depth nodes have the same IoU as the unit, then according to the definition of DAG, establish an edge for each of them and make them child nodes shared by several first depth nodes.

[0111] (5) A DAG structure is constructed for the cells of a row; for the first node of the first depth in each row, it is connected to the first node of the first depth in the next row to achieve a causal relationship of progressive time sequence.

[0112] At this point, a reasonable arrangement can be constructed, and the edges of the DAG can be pre-generated for each organization or level as the initial relationship for system modeling. It should be noted that SysML's modeling method is unrelated to DAG, i.e., directed acyclic graph. Since the connections between nodes in a DAG are directional, they conform to the causal development relationship in terms of information content and temporal order. Therefore, the result of this optimization is very friendly to human reading and the correction of modeling relationships. This embodiment uses DAG to simultaneously utilize causal relationships and semantic relationships across organizations and levels, so as to progressively arrange the positions of each unit based on the word tag IoU and causal order in the global association space G.

[0113] Thus far, this embodiment incorporates domain-related knowledge and, based on heuristic semantic analysis, automatically optimizes the display layout of the model.

[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A model-based method for cross-organizational and cross-level system modeling and optimization, characterized in that, The method includes the following steps: Modeling of electromechanical control systems yields models based on natural language description and models based on domain knowledge. A word segmentation lexicon is established, and each modeled unit is segmented into words, with a word indexing mechanism constructed. The similarity distance function between word vectors in different models is obtained based on the word indexing mechanism. The character number distribution index is obtained based on the number of characters in each unit of each organization or level. The pairwise matching distance is obtained based on the similarity distance function and the character number distribution index. The effective matching results are obtained through minimum distance matching. Invalid matches are included as isolated units in the candidate set. The metric function is constructed based on the effective matching results and the candidate set to obtain the cross-organization and cross-level associations. Based on a large-scale natural language model, domain knowledge keywords are associated, and the associative body and units not involved in the associative body are given word labels. The global association space is obtained through the word labels. By constructing causal questions based on the global relational space, we obtain corpora arranged according to timeline, and then construct a directed acyclic graph across organizations and levels, automatically optimizing the display layout of the model.

2. The model-based cross-organizational and cross-level system modeling and optimization method according to claim 1, characterized in that, The specific method for obtaining the similarity distance function between word vectors of different models based on the word indexing mechanism is as follows: in, For similarity measurement function, , For any two units, It is the intersection-union ratio between a set of word indices of one unit and a set of word indices of another unit.

3. The model-based cross-organizational and cross-level system modeling and optimization method according to claim 1, characterized in that, The specific method for obtaining the character number distribution index based on the number of characters in each unit of each organization or level includes: The ratio of the minimum to the median number of characters in each unit of an organization or hierarchy is calculated, and a ratio less than 1 is obtained as an indicator of the character distribution in each unit.

4. The model-based cross-organizational and cross-level system modeling and optimization method according to claim 1, characterized in that, The specific methods for obtaining pairwise matching distances are as follows: in, The pairwise matching distance, For similarity measurement function, , For any two units, and V refers to the character distribution index of the organization or level to which a and b belong; a and b refer to the indexes of each unit.

5. The model-based cross-organizational and cross-level system modeling and optimization method according to claim 1, characterized in that, The specific method for constructing the metric function based on the valid matching results and the candidate set is as follows: in, For the metric function, It is an XOR mechanism. , For any two units, The intersection-union ratio (IUU) is the ratio of the number of word indices in one unit to the number of word indices in another unit. The XOR mechanism is that if... , One method is to remove the matched parts of the words in one side of the associative body, leaving the words that differ in the associative body, which are used as words for calculating the intersection-union ratio between the words and the words in the candidate set C.

6. The model-based cross-organizational and cross-level system modeling and optimization method according to claim 1, characterized in that, The specific methods for obtaining the global association space through word tags are as follows: The spatial distance between an associative word and other associative words is calculated by subtracting the cross-union ratio of their word tags T from 1, as the spatial distance between the two associative words. Establish a graph relationship in space based on spatial distance, denoted as the global associative space.

Citation Information

Patent Citations

  • Multidomain complex product system layer behavior modeling method based on SysML

    CN102393635A

  • Index verification technology supporting quantitative evaluation of model attributes

    CN114896755A