CN114627226A - Online modeling method and device - Google Patents

Online modeling method and device Download PDF

Info

Publication number
CN114627226A
CN114627226A CN202210280651.5A CN202210280651A CN114627226A CN 114627226 A CN114627226 A CN 114627226A CN 202210280651 A CN202210280651 A CN 202210280651A CN 114627226 A CN114627226 A CN 114627226A
Authority
CN
China
Prior art keywords
model
modelica
modeling
models
canvas
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
CN202210280651.5A
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.)
Suzhou Tongyuan Software & Control Technology Co ltd
Original Assignee
Suzhou Tongyuan Software & Control Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Tongyuan Software & Control Technology Co ltd filed Critical Suzhou Tongyuan Software & Control Technology Co ltd
Priority to CN202210280651.5A priority Critical patent/CN114627226A/en
Publication of CN114627226A publication Critical patent/CN114627226A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the disclosure discloses an online modeling method, which carries out modeling under a drawing frame mxgraph suitable for a browser environment, wherein each model involved in the modeling process is a modelica model generated based on a modelica language, and the method comprises the following steps: when at least one modelica model is called, presenting the called modelica model to a canvas of a browser page; when detecting that the ports of any two modelica models in the canvas are connected by a connecting line, verifying the connection relationship; and if the verification is successful, establishing a connection relation between modelica models to obtain the target model. The Modelica online modeling technology is realized based on the mxgraph framework, online modeling of a complex business system is realized, and the modeling flexibility and the online modeling applicability are improved.

Description

