Connection method and device based on water power model, computer device and medium thereof
By acquiring and updating the location information of the hydropower model, flexible configuration and expansion of the hydropower model connection ports are realized, solving the problem of difficult maintenance and expansion of the connection port design of the hydropower model in the existing technology, and improving the update efficiency and intelligence level.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU QUNHE INFORMATION TECHNOLOGIES CO LTD
- Filing Date
- 2022-08-03
- Publication Date
- 2026-06-02
AI Technical Summary
In existing intelligent home decoration design software, the connection port design of water and electricity models is difficult to maintain and expand, and cannot meet diverse home decoration needs.
By acquiring multiple hydropower models from the hydropower model scheme, the target hydropower model and the original hydropower model are determined. The location information and configuration information of the target hydropower model are obtained, and the location information of the target hydropower model is updated according to the configuration information. Finally, the updated target hydropower model is connected with the original hydropower model to update the hydropower model scheme.
This solves the problem of difficult maintenance and expansion of the connection port design in hydroelectric models, and improves the update efficiency and intelligent features of hydroelectric model solutions.
Smart Images

Figure CN115374506B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of home decoration design technology, and in particular to connection methods, devices, computer equipment and media based on water and electricity models. Background Technology
[0002] In recent years, whole-house integrated decoration has become a major trend in the home improvement industry. To meet users' personalized and fashionable demands for home decoration, intelligent decoration design software typically offers a variety of decoration design schemes with different styles. These schemes involve basic construction techniques for different spaces, as well as wall, ceiling, and floor paving and painting. Besides providing spatial design for the apartment layout, intelligent decoration design software also offers various furniture models, appliance models, and bathroom models, as well as plumbing and electrical models, to ensure a rational layout of the apartment space. The location of the connection points in each plumbing and electrical model affects the entire apartment's plumbing and electrical circuit routing. Although relevant intelligent decoration design software provides plumbing and electrical models for users when designing their home decoration, the connection points in general plumbing and electrical models are generated through fixed logic codes, meaning the locations of the connection points are unchanging. This cannot meet and adapt to diverse home decoration needs; in other words, the current connection point design of plumbing and electrical models is difficult to maintain and expand. Summary of the Invention
[0003] The purpose of this application is to propose a connection method, device, computer equipment and medium based on a hydroelectric model, so as to solve the problem of difficult maintenance and expansion of the connection port design of the hydroelectric model.
[0004] To address the aforementioned technical problems, embodiments of this application provide a connection method based on a hydroelectric model, comprising:
[0005] Obtain hydropower model schemes, which include multiple hydropower models;
[0006] When determining the target hydropower model and the original hydropower model from multiple hydropower models, the location information and configuration information of the target hydropower model are obtained; the target hydropower model describes the hydropower model of the connection port to be updated, the original hydropower model describes the other hydropower models besides the target hydropower model, and the location information describes the connection port information of the target hydropower model.
[0007] Update the location information of the target hydropower model based on its configuration information;
[0008] The updated target hydropower model is connected to the original hydropower model to update the hydropower model scheme.
[0009] To address the aforementioned technical problems, this application also provides a connection device based on a hydroelectric model, comprising:
[0010] The first acquisition module is used to acquire hydropower model schemes, wherein the hydropower model schemes include multiple hydropower models;
[0011] The configuration module is used to obtain the point information and configuration information of the target hydropower model when the target hydropower model and the original hydropower model are determined from multiple hydropower models. The target hydropower model describes the hydropower model of the connection port to be updated, the original hydropower model describes the other hydropower models besides the target hydropower model, and the point information describes the connection port information of the target hydropower model.
[0012] The update module is used to update the location information of the target hydropower model based on the configuration information of the target hydropower model.
[0013] The connection module is used to connect the updated target hydropower model and the original hydropower model in order to update the hydropower model scheme.
[0014] To address the aforementioned technical problems, this application also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described connection method based on a hydroelectric model.
[0015] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described connection method based on a hydroelectric model.
[0016] Compared with the prior art, the embodiments of this application have the following main advantages:
[0017] By acquiring a hydropower model scheme that includes multiple hydropower models, when determining the target hydropower model for the connection port to be updated and the original hydropower model that will not be updated from among the multiple hydropower models, the point information and configuration information of the target hydropower model are obtained. The point information describes the connection port information of the target hydropower model. Based on the configuration information of the target hydropower model, the point information of the target hydropower model is updated. The updated target hydropower model and the original hydropower model are then connected to update the hydropower model scheme. That is, the target hydropower model is updated through the set configuration information, and the connections of various hydropower models in the hydropower model scheme are updated. This not only solves the problems of difficult maintenance and expansion of the connection port design of hydropower models in related technologies, but also improves the update efficiency of the hydropower model scheme and has more intelligent features. Attached Figure Description
[0018] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;
[0020] Figure 2 This is a flowchart of an embodiment of the connection method based on a hydroelectric model of this application;
[0021] Figure 3 This is a schematic diagram showing the editor page in an embodiment of this application;
[0022] Figure 4 This is a schematic diagram of the hovering state of the target hydropower model in the embodiments of this application;
[0023] Figure 5 This is a schematic diagram of an embodiment of the connection device based on the hydroelectric model of this application;
[0024] Figure 6 This is a basic structural block diagram of the computer device of this application. Detailed Implementation
[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.
[0026] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0027] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
[0028] Based on this, this application provides a connection method based on a hydroelectric model to solve the above-mentioned technical problems.
[0029] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.
[0030] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.
[0031] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.
[0032] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.
[0033] It should be noted that the connection method based on the hydroelectric model provided in this application embodiment is executed by the server / terminal device, and correspondingly, the connection device based on the hydroelectric model is generally set in the server / terminal device.
[0034] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0035] Continue to refer to Figure 2 , Figure 2 A flowchart of an embodiment of the connection method based on a hydroelectric model is provided, including:
[0036] S201: Obtain the hydropower model scheme, which includes multiple hydropower models.
[0037] The hydroelectric model scheme is a layout scheme for the hydroelectric models designed by the user or selected on the editor page. The scheme includes various hydroelectric models, their connection points, and connection information. Each hydroelectric model represents a virtual model of hydroelectric equipment. These models can be air conditioners, washing machines, dryers, electric water heaters, etc. The hydroelectric models are pre-stored on a server or in a database. Each model can be a 3D or 2D model. File formats for the hydroelectric models include, but are not limited to, dwg, obj, dae, jpg, bmp, and png formats, and they are stored on the server or in the database. Each hydroelectric model category can be tagged with a unique identifier, allowing the server or database to identify and retrieve the corresponding model based on this unique identifier.
[0038] In this embodiment, the editor can be a three-dimensional drawing scene, such as a three-dimensional modeling software, a three-dimensional modeling website, or a three-dimensional modeling mobile application developed using BIM technology. When the three-dimensional space is detected to enter the drawing state, for example, when the user clicks the control to which the hydropower model scheme belongs with the mouse, launches the corresponding hydropower model scheme through a preset shortcut key, or performs any of the following actions, the selected hydropower model scheme is loaded into the editing window.
[0039] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the editor page display in an embodiment of this application. When it is detected that a user clicks on a selected hydroelectric model reference scheme or drags a selected hydroelectric model reference scheme into the editing window, the corresponding hydroelectric model scheme is loaded from the database or server based on the tag or protocol code of the selected hydroelectric model scheme, and the loaded hydroelectric model scheme is displayed in the editing window. The editing window represents a window that provides a space for editing hydroelectric models and displaying hydroelectric model schemes. For example... Figure 3 The hydropower model scheme 1 is called or loaded from the database or server and displayed in the editing window. The editing window shows hydropower model A, hydropower model B, hydropower model C, hydropower model D and hydropower model E included in hydropower model scheme 1.
[0040] In this embodiment of the application, before obtaining the hydropower model scheme, it also includes... Figure 3 The design of each hydroelectric model in the hydroelectric model library shown follows the specific steps below:
[0041] Obtain the connection points of the hydroelectric model and their definition information, including the location and purpose of the connection points.
[0042] The hydroelectric model and definition information are encapsulated to obtain the data packet of the hydroelectric model's connection port;
[0043] Save the data packet.
[0044] Specifically, the location information of the connection points in the hydroelectric model includes the number of connection points, the position and normal direction of the connection points in the hydroelectric model, and the purpose of the connection points configured in the hydroelectric model, etc., which are not limited here.
[0045] In this embodiment, the water and electricity model can be a water and electricity model without edited connection ports. Connection ports can be pipe interfaces between water and electricity models. For example, they can be the fresh air vents of an air conditioner, the hot water inlet of an electric water heater, and the cold water inlet. The purpose of the connection ports can include, but is not limited to, exhaust vents for expelling stale indoor air to the outside, fresh air vents for directly delivering natural air from the outside to the desired area, and air outlets for supplying air to the air conditioner.
[0046] In this embodiment, the definition information of the connection port is saved in doc format. A data structure is constructed using the unique identifier of the hydropower model and key fields of the definition information. This data structure is then used as the protocol content of the data packet to encapsulate the definition information of the hydropower model and its corresponding connection port. The encapsulated data packet is stored on a server or in a database. Since the data packet does not directly store the entire hydropower model and its definition information (i.e., it does not repeatedly store the hydropower model, but only stores newly added or modified definition information), the generated data packet carries a small amount of data, reducing the memory usage of the server or database. It is understood that subsequently, by parsing the corresponding protocol content, the hydropower model and its definition information, and the target connection port of the corresponding hydropower model, can be accessed from the server or database.
[0047] For example, such as Figure 3 As shown, when a user logs in to the editor page with their account, the editor page is loaded, and various hydroelectric models from the hydroelectric model library are imported. These hydroelectric models can be obtained from a database or server. In this embodiment, the number and type of hydroelectric models loaded in the library can be controlled according to the user's permissions, avoiding editing problems such as repeated or erroneous modifications to the connection points of hydroelectric models, thus improving the security of editing and using hydroelectric models. For example, the location or size of the connection points of some hydroelectric models is fixed in actual scenarios. If the connection points of such hydroelectric models are modified, it may lead to problems such as the inability to form loops in the pipe connections of the entire hydroelectric model scheme.
[0048] S202: When determining the target hydropower model and the original hydropower model from multiple hydropower models, obtain the location information and configuration information of the target hydropower model.
[0049] The target hydroelectric model describes the hydroelectric model of the connection port to be updated, the original hydroelectric model describes the other hydroelectric models besides the target hydroelectric model, the point information describes the connection port information of the target hydroelectric model, and the target connection port indicates the connection port in the hydroelectric model that needs to be edited.
[0050] In some embodiments of this application, obtaining the location information of the target hydroelectric model includes:
[0051] Obtain the data packet belonging to the target hydroelectric model;
[0052] Parse the data packet to obtain the first position information of the connection port of the target hydroelectric model in the preset first coordinate system;
[0053] The first position information is converted to the second position information in the preset second coordinate system, and the second position information is used as the position information of the connection port of the target hydroelectric model.
[0054] The configuration information of the target hydroelectric model includes at least one of the following: the size of the connection port of the target hydroelectric model, the direction of rotation, the position coordinates, and the type of use.
[0055] Specifically, when a user selects a hydropower model in the hydropower model scheme through clicking or selecting a box, the selected hydropower model is activated. At this time, the selected hydropower model becomes the target hydropower model, and the remaining unselected hydropower models become the original hydropower models. When the target hydropower model is determined from multiple hydropower models, the protocol content of the data packet belonging to the target hydropower model is read. Based on the structure information of the parsed protocol content, the first position information of the target hydropower model in a preset first coordinate system is obtained from the server or database. This first coordinate system is constructed using two adjacent sides of the target hydropower model. Figure 4 The coordinate system of the connection port i' shown is within the target hydroelectric model. The second coordinate system is the world coordinate system, which allows the hydroelectric model scheme to be treated as a whole and a world coordinate system to be established, such as... Figure 3 The second coordinate system shown is the world coordinate system. Based on the mapping relationship between the first and second coordinate systems, the first position information is transformed into the second position information under the preset second coordinate system. The transformation method is absolutely based on the mapping relationship, for example, it can be obtained through matrix mapping. Finally, the obtained second position information is used as the position information of the connection port of the target hydropower model, so that the position information of the target hydropower model can be aligned with the original hydropower model under the same world coordinate system, thereby improving the accuracy of the connection port position information.
[0056] For example, when the O point of the first coordinate system is (0, 0) and the O point of the second coordinate system is (6, 10), we can obtain the first coordinate system = (the x-coordinate of the second coordinate system - 6, the y-coordinate of the second coordinate system - 10).
[0057] In this embodiment, when a user selects a hydropower model in the hydropower model scheme through clicking or box selection, the selected hydropower model is activated. At this time, the selected hydropower model becomes the target hydropower model, and is set to a hover state, meaning the target hydropower model enters the editing state. When the target hydropower model enters the editing state, configuration information is obtained by reading the connection ports set by the user on the editing page. For example... Figure 4 As shown, Figure 4 This is a schematic diagram of the hovering state of the target hydroelectric model in an embodiment of this application. For example... Figure 4 As shown in the dashed 3D box, when the target hydroelectric model is in a hovering state, its length, width, and height can be read, and a bounding box of the target hydroelectric model can be generated according to a preset ratio, so that the bounding box covers the target hydroelectric model. At this time, the user can set new point information for the connection ports on a specified face in the target hydroelectric model, and use the new point information as configuration information.
[0058] In this embodiment, the configuration information includes reconfiguring the location information of the connection points of the target hydroelectric model, namely, the location information, scaling or enlarging of the size, rotation orientation, and purpose information of the connection points. The location information can be represented by coordinates, such as... Figure 3 The position information of the connection port i' in the middle is (x i y i ).
[0059] For example, when it is detected that a user has set a connection port in the target hydroelectric model, the user sets the location information of the connection port in the target hydroelectric model by clicking to add a connection port, dragging the size of the connection port to scale or enlarge it, or directly entering the location information of the connection port on a specified side of the target hydroelectric model.
[0060] Furthermore, the configuration information of the target hydroelectric model input by the user is obtained, such as the purpose information of the connection ports of the target hydroelectric model. The purpose information can be exhaust, air intake, drainage, water intake, and fresh air system functions, etc., which are not limited here. Figure 3 The definition information shown displays the x-coordinate, y-coordinate, size, and rotation information of the connection point. The coordinates in the point information here are based on the hydroelectric model as the reference coordinate system.
[0061] S203: Update the location information of the target hydropower model based on the configuration information of the target hydropower model.
[0062] Specifically, the point information to be updated in the target hydropower model is determined based on the configuration information of the connection port, the point information to be updated is deleted, and the configuration information is filled into the point information to be updated in order to update the connection port of the target hydropower model.
[0063] Furthermore, the structure information of the updated target hydropower model is extracted. The structure information can be the key fields of the configuration information of the connection port to generate the protocol content of the data packet, thereby realizing the encapsulation of the data packet and saving it to the database or server to enrich the types of connection ports of the hydropower model.
[0064] S204: Connect the updated target hydropower model and the original hydropower model to update the hydropower model scheme.
[0065] In this embodiment of the application, after the connection port of the target hydroelectric model is updated, the connection port of the updated target hydroelectric model and the connection port of the original hydroelectric model can be automatically connected to generate a new pipeline loop.
[0066] In this embodiment of the application, connecting the updated target hydropower model and the original hydropower model may further include:
[0067] Connect the updated target hydropower model and the original hydropower model, including:
[0068] Based on the connection ports of the updated target hydroelectric model and the connection ports of the original hydroelectric model, determine the pipeline layout direction of the target hydroelectric model and the original hydroelectric model;
[0069] Based on the pipeline layout direction, the target hydroelectric model and the original hydroelectric model are connected by lines to obtain the pipeline loops of the target hydroelectric model and the original hydroelectric model.
[0070] In this embodiment, when the connection ports of the updated target hydroelectric model and the original hydroelectric model are selected sequentially, the selection order is used as the pipeline layout direction, i.e., the connection direction. The selection of a connection port can be done by the user clicking on the port or selecting it by drawing a box. When an event for automatically generating pipeline loops is triggered, the target hydroelectric model and the original hydroelectric model are connected by lines according to the pipeline layout direction to obtain the pipeline loops of the target hydroelectric model and the original hydroelectric model, resulting in the updated hydroelectric model scheme. Figure 3 The connection event control in the program is used for wire connections to automatically generate pipeline loops.
[0071] It should be noted that the above connection scheme, which considers the pipeline layout direction, is based on the scenario where the connection points of the hydroelectric model have been modified or added. When there are no changes to the connection points in the hydroelectric model, the connections are made according to the original point information generation method of each original hydroelectric model.
[0072] By acquiring a hydropower model scheme that includes multiple hydropower models, when determining the target hydropower model for the connection port to be updated and the original hydropower model that will not be updated from among the multiple hydropower models, the point information and configuration information of the target hydropower model are obtained. The point information describes the connection port information of the target hydropower model. Based on the configuration information of the target hydropower model, the point information of the target hydropower model is updated. The updated target hydropower model and the original hydropower model are then connected to update the hydropower model scheme. That is, the target hydropower model is updated through the set configuration information, and the connections of various hydropower models in the hydropower model scheme are updated. This not only solves the problems of difficult maintenance and expansion of the connection port design of hydropower models in related technologies, improving the scalability and flexibility of the connection port, but also improves the update efficiency of the hydropower model scheme and has more intelligent features.
[0073] In some optional implementations of this embodiment, after obtaining the hydropower model scheme, the following is further included:
[0074] When a new hydropower model is detected in the hydropower model scheme, the new hydropower model will be used as the target hydropower model.
[0075] Obtain the location and configuration information of the target hydropower model;
[0076] Update the location information of the target hydropower model based on its configuration information;
[0077] The updated target hydropower model is connected to the original hydropower model to update the hydropower model scheme.
[0078] In this application embodiment, besides updating the connection port by changing the configuration information of the target hydroelectric model in the hydroelectric model scheme, it is also possible to add a new hydroelectric model to the hydroelectric model scheme and use the newly added hydroelectric model as the target hydroelectric model. For example... Figure 3 As shown, users can drag and drop selected target hydroelectric models from the hydroelectric model library in the editor page into the editing window, and then select the target hydroelectric model in the editing window to put it into editing mode, i.e., hover mode. The steps of obtaining the point information and configuration information of the target hydroelectric model, updating the point information of the target hydroelectric model, and connecting the updated target hydroelectric model with the original hydroelectric model are the same as steps S202-S204 above, and will not be repeated here.
[0079] For example, an air conditioner indoor unit model is used as a water and electricity model. When it is detected that the user loads the air conditioner indoor unit model into the editing window by dragging or selecting from the water and electricity model library, the air conditioner indoor unit model in the editing window is switched to an editable state. The system monitors the location information of the cold air vents set by the user on the air conditioner indoor unit model in the editing window, such as the user drawing the cold air vents in a specified direction on the air conditioner indoor unit model, and the configuration information for the purpose of inputting cold air and outputting cold air. The air conditioner indoor unit model is updated according to the configuration information. The connection ports of the original water and electricity models, such as the air conditioner outdoor unit model in the water and electricity model scheme, are connected to the cold air vents of the air conditioner indoor unit model to update the water and electricity model scheme, enabling flexible configuration of the connection ports and improving their scalability.
[0080] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).
[0081] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0082] Further reference Figure 5 As a response to the above Figure 2 The implementation of the connection method based on the hydroelectric model is shown in the schematic diagram. This application provides an embodiment of the connection device based on the hydroelectric model. This device embodiment is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.
[0083] like Figure 5 As shown, the connection device based on the hydroelectric model described in this embodiment includes: a first acquisition module 51, a configuration module 52, an update module 53, and a connection module 54. Wherein:
[0084] The first acquisition module 51 is used to acquire hydropower model schemes, wherein the hydropower model schemes include multiple hydropower models;
[0085] The configuration module 52 is used to obtain the point information and configuration information of the target hydropower model when the target hydropower model and the original hydropower model are determined from multiple hydropower models; wherein, the target hydropower model describes the hydropower model of the connection port to be updated, the original hydropower model describes the other hydropower models besides the target hydropower model, and the point information describes the connection port information of the target hydropower model.
[0086] The update module 53 is used to update the location information of the target hydropower model based on the configuration information of the target hydropower model.
[0087] The connection module 54 is used to connect the updated target hydropower model and the original hydropower model in order to update the hydropower model scheme.
[0088] In this embodiment of the application, the connecting device further includes:
[0089] The second acquisition module is used to acquire the connection port of the hydroelectric model and the definition information of the connection port of the hydroelectric model. The definition information includes the location information and usage information of the connection port of the hydroelectric model.
[0090] The encapsulation module is used to encapsulate the hydroelectric model and definition information to obtain the data packet of the hydroelectric model's connection port;
[0091] The save module is used to save data packets.
[0092] In this embodiment of the application, the configuration module 52 includes:
[0093] The acquisition unit is used to acquire the data packet to which the target hydropower model belongs;
[0094] The parsing unit is used to parse the data packet and obtain the first position information of the connection port of the target hydropower model in the preset first coordinate system.
[0095] The conversion unit is used to convert the first position information to the second position information in the preset second coordinate system, and use the second position information as the position information of the connection port of the target hydroelectric model.
[0096] In this embodiment of the application, the connecting device further includes:
[0097] The configuration module 52 is also used to, when a new hydropower model is detected in the hydropower model scheme, use the new hydropower model as the target hydropower model; and obtain the location information and configuration information of the target hydropower model.
[0098] The update module 53 is also used to update the location information of the target hydropower model based on the configuration information of the target hydropower model;
[0099] The connection module 54 is also used to connect the updated target hydropower model and the original hydropower model to update the hydropower model scheme.
[0100] In this embodiment of the application, the connection module 54 further includes:
[0101] The determining unit is used to determine the pipeline layout direction of the target hydroelectric model and the original hydroelectric model based on the connection ports of the updated target hydroelectric model and the connection ports of the original hydroelectric model.
[0102] The connection unit is used to connect the target hydroelectric model and the original hydroelectric model with lines according to the pipeline layout direction, so as to obtain the pipeline loop of the target hydroelectric model and the original hydroelectric model.
[0103] In this embodiment of the application, the connecting device further includes:
[0104] The configuration information of the target hydroelectric model includes at least one of the following: the size of the connection port of the target hydroelectric model, the direction of rotation, the position coordinates, and the type of use.
[0105] Regarding the connection device based on the hydroelectric model in the above embodiments, the specific way in which each module performs operations has been described in detail in the embodiments related to the method, and will not be elaborated here.
[0106] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed]. Figure 6 , Figure 6 This is a basic structural block diagram of the computer device in this embodiment.
[0107] The computer device 6 includes a memory 61, a processor 62, and a network interface 63 that are interconnected via a system bus. It should be noted that only the computer device 6 with components 61-63 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0108] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.
[0109] The memory 61 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or D-interface display memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 61 may be an internal storage unit of the computer device 6, such as the hard disk or memory of the computer device 6. In other embodiments, the memory 61 may also be an external storage device of the computer device 6, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 6. Of course, the memory 61 may also include both the internal storage unit and its external storage device of the computer device 6. In this embodiment, the memory 61 is typically used to store the operating system and various application software installed on the computer device 6, such as program code for a connection method based on a hydroelectric model. In addition, the memory 61 can also be used to temporarily store various types of data that have been output or will be output.
[0110] In some embodiments, the processor 62 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 62 is typically used to control the overall operation of the computer device 6. In this embodiment, the processor 62 is used to run program code stored in the memory 61 or process data, for example, to run the program code of the connection method based on the hydroelectric model.
[0111] The network interface 63 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 6 and other electronic devices.
[0112] This application also provides another embodiment, namely, a computer-readable storage medium storing a connection program based on a hydroelectric model, the connection program being executable by at least one processor to perform the steps of the connection method based on the hydroelectric model as described above.
[0113] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0114] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.
Claims
1. A connection method based on a hydroelectric model, characterized in that, include: Obtain a hydropower model scheme, wherein the hydropower model scheme includes multiple hydropower models; When a target hydropower model and an original hydropower model are determined from multiple hydropower models, the location information and configuration information of the target hydropower model are obtained; wherein, the target hydropower model describes the hydropower model of the connection port to be updated, the original hydropower model describes the other hydropower models besides the target hydropower model, and the location information describes the connection port information of the target hydropower model; Update the location information of the target hydropower model based on its configuration information; The updated target hydropower model and the original hydropower model are connected to update the hydropower model scheme; Before obtaining the hydropower model scheme, the method further includes: Obtain the connection ports of the hydroelectric model and the definition information of the connection ports of the hydroelectric model, wherein the definition information includes the location information and usage information of the connection ports of the hydroelectric model; The hydroelectric model and the definition information are encapsulated to obtain a data packet for the connection port of the hydroelectric model; Save the data packet; When the location information includes the location information of the connection port of the target hydropower model, obtaining the location information of the target hydropower model includes: Obtain the data packet to which the target hydropower model belongs; Parse the data packet to obtain the first position information of the connection port of the target hydroelectric model in a preset first coordinate system; The first position information is converted to the second position information in the preset second coordinate system, and the second position information is used as the position information of the connection port of the target hydroelectric model; After obtaining the hydropower model scheme, the method further includes: When a new hydropower model is detected in the hydropower model scheme, the new hydropower model will be used as the target hydropower model. Obtain the location information and configuration information of the target hydropower model; Update the location information of the target hydropower model based on its configuration information; The updated target hydropower model and the original hydropower model are connected to update the hydropower model scheme.
2. The connection method based on a hydroelectric model according to claim 1, characterized in that, The step of connecting the updated target hydropower model and the original hydropower model includes: Based on the connection ports of the updated target hydroelectric model and the connection ports of the original hydroelectric model, determine the pipeline layout direction of the target hydroelectric model and the original hydroelectric model; The target hydroelectric model and the original hydroelectric model are connected by lines according to the pipeline layout direction to obtain the pipeline loops of the target hydroelectric model and the original hydroelectric model.
3. The connection method based on a hydroelectric model according to claim 1, characterized in that, The configuration information of the target hydroelectric model includes at least one of the following: the size of the connection port of the target hydroelectric model, the direction of rotation, the position coordinates, and the type of use.
4. A connection device for implementing the connection method based on a hydroelectric model according to any one of claims 1 to 3, characterized in that, include: The first acquisition module is used to acquire a hydropower model scheme, wherein the hydropower model scheme includes multiple hydropower models; The configuration module is used to obtain the location information and configuration information of the target hydropower model when a target hydropower model and an original hydropower model are determined from multiple hydropower models; wherein, the target hydropower model describes the hydropower model of the connection port to be updated, the original hydropower model describes the other hydropower models besides the target hydropower model, and the location information describes the connection port information of the target hydropower model; The update module is used to update the location information of the target hydropower model according to the configuration information of the target hydropower model; A connection module is used to connect the updated target hydropower model and the original hydropower model to update the hydropower model scheme.
5. The connecting device according to claim 4, characterized in that, The connecting device further includes: The second acquisition module is used to acquire the connection port of the hydroelectric model and the definition information of the connection port of the hydroelectric model, wherein the definition information includes the location information and usage information of the connection port of the hydroelectric model; An encapsulation module is used to encapsulate the hydroelectric model and the definition information to obtain a data packet of the connection port of the hydroelectric model; A storage module is used to save the data packets.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the connection method based on a hydroelectric model as described in any one of claims 1 to 3.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the connection method based on a hydroelectric model as described in any one of claims 1 to 3.