View editing method, device, storage medium, and program product

CN122289592APending Publication Date: 2026-06-26QINGDAO HAIER TECH +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
QINGDAO HAIER TECH
Filing Date
2026-03-12
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

[0005]本申请实施例提供一种视图编辑方法、设备、存储介质及程序产品,用以解决现有的视图编辑方法的操作复杂,编辑效率低下,且难以保证设备在空间中的摆放位置的精确性的技术问题

Benefits of technology

[0044]第五方面,本申请实施例提供一种程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上第一方面以及第一方面各种可能的实现方式所述的视图编辑方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122289592A_ABST
    Figure CN122289592A_ABST
Patent Text Reader

Abstract

This application discloses a view editing method, device, storage medium, and program product, relating to the field of smart home / intelligent home technology. The view editing method includes: determining the target snapping position of the target object in the floor plan based on the movement position of the target object and the floor plan; the movement position is generated by the user triggering the movement of the target object in the view editing interface; the target object includes: a device model or a furniture model; obtaining a target space view based on the floor plan, the target snapping position, and the target object; in the target space view, the target object is displayed at the target snapping position of the floor plan; this method adopts a drag-and-drop editing method, which is simple to operate, improves editing efficiency, and effectively ensures the geometric accuracy of the target object's spatial placement and the rationality of the view layout through automatic snapping.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart home / intelligent home technology, and more specifically, to a view editing method, device, storage medium, and program product. Background Technology

[0002] In fields such as smart homes and interior design, digital modeling of floor plans is a crucial prerequisite for achieving spatial intelligence, providing a unified data foundation for visual design, effect previews, smart device deployment, and subsequent spatial interaction. Based on this, users can perform operations such as floor plan adjustments, component configuration, and scene optimization through view editing tools.

[0003] Currently, during view editing, users first need to select the desired device icon from a preset device library, and then place it on the floor plan by clicking on a specified location. To adjust the device's position, the user needs to select the device and drag it to the new location. If the user wants to place the object precisely in an ideal location within the room, such as next to a wall or in a corner, they may need to make repeated fine adjustments to ensure the layout meets expectations.

[0004] However, existing view editing tools rely on the user's visual judgment and manual fine-tuning, which is not only complicated to operate and leads to low editing efficiency, but also makes it difficult to guarantee the accuracy of the device's placement in space. Summary of the Invention

[0005] This application provides a view editing method, device, storage medium, and program product to solve the technical problems of existing view editing methods being complex to operate, inefficient to edit, and difficult to guarantee the accuracy of the device's placement in space.

[0006] In a first aspect, embodiments of this application provide a view editing method, wherein the view editing interface displays a floor plan, and the method includes:

[0007] Based on the movement position of the target object and the floor plan, the target attachment position of the target object in the floor plan is determined; the movement position is generated by the user triggering the movement of the target object in the view editing interface; the target object includes: a device model or a furniture model;

[0008] Based on the floor plan, the target adsorption location, and the target object, a target space view is obtained; in the target space view, the target object is displayed at the target adsorption location of the floor plan.

[0009] Optionally, determining the target adsorption position of the target object in the floor plan based on the movement position of the target object and the floor plan includes:

[0010] Based on the floor plan and the preset layout rules corresponding to the target object, candidate adsorption elements of the target object in the floor plan are determined;

[0011] Based on the movement position and the position of the candidate adsorbed element, the target adsorption position of the target object in the floor plan is determined.

[0012] Optionally, determining the target adsorption location of the target object in the floor plan based on the moving location and the location of the candidate adsorption element includes:

[0013] In response to the movement position, the distance between the position of the candidate adsorbed element and the position of the candidate adsorbed element is less than or equal to a preset distance threshold, and the user triggers a position determination operation, the target adsorption position is determined based on the position of the candidate adsorbed element and the preset layout rules.

[0014] Optionally, the method further includes:

[0015] In response to the moving position, if the distance between the moving position and the position of the candidate adsorbed element is less than or equal to the preset distance threshold, the display effect of the candidate adsorbed element is changed to the first display effect.

[0016] Optionally, the method further includes:

[0017] Based on the movement position, the position of existing elements in the floor plan, and the preset layout rules, a conflict detection is performed between the target object and the existing elements to obtain a detection result indicating whether there is a conflict between the movement position and the position of the existing elements.

[0018] In response to the detection result indicating a conflict between the moved position and the position of the existing element, the display effect of the existing element is changed to a second display effect.

[0019] Optionally, before obtaining the target spatial view based on the floor plan, the target adsorption location, and the target object, the method further includes:

[0020] In response to a user's operation to adjust the display angle of the target object, the target display angle of the target object is determined;

[0021] The process of obtaining a target spatial view based on the floor plan, the target adsorption location, and the target object includes:

[0022] Based on the floor plan, the target adsorption location, the target display angle, and the target object, the target space view is obtained.

[0023] Optionally, the method is applied to a smart home control application (APP), the target space view is an interactive 3D floor plan view, and the method further includes:

[0024] Based on the interactive 3D floor plan view, smart home devices can be controlled.

[0025] Secondly, embodiments of this application provide a view editing device, including:

[0026] The determination module is used to determine the target adsorption position of the target object in the floor plan based on the movement position of the target object and the floor plan; the movement position is generated by the user triggering the movement of the target object in the view editing interface; the target object includes: a device model or a furniture model;