Online modeling method and device
Technical Field
The disclosure relates to the technical field of data processing, in particular to an online modeling method and device.
Background
An mxgraph is a JavaScript chart library that can quickly create interactive chart applications.
In the related technology, when on-line modeling is performed based on the mxgraph, only some simple graphs can be drawn, or the relationship between the graphs can be reflected, complex modeling cannot be completed, and the function is single.
Disclosure of Invention
The main purpose of the present disclosure is to provide an online modeling method and apparatus.
In order to achieve the above object, according to a first aspect of the present disclosure, there is provided an online modeling method for modeling under a drawing frame mxgraph suitable for a browser environment, where each model involved in the modeling process is a modelica model generated based on a modelica language, including: when at least one modelica model is called, presenting the called modelica model to a canvas of a browser page; when detecting that the ports of any two modelica models in the canvas are connected by a connecting line, verifying the connection relationship; and if the verification is successful, establishing a connection relation between modelica models to obtain the target model.
Optionally, the modelica model is rendered in advance for display in a canvas, including: rendering all objects that make up the modelica model, and rendering the connecting lines of the modelica model.
Optionally, in the process of establishing the target model, after any element used for modeling is adjusted, the original coordinates of the element are converted to obtain the position information of the element in the canvas.
Optionally, the method further comprises: managing states of the target model, and prior to managing, the method comprises: the method comprises the steps of creating object model structures corresponding to various modelica models in advance, wherein the object models comprise model layers, view layers and structures of model view layers; monitoring events of the life cycle of the model in the model view layer; triggering the updating of the view layer on the model layer based on the change of the data; and triggering the updating of the model layer data by the behavior of the view layer view.
Optionally, when it is detected that the ports of any two modelica models in the canvas are connected by a connection line, checking the connection relationship includes: checking the input type and the output type of the port of the connecting line; the input physical data and the output physical data in the two connected modelica models are checked.
Optionally, the method further comprises: and sending the data of the target model to a preset server in a preset format so that the server analyzes the data in the preset format.
Optionally, the method further comprises: when the ports of any two modelica models are connected by a connecting line, monitoring a triggered starting point, a triggered routing point in a routing path and a triggered end point; the shortest connecting line between the two modelica models is determined based on the starting point, the routing point, and the end point.
According to a second aspect of the present disclosure, there is provided an online modeling apparatus for modeling under a drawing frame mxgraph suitable for a browser environment, each model involved in the modeling process
All modelica models generated based on modelica language, the apparatus comprising: the model providing unit is configured to present the called modelica model to a canvas of the browser page when at least one modelica model is called; the connection line verification unit is configured to verify the connection relation when detecting that the ports of any two modelica models in the canvas are connected by the connection line; and the target model establishing unit is configured to establish a connection relation between modelica models to obtain the target model if the verification is successful.
According to a third aspect of the present disclosure, there is provided a computer-readable storage medium storing computer instructions for causing the computer to perform the online modeling method of any one of the first aspects.
According to a fourth aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the online modeling method of any one of the implementations of the first aspect.
According to the online modeling method and device, modeling is performed under a drawing frame mxgraph suitable for a browser environment, all models involved in the modeling process are modelica models generated based on modelica language, and the method comprises the following steps: when at least one modelica model is called, presenting the called modelica model to a canvas of a browser page; when detecting that the ports of any two modelica models in the canvas are connected by a connecting line, verifying the connection relationship; and if the verification is successful, establishing a connection relation between modelica models to obtain the target model. The method realizes Modelica online modeling technology based on an mxgraph framework, realizes online modeling of a complex business system, improves modeling flexibility and applicability, and further solves the problem that only a model composed of simple graphs can be built and complex modeling cannot be performed in related technologies.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of an online modeling method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those skilled in the art, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only some embodiments of the present disclosure, not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the present disclosure may be described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In the present disclosure, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings. These terms are used primarily to better describe the present disclosure and its embodiments, and are not used to limit the indicated devices, elements or components to a particular orientation or to be constructed and operated in a particular orientation.
Moreover, some of the above terms may be used to indicate other meanings besides the orientation or positional relationship, for example, the term "on" may also be used to indicate some kind of attachment or connection relationship in some cases. The specific meaning of these terms in this disclosure can be understood by one of ordinary skill in the art as a matter of context.
Furthermore, the terms "mounted," "disposed," "provided," "connected," and "sleeved" are to be construed broadly. For example, it may be a fixed connection, a removable connection, or a unitary construction; can be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in internal communication between two devices, elements or components. The specific meaning of the above terms in the present disclosure can be understood by those of ordinary skill in the art as appropriate.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
According to the embodiment of the disclosure, an online modeling method is provided, as shown in fig. 1, modeling is performed under a drawing frame mxgraph suitable for a browser environment, and each model involved in the modeling process is a modelica model generated based on a modelica language.
The embodiment is based on mxgraph modeling and thus can be used in any browser without considering browser compatibility problems. Meanwhile, the method is realized by using native JavaScript, does not depend on other libraries or plug-ins, avoids the problems caused by third-party libraries and plug-ins, and is autonomous and controllable. Since the mxgraph is internally provided with rich graph interaction api and tool functions, the embodiment supports various steps in the online modeling process, including but not limited to rendering, moving, scaling, connecting lines, port identification, style attribute modification, storage and the like of the model, by extending and modifying the graph api method provided by the mxgraph, and realizes a model coordinate transformation function by using the design mode of the function thereof. Meanwhile, the modeling of the Modelica model is carried out based on the mxgraph framework, so that the modeling supporting the model ica model is realized, the management of the relationship between the model lica models is supported, and the defect that the modeling based on the mxgraph cannot reflect the relationship between the models and only can draw a simple graph is overcome.
The method comprises the following steps 101 to 102:
step 101: when at least one modelica model is invoked, the invoked modelica model is rendered into a canvas of a browser page.
In this embodiment, a user can call a modelica model in a browser page by means of dragging, and when the page detects that the modelica model is dragged into a canvas, the modelica model can be presented in the canvas, and the modelica model can be a model designed based on different business systems, such as a fuel engine model, an engine model, and the like.
Illustratively, the Mxgraph framework is a graphical framework, and the modelica model uses graphical representations, and apis in the Mxgraph framework can be invoked to control the modelica model.
As an optional implementation manner of this embodiment, the method for rendering the modelica model in advance to display the modelica model in a canvas includes: rendering all objects that make up the modelica model, and rendering the connecting lines of the modelica model.
In this optional implementation manner, the rendering of graphics (including but not limited to rectangles, ellipses, polygons, line segment basic graphics, and the like) composing the target model, the rendering of each component of the Modelica model composing the target model (a single-level component is composed of several parts of model description information, graphics, and ports, and a multi-level component is formed by nesting and combining single-level components), the rendering of ports (ports are interfaces of the Modelica model, and contain port verification information, port graphics information, and port description information) composing the Modelica model of the target model, and the like may be included.
Illustratively, when a graph is rendered, a JSON data structure of the graph is generated based on a preset protocol, traversal analysis is carried out on the data structure, the field of the graph shape is read, drawing is carried out by using a shape tag element in svg, and then the style attribute of the graph is read; and setting a style by using a setAttribute method of JavaScript, and finally reading the graphic description information to draw text information by using a text label in svg, so as to finish the rendering of the graphic. Illustratively, analyzing by using an AST (advanced graphics file system) syntax principle, traversing a data structure, reading a shape type field of a graph, drawing by using shape tag elements of rect, ellise, path, polygon, polyline and line in svg, then reading graph coordinate information, starting to set graph position geometric information when related keys of origin, points and extension are read, then reading graph style attribute information, setting by using a settypestyle method of JavaScript when related keys of rotation, lineColor, linemetadata, filepattern, linethockennes, borderPattern and radius are read, and finally reading graph description information, drawing text information by using a text tag in svg when related keys of description are read, thus finishing the rendering of the graph.
When the components are rendered, based on a preset protocol, the Modelica components are regarded as a special JSON structure, the JSON comprises model description information, model graphic information and model input/output port information, the JSON data structure is traversed in sequence, when a first preset key (including but not limited to ident, description and edit related keys) is read, traversal is stopped, text label elements in svg are used for drawing, text content is filled in to complete the rendering of the model description information, the data structure is traversed continuously, when a second preset key (including but not limited to icon, diagram and component related keys) is read, traversal is stopped, then the graphics are drawn by referring to the graphics rendering method, the rendering of the model graphics is completed, the data structure is continued, when a third preset key (including but not limited to visible related keys) is read, traversal is stopped, and then the rendering of the model port is completed by referring to the graphics rendering method, and finishing the traversal to finish the rendering of the component.
Illustratively, when a port is rendered, based on a preset protocol, a port identifier is set for the port, so that the port part in the model can be defined, the port is very flexible and easy to identify, and the port belongs to an assembly, so that after the port is identified, the rendering method for the port is the same as the rendering method for the assembly.
Step 102: when the connection of the ports of any two modelica models in the canvas is detected, the connection relation is checked.
In this embodiment, in the online modeling process, in order to obtain a model with a certain function in a service system (for example, a service system for generator power generation control) through modeling, it is necessary to establish a connection between each of the submodels constituting the final model, and a model with a certain function can be finally obtained by reflecting a relationship between each of the submodels.
In an online environment, one bar can be dragged out from a port of any model in a man-machine interaction mode; connecting lines (including but not limited to orthogonal lines), in turn, connect ports between different models to establish interdependence or data flow direction relationships by which structures between the interior of the models can be expressed.
Further, each modelica model that is called may include ports, and the ports are connected by connecting wires to achieve the relationship between the models. Ports are classified into two types, input and output. The output, i.e. the source of the data stream, may flow to the matching input port. The input, i.e. the target of the data stream, may accept data streams from other model output ports. In the modeling process of the present embodiment, when the mouse slides over the port, an identifier (e.g., a green border or others) for distinguishing the port may be generated around the port.
Furthermore, after the two ports are triggered to be connected, the connection relationship between the two ports can be verified, and if the verification is successful, the connection relationship between the two ports is established; otherwise, the connection line and the connection relation are automatically cancelled.
Through the optional implementation mode, the online rendering of the model is realized.
Step 103: and if the verification is successful, establishing a connection relation between modelica models to obtain the target model.
In this embodiment, only the ports meeting the preset condition can be successfully connected, and the ports include the structure information of the model, so that the ports can be connected only with the ports of the specified type, and unnecessary errors in model translation can be reduced. When the connection line is connected to the target port, a preset check interface provided by the service is called immediately, the information of the source port and the information of the target port are transmitted to the check interface, a check result is obtained, if the check is passed, the two ports can be connected, otherwise, the connection is cancelled.
As an optional implementation manner of this embodiment, when it is detected that ports of any two modelica models in the canvas are connected by a connection line, checking a relationship of the connection includes: checking the input type and the output type of the port of the connecting line; the input physical data and the output physical data in the two connected modelica models are checked.
In this optional implementation manner, it is first selected whether the types of the check ports are matched, and whether the port of the input type is connected with the port of the output type is judged; meanwhile, whether the parameters of the port meet preset conditions can be verified, including but not limited to verifying the physical data of the two ports, so as to verify whether the physical data of the port is data with preset attributes, for example, if the input of the port should be current, and the input after connection is voltage, the connection relationship is wrong.
As an optional implementation manner of this embodiment, in the process of establishing the target model, after any involved element for modeling is adjusted, the original coordinates of the element are converted to obtain the position information of the element in the canvas; and sending the position information of each element to the server.
In this alternative implementation, the elements used for modeling may include modelica models, graphs, wires, etc., and when any one element is adjusted, its original left side may be transformed in order to record its position in the canvas.
Furthermore, the Modelica model coordinates are a plane rectangular coordinate system, the origin is at the center of the coordinate system and is divided into an x axis and a y axis, the model coordinates are divided into positive and negative, the Modelica model is rendered on a browser by using svg, the upper left corner of the svg is the origin of coordinates, namely only the fourth axis is always displayed, so that the coordinates need to be converted when the model is read and stored. In the modeling process, the editing of each step of the position of the model in the canvas needs to be recorded, when the model is read in the process of communicating with a server through a communication service (such as Mols service), the received original coordinates can be converted into the coordinates of svg, each element in the model needs to recalculate the coordinates to ensure that the position of the model in the canvas is accurate, and when the model is stored, the coordinates of svg need to be converted into the original coordinates to ensure that the last saved effect can be viewed after the model is opened again.
As an optional implementation manner of this embodiment, the method further includes: managing states of the target model, and prior to managing, the method comprises: the method comprises the steps of creating object model structures corresponding to various modelica models in advance, wherein the object models comprise model layers, view layers and structures of model view layers; monitoring events of the life cycle of the model in the view layer of the model; triggering the updating of the view layer on the model layer based on the change of the data; and triggering the updating of the model layer data by the behavior of the view layer view.
In this optional implementation manner, the model states, i.e., the model life cycles, respectively include an input life cycle, a created life cycle, a mounted life cycle, an updated life cycle, a saved life cycle, and a destructed life cycle. Different model states support different operations during the modeling process. As shown in the following table:
Figure BDA0003556747760000101
Figure BDA0003556747760000111
in this embodiment, when managing the model state, the mxgraph framework provides three objects, mxgraph model, mxgraph, and mxgraph view, and each object handles different logic. By referring to the design mode and the concept of the model, and combining an actual modeling scene, a model object model can be created, and comprises three main structures of a model, a view and a model-view, event handles of different behaviors are added to the model-view layer, events of different life cycles are monitored, the update of the view layer can be triggered by the change of the data of the model layer, and the update of the data of the model layer can be triggered by the behaviors of the view layer. With such an architecture, the state of the model is managed.
As an optional implementation manner of this embodiment, the method further includes: and sending the data of the target model to a preset server in a preset format so that the server analyzes the data in the preset format.
In this optional implementation manner, the target model finally needs to be stored as a file in a preset format (e.g., mo file), a preset service (e.g., Mols service) is called immediately after each editing action is completed to transmit the information of the model to the server in a json form, and the server parses and generates the mo file for subsequent processing. Meanwhile, an online storage space is further arranged, so that the mo file can be conveniently checked, edited and stored online.
As an optional implementation manner of this embodiment, the method further includes: when the ports of any two modelica models are connected by a connecting line, monitoring a triggered starting point, a triggered routing point in a routing path and a triggered end point; the shortest connecting line between the two modelica models is determined based on the starting point, the routing point, and the end point.
In this optional implementation manner, the connection between the models is implemented in an intelligent connection manner. The intelligent connecting line is developed on the basis of the orthogonal line, so that the intelligent connecting line can automatically bypass barriers and can be drawn by combining mouse clicking, and the intelligent connecting line is convenient and applicable.
The implementation may be as follows: marking the initial position of the connecting line generated by dragging as a starting point, marking the position moved by the mouse or the position clicked by the left button of the mouse as an intermediate routing point, marking the finally determined port position of the connecting line as an end point, and jointly determining the final connecting line by the starting point, the end point and the intermediate routing point. Monitoring a mouse mousecover event and recording the current coordinate of the mouse during connection, immediately recalculating a new shortest middle routing point according to a starting point, the routing point, the current coordinate of the mouse and the coordinates and the size of an obstacle in a canvas if a component or a graph is touched in the moving process of the mouse, enabling the new routing point to surround the obstacle and drawing a line segment immediately; if not, keeping the existing route points unchanged, and drawing the line segment. The modeling method and the modeling system are based on the mxgraph framework, online complex modeling of the modelica model is achieved, modeling client software does not need to be installed, modeling can be conducted at any time as long as a network exists, the efficiency of complex business system modeling is improved, and a foundation is provided for more complex modeling.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
According to an embodiment of the present disclosure, there is also provided an apparatus for implementing the method, where modeling is performed under a drawing frame mxgraph suitable for a browser environment, and each model involved in the modeling process is a modelica model generated based on a modelica language, the apparatus including: the model providing unit is configured to present the called modelica model to a canvas of the browser page when at least one modelica model is called; the connection line verification unit is configured to verify the connection relation when detecting that the ports of any two modelica models in the canvas are connected by the connection line; and the target model establishing unit is configured to establish a connection relation between modelica models to obtain the target model if the verification is successful.
The embodiment of the present disclosure provides an electronic device, as shown in fig. 2, the electronic device includes one or more processors 21 and a memory 22, where one processor 21 is taken as an example in fig. 2.
The controller may further include: an input device 23 and an output device 24.
The processor 21, the memory 22, the input device 23 and the output device 24 may be connected by a bus or other means, which is exemplified in fig. 2.
The processor 21 may be a Central Processing Unit (CPU). The processor 21 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 22, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the control methods in the embodiments of the present disclosure. The processor 21 executes various functional applications of the server and data processing by running non-transitory software programs, instructions and modules stored in the memory 22, i.e. implements the method of the above-described method embodiment.
The memory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of a processing device operated by the server, and the like. Further, the memory 22 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 22 may optionally include memory located remotely from the processor 21, which may be connected to a network connection device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 23 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the processing device of the server. The output device 24 may include a display device such as a display screen.
One or more modules are stored in the memory 22, which when executed by the one or more processors 21 perform the method as shown in fig. 1.
It will be understood by those skilled in the art that all or part of the processes in the methods according to the embodiments described above may be implemented by instructing relevant hardware through a computer program, and the program may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the motor control methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-only memory (ROM), a Random Access Memory (RAM), a flash memory (flash memory), a hard disk (hard disk drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. An online modeling method is characterized in that modeling is performed under a drawing frame mxgraph suitable for a browser environment, each model involved in the modeling process is a modelica model generated based on a modelica language, and the method comprises the following steps:
when at least one modelica model is called, presenting the called modelica model to a canvas of a browser page;
when detecting that the ports of any two modelica models in the canvas are connected by a connecting line, verifying the connection relationship;
and if the verification is successful, establishing a connection relation between modelica models to obtain the target model.
2. The online modeling method of claim 1, further comprising:
modelica models are rendered in advance for display in a canvas, including: rendering all objects that make up the modelica model, and rendering the connecting lines of the modelica model.
3. The online modeling method of claim 1, further comprising:
in the process of establishing the target model, after any element used for modeling is adjusted, the original coordinates of the element are converted to obtain the position information of the element in the canvas.
4. The online modeling method of claim 1, further comprising: managing states of the target model, and prior to managing, the method comprises:
the method comprises the steps of creating object model structures corresponding to various modelica models in advance, wherein the object models comprise model layers, view layers and structures of model view layers;
monitoring events of the life cycle of the model in the model view layer;
updating the view layer is triggered on the basis of the change of the data in the model layer;
and triggering the updating of the model layer data by the behavior of the view layer view.
5. The on-line modeling method of claim 1, wherein when it is detected that any two modelica models in the canvas have their ports connected by a connection line, checking the relationship of the connection comprises:
checking the input type and the output type of the port of the connecting line;
the input physical data and the output physical data in the two connected modelica models are checked.
6. The online modeling method of claim 1, further comprising:
and sending the data of the target model to a preset server in a preset format so that the server analyzes the data in the preset format.
7. The online modeling method of claim 1, further comprising:
when the ports of any two modelica models are connected by a connecting line, monitoring a triggered starting point, a triggered routing point in a routing path and a triggered end point;
the shortest connecting line between the two modelica models is determined based on the starting point, the routing point, and the end point.
8. An online modeling apparatus, wherein modeling is performed under a drawing frame mxgraph suitable for a browser environment, and each model involved in the modeling process is a modelica model generated based on a modelica language, the apparatus comprising:
the model providing unit is configured to present the called modelica model to a canvas of the browser page when at least one modelica model is called;
the connection line verifying unit is configured to verify the connection relation when detecting that the ports of any two modelica models in the canvas are connected by the connection line;
and the target model establishing unit is configured to establish a connection relation between modelica models to obtain the target model if the verification is successful.
9. A computer-readable storage medium, characterized in that it stores computer instructions for causing the computer to execute the online modeling method of any one of claims 1-7.
10. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the online modeling method of any of claims 1-7.
CN202210280651.5A 2022-03-21 2022-03-21 Online modeling method and device Pending CN114627226A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210280651.5A CN114627226A (en) 2022-03-21 2022-03-21 Online modeling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210280651.5A CN114627226A (en) 2022-03-21 2022-03-21 Online modeling method and device

Publications (1)

Publication Number Publication Date
CN114627226A true CN114627226A (en) 2022-06-14

Family

ID=81903535

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210280651.5A Pending CN114627226A (en) 2022-03-21 2022-03-21 Online modeling method and device

Country Status (1)

Country Link
CN (1) CN114627226A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991531A (en) * 2023-09-27 2023-11-03 中汽数据(天津)有限公司 Cloud rendering method, device, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991531A (en) * 2023-09-27 2023-11-03 中汽数据(天津)有限公司 Cloud rendering method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US10372321B2 (en) Recognition of user drawn graphical objects based on detected regions within a coordinate-plane
WO2014117559A1 (en) 3d-rendering method and device for logical window
US10956747B2 (en) Creating sparsely labeled video annotations
US11734939B2 (en) Vision-based cell structure recognition using hierarchical neural networks and cell boundaries to structure clustering
US20160371891A1 (en) Hybrid surfaces for mesh repair
US10691429B2 (en) Converting whiteboard images to personalized wireframes
CN114627226A (en) Online modeling method and device
CN114637939A (en) Online rendering method and device of model
CN113610963B (en) Three-dimensional network topology drawing method, device, computing equipment and storage medium
KR20220027870A (en) Visual programming for deep learning
WO2016000547A1 (en) Method, apparatus and mobile terminal for triggering widget in application
US20210312324A1 (en) Systems and methods for integration of human feedback into machine learning based network management tool
CN116245052A (en) Drawing migration method, device, equipment and storage medium
CN116578293A (en) Service data method, device, equipment and storage medium
CN114564268A (en) Equipment management method and device, electronic equipment and storage medium
US10216752B1 (en) Defining software infrastructure using a picture
CN114238072A (en) HIL requirement design method, HIL requirement design device, computer equipment and storage medium
CN107818002A (en) The management method and device of a kind of Command Line Interface
US10319127B2 (en) Spatial and hierarchical placement of images at runtime
EP4198893A1 (en) Interactive 3d annotation tool with slice interpolation
CN112405623B (en) Robot development method, robot development device, and readable storage medium
US11989509B2 (en) Generative adversarial network implemented digital script modification
TWI699660B (en) Electronic system having physical and virtual resources grouping and topological display technology and operation method thereof
Paz et al. Adaptive reconstruction of implicit surfaces from depth images
CN115131532A (en) Method, apparatus, device and storage medium for generating three-dimensional model

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