Object-based type primitive modeling method and device and electronic equipment
By obtaining object type primitives and generating type primitive models, the problem of fuzzy type relationships in the existing technology is solved, and more accurate primitive modeling and class diagram creation are achieved.
Patent Information
- Application Number
- CN202510468271.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-07-29
AI Technical Summary
In the existing primitive modeling methods, the type relationship definition is fuzzy, resulting in low modeling accuracy, and inaccurate relationship between class diagrams and source code, making it difficult to accurately create class diagrams.
By obtaining object type primitives, determining the classification type, and generating a type primitive model based on the specified structural relationship, including external interfaces and internal structural design, using object-oriented modeling principles, clarifying the responsibilities and functions of types, adopting the multi-implementation principles of polymorphism and single inheritance, allowing subclasses to expand logic and improve modeling accuracy.
It improves the accuracy of element modeling, clearly displays internal and external relationships of types, enhances user understanding ability, and reduces the uncertainty of creating class diagrams.
Smart Images

Figure CN120387205A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of graphic element processing, and in particular, to an object-based type graphic element modeling method, apparatus, and electronic device. Background Art
[0002] Currently, in graphic element modeling, classes in existing technical solutions are usually represented by rectangles containing types, attributes, and methods with dividing lines. The symbols before the attribute / method names indicate the visibility of this attribute / method. In existing modeling methods, the expression method for types is very single. For example, in the class diagram of UML, the UML class diagram shows the static structure of the model, especially the classes existing in the model, the internal structure of the classes, and their relationships with other classes, etc. Multiple types of relationships are defined in the prior art, but in practical applications, the definition of some relationships may still be relatively ambiguous. For example, the boundary between the aggregation and composition relationships may sometimes not be clear enough, which leads to certain uncertainties when creating a class diagram, resulting in a lower accuracy of graphic element modeling. Summary of the Invention
[0003] The purpose of the present invention is to provide an object-based type graphic element modeling method, apparatus, and electronic device to solve the technical problem of relatively low accuracy of graphic element modeling.
[0004] In a first aspect, the present application provides an object-based type graphic element modeling method, and the method includes:
[0005] Obtain the object type graphic element designed corresponding to the graphic element design operation; wherein, the object type graphic element is a graphic element for an object type, and the object type is used to represent the entity or functional data of a thing object;
[0006] Determine the classification type of the object type corresponding to the object type graphic element; wherein, the classification type includes a predefined type, a basic type, and a custom type;
[0007] According to the type external structure association operation for the target object type and in accordance with the specified structure relationship association rule fixed by the system itself, determine the external interface defined for the target object type in the system, and the structure relationship defined between the target object type and other object types except the target object type; wherein, the external interface is used to standardize the behaviors that the target object type must implement;
[0008] According to the type internal structure design operation that conforms to the specified type design rules and is targeted at the target object type, generate a type primitive model of the target object type by using the object type primitives, the classification type, the external interface, and the structural relationship of the target object type; the type primitive model is a primitive model corresponding to the object type with the same attributes as the thing object; the internal structure of the target object type is used to represent the instances, processes, and component members included in the target object type.
[0009] In response to a selection operation on the target type primitive model among multiple type primitive models, combine several target type primitive models to obtain an overall integrated model; the overall integrated model is an integrated model corresponding to the overall object including the thing object.
[0010] In a possible implementation, the operation of generating the type primitive model of the target object type by using the object type primitives, the classification type, the external interface, and the structural relationship according to the type internal structure design operation that conforms to the specified type design rules and is targeted at the target object type includes:
[0011] Display an internal structure design interface for the target object type in the graphical user interface;
[0012] Obtain the type internal structure design operation that conforms to the specified type design rules and acts on the internal structure design interface;
[0013] Determine the instances, processes, and component members included in the target object type according to the type internal structure design operation, and determine the internal structure of the target object type based on the instances, the processes, and the component members;
[0014] Generate a type design view corresponding to the target object type based on the internal structure, the object type primitives, the classification type, the external interface, and the structural relationship of the target object type;
[0015] Display the type design view in the graphical user interface, and generate a type primitive model of the target object type based on the design result of the target object type corresponding to the type design view; in the type design view, all the defined instances, processes, component members, and the association relationship between the instances and the processes of the target object type are shown through the structural relationship; the processes that can be triggered in the type design view do not need to be associated with the instances, or all the associated instances are component members of the target object type.
[0016] In a possible implementation, the type external structure association operation for the target object type determines, according to the specified structure relationship association rule fixed by the system itself, the external interface defined by the target object type in the system and the structure relationship defined between the target object type and other object types other than the target object type, including:
[0017] Display an external structure design interface for the target object type in the graphical user interface;
[0018] Obtain a type external structure association operation that acts on the external structure design interface and conforms to the specified structure relationship association rule fixed by the system itself;
[0019] Determine the external interface defined by the target object type in the system and the structure relationship defined between the target object type and external object types other than the target object type according to the type external structure association operation, and generate and display a type definition view corresponding to the target object type based on the external interface and the structure relationship; wherein, an external association relationship for characterizing the relationship between the target object type and the external object type is shown in the type definition view.
[0020] In a possible implementation, the predefined types corresponding to the type sets of multiple object types include built-in procedures related to sets and length members; the predefined types corresponding to data streams include at least one of the type of data stream, outflow speed, cache size, and cache processing policy; the built-in procedures related to the type set include at least one of array-related built-in procedures, mapping-related built-in procedures, operation-related built-in procedures, and set-related built-in procedures; the predefined types of operators include operation-related built-in procedures; wherein, the operators include at least one of arithmetic operators, comparison operators, logical operators, assignment operators, operators, increment operators, decrement operators, shift operators, bitwise operators, and type operators;
[0021] The instances corresponding to the basic types contain values, and the basic types include any one or more of the following: integers, real numbers, time, dates, booleans, strings, and enums;
[0022] The custom type represents a matching type customized according to user operations, and the custom type is used to configure other object types that need to be associated with the target object type and complete the type binding of the corresponding attributes of the component members.
[0023] In a possible implementation, in the specified type design rule, in the internal structure design view corresponding to the target object type, temporary variables generated during the execution of the process included in the target object type are displayed;
[0024] The type internal structure design operation includes an operation of setting an anchor point for the process and an operation of annotating associated objects.
[0025] In a possible implementation, the specified type design rule includes any one or more of the following:
[0026] The relationship between the component members of the target object type and the process is represented by a relational symbol;
[0027] Data expression events are triggered through the call relationship between the instance and the process;
[0028] For the automatic trigger process of the object type, a connection is made through a call between the built-in instance itself and the process, and the life cycle of the process is determined according to a time parameter or the running time of a subprocess of the process.
[0029] In a possible implementation, the object type primitive corresponds to an attribute panel of the object type;
[0030] The obtaining of the object type primitive designed corresponding to the primitive design operation includes:
[0031] Obtaining an editing operation for the attribute panel;
[0032] Determining the target attribute of the object type according to the attribute field edited corresponding to the editing operation;
[0033] Generating the object type primitive of the object type based on the target attribute and the primitive design operation.
[0034] In a second aspect, the present application provides an object-based type primitive modeling device, including:
[0035] An obtaining module, configured to obtain an object type primitive designed corresponding to a primitive design operation; wherein, the object type primitive is a primitive for an object type, and the object type is used to characterize the entity or functional data of a thing object;
[0036] A first determination module, configured to determine the classification type of the object type corresponding to the object type primitive; wherein, the classification type includes a predefined type, a basic type, and a custom type;
[0037] A second determination module, configured to determine, according to a type external structure association operation for a target object type, an external interface defined for the target object type in the system and a structural relationship defined between the target object type and other object types other than the target object type, in accordance with a specified structural relationship association rule fixed by the system itself; wherein the external interface is used to specify behaviors that the target object type must implement.
[0038] A generation module, configured to generate a type meta-model for the target object type by using the object type meta-elements, the classification type, the external interface, and the structural relationship of the target object type, according to a type internal structure design operation that conforms to a specified type design rule and is for the target object type; the type meta-model is a meta-model corresponding to an object type with the same attributes as the thing object; the internal structure of the target object type is used to represent instances, processes, and component members included in the target object type.
[0039] A combination module, configured to, in response to a selection operation for a target type meta-model among a plurality of the type meta-models, perform combination based on a plurality of the target type meta-models to obtain an overall integrated model; the overall integrated model is an integrated model corresponding to an overall object including the thing object.
[0040] In a third aspect, the present application further provides an electronic device, including a memory and a processor. A computer program that can run on the processor is stored in the memory. When the processor executes the computer program, the method described in the first aspect above is implemented.
[0041] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and run by a processor, the computer-executable instructions cause the processor to run the method described in the first aspect above.
[0042] The present application brings the following beneficial effects:
[0043] An object-based type primitive modeling method, device, and electronic device provided by the present application can obtain the object type primitives designed corresponding to the primitive design operations; wherein, the object type primitives are primitives for object types, and the object types are used to represent the entity or functional data of thing objects; determine the classification type of the object type corresponding to the object type primitives; wherein, the classification type includes predefined types, basic types, and custom types; according to the type external structure association operation for the target object type and in accordance with the specified structure relationship association rules fixed by the system itself, determine the external interface defined for the target object type in the system, and the structure relationship defined between the target object type and other object types other than the target object type; wherein, the external interface is used to standardize the behaviors that the target object type must implement; according to the type internal structure design operation that conforms to the specified type design rules and is for the target object type, use the object type primitives, the classification type, the external interface, and the structure relationship of the target object type to generate the type primitive model of the target object type; the type primitive model is the primitive model corresponding to the object type with the same attributes as the thing object; the internal structure of the target object type is used to represent the instances, processes, and component members included in the target object type; in response to a selection operation for the target type primitive model among multiple type primitive models, combine based on several target type primitive models to obtain an overall integrated model; the overall integrated model is the integrated model corresponding to the overall object including the thing object. In this solution, through the type primitive modeling method expressed in an object-oriented manner, following the basic principles of object orientation, modular design is achieved in the modeling process by constructing clear responsibilities and functional types. In the modeling process, since the type represents the entity or functional abstraction of thing objects (such as any thing like a sheep, a car tire, etc.), by defining and designing the component members and processes of the type in detail, and through the association relationship between instances and processes, the definition of relationships by the type modeling method can be completed. For the constructed type modeling, in the type modeling design process, the polymorphism of the type is fully utilized, and the type modeling principle of single inheritance and multiple implementations is added to the modeling process, allowing subclasses to extend new logics without affecting the parent class. This not only realizes the development of extensions and improves the flexibility of the type modeling method, but also, through various expression methods of object types, can efficiently combine user requirements, accurately abstract types, make the definition and structure of types clearer and more hierarchical, clearly display the internal and external relationships of types, not only improve the user's understanding ability, but also improve the certainty of creating class diagrams, so that the accuracy of primitive modeling is improved, and the technical problem of low accuracy of primitive modeling is solved.
[0044] To make the above objects, features, and advantages of the present application more obvious and understandable, the following provides preferred embodiments in conjunction with the accompanying drawings for detailed description as follows. Brief Description of the Drawings
[0045] In order to more clearly illustrate the specific embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the accompanying drawings required for the description of the specific embodiments or the prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0046] Figure 1 It is a sample diagram of class diagram design in the prior art;
[0047] Figure 2 It is a schematic flowchart of the object-based type primitive modeling method provided by the embodiment of the present application;
[0048] Figure 3 It is a schematic structural diagram of an object-based type primitive modeling device provided by the embodiment of the present application;
[0049] Figure 4 It shows a schematic structural diagram of an electronic device provided by the embodiment of the present application. Detailed Embodiments
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions of the present application in conjunction with the accompanying drawings. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.
[0051] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally further include other unlisted steps or units, or may optionally further include other steps or units inherent to these processes, methods, products, or devices.
[0052] Currently, the existing class diagram design is as Figure 1As shown below, taking the scenario of processing customers' purchases of individual tickets and package tickets as an example: In the existing technical solutions, a class is usually represented by a rectangle containing a type, attributes, and methods, with a dividing line. The symbol before the attribute / method name indicates the visibility of this attribute / method. For example, "+" represents public, and "-" represents private. Multiple relationships between classes are expressed in the class diagram, including generalization (inheritance), implementation, association, aggregation, composition, and dependency, etc. These relationships are represented by different arrows and lines. For example, the inheritance relationship is represented by a solid line with a hollow triangular arrow, and the dependency relationship is represented by a dashed line with an arrow, etc.
[0053] However, the existing class modeling techniques are relatively complex for beginners, and it requires a large amount of time and effort to learn and master them proficiently. Moreover, when modeling, there is a risk of over-modeling or under-modeling, and users cannot configure the class diagram in more detail. Furthermore, although multiple types of relationships are defined in the existing technology, in practical applications, the definitions of some relationships may still be relatively vague. For example, the boundary between the aggregation and composition relationships may sometimes not be clear enough, which may lead to a certain degree of subjectivity and uncertainty when creating a class diagram, resulting in a lower accuracy of graphic element modeling. At the same time, the correspondence between this class diagram and the source code is inaccurate, making it difficult to convert the class diagram to code or update the class diagram according to the code.
[0054] Based on this, the embodiments of the present application provide an object-based graphic element modeling method, apparatus, and electronic device, which can solve the technical problem of relatively low accuracy of graphic element modeling through this method.
[0055] The embodiments of the present invention will be further introduced below with reference to the accompanying drawings.
[0056] Figure 2 It is a schematic flowchart of an object-based graphic element modeling method provided by the embodiments of the present application. As Figure 2 shown, this method includes:
[0057] Step S110, obtaining the object type graphic elements corresponding to the graphic element design operations.
[0058] Among them, the object type graphic element is a graphic element for the object type, and the object type is used to represent the entity or functional data of the thing object. It should be noted that the type in the embodiments of the present application represents the entity or functional abstraction of things (such as, for example, car tires, sheep in the following table, etc.).
[0059] In an alternative embodiment, the object type graphic primitive corresponds to an attribute panel of the object type; obtaining the object type graphic primitive designed corresponding to the graphic primitive design operation includes: obtaining an editing operation for the attribute panel; determining a target attribute of the object type according to the attribute field edited corresponding to the editing operation; and generating an object type graphic primitive of the object type based on the target attribute and the graphic primitive design operation.
[0060] Exemplarily, the type graphic primitive is designed as shown in Table 1 below:
[0061] Table 1 Type Graphic Primitive Information
[0062]
[0063]
[0064] Table 1 shows the style of the type graphic primitive. Taking the legend as an example: the type "sheep" is inherited from the type "animal", which means that the type "sheep" is a subtype of the type "animal", and the type "animal" is the supertype of the type "sheep".
[0065] It should be noted that types cannot be nested, but can be inherited. The inherited type is called the supertype of the inheriting type, and the inheriting type is called the subtype of the inherited type. If a type is inherited from a type and multiple interfaces, then only the first one is displayed, followed by an ellipsis "...", and the modeling tool should provide means to display all the information, such as a non-modal tooltip popping up when the mouse hovers to display all.
[0066] As an example, the attribute fields edited corresponding to the above-mentioned editing operation for the attribute panel are shown in Table 2 below:
[0067] Table 2 Type Attribute Information
[0068]
[0069] Step S120, determining the classification type of the object type corresponding to the object type graphic primitive.
[0070] Among them, the classification type includes predefined types, basic types, and custom types.
[0071] For predefined types, exemplarily, the predefined types corresponding to the type sets of multiple object types include built-in procedures related to sets and length members; the predefined types corresponding to data streams include at least one of the type of the data stream, the outflow speed, the cache size, and the cache processing policy; the built-in procedures related to type sets include at least one of the built-in procedures related to arrays, the built-in procedures related to mappings, the built-in procedures related to operations, and the built-in procedures related to sets; the predefined types of operators include the built-in procedures related to operations; wherein, the operators include at least one of arithmetic operators, comparison operators, logical operators, assignment operators, operators, increment operators, decrement operators, shift operators, bitwise operators, and type operators.
[0072] For example, construct predefined types according to actual requirements, including operators (built-in procedures related to operations), sets (built-in procedures related to sets and length members), streams (the type of the stream, the speed of the stream, the cache size, and the cache processing policy), etc., which can be directly used without definition. In addition, the predefined types of operators include the built-in procedures related to operations.
[0073] On the other hand, the predefined types of sets (sets of types) include built-in procedures related to sets and length members. The predefined types of streams (data streams) include members such as the type of the stream (including units), the outflow speed (including units), the cache size, and the cache processing policy.
[0074] For the above basic types, the instances corresponding to the basic types contain values, and the basic types include any one or more of the following: integers, real numbers, times, dates, booleans, strings, and enums. In practical applications, construct basic types according to actual requirements. The basic types can be directly used without definition, and only the instances of the basic types have values.
[0075] For the above custom types, the custom types represent matching types customized according to user operations. The custom types are used to configure other object types that need to be associated with the target object type and complete the type binding of the corresponding attributes of the component members.
[0076] In practical applications, customize types according to actual requirements, configure other types that need to be associated through the custom types, and complete the type binding of the member attributes. Customize the matching type according to user needs.
[0077] Step S130, according to the type external structure association operation for the target object type, in accordance with the specified structure relationship association rule fixed by the system itself, determine the external interface defined for the target object type in the system and the structure relationship defined between the target object type and other object types other than the target object type.
[0078] Among them, the external interface is used to standardize the behaviors that the target object type must implement. As an optional implementation method, an external structure design interface for the target object type is displayed in the graphical user interface; this step S130 may specifically include the following steps:
[0079] Obtain the type external structure association operation that conforms to the specified structure relationship association rules fixed by the system itself in the external structure design interface; determine the external interface defined by the target object type in the system and the structure relationship defined between the target object type and external object types other than the target object type according to the type external structure association operation, and generate and display a type definition view corresponding to the target object type based on the external interface and the structure relationship; among them, an external association relationship for characterizing the relationship between the target object type and the external object type is displayed in the type definition view.
[0080] For the definition view of the type, the external association of the type reflects the relationship between the type and the external type. The definition of the type represents the external structure of the type and is used to describe and display the view of the overall composition of the type. The external interface of the type in the system and its structure relationship with other types are described and displayed in the definition of the type.
[0081] Step S140, according to the type internal structure design operation that conforms to the specified type design rules and is for the target object type, generate a type primitive model of the target object type by using the object type primitives, classification types, external interfaces, and structure relationships of the target object type.
[0082] Among them, the type primitive model is the primitive model corresponding to the object type with the same attributes as the thing object; the internal structure of the target object type is used to characterize the instances, processes, and component members included in the target object type.
[0083] In an optional implementation method, in the specified type design rules, temporary variables generated during the execution of the process included in the target object type are displayed in the internal structure design view corresponding to the target object type; the type internal structure design operation includes operations for anchoring the process and annotating associated objects. For example, the type design rules include: it is necessary to anchor the process and annotate associated objects, and temporary members can be reflected in the design view of the type.
[0084] In another optional implementation method, the specified type design rules include any one or more of the following: the relationship between the component members and processes of the target object type is represented by relationship symbols, connected through the call relationship between instances and processes, expressed by data, triggered by events; for the automatic trigger process of the object type, it is connected through a call between the built-in instance itself and the process, and the life cycle of the process is determined according to time parameters or the running time of the sub-processes of the process.
[0085] For example, the type design rules also include: the relationship between members and procedures is represented by relationship symbols; the event triggers expressing a, v, and x are directly connected by the call relationship between objects and procedures; for the procedures automatically triggered by the type, calls are used to connect between the built-in object "this object" and the procedures, and the lifecycle of such procedures is determined by time parameters or the running time of sub-procedures.
[0086] As an example, display an internal structure design interface for the target object type in the graphical user interface; this step S140 may specifically include the following steps:
[0087] Obtain the type internal structure design operations that conform to the specified type design rules in the internal structure design interface; determine the instances, procedures, and component members included in the target object type according to the type internal structure design operations, and determine the internal structure of the target object type based on the instances, procedures, and component members; generate a type design view corresponding to the target object type based on the internal structure, the object type primitive of the target object type, the classification type, the external interface, and the structural relationship; display the type design view in the graphical user interface, and generate a type primitive model of the target object type based on the design result of the target object type corresponding to the type design view; display all the corresponding defined instances, procedures, component members, and the association relationship between the instances and procedures of the target object type through the structural relationship in the type design view; the procedures that can be triggered in the type design view do not need to be associated with instances, or all the associated instances are component members of the target object type.
[0088] For example, the type design describes and displays a view of the internal structure of the type. In this view, all the defined objects and procedures of the type are clearly represented by relationships (the above structural relationships). The design view of the type not only clarifies the instances, the included procedures and relationships of the type, but also explains that the procedures that can be triggered in this view either do not need to be associated with objects or all the associated objects are members of the type.
[0089] Step S150, in response to the selection operation for the target type primitive model among multiple type primitive models, combine several target type primitive models to obtain an overall comprehensive model; the overall comprehensive model is the comprehensive model corresponding to the overall object including the thing object.
[0090] In the embodiments of the present application, a modeling method for type graphic elements based on object-oriented expression follows the basic principles of object orientation and realizes modular design in the modeling process by constructing clear responsibilities and function types. During the modeling process, since a type represents the entity or functional abstraction of a thing object (such as any thing like a sheep or a car tire), by defining and designing the members and processes of the type in detail, and through the association relationship between the object and the process, the definition of the relationship by the type modeling method can be completed. For the constructed type modeling, during the type modeling design process, the polymorphism of the type is fully utilized, and the type modeling principle of single inheritance and multiple implementations is added during the modeling process, allowing subclasses to extend new logic without affecting the parent class. This not only realizes the development of extensions and improves the flexibility of the type modeling method, but also, through various object type expression methods, can efficiently combine user requirements to achieve accurate abstract types, making the definition and structure of the type clearer and more hierarchical, and being able to clearly display the internal and external relationships of the type, which not only improves the user's understanding ability, but also increases the certainty of creating a class diagram, thus improving the accuracy of graphic element modeling.
[0091] Figure 3 A structural schematic diagram of a type graphic element modeling device based on an object is provided. As Figure 3 shown, the type graphic element modeling device 300 based on an object includes:
[0092] An acquisition module 301, configured to acquire an object type graphic element designed corresponding to a graphic element design operation; wherein, the object type graphic element is a graphic element for an object type, and the object type is used to represent the entity or functional data of a thing object;
[0093] A first determination module 302, configured to determine the classification type of the object type corresponding to the object type graphic element; wherein, the classification type includes a predefined type, a basic type, and a custom type;
[0094] A second determination module 303, configured to determine, according to the type external structure association operation for a target object type and in accordance with the specified structure relationship association rule fixed by the system itself, the external interface defined by the target object type in the system and the structure relationship defined between the target object type and other object types except the target object type; wherein, the external interface is used to standardize the behaviors that the target object type must implement;
[0095] A generation module 304 is configured to generate a type primitive model of the target object type by using the object type primitives, the classification type, the external interfaces, and the structural relationships of the target object type according to the type internal structure design operations that conform to the specified type design rules and are for the target object type; the type primitive model is a primitive model corresponding to the object type with the same attributes as the thing object; the internal structure of the target object type is used to characterize the instances, processes, and component members included in the target object type.
[0096] A combination module 305 is configured to, in response to a selection operation for a target type primitive model among multiple type primitive models, combine several target type primitive models to obtain an overall integrated model; the overall integrated model is an integrated model corresponding to the overall object including the thing object.
[0097] The object-based type primitive modeling apparatus provided by the embodiments of the present application has the same technical features as the object-based type primitive modeling method provided by the above embodiments, so it can also solve the same technical problems and achieve the same technical effects.
[0098] An electronic device provided by an embodiment of the present application, as Figure 4 shown, the electronic device 400 includes a processor 402 and a memory 401. A computer program that can run on the processor is stored in the memory. When the processor executes the computer program, the steps of the method provided by the above embodiments are implemented.
[0099] See Figure 4 , the electronic device further includes: a bus 403 and a communication interface 404. The processor 402, the communication interface 404, and the memory 401 are connected through the bus 403; the processor 402 is configured to execute an executable module stored in the memory 401, such as a computer program.
[0100] Among them, the memory 401 may include a high-speed random access memory (Random Access Memory, abbreviated as RAM), and may also include a non-volatile memory, such as at least one disk memory. Through at least one communication interface 404 (which can be wired or wireless), a communication connection between this system network element and at least one other network element is realized, and the Internet, wide area network, local area network, metropolitan area network, etc. can be used.
[0101] The bus 403 may be an ISA bus, a PCI bus, an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 4 only a bidirectional arrow is used in
[0102] Among them, the memory 401 is used to store a program. After receiving an execution instruction, the processor 402 executes the program. The method executed by the device defined by the process disclosed in any embodiment of the present application can be applied to or implemented by the processor 402.
[0103] The processor 402 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by the integrated logic circuit in hardware or instructions in software form in the processor 402. The above-mentioned processor 402 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field-programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 401, and the processor 402 reads the information in the memory 401 and combines its hardware to complete the steps of the above method.
[0104] Corresponding to the above object-based type primitive modeling method, an embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are called and run by a processor, the computer-executable instructions cause the processor to run the steps of the above object-based type primitive modeling method.
[0105] The object-based type primitive modeling device provided by the embodiments of the present application can be specific hardware on a device or software or firmware installed on the device, etc. For the device provided by the embodiments of the present application, its implementation principle and the resulting technical effects are the same as those of the foregoing method embodiments. For the sake of brief description, for the parts not mentioned in the device embodiments, reference may be made to the corresponding content in the foregoing method embodiments. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the foregoing described systems, devices, and units can all refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0106] In the embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.
[0107] For another example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementation manners, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0109] In addition, each functional unit in the embodiments provided in the present application may be integrated into a processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
[0110] If the above-mentioned functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the object-based type primitive modeling method described in each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM for short), random access memories (RAM for short), magnetic disks, or optical discs that can store program codes.
[0111] It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. In addition, the terms "first", "second", "third", etc. are only used for descriptive distinction and cannot be understood as indicating or implying relative importance.
[0112] Finally, it should be noted that the above-mentioned embodiments are only specific implementation manners of the present application, used to illustrate the technical solutions of the present application, rather than limiting them. The protection scope of the present application is not limited thereto. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed in the present application can still modify the technical solutions recorded in the foregoing embodiments, or can easily think of changes, or make equivalent replacements for some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application. All should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An object-based type primitive modeling method, characterized in that, The method includes: Obtaining a primitive of an object type corresponding to a primitive design operation; wherein, the primitive of the object type is a primitive for an object type, and the object type is used to represent the entity or functional data of a thing object; Determining the classification type of the object type corresponding to the primitive of the object type; wherein, the classification type includes a predefined type, a basic type, and a custom type; According to the type external structure association operation for the target object type and in accordance with the specified structure relationship association rule fixed by the system itself, determining the external interface defined for the target object type in the system and the structure relationship defined between the target object type and other object types other than the target object type; wherein, the external interface is used to standardize the behaviors that the target object type must implement; According to the type internal structure design operation that conforms to the specified type design rule and is for the target object type, generating a type primitive model of the target object type by using the primitive of the object type, the classification type, the external interface, and the structure relationship of the target object type; the type primitive model is a primitive model corresponding to an object type with the same attributes as the thing object; the internal structure of the target object type is used to represent the instances, processes, and component members included in the target object type; In response to a selection operation for a target type primitive model among a plurality of the type primitive models, combining based on a plurality of the target type primitive models to obtain an overall comprehensive model; the overall comprehensive model is a comprehensive model corresponding to the overall object including the thing object.
2. The method according to claim 1, characterized in that The step of, according to the type internal structure design operation that conforms to the specified type design rule and is for the target object type, generating a type primitive model of the target object type by using the primitive of the object type, the classification type, the external interface, and the structure relationship of the target object type, includes: Displaying an internal structure design interface for the target object type in a graphical user interface; Obtaining a type internal structure design operation that acts on the internal structure design interface and conforms to the specified type design rule; Determining the instances, processes, and component members included in the target object type according to the type internal structure design operation, and determining the internal structure of the target object type based on the instances, the processes, and the component members; Generating a type design view corresponding to the target object type based on the internal structure, the primitive of the object type, the classification type, the external interface, and the structure relationship. Display the type design view in the graphical user interface, and generate a type primitive model of the target object type based on the design result of the target object type corresponding to the type design view; in the type design view, display all the corresponding defined instances, processes, component members of the target object type, and the association relationship between the instance and the process through the structural relationship; the process that can be triggered in the type design view does not need to be associated with the instance, or all associated instances are component members of the target object type.
3. The method according to claim 1, wherein According to the type external structure association operation for the target object type, determine the external interface defined by the target object type in the system and the structural relationship defined between the target object type and other object types other than the target object type according to the specified structure relationship association rule fixed by the system itself, including: Display an external structure design interface for the target object type in the graphical user interface; Obtain a type external structure association operation that acts on the external structure design interface and conforms to the specified structure relationship association rule fixed by the system itself; Determine the external interface defined by the target object type in the system and the structural relationship defined between the target object type and external object types other than the target object type according to the type external structure association operation, and generate and display a type definition view corresponding to the target object type based on the external interface and the structural relationship; wherein, an external association relationship for characterizing the relationship between the target object type and the external object type is displayed in the type definition view.
4. The method according to claim 1, wherein The predefined type corresponding to the type set of multiple object types includes built-in processes and length members related to the set; the predefined type corresponding to the data flow includes at least one of the type of the data flow, the outflow speed, the cache size, and the cache processing policy; the built-in processes related to the type set include at least one of the built-in processes related to arrays, the built-in processes related to mappings, the built-in processes related to operations, and the built-in processes related to sets; the predefined type of the operator includes the built-in processes related to operations; wherein, the operator includes at least one of arithmetic operators, comparison operators, logical operators, assignment operators, operators, increment operators, decrement operators, shift operators, bitwise operators, and type operators; The instance corresponding to the basic type contains a value, and the basic type includes any one or more of the following: integer, real number, time, date, boolean, string, and enumeration; The custom type represents a matching type customized according to user operations, and the custom type is used to configure other object types that need to be associated with the target object type and complete the type binding of the corresponding attributes of the component members.
5. The method according to claim 1, wherein In the specified type design rule, temporary variables generated during the execution of the process included in the target object type are displayed in the internal structure design view corresponding to the target object type; The internal structure design operation of the said type includes the operation of anchoring the said process and the annotation operation of associated objects.
6. The method according to claim 1, characterized in that, The specified type design rules include any one or more of the following: The relationship between the component members of the said target object type and the said process is represented by a relationship symbol; The data expression event trigger is connected through the call relationship between the said instance and the said process; For the automatic trigger process of the said object type, it is connected through a call between the built-in instance itself and the said process, and the life cycle of the said process is determined according to the time parameter or the running time of the sub-process of the said process.
7. The method according to claim 1, wherein The graphic primitive of the said object type corresponds to the property panel of the said object type; The graphic primitive of the object type designed corresponding to the graphic primitive design operation includes: Obtaining the editing operation for the said property panel; Determining the target property of the said object type according to the property field edited corresponding to the said editing operation; Generating the graphic primitive of the said object type based on the said target property and the graphic primitive design operation.
8. An object-based type primitive modeling device, characterized in that, Including: An obtaining module, which is used to obtain the graphic primitive of the object type designed corresponding to the graphic primitive design operation; wherein, the graphic primitive of the object type is the graphic primitive for the object type, and the object type is used to represent the entity or functional data of the thing object; A first determining module, which is used to determine the classification type of the said object type corresponding to the graphic primitive of the object type; wherein, the classification type includes predefined type, basic type and custom type; A second determining module, which is used to determine the external interface defined by the said target object type in the said system and the structural relationship defined between the said target object type and other object types except the said target object type according to the type external structure association operation for the target object type in accordance with the specified structure relationship association rules fixed by the system itself; wherein, the external interface is used to standardize the behaviors that the said target object type must implement; A generating module, which is used to generate the type graphic primitive model of the said target object type according to the type internal structure design operation that conforms to the specified type design rules and is for the said target object type, by using the graphic primitive of the said object type, the classification type, the external interface and the structural relationship of the said target object type; the type graphic primitive model is the graphic primitive model corresponding to the object type with the same attributes as the said thing object; the internal structure of the said target object type is used to represent the instances, processes and component members included in the said target object type; A combining module, which is used to, in response to the selection operation for the target type graphic primitive model among multiple said type graphic primitive models, combine based on several said target type graphic primitive models to obtain an overall integrated model; the overall integrated model is the integrated model corresponding to the overall object including the said thing object.
9. An electronic device, comprising a memory and a processor, wherein a computer program capable of running on the processor is stored in the memory, characterized in that When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7 above.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and run by the processor, the computer-executable instructions cause the processor to run the method according to any one of claims 1 to 7.