[0027] The processing module is used to obtain a target space view based on the floor plan, the target adsorption location, and the target object; in the target space view, the target object is displayed at the target adsorption location of the floor plan.

[0028] Optionally, the determining module is further configured to determine candidate adsorption elements of the target object in the floor plan based on the floor plan and the preset layout rules corresponding to the target object;

[0029] The determining module is further configured to determine the target adsorption position of the target object in the floor plan based on the moving position and the position of the candidate adsorption element.

[0030] Optionally, the determining module is further configured to, in response to the movement position, the distance between the position of the candidate adsorption element and the position of the candidate adsorption element being less than or equal to a preset distance threshold, and the user triggering a position determining operation, determine the target adsorption position based on the position of the candidate adsorption element and the preset layout rules.

[0031] Optionally, the device further includes: a change module;

[0032] The modification module is used to change the display effect of the candidate adsorbed element to a first display effect in response to the movement position and the distance between the moving position and the position of the candidate adsorbed element being less than or equal to the preset distance threshold.

[0033] Optionally, the device further includes: a detection module;

[0034] The detection module is used to perform conflict detection between the target object and the existing elements based on the movement position, the position of the existing elements in the floor plan, and the preset layout rules, and to obtain a detection result on whether there is a conflict between the movement position and the position of the existing elements.

[0035] The modification module is further configured to, in response to the detection result indicating a conflict between the moved position and the position of the existing element, change the display effect of the existing element to a second display effect.

[0036] Optionally, the determining module is further configured to determine the target display angle of the target object in response to the user's operation of adjusting the display angle of the target object;

[0037] The processing module is further configured to obtain the target space view based on the floor plan, the target adsorption location, the target display angle, and the target object.

[0038] Optionally, the device further includes: a control module;

[0039] The control module is used to control smart home devices based on the interactive 3D floor plan view.

[0040] Thirdly, embodiments of this application provide an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0041] The memory stores computer-executed instructions;

[0042] The processor executes computer execution instructions stored in the memory to implement the view editing method as described in the first aspect and various possible implementations of the first aspect above.

[0043] Fourthly, embodiments of this application provide a computer-readable storage medium including a stored program that, when executed, performs the view editing method as described in the first aspect and various possible implementations thereof.

[0044] Fifthly, embodiments of this application provide a program product including a computer program that, when executed by a processor, implements the view editing method as described in the first aspect and various possible implementations of the first aspect.

[0045] The view editing method provided in this application determines the target snapping position of the target object in the floor plan based on the movement position of the target object and the floor plan. The movement position is generated by the user triggering the movement of the target object in the view editing interface. The target object includes: an equipment model or a furniture model. Based on the floor plan, the target snapping position, and the target object, a target space view is obtained. In the target space view, the target object is displayed at the target snapping position of the floor plan. This method adopts a drag-and-drop editing method, which is simple to operate, improves editing efficiency, and effectively ensures the geometric accuracy of the target object's spatial placement and the rationality of the view layout through automatic snapping. Attached Figure Description

[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 A schematic diagram of the hardware environment for the view editing method provided in the embodiments of this application;

[0049] Figure 2 This is a schematic diagram of the system architecture of the editing system provided in the embodiments of this application;

[0050] Figure 3 A flowchart illustrating the view editing method provided in an embodiment of this application;

[0051] Figure 4 A schematic diagram of the floor plan provided in the embodiments of this application. Figure 1 ;

[0052] Figure 5 A schematic diagram of the floor plan provided in the embodiments of this application. Figure 2 ;

[0053] Figure 6 A schematic diagram of the floor plan provided in the embodiments of this application. Figure 3 ;

[0054] Figure 7 Flowchart of the view editing method provided in the embodiments of this application Figure 2 ;

[0055] Figure 8 A schematic diagram of the structure of the view editing device provided in the embodiments of this application;

[0056] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0057] 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. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0058] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0059] According to one aspect of the embodiments of this application, a view editing method is provided. This view editing method is widely used in whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligencehouse ecosystems. Optionally, in this embodiment, the above-mentioned view editing method can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. A database can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data processing services for server 104.

[0060] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. The terminal device 102 may not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart range hood, smart refrigerator, smart oven, smart stove, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projector, smart TV, smart clothes rack, smart curtains, smart audio-visual equipment, smart socket, smart speaker, smart speaker box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart robot vacuum cleaner, smart window cleaning robot, smart mopping robot, smart air purifier, smart steam oven, smart microwave oven, smart water heater, smart air purifier, smart water dispenser, smart door lock, etc.

[0061] Currently, during view editing, users typically need to first select the target device icon from a preset device library, and then place it by clicking on the specific location in the floor plan. If the device position needs to be adjusted, the device must first be selected, and then manually dragged to the new position. When it is desired to precisely align the device to a specific spatial location (such as against a wall or in a corner), multiple adjustments are often required to achieve the desired layout effect.

[0062] However, existing view editing tools mainly rely on user visual judgment and manual fine-tuning, which is not only cumbersome and inefficient, but also makes it difficult to ensure the geometric accuracy of the device's placement in space.

[0063] The view editing method provided in this application is intended to solve the above-mentioned technical problems of the prior art.

[0064] This application provides a view editing method. During the process of a user dragging a target object, using a floor plan as the scene, the system performs real-time snap-in detection based on the real-time movement position of the target object and the spatial structural relationship of various elements in the floor plan, thereby obtaining a target snap-in position that meets preset snap-in conditions. Specifically, when the user selects a target object (such as an equipment model or furniture model) and edits it in the view editing interface, the system automatically identifies the optimal snap-in position during the dragging process. Based on this snap-in position, the floor plan, and the target object, it generates a target spatial view containing the target object, thus completing the view editing. This eliminates the multi-step operation of selecting, visually placing, and then manually fine-tuning, achieving "scene as guide, drag and drop as editing," significantly simplifying the interaction process, improving editing efficiency, and ensuring the geometric accuracy and layout rationality of the target object's placement in space.

[0065] Figure 2This is a schematic diagram of the system architecture of the view editing system provided in the embodiments of this application. This system can provide an interactive interface to the user through a smart home control application running on a terminal device, such as... Figure 2 As shown, the view editing system provided in this embodiment includes: an editor capability layer, a 2D view layer, a 3D view layer, a data view binding layer, and a data layer.

[0066] The data layer stores and manages the raw data and operational states of the view editing system. This layer includes the following components: data model, operation objects, and context management. The data model maintains data for all editable objects in the entire floor plan. Editable objects include entities such as walls, rooms, doors, windows, furniture, and equipment, along with their attributes (e.g., location, size, type). Operation objects represent instances of objects that can be edited by the user. Each object encapsulates its own state and change history, supporting transactional modifications. Context management provides a global operational context environment for tracking the current editing state, transaction stack (for undo / redo), user permissions, and other information, ensuring data consistency. It should be understood that the data layer does not directly participate in the interface display; it only provides data read and write services to the data view binding layer through an interface.

[0067] The data-view binding layer acts as an intermediary between the data layer and the view layer, enabling the mapping from data to visualization. The view model module listens for changes in the data model and manipulated objects within the data layer, converting the raw data of editable objects into rendered data. The view model module also receives operation commands from the editor capability layer, invokes the data layer to execute business logic, and synchronously updates the state of the view layer.

[0068] The view layer includes a 2D view layer and a 3D view layer. The 2D view layer is used for editing interactions and displaying two-dimensional views, while the 3D view layer is used for real-time updating of three-dimensional views and interaction.

[0069] The 2D view layer includes a viewport control container, vector graphics drawing objects, and display objects. The viewport control container provides an editable area for the user. Vector graphics drawing tools are used to generate various elements in the 2D view, such as rectangles, circles, checkboxes, and guidelines. Display objects are used to display images, icons, and UI elements.

[0070] The 3D view layer includes a renderer and a geometric model unit. The renderer is used to present an interactive 3D house scene; the geometric model unit is used to construct specific objects in 3D space, and its function is similar to the display objects in the 2D view layer.

[0071] The editor capability layer provides users with several editing functions that can be used directly, including: undo / redo, wall editing, door and window placement, space creation, and equipment placement.

[0072] Among them, the undo / redo function is based on the transaction mechanism to realize operation rollback and recovery, which relies on the context management module of the data layer; the wall editing function allows users to create, delete or adjust the shape of walls; the door and window placement function is used to add or move the position of doors and windows on walls; the space creation function is used to divide room areas and generate independent space units; and the equipment placement function is used to drag and drop furniture, appliances and other equipment, and supports automatic snapping and conflict detection.

[0073] In this system, user touch operations are identified and distributed through a drag-and-drop processing module. When a single-finger operation is detected, it is processed according to the stage of the operation:

[0074] If it is a press event, the system determines whether it is currently in editing mode; if it is in editing mode, it confirms that the selected device, furniture, or structural element is selected; otherwise, it enters the ready-to-select mode.

[0075] If it is a move event, the system determines whether there is a selected element; if there is, it performs the move, rotation, or scaling operation on that element; if there is no selected element, it performs the view translation.

[0076] If it is a lift event, the current operation ends, the finally selected element is confirmed, and the placement is completed.

[0077] When a two-finger gesture is detected, the system further identifies the gesture type: if it is a pinch gesture, it triggers view zooming; if it is a two-finger panning gesture, it triggers view panning.

[0078] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0079] Figure 3 This is a flowchart illustrating the view editing method provided in an embodiment of this application. The executing entity in this embodiment can, for example, be a smart home control application. Figure 3 As shown, the view editing method provided in this embodiment includes:

[0080] S301. Based on the movement position of the target object and the floor plan, determine the target adsorption position of the target object in the floor plan.

[0081] In this embodiment of the application, the view editing interface displays a floor plan. The floor plan can be a floor plan that has been created before the target object is edited. The methods for creating the floor plan can include: hand-drawing the floor plan, uploading the floor plan, using a floor plan template, using an existing floor plan, generating the floor plan by voice, generating the floor plan by spatial scanning, etc. This application does not impose any special restrictions on the methods for creating the floor plan.

[0082] The target objects include: equipment models or furniture models. Understandably, they exist in the system as operable objects and have variable positional attributes. The movement of the target object is triggered by the user moving it within the view editing interface. For example, the movement position refers to the real-time changing coordinates of the center point (such as the model's axis position) in the view coordinate system as the user drags the target object using an input device (such as a mouse or touchscreen). This coordinates are continuously reported from the 2D view layer to the view model module of the data view binding layer.

[0083] For example, one side of the view editing interface displays all available model resources in the form of a scrollable, categorized icon wall or 3D thumbnails, including structural models (such as walls, doors, and windows), furniture models (such as sofas and beds), and equipment models (such as electric water heaters and air conditioners). Each icon corresponds to a target object, which is associated with metadata, including attribute information such as name, physical dimensions, power consumption, and interface type. When selected by the user, it is instantiated as an operation object and loaded onto the editing canvas.

[0084] Figure 4 A schematic diagram of the floor plan provided in the embodiments of this application. Figure 1 ,like Figure 4 As shown, the floor plan can include structural models such as spaces, vertical walls, horizontal walls, virtual vertical walls, virtual horizontal walls, doors, and windows, which are maintained by the data model in the data layer.

[0085] Figure 5 A schematic diagram of the floor plan provided in the embodiments of this application. Figure 2 ,like Figure 5 As shown, the floor plan also includes models of several equipment, including: clothes dryer, shoe washer, wall-mounted air conditioner, single-tower floor-standing air conditioner, double-tower floor-standing air conditioner, central air conditioner, fresh air system, kitchen air conditioner, etc.

[0086] Figure 6 A schematic diagram of the floor plan provided in the embodiments of this application. Figure 3 ,like Figure 6 As shown, the floor plan also includes several furniture models, including: L-shaped sofa, coffee table, desk, side table, bar counter, general counter, dining chairs and other furniture models.

[0087] The purpose of this step is to obtain the spatial relationship between the target object and the apartment structure during user interaction, and to automatically determine a reasonable position for its landing point that conforms to the preset layout logic, so as to avoid layout misalignment or time-consuming subsequent adjustments caused by manual placement deviations.

[0088] In some embodiments, candidate adsorption elements of the target object in the floor plan can be determined based on the floor plan and the preset layout rules corresponding to the target object; and the target adsorption position of the target object in the floor plan can be determined based on the movement position and the position of the candidate adsorption elements.

[0089] The target object can be a device or furniture model (such as an air conditioner, bed, switch, etc.) selected by the user from the resource library, or it can be an existing device or furniture model in the current floor plan. It is associated with metadata and preset layout rules. The preset layout rules are used to characterize the spatial placement relationship between various devices and furniture, ensuring that the automatic snapping process not only meets geometric alignment, but also conforms to actual installation specifications and usage logic.

[0090] Preset layout rules can be stored in the database in the form of a configuration table. Each row in the table corresponds to a specific device or furniture model, identified by its unique code (such as "wall-mounted air conditioner A177"), and associated with a set of space constraint rules.

[0091] These rules include: furniture that can be stacked underneath, equipment that can be stacked underneath, cabinets that allow equipment to be placed on the countertop, and custom-built-in cabinets.

[0092] The categories include: "Furniture Allowed to be Stacked Below," indicating the list of furniture types that can be placed directly beneath the wall-mounted or hanging device (e.g., a double bed, single sofa, coffee table, or bar can be placed below a wall-mounted air conditioner); "Device Allowed to be Stacked Below," indicating other devices that can be stacked beneath the device (e.g., a smart speaker or temperature / humidity sensor can be stacked below a ceiling light); "Cabinet Allowed for Tabletop Placement," indicating the type of cabinet that can serve as a platform for tabletop devices (e.g., a smart speaker can be placed on a TV cabinet, worktop, or sideboard); and "Dedicated Embedded Cabinet," indicating the specific cabinet type that certain devices must be embedded in (e.g., a dishwasher can only be embedded in a "dishwasher cabinet," and a steam oven can only be embedded in an "oven cabinet"). For floor-standing furniture (such as beds and sofas), since they do not involve hanging, tabletop placement, or embedded logic, the relevant fields are usually empty or marked as "not applicable."

[0093] Therefore, the preset layout rule table can be dynamically queried during system operation to filter allowed snap-in positions, ensuring that the automatic layout meets both geometric alignment requirements and actual installation specifications and usage logic.

[0094] The following example uses "wall-mounted air conditioner" from the layout rule table:

[0095] Equipment category: "Wall-mounted air conditioner";

[0096] Product code: "A177";

[0097] Dimensions (width, height, depth): 865×190×300;

[0098] Placement: Back-mounted, top surface distance from ground: 1.9m;

[0099] Furniture that can be stacked underneath (hanging or suspended): double bed, single sofa, coffee table, bar counter, dining chair, TV cabinet;

[0100] Devices that are allowed to be stacked below (wall-mounted, hanging): T-shaped refrigerator (01028), single pulsator (A169), air purifier (A033), electric heater (A105), smart speaker (A088);

[0101] Cabinets that allow equipment to be placed on the countertop (desktop type): Countertop placement is not supported;

[0102] Dedicated built-in cabinet (embedded design not supported).

[0103] In this step, firstly, in response to the user's operation of selecting a target object (such as an equipment model or furniture model) from the resource library and starting to drag it, the system obtains the type identifier of the target object, and loads the corresponding preset layout rule from the preset layout rule library according to the type identifier of the target object.

[0104] Then, the system iterates through all elements in the currently loaded floor plan, including walls, furniture, doors and windows, floors, and equipment. For each element, the system performs snap-in detection according to preset layout rules. For example, if the target object is a wall-mounted device, only wall segments that meet the requirements of length, orientation, and room type are retained. After the above filtering, a set of candidate snap-in elements that meet the layout rules are obtained. Each element has a clear geometric reference position (such as the midpoint of the wall, the center of the countertop, or the origin of the embedding position).

[0105] Subsequently, the system acquires the target object's position in real time during the dragging process and calculates the spatial distance between that position and each candidate adsorbed element.

[0106] Based on this, the alignment score between the target object and each candidate adsorption element is further calculated. The alignment score includes: the angle between the main orientation of the target object and the direction of the candidate element, the offset between the center point of the target object and the reference point of the candidate element (such as the midpoint or corner of the wall), and the degree of parallelism or collinearity between the boundary of the target object and the boundary of the candidate element.

[0107] For example, when the target object is a rectangular sofa model and the candidate snapping element is a horizontal wall, if the long side of the sofa is parallel to the direction of the wall and its center projection falls within the range of the wall, then its alignment score is determined to be high; conversely, if the sofa is tilted or only one corner is close to the wall, the score is reduced.

[0108] Finally, the distance values ​​and alignment scores of each candidate adsorption element are weighted and fused to generate a comprehensive matching score. If the comprehensive score of at least one candidate adsorption element exceeds a preset threshold, the position corresponding to the candidate element with the highest score is selected as the target adsorption position.

[0109] This allows users to achieve precise positioning without manual fine-tuning during drag-and-drop, significantly reducing the number of invalid operations and improving the success rate and layout rationality of a single drag-and-drop operation.

[0110] S302. Based on the floor plan, the target adsorption location, and the target object, obtain the target space view.

[0111] In the target space view, the target adsorption location of the floor plan is displayed.

[0112] In this target space view, the target object is drawn at its corresponding target attachment position on the target space view. For example, a wall-mounted air conditioner icon is attached to a specified height on the wall, a smart speaker model is displayed in the center of the TV cabinet counter area, or a dishwasher is embedded in the outline of a dedicated cabinet.

[0113] In this embodiment, once the system determines the target object's location on the floor plan, it performs a view generation operation. For example, the view model module of the data view binding layer transmits the updated object location along with the floor plan data to the rendering engine in the 2D view layer; the rendering engine loads the corresponding display resources according to the type of the target object and draws it using its target location as the anchor point, ultimately generating a complete target space view.

[0114] In some embodiments, before generating the target spatial view, the target spatial view can also be generated based on the user's adjustment of the orientation of the target object.

[0115] Optionally, before obtaining the target space view based on the floor plan, the target attachment location, and the target object, the target display angle of the target object can be determined in response to the user's operation of adjusting the display angle of the target object; then, the target space view is obtained based on the floor plan, the target attachment location, the target display angle, and the target object.

[0116] In this embodiment of the application, when a user selects a target object and starts dragging it, its orientation can be dynamically adjusted through rotation gestures, scroll wheel or shortcut keys; the system captures the display angle specified by the user in real time and uses it for subsequent calculation of the adsorption position.

[0117] Subsequently, based on the floor plan and the preset layout rules corresponding to the target object, a set of candidate adsorption elements can be determined. At the same time, combined with the current moving position and the display angle set by the user, the alignment score between the target object and each candidate adsorption element can be calculated. For example, it can be determined whether the main axis of the object is parallel to the wall, whether it avoids the door and window area, or whether it meets the equipment installation orientation constraints when placed at the current angle.

[0118] If the alignment score of a candidate element exceeds the threshold, the system will attach the target object to the position corresponding to that element and retain the user-defined display angle as the final target display angle. Optionally, if the angle violates the installation rules (e.g., the embedded device is rotated 90°), the system can automatically correct it to the allowed angle or prompt the user to adjust it.

[0119] Finally, based on the floor plan, target snap-in location, target display angle, and target object, a target space view is generated. The target object is accurately presented at the snap-in location according to the user's intended orientation, improving the user's editing and interaction experience.

[0120] When the view editing method provided in this embodiment is applied to a smart home control application (APP), the target space view is an interactive 3D floor plan view. After obtaining the interactive 3D floor plan view, smart home devices can be controlled based on the interactive 3D floor plan view.

[0121] Specifically, the system determines the controlled device in response to the user's selection of a target device in the interactive 3D floor plan view. For example, the user can select a device model such as an air conditioner, light, or curtains as the control object by clicking on it in the 3D view. The system also generates corresponding control commands in response to the user's input of control instructions for the controlled device. These input commands can include clicking virtual buttons, sliding adjustment bars, entering numerical values, or using gestures (such as rotation or zoom).

[0122] Control commands are sent to the controlled device to control it to perform corresponding actions. For example: clicking on the air conditioner model brings up a control panel, allowing you to adjust the temperature or mode; sliding the brightness bar next to the light model adjusts the light brightness; dragging the curtain model controls the opening and closing ratio of the curtains.

[0123] Furthermore, the interactive 3D floor plan view can also display updated device statuses. Upon receiving status update information from the controlled device, the display status of the corresponding device in the 3D view is updated in real time. For example, when lights are turned on, the light fixture model in the 3D view lights up; in air conditioning cooling mode, the air vents display a dynamic blue effect; when curtains are opened, the curtain model in the 3D view moves synchronously.

[0124] The view editing method provided in this application embodiment displays a floor plan in the view editing interface. This method determines the target snapping position of the target object in the floor plan based on the movement position of the target object and the floor plan. The movement position is generated by the user triggering the movement of the target object in the view editing interface. The target object includes: an equipment model or a furniture model. Based on the floor plan, the target snapping position, and the target object, a target space view is obtained. In the target space view, the target object is displayed at the target snapping position of the floor plan. This method adopts a drag-and-drop editing method, which is simple to operate, improves editing efficiency, and effectively ensures the geometric accuracy of the target object's spatial placement and the rationality of the view layout through automatic snapping.

[0125] In some embodiments, determining the target adsorption location of the target object in the floor plan based on the movement location and the location of the candidate adsorption element includes:

[0126] In response to a moving position, if the distance between the current position and the position of the candidate element to be attracted is less than or equal to a preset distance threshold, and the user triggers a position determination operation, the target attraction position is determined based on the position of the candidate element to be attracted and the preset layout rules.

[0127] In this embodiment, when the user drags the target object to move within the view editing interface, the system can acquire its position in real time and continuously calculate the spatial distance between that position and each candidate adsorption element. Once it is determined that the position of a candidate adsorption element meets the adsorption conditions, to avoid automatically locking the position due to accidental touches or temporary passing, adsorption is not immediately executed; instead, the system waits for the user to actively trigger a position determination operation. Here, the position determination operation could be, for example, releasing the mouse button, lifting a finger, pressing the Enter key, or clicking the "Confirm Placement" button.

[0128] In response to the position determination operation, the system further verifies whether the selected candidate adsorption element still meets the preset layout rules corresponding to the target object. If the verification passes, the target adsorption position is finally determined based on the geometric reference position of the candidate adsorption element and the offset defined in the rules (such as "1.2 meters from the ground" and "center alignment"). In this way, the device can automatically adsorb or align to the candidate adsorption element, such as a wall-mounted air conditioner adsorbing onto the wall, and automatically attaching the back of the air conditioner to the wall. If the verification fails (such as when a user attempts to place an embedded device in a non-dedicated cabinet), the adsorption is canceled and an error message is displayed.

[0129] Thus, through a dual determination mechanism of distance threshold and user confirmation, this embodiment ensures that the adsorption position meets the user's operational intentions while guaranteeing the intelligence of adsorption.

[0130] Optionally, when determining the target adsorption location, various algorithm modules can be invoked for matching calculations, including: point-to-point adsorption, point-to-line adsorption, line-to-line adsorption, rectangular adsorption, and polygonal adsorption. The output results of each adsorption algorithm are sorted according to a preset priority. If the distance between the current moving position and a high-priority candidate element is less than a threshold, the target adsorption location is determined based on the position of the high-priority candidate adsorption element and the preset layout rules.

[0131] In other embodiments, in response to the movement position, if the distance between the candidate adsorbed element and the position of the candidate adsorbed element is less than or equal to a preset distance threshold, the display effect of the candidate adsorbed element is changed to a first display effect.

[0132] The first display effect can be, for example, a highlight, a drawing of an adsorption marker (such as a circular halo or alignment guide lines), or a magnetic animation. The first display effect is used to indicate that the current moving position has entered the effective adsorption range and that the candidate adsorption element conforms to the preset layout rules of the target object; for example, highlighting the recommended device placement area.

[0133] Furthermore, if the user continues to move the target object away from the candidate adsorbed element, causing the distance to exceed a preset distance threshold, the system will automatically restore the display effect of the candidate adsorbed element to the default state and cancel the first display effect to avoid misleading the user.

[0134] In this way, by changing the display effect of the candidate adsorbed elements in real time to the first display effect, users can perceive the system's intent and thus be guided to achieve efficient and accurate view editing.

[0135] In some embodiments, spatial conflict detection can be further performed during the user's dragging of the target object to avoid invalid or non-compliant layouts. For example, based on the movement position, the positions of existing elements in the floor plan, and preset layout rules, conflict detection is performed between the target object and existing elements to obtain a detection result indicating whether there is a conflict between the movement position and the positions of existing elements.

[0136] In response to the detection result indicating a conflict between the moved position and the position of an existing element, the display effect of the existing element is changed to the second display effect.

[0137] Conflict detection can include: geometric overlap between the bounding box of the target object and the bounding box of existing furniture; wall-mounted equipment being dragged to a prohibited installation area; desktop equipment being moved above a cabinet that does not support desktop placement; embedded equipment being close to but not aligned with its dedicated embedded cabinet; and interference between the equipment and the opening path of doors / windows.

[0138] When the collision detection result indicates that the moving position conflicts with the position of an existing element, a corresponding visual warning will be triggered, changing the display effect of the conflicting existing element to a second display effect. Understandably, the second display effect differs from the first display effect of the aforementioned snapping prompt. The second display effect is used to indicate that the target object cannot be placed in the current position. For example, the outline of the conflicting existing furniture will be rendered with a flashing red border, or the conflicting device model will briefly shake or darken.

[0139] In this embodiment of the application, if the user continues to adjust the position of the target object so that the target object moves out of the conflict area, the system automatically restores the default display effect of the existing elements and cancels the second display effect.

[0140] Thus, through the aforementioned conflict detection and dynamic visual feedback methods, the system can pre-prompt users to indicate layout issues before they complete placement, reducing the tediousness of repeated trial and error, minimizing human error, and improving layout efficiency.

[0141] Figure 7 Flowchart of the view editing method provided in the embodiments of this application Figure 2 ,like Figure 7 As shown, when a user drags the device, the system first activates the adsorption system to determine if the device is close to structural elements such as walls, room boundaries, or furniture. If the preset adsorption conditions are met, the automatic adsorption function is triggered, automatically offsetting and backing the device to the target alignment point, such as the wall, the device itself, or the center of the room.

[0142] Subsequently, the system enters the conflict detection process, which uses a conflict detection system to determine whether there are spatial conflicts between the device and existing elements, including separation, intersection, or contact. If a conflict is detected, the system marks the device status as "red" and provides visual feedback on the conflict in the view layer to avoid ineffective placement.

[0143] After the user stops dragging, the system checks again whether there is a conflict at the current position. If a conflict exists, the move is considered a failure, and no data changes are committed; if there is no conflict, the move is considered a success, a transaction is initiated, and data is written to the data layer. At the same time, the view layer is updated, completing the entire editing process.

[0144] This process achieves closed-loop control from adsorption guidance to conflict warning and data persistence, balancing intelligence and operational security, and improving the user interaction experience.

[0145] In some embodiments, the system performs overlap and conflict detection in real time while the user is dragging the device to determine whether its current position conforms to preset layout rules.

[0146] For example, the system performs real-time overlap detection while the user drags the device to determine if its current position conforms to preset layout rules. The detection process begins with a touch movement event and first determines whether the current device is a wall-mounted device.

[0147] If it is a wall-mounted device, perform the following checks in sequence:

[0148] (1) Determine if the equipment is located in its assigned room; if not, mark it as an invalid operation;

[0149] (2) If inside the room, further determine whether there is contact with the wall or doors and windows; if there is no contact, mark it as an invalid operation;

[0150] (3) If it has already contacted the wall or door / window, continue to determine whether it overlaps with other wall-mounted equipment or equipment that is allowed to be stacked below it; if there is an overlap, mark it as an invalid operation;

[0151] (4) If all the above checks pass, the placement is deemed valid.

[0152] If the current device is not a wall-mounted device, proceed to the non-wall-mounted device testing process:

[0153] First, determine if the device is located in the designated room; if not, mark it as an invalid operation.

[0154] If so, determine whether there is a collision with a wall, door, or window; if a collision occurs, mark it as an invalid operation.

[0155] If no collision occurs, further determine whether the equipment is a ceiling-mounted device:

[0156] If it is a ceiling-mounted device, check if there is any furniture or other equipment directly below it that conflicts with it (such as height interference or projection overlap); if there is a conflict, mark it as an invalid operation; if there is no conflict, it is considered a valid operation.

[0157] If it is not a ceiling-mounted device, then determine whether it is a device that can be placed on a countertop:

[0158] If it is a countertop device, check whether it falls within the valid area of ​​the furniture (such as a TV cabinet or worktable) that supports the countertop, and verify whether it overlaps with existing devices on the countertop; if it does not fall within the valid area or overlaps, mark it as an invalid operation; otherwise, it is considered a valid operation.

[0159] If it is not a tabletop device, it is assumed to be a floor-standing device. The system will directly detect whether its bottom projection overlaps with existing devices or obstacles. If it overlaps, it will be marked as an invalid operation. If it does not overlap, it will be considered a valid operation.

[0160] All invalid operations will set the device status to warning, while valid operations will remain normal. This mechanism, through type-driven multi-level condition judgment, enables fine-grained conflict verification for devices with different installation configurations, ensuring the physical feasibility and standard consistency of the layout results.

[0161] Figure 8 This is a schematic diagram of the structure of a view editing device provided in an embodiment of this application. Figure 8 As shown, this application embodiment provides a view editing device, the view editing device 800 including:

[0162] The determination module 801 is used to determine the target attachment position of the target object in the floor plan based on the movement position of the target object and the floor plan; the movement position is generated by the user triggering the movement of the target object in the view editing interface; the target object includes: equipment model or furniture model;

[0163] The processing module 802 is used to obtain a target space view based on the floor plan, the target adsorption location, and the target object; in the target space view, the target adsorption location of the floor plan is displayed with the target object.

[0164] Optionally, the determining module 801 is also used to determine the candidate adsorption elements of the target object in the floor plan based on the floor plan and the preset layout rules corresponding to the target object;

[0165] The determination module 801 is also used to determine the target adsorption position of the target object in the floor plan based on the movement position and the position of the candidate adsorption element.

[0166] Optionally, the determination module 801 is further configured to determine the target adsorption position based on the position of the candidate adsorption element and a preset layout rule, in response to the movement position, the distance between the position and the position of the candidate adsorption element being less than or equal to a preset distance threshold, and the user triggering the position determination operation.

[0167] Optionally, the view editing device 800 further includes: a change module 803;

[0168] The modification module 803 is used to change the display effect of the candidate adsorbed element to the first display effect when the distance between the moving position and the position of the candidate adsorbed element is less than or equal to a preset distance threshold.

[0169] Optionally, the view editing device 800 further includes: a detection module 804;

[0170] The detection module 804 is used to perform conflict detection between the target object and existing elements based on the moving position, the position of existing elements in the floor plan, and preset layout rules, and to obtain the detection result of whether there is a conflict between the moving position and the position of existing elements.

[0171] The modification module 803 is also used to respond to the detection result indicating a conflict between the position of the moving element and the position of the existing element, and to change the display effect of the existing element to the second display effect.

[0172] Optionally, the determining module 801 is also used to determine the target display angle of the target object in response to the user's operation of adjusting the display angle of the target object;

[0173] The processing module 802 is also used to obtain a target space view based on the floor plan, the target adsorption location, the target display angle, and the target object.

[0174] Optionally, the view editing device 800 further includes a control module 805;

[0175] The control module 805 is used to control smart home devices based on an interactive 3D floor plan view.

[0176] Figure 9 A schematic diagram of the structure of the electronic device provided in this application. Figure 9 As shown, this application provides an electronic device 900, which includes: a receiver 901, a transmitter 902, a processor 903, and a memory 904.

[0177] Receiver 901 is used to receive instructions and data;

[0178] Transmitter 902 is used to send commands and data;

[0179] Memory 904 is used to store instructions executed by the computer;

[0180] The processor 903 is used to execute computer execution instructions stored in the memory 904 to implement the various steps performed by the view editing method in the above embodiments. For details, please refer to the relevant descriptions in the foregoing view editing method embodiments.

[0181] Optionally, the memory 904 can be either standalone or integrated with the processor 903.

[0182] When the memory 904 is set up independently, the electronic device also includes a bus for connecting the memory 904 and the processor 903.

[0183] The implementation principle and technical effects of the electronic device provided in this embodiment can be found in the foregoing embodiments, and will not be repeated here.

[0184] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the view editing method in any of the foregoing embodiments.

[0185] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the view editing method in any of the foregoing embodiments.

[0186] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules described above is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed.

[0187] The integrated modules described above, implemented as software functional modules, can be stored in a computer-readable storage medium. These software functional modules, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute partial steps of the methods in the various embodiments of this application.

[0188] It should be understood that the aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor. The memory may include high-speed RAM, and may also include non-volatile memory (NVM), such as at least one disk storage device, and may also be a USB flash drive, external hard drive, read-only memory, disk, or optical disc, etc.

[0189] The aforementioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0190] An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Alternatively, the storage medium can be an integral part of the processor. Both the processor and the storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and storage medium can exist as discrete components in an electronic device or host device.

[0191] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0192] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0193] 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 of the various embodiments of this application.

[0194] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A view editing method characterized by, The view editing interface displays a floor plan, and the method includes: Based on the movement position of the target object and the floor plan, the target attachment position of the target object in the floor plan is determined; the movement position is generated by the user triggering the movement of the target object in the view editing interface; the target object includes: a device model or a furniture model; Based on the floor plan, the target adsorption location, and the target object, a target space view is obtained; in the target space view, the target object is displayed at the target adsorption location of the floor plan.

2. The view editing method according to claim 1, characterized in that, The determination of the target adsorption position of the target object in the floor plan based on the movement position of the target object and the floor plan includes: Based on the floor plan and the preset layout rules corresponding to the target object, candidate adsorption elements of the target object in the floor plan are determined; Based on the movement position and the position of the candidate adsorbed element, the target adsorption position of the target object in the floor plan is determined.

3. The view editing method according to claim 2, characterized in that, Determining the target adsorption location of the target object in the floor plan based on the movement location and the location of the candidate adsorption element includes: In response to the movement position, the distance between the position of the candidate adsorbed element and the position of the candidate adsorbed element is less than or equal to a preset distance threshold, and the user triggers a position determination operation, the target adsorption position is determined based on the position of the candidate adsorbed element and the preset layout rules.

4. The view editing method according to claim 3, characterized in that, The method further includes: In response to the moving position, if the distance between the moving position and the position of the candidate adsorbed element is less than or equal to the preset distance threshold, the display effect of the candidate adsorbed element is changed to the first display effect.

5. The view editing method according to any one of claims 2-4, characterized in that, The method further includes: Based on the movement position, the position of existing elements in the floor plan, and the preset layout rules, a conflict detection is performed between the target object and the existing elements to obtain a detection result indicating whether there is a conflict between the movement position and the position of the existing elements. In response to the detection result indicating a conflict between the moved position and the position of the existing element, the display effect of the existing element is changed to a second display effect.

6. The view editing method according to any one of claims 1-4, characterized in that, Before obtaining the target spatial view based on the floor plan, the target adsorption location, and the target object, the method further includes: In response to a user's operation to adjust the display angle of the target object, the target display angle of the target object is determined; The process of obtaining a target spatial view based on the floor plan, the target adsorption location, and the target object includes: Based on the floor plan, the target adsorption location, the target display angle, and the target object, the target space view is obtained.

7. The view editing method according to any one of claims 1-4, characterized in that, The method is applied to a smart home control application (APP), wherein the target space view is an interactive 3D floor plan view, and the method further includes: Based on the interactive 3D floor plan view, smart home devices can be controlled.

8. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 7 through the computer program.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program, when executed, performs the method of any one of claims 1 to 7.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the method as described in any one of claims 1-7.