A control method and device
By identifying and processing the first operation of the operation body in the drawing tools and document production tools, and automatically determining and adjusting multiple elements related to it, the problem of cumbersome elements deletion and hierarchical relationship adjustment operations is solved, and more efficient users are achieved Operations and tool promotion.
Patent Information
- Application Number
- CN202111166512.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-30
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-09-30
AI Technical Summary
When using drawing tools and document production tools to build or display objects, the deletion of elements and hierarchical relationship adjustment operations are more cumbersome, which is not conducive to user operations and tool promotion.
By obtaining the first operation of the operation body, at least one element in the object is selected, multiple elements related to the element are determined, instructions are generated and executed to change the display of these elements, and rapid adjustment of multiple elements with the same element type is achieved. .
It simplifies the operation process, improves the efficiency of user operations and the promotion potential of tools, and realizes rapid adjustment of multiple elements with the same element type.
Smart Images

Figure CN113885761B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of visualization adjustment technology, and in particular, relates to a control method and device. Background Art
[0002] At present, electronic devices can use some special tools, such as drawing tools and document creation tools, to build and display objects, etc., for example, to build relationship models through graphic visualization adjustment tools, etc. In the process of building or displaying using drawing tools and document creation tools, it may be necessary to delete an element or adjust the hierarchical relationship between elements. The operations such as deleting and adjusting elements are relatively cumbersome, which is not conducive to user operation and tool promotion. Summary of the invention
[0003] The present application provides a control method and device.
[0004] In one aspect, the present application provides a control method, the method comprising:
[0005] Obtaining a first operation of an operation body, wherein the first operation selects at least one first element in a first object;
[0006] According to the first operation, determining a plurality of second elements associated with the at least one first element, wherein the plurality of second elements associated with the at least one first element have the same element type;
[0007] generating a first instruction based at least on the first operation;
[0008] The first instruction is executed at least on the plurality of second elements to change display of the plurality of second elements in the first object.
[0009] Optionally, the first element and the second element are of the same element type, and determining, according to the first operation, a plurality of second elements related to the at least one first element includes:
[0010] According to the first operation, all second elements in a plurality of types of elements are selected, wherein the plurality of types of elements further include at least a third element, and the third element is of a different element type from the first element;
[0011] The at least executing the first instruction on the plurality of second elements to change display of the plurality of second elements in the first object includes:
[0012] The first instruction is executed on the first element and the plurality of second elements to change display of the first element and the plurality of second elements in the first object.
[0013] Optionally, the first element and the second element are of different element types, and determining, according to the first operation, a plurality of second elements related to the at least one first element includes:
[0014] According to the first operation, all second elements in a plurality of types of elements are selected, wherein the plurality of types of elements further include at least a third element, and the third element has the same element type as the first element.
[0015] Optionally, selecting all second elements from multiple types of elements according to the first operation includes:
[0016] According to the first operation, determining all lines connected to the at least one first element, the element type of the first element being a model element or a device element;
[0017] or
[0018] According to the first operation, a model element related to the at least one first element and all lines connected to the related model element are determined, and the element type of the first element is a device element.
[0019] Optionally, executing the first instruction on at least the multiple second elements includes: executing a delete instruction on the multiple second elements.
[0020] Optionally, selecting all second elements from multiple types of elements according to the first operation includes:
[0021] According to the first operation, all second elements having the same element type and the same level as the first element are determined.
[0022] Optionally, executing the first instruction on at least the plurality of second elements includes:
[0023] A first instruction is executed on the first element and the plurality of second elements, wherein the first instruction changes a hierarchical relationship between the first element and the plurality of second elements and other elements.
[0024] Optionally, the method further includes: when the operator maintains the first operation, determining at least an element at a previous level of the first element and an element at a next level of the first element;
[0025] The upper-level element is controlled to be displayed in a first manner, and the lower-level element is controlled to be displayed in a second manner, wherein the first manner and the second manner make the display of the upper-level element and the lower-level element different from other elements.
[0026] Optionally, the first manner is that the upper-level element is marked with an upper-level identifier, and the second manner is that the lower-level element is marked with a lower-level identifier;
[0027] or
[0028] The first method and the second method make the shading of the upper-level element and the lower-level element different from other elements, and the shading of the upper-level element is different from the shading of the lower-level element.
[0029] In another aspect, the present application provides an electronic device, comprising:
[0030] A display screen, configured to display a first object;
[0031] A processor is used to obtain a first operation of an operating body, wherein the first operation selects at least one first element in a first object; based on the first operation, determine multiple second elements related to the at least one first element, and the element types of the multiple second elements related to the at least one first element are the same; generate a first instruction based at least on the first operation; and execute the first instruction on at least the multiple second elements to change the display of the multiple second elements in the first object.
[0032] The above-mentioned control method and device obtain a first operation of an operating body, the first operation selects at least one first element in a first object, and according to the first operation, determines multiple second elements related to the at least one first element, and the element types of the multiple second elements related to the at least one first element are the same; at least based on the first operation, generates a first instruction; at least executes the first instruction on multiple second elements to change the display of multiple second elements in the first object, so that the operating body (such as a user) adjusts multiple elements of the same element type when making at least one operation, and by adjusting and changing multiple elements of the same element type at the same time, multiple elements of the same element type can be quickly adjusted, simplifying operations, thereby facilitating user operations and tool promotion. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0034] Figure 1 is a flow chart of a control method provided by an embodiment of the present application;
[0035] Figure 2is a flow chart of another control method provided by an embodiment of the present application;
[0036] Figure 3 is a schematic diagram of a display adjustment provided by an embodiment of the present application;
[0037] Figure 4 is a schematic diagram of another display adjustment provided by an embodiment of the present application;
[0038] Figure 5 is a flow chart of another control method provided in an embodiment of the present application;
[0039] Figure 6 is a schematic diagram of another display adjustment provided in an embodiment of the present application;
[0040] Figure 7 is a schematic diagram of another display adjustment provided in an embodiment of the present application;
[0041] Figure 8 is a schematic diagram of another display adjustment provided in an embodiment of the present application;
[0042] Fig. 9 is a flow chart of another control method provided in an embodiment of the present application;
[0043] Fig.10 is a schematic diagram of another display adjustment provided in an embodiment of the present application;
[0044] Fig.11 is a schematic diagram of another display adjustment provided in an embodiment of the present application;
[0045] Fig.12 is a schematic diagram of another display adjustment provided in an embodiment of the present application;
[0046] Fig.13 is a schematic diagram of another display adjustment provided in an embodiment of the present application;
[0047] Fig.14 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0049] Electronic devices can use some special tools, such as drawing tools and document creation tools, to build and display objects, etc. Taking graphic visualization editing tools as an example, graphic visualization editing tools can build a relationship model. A relationship model includes device elements, model elements and line elements. Device elements and model elements can be connected by lines, and there is a certain relationship between devices and models connected by lines; device elements can include multiple model elements.
[0050] For example, a relational model of a mobile phone is constructed in a graphical visualization editing tool. The relational model of a mobile phone is used to reflect the relationship between all applications installed on the mobile phone. The mobile phone is a device element, and the application is a model element. If one application calls another application, the two applications are connected by a line.
[0051] When a user deletes a connection between device elements and / or model elements, the first way to delete the connection is that the user can select one or more connections, trigger the electronic device to display an operation menu, and select the delete option in the operation menu to delete the connection selected by the user. For example, the user selects one or more connections by clicking the left mouse button, and the user also needs to hold down the ctrl key when selecting multiple connections; when the cursor is on the selected connection, the user clicks the right mouse button, and the electronic device can display an operation menu; then the user selects the delete option in the operation menu to delete the selected connection. The first method requires the user to select multiple connections, which may fail to achieve the purpose of deletion due to misoperation or missed operations.
[0052] The second way to delete a line is that the user selects the line to be deleted by selecting it, triggering the electronic device to display an operation menu, and selects the delete option in the operation menu to delete the line selected by the user. For example, the user holds down the left mouse button to select multiple lines, and when the cursor is on the selected line, the user clicks the right mouse button, and the electronic device can display an operation menu; then the user selects the delete option in the operation menu to delete the selected line. The second method is easy to select lines that do not need to be deleted when selecting lines. If you select lines that do not need to be deleted, the user also needs to remove these lines in reverse, which is very complicated.
[0053] In the relational model, the elements in the relational model also have hierarchical properties. The hierarchy of the elements is determined by the order in which the elements are added. The hierarchy of the elements added later is greater than the hierarchy of the elements added earlier. If the positions of the elements added later overlap with the elements added earlier, the elements added later will cover part of the area of the elements added earlier. Users can change the hierarchical relationship between elements. To change the hierarchical relationship, users need to perform three steps: select the element - right-click to display the menu - select the operation option. The operation options related to the hierarchical relationship include Place at the top, Place at the bottom, Move up one level, and Move down one level. If the user adjusts an element up two levels, it is necessary to move up one level after moving up one level, so the operation of changing the hierarchical relationship is also more complicated.
[0054] The above is an example of a graphic visualization editing tool to introduce how to delete elements and change the hierarchical relationship between elements in a graphic visualization editing tool. The above problems also exist for PPT documents created by PPT tools. Therefore, when editing elements in an object, the operation is cumbersome, which is not conducive to user operation and tool promotion.
[0055] In order to solve the above problems, an embodiment of the present application provides a control method and device, which can change the display of multiple elements of the same element type in a first object at least through a first operation of an operating body, so that the operating body (such as a user) can adjust the multiple elements of the same element type when making at least one operation. By adjusting and changing the multiple elements of the same element type at the same time, the multiple elements of the same element type can be quickly adjusted, the operation is simplified, and it is beneficial to user operation and tool promotion.
[0056] like Figure 1 As shown, it shows an optional process of a control method provided in an embodiment of the present application, which may include the following steps:
[0057] 101. Obtain a first operation of an operation body, where the first operation selects at least one first element in a first object.
[0058] The first object includes multiple types of elements, and the element types of the multiple types of elements are different. One way is that the first object includes at least three types of elements: device elements, model elements, and line elements. Device elements are connected by lines, and model elements can also be connected by lines. Device elements include model elements. For example, if the first object is a relationship model of applications in a mobile phone, the mobile phone is a device element, and the application in the mobile phone is a model element. For another example, if the first object is a smart home monitoring platform, the smart home monitoring platform is a device element, and each home device in the smart home monitoring platform is a model element.
[0059] The operating body can perform a first operation on the first object, and the function of the first operation is to select at least one first element in the first object. For example, the first operation can be a point selection operation, and the point selection operation can select a first element in the first object; for another example, the first operation can be a box selection operation, and the box selection operation can select multiple first elements in the first object, and the element types of the selected multiple first elements are the same.
[0060] 102. According to the first operation, determine a plurality of second elements associated with at least one first element, wherein the plurality of second elements associated with the at least one first element have the same element type. The element type of the second element may be the same as the element type of the first element, or the element type of the second element may be different from the element type of the first element, and the element type relationship between the first element and the second element is not limited.
[0061] While at least one first element is selected in the first operation, multiple second elements related to the selected first element are determined. Wherein the correlation indicates that there is a certain association relationship between the first element and the multiple second elements, and the association relationship can indicate the element type relationship between the first element and the second element, such as the association relationship can indicate that the element types of the first element and the second element are the same, or the association relationship can indicate that the element types of the first element and the second element are different. If the association relationship indicates that the element types of the first element and the second element are different, the association relationship between the first element and the second element can include at least one of the following relationships: the second element runs on the first element, the second element is a component of the first element, the first element includes the second element, the second element and the first element are a parent-child relationship (such as the first element is a parent node and the second element is a child node), and the second element is connected to the first element (such as the second element is a line connected to the first element).
[0062] In this embodiment, the electronic device may preset an association relationship corresponding to the first object. After selecting the first element according to the first operation, the electronic device may search the first object for all second elements that have a preset association relationship with the first element.
[0063] 103. Generate a first instruction based at least on the first operation. In this embodiment, the first instruction can be generated based on the operation data of the first operation, that is, the first operation can select the first element to determine multiple second elements and adjust the display of elements of the same element type, such as at least controlling the display of multiple second elements. The operation data of the first operation includes at least one of the operation duration of the first operation, the movement trajectory of the first operation, and the moving distance of the first operation. Different operation data generate different first instructions.
[0064] For example, the operation duration of the first operation is at least used to adjust the order between elements of the same element type, such as adjusting the order between multiple second elements and other elements. The order can be but is not limited to a hierarchical relationship. The corresponding first instruction is used to adjust the order between elements of the same element type, such as the first instruction adjusts the order between multiple second elements and other elements, but the order intervals of each second element are adjusted to be the same. The order interval refers to the interval between an element from the first order before adjustment to the second order after adjustment. Although the order of each second element is different before adjustment, the order interval adjusted by the first instruction is the same, such as the order of each second element is increased by N or decreased by M, N and M are natural numbers greater than 1, and the adjusted order interval can be determined according to the operation duration of the first operation. If the operation duration is longer, the increase or decrease is more, and if the operation duration is shorter, the increase or decrease is less. Similarly, the increase or decrease can also be determined by the operation data of the first operation, such as the first operation indicates that the order increases by pressing the left mouse button, and if the first operation indicates that the order decreases by pressing the right mouse button, this is only an example, and this embodiment is not limited.
[0065] For another example, the motion trajectory of the first operation is at least used to adjust the position of elements of the same element type and / or to delete elements of the same element type, and the corresponding first instruction is used to adjust the position of elements of the same element type and / or to delete elements, such as the motion trajectory of the first operation is used to adjust the position of multiple second elements and / or to delete multiple second elements. The position of elements in the first object and the deletion of elements can be distinguished by different motion trajectories. For example, if the motion trajectory is a repeated motion trajectory (such as moving left and then right, repeatedly), multiple elements can be deleted; if the motion trajectory indicates movement in one direction, the position of the element can be adjusted.
[0066] In the process of controlling the motion trajectory with the first operation, the motion trajectory can both select the first element and adjust the display of elements of the same element type; the electronic device can determine the element passed by the motion trajectory as the first element, such as determining the element that meets the preset conditions among all the elements passed by the motion trajectory as the first element. For example, the first element can be the element corresponding to the initial position, starting position or other special position (such as the intersection position in the motion trajectory) of the motion trajectory; the first element can also be an element of one element type among all the element types experienced by the motion trajectory, and this element type can be the largest proportion or the highest ranking, etc.
[0067] The same moving distance of the first operation can also be used to adjust elements of the same element type, such as adjusting at least multiple second elements. For the adjustment of the moving distance based on the first operation, please refer to the description of the operation duration and the motion trajectory, which will not be described one by one in this embodiment. The operation duration of the above-mentioned first operation and the motion trajectory of the first operation are also some exemplary descriptions. Users can set the operation data of the first operation and the purpose of the corresponding first instruction according to their own needs to adjust the elements of the same element type in the first object through the first operation.
[0068] In this embodiment, the first instruction can be generated based on the first operation and other operations. One way is to obtain a second operation of the operation body when the operation body maintains the first operation, the first operation and the second operation are different, and the second operation is another operation performed continuously by the operation body after the first operation; according to the second operation, generate a first instruction corresponding to the second operation, so as to adjust the elements of the same element type in the first object through two consecutive different operations of the operation body.
[0069] When adjusting through two consecutive different operations of the operating body, the first operation is used to select at least one first element, and the second operation is performed while maintaining the selection of at least one first element through the first operation. The elements of the same element type in the first object are adjusted through the second operation. The adjustment of the elements of the same element type by the second operation is mainly to change the display of the elements of the same element type, which may include but is not limited to: adjusting the order between other elements, deleting elements, adjusting the position of elements, adjusting the color and pattern of elements, etc. This embodiment does not explain the adjustment of the elements by the second operation one by one.
[0070] For the adjustment of elements of the same element type in different directions, different second operations can be implemented. For example, when the first element is selected, the second operation is a repeated movement operation, such as the operating body moves in the first direction and then moves in the second direction while maintaining the first operation and moves multiple times, and the first direction and the second direction are two opposite directions (such as repeated left and right movements), indicating deleting elements of the same element type, such as deleting multiple second elements; for example, when the first element is selected, the second operation is an operation of continuous movement in one direction (such as continuous downward movement), indicating ascending sorting of multiple second elements.
[0071] Regardless of whether the first instruction is generated based on the first operation or the first instruction is generated based on the first operation and the second operation, the first operation and the second operation are in the following form:
[0072] The first operation and the second operation may be operations of a mouse by the operating body, or the first operation and the second operation may be gesture operations of the user, and the gesture operation may be an air gesture or a gesture made on the touch screen of the electronic device, or the first operation and the second operation may be operations of a touchpad by the operating body. This embodiment does not limit the types of operations of the first operation and the second operation, such as a click operation or a box selection operation, or specific gesture operations, such as a cross gesture, or repeated left and right movements after a click operation.
[0073] 104. Execute the first instruction at least on the multiple second elements to change display of the multiple second elements in the first object, thereby adjusting the multiple second elements of the same element type.
[0074] The first instruction can be used to change the order between the multiple second elements and other elements, delete the multiple second elements, adjust the positions of the multiple second elements, adjust the colors and patterns of the multiple second elements, etc. In this embodiment, the electronic device can pre-set the correspondence between the first instruction and the first operation, and the correspondence indicates that the electronic device may make adjustments to the first object after the operator performs at least the first operation, such as repeated left and right movements after the operator performs a click operation. The first instruction can be to delete the multiple second elements. The electronic device can set the first instructions corresponding to various operations in advance according to user needs, so as to be able to make a variety of different adjustments to the elements of the same element type in the first object. The correspondence between the operation and the instruction is not limited in this embodiment.
[0075] The above-mentioned control method obtains a first operation of an operating body, the first operation selects at least one first element in a first object, and according to the first operation, determines multiple second elements related to the at least one first element, and the element types of the multiple second elements related to the at least one first element are the same; generates a first instruction based on at least the first operation; executes the first instruction on at least multiple second elements to change the display of the multiple second elements in the first object, so that the operating body (such as a user) adjusts multiple elements of the same element type when making at least one operation, and by adjusting and changing multiple elements of the same element type at the same time, multiple elements of the same element type can be quickly adjusted, simplifying operations, thereby facilitating user operations and tool promotion.
[0076] The control method provided by this embodiment is described below from the perspectives of the first element and the second element having the same element type and the first element and the second element having different element types. First, the optional flow of the control method when the first element and the second element have the same element type is introduced, such as Figure 2 As shown, it shows an optional way of determining multiple second elements and executing the first instruction, which may include the following steps:
[0077] 201. Obtain a first operation of an operation body, where the first operation selects at least one first element in a first object.
[0078] 202. According to the first operation, all second elements in the multiple types of elements are selected, wherein the multiple types of elements also include at least a third element, the third element and the first element have different element types, the first element and the second element have the same element type, and the element type of multiple second elements related to at least one first element are the same.
[0079] That is, the first object includes at least a first element, a second element, and a third element, the first element and the second element have the same element type, but the first element and the third element have different element types. After the first operation of the operating body selects the first element, the electronic device can select the second element of the first object that has the same element type as the first element according to the element type of the first element.
[0080] For example, the first object includes multiple device elements and multiple model elements. The first operation of the operator selects one device element. The electronic device can select the remaining device elements according to the first operation, thereby selecting all elements of the same element type in one operation.
[0081] One thing to note here is that multiple elements of the same element type in the first object may refer to different things. For example, the first object includes multiple device elements, and the multiple device elements may point to different devices, such as one device element pointing to a motherboard and another device element pointing to a sensor. Therefore, when all second elements of the multiple types of elements are selected according to the first operation, in addition to referring to the element type of the first element, the target pointed to by the first element is also referred to, and the element with the same element type and the same target as the first element is used as the second element.
[0082] For example, if the first element is a device element and points to the sensor, then the second element is also a device element pointing to the sensor. For another example, in a PPT production scenario, a PPT document includes a title element, a subtitle element, a text element, a picture element, etc., and elements of different element types have content written in them. Therefore, when the second element is selected according to the first operation, an element with the same element type and content as the first element is selected as the second element.
[0083] 203. Generate a first instruction based at least on the first operation.
[0084] The first instruction can be generated based on the operation data of the first operation, that is, the first operation can not only select multiple identical second elements, but also adjust the display of multiple identical second elements; or the first instruction can be generated based on the first operation and the second operation after the first operation, that is, it is generated based on two consecutive operations, so as to select multiple identical second elements through the first operation, and adjust the display of multiple identical second elements through the second operation. For details, please refer to the description in the above embodiment, which will not be repeated here.
[0085] 204. Execute a first instruction on the first element and the plurality of second elements to change display of the first element and the plurality of second elements in the first object.
[0086] In this embodiment, the first instruction is for the first element and all the selected second elements, that is, the first instruction is for multiple identical elements selected based on the first operation, and the multiple identical elements can be the first element and all the second elements of the same element type, or multiple elements of the same element type with the same reference target. In order to achieve precise adjustment of elements of the same type, multiple identical elements can be multiple elements of the same element type with the same reference target.
[0087] Among them, changing the display of the first element and multiple second elements in the first object may include but is not limited to: deleting the first element and multiple second elements, adjusting the positions of the first element and multiple second elements, adjusting the order of the first element and multiple second elements with other elements, adjusting the colors and patterns of the first element and multiple second elements, modifying the targets pointed to by the first element and multiple second elements, etc.
[0088] The following example illustrates how to adjust the display of multiple identical elements based on the first instruction. Figure 3 As shown, a PPT file as shown in 3 is produced by a PPT production tool, and "Patent Knowledge" is written in the titles of the first and second pages of the PPT file. When checking the PPT file, the user wants to change "Patent Knowledge" to "Introduction to Basic Patent Knowledge" or adjust the display of the title "Patent Knowledge", such as adjusting the position of the title, the size and color of the text box where the title is located, etc.; then the user needs to adjust the titles on the first and second pages respectively, such as the user modifies the title content in turn, and changes the title content of the first and second pages to "Introduction to Basic Patent Knowledge".
[0089] When implementing the control method of the present application for a PPT file, the user can click on the title of the first page to select the title of the first page, and then the title of the second page is also selected based on the click operation. Then, based on the selection of the title of the first page, the user can make a second operation to modify the content of the selected element, and modify the title content of the first page to "Introduction to Basic Patent Knowledge" through the second operation. Since the title content of the second page is also selected, the title content of the second page can be modified synchronously with the title content of the first page, and the user does not need to manually modify the title content of the second page. For example, based on the selection of the title of the first page, the user can click the edit shortcut key, the title content of the first page is in an editable state, and the user can modify the title content of the first page.
[0090] Figure 4 A relational model constructed by a graphical visualization editing tool is shown. The relational model shows the relationship between two device elements and the relationship between model elements in each device element. In the relational model, the elements in the relational model also have a hierarchical attribute. The hierarchy of the elements is determined by the order in which the elements are added. The hierarchy of the elements added later is greater than the hierarchy of the elements added earlier. If the positions of the elements added later overlap with the elements added earlier, the elements added later will cover part of the area of the elements added earlier. Figure 4 The model elements in a device element will be blocked due to the order in which they are added, and the hierarchy of the model elements is determined by the order in which they are added. If the user wants to adjust the hierarchy of the model elements, the user needs to perform at least three steps: select the element - right-click to display the menu - select the operation option.
[0091] For example, Figure 4 To adjust the level of model element 4 from level 4 to level 2, the user needs to select model element 4, right-click to display the menu, and select the operation option of moving up one layer from the menu, and the level of model element 4 is adjusted from level 4 to level 3; then, the menu display is maintained and the operation option of moving up one layer is selected again, and the level of model element 4 is adjusted from level 3 to level 2. If the electronic device no longer displays the menu after adjusting to level 3, the user needs to right-click again to display the menu, and then select the operation option of moving up one layer, and the level of model element 4 is adjusted from level 3 to level 2.
[0092] If the user adjusts the model elements of level 4 in the two device elements to level 2, the user needs to repeat the above operation twice to complete the level adjustment of the two model elements of level 4. The adjustment process is cumbersome and takes a long time.
[0093] When implementing the control method of the present application for a relational model, a user can perform a left-click operation on a model element at level 4 in device element 1 to select the model element at level 4 in device element 1. Based on the user's left-click operation, the model element at level 4 in device element 2 is also selected. The user can then maintain the left-click operation, and adjust the level of the model element at level 4 upwards according to the operation duration of the left-click operation. For example, if the operation duration is between 2 seconds and 3 seconds, the level of the model element at level 4 is adjusted to level 2, thereby achieving simultaneous adjustment of the levels of multiple model elements at level 4 by the left-click operation, reducing the user's operations, thereby simplifying the adjustment process and significantly shortening the time spent.
[0094] Based on the example of the relational model, a feasible way for this embodiment to select all second elements of multiple types of elements is to determine, according to the first operation, all second elements of the same element type and the same level as the first element. Correspondingly, a feasible way to execute the first instruction on at least multiple second elements is to execute the first instruction on the first element and multiple second elements, and the first instruction changes the hierarchical relationship between the first element and the multiple second elements and other elements, so as to adjust the levels of the first element and the multiple second elements at the same time. After the levels of the first element and the multiple second elements are adjusted, the order of the elements in the first object is also adjusted synchronously. The process is as follows: Figure 5 As shown, the following steps may be included:
[0095] 301. Obtain a first operation of an operation body, where the first operation selects at least one first element in a first object, and the first element is an element in a hierarchy in the first object.
[0096] 302. According to the first operation, determine all second elements that have the same element type and the same level as the first element.
[0097] 303. Generate a first instruction based at least on the first operation.
[0098] 304. Execute a first instruction on the first element and the multiple second elements, wherein the first instruction changes the hierarchical relationship between the first element and the multiple second elements and other elements, thereby adjusting the hierarchies of the first element and the multiple second elements at the same time. After the hierarchies of the first element and the multiple second elements are adjusted, the order of the elements in the first object is also synchronously adjusted.
[0099] Among them, one way to generate the first instruction is to obtain the operation duration of the first operation or the moving distance of the first operation when the operating body maintains the first operation; and generate the first instruction according to the operation duration of the first operation or the moving distance of the first operation.
[0100] The operation duration of the first operation is the duration of the first operation when the first operation is maintained, and the moving distance of the first operation is the distance the first operation currently moves when the first operation is maintained. As the first operation continues, the operation duration of the first operation or the moving distance of the first operation may change. For example, as the first operation is maintained, the operation duration of the first operation will gradually increase.
[0101] The operation duration and the moving distance are used to indicate the level of adjustment, such as indicating that the first element and the plurality of second elements are adjusted from the first level to the second level. The first level is the starting level of the first element and the plurality of second elements, and the second level is the final level after the first element and the plurality of second elements are adjusted. The longer the operation duration, the greater the difference between the first level and the second level, and the shorter the operation duration, the smaller the difference between the first level and the second level. Similarly, the greater the moving distance, the greater the difference between the first level and the second level, and the smaller the moving distance, the smaller the difference between the first level and the second level.
[0102] The adjustment direction of the level includes upward adjustment and downward adjustment. The upward adjustment can increase the level of the first element, while the downward adjustment can reduce the level of the first element. If the first instruction is generated based on the moving distance of the first operation, the moving direction of the first operation can be used to indicate the adjustment direction, such as moving upward or rightward to indicate upward adjustment; moving downward or leftward to indicate downward adjustment.
[0103] If the moving distance is moving in one moving direction, the adjustment direction is determined based on other parameters of the first operation. For example, if the first operation is a mouse operation, and the first operation indicates long pressing the left mouse button, the first element is adjusted upward; if the first operation indicates long pressing the right mouse button, the first element is adjusted downward. For another example, if the first operation is a gesture operation, and the first operation indicates long pressing the index finger, the first element is adjusted downward; if the first operation indicates long pressing the middle finger, the first element is adjusted upward.
[0104] If the first instruction is generated based on the operation duration of the first operation, the adjustment direction of the first instruction can also be determined according to other parameters of the first operation, such as if the first operation indicates long pressing the left mouse button, the first element is adjusted upward; if the first operation indicates long pressing the right mouse button, the first element is adjusted downward. The level of upward adjustment or downward adjustment can be determined according to the operation duration.
[0105] like Figure 6An adjustment schematic diagram is shown, in which a user selects a text box in a PPT file as the first element, and the user long-presses the left mouse button, and the level of the first element is adjusted upward; if the level of the first element is placed at the top layer by long-pressing the left mouse button, the level adjustment of the first element is stopped. In addition, a prompt message can be output on the electronic device, such as "the text box has been placed at the top layer", to indicate that the level of the first element can no longer be adjusted upward, and the user can stop long-pressing the left mouse button.
[0106] Above Figure 5 The control method may further include the following steps:
[0107] 305. When the operator maintains the first operation, at least determine an upper-level element of the first element and a lower-level element of the first element.
[0108] When the operator maintains the first operation, the level of the first element is continuously changing. In the process of the continuous change of the level of the first element, the upper level element of the first element and the lower level element of the first element are also in continuous change. For example, the first element is at level 4, the upper level element of the first element is the element of level 3, and the lower level element of the first element is the element of level 5; the first element changes from level 4 to level 3, the upper level element of the first element becomes the element of level 2, and the lower level element of the first element becomes the element of level 4.
[0109] 306. Control the display of the previous level element in a first manner, and control the display of the next level element in a second manner, wherein the first manner and the second manner make the display of the previous level element and the next level element different from other elements. The purpose of the first manner and the second manner is to highlight the previous level element and the next level element by controlling the display of the previous level element and the next level element, so as to visually clarify the previous level element and the next level element of the current first element by highlighting.
[0110] After visually clarifying the upper level element and the lower level element of the current first element through the first method and the second method, when the operator maintains the first operation to adjust the level of the first element, the user can clearly know the current upper level element and the lower level element to determine the level to which the first element is moved, so that when the user determines to move to the desired level, the user can stop the first operation. For example, the user can stop the first operation when the first element is moved between two desired elements.
[0111] In this embodiment, the first method is to mark the upper level element with the upper level mark, and the second method is to mark the lower level element with the lower level mark. For example, the level to which the element belongs is identified by the first method and the second method.
[0112] like Figure 7As shown, the user selects a text box in the PPT file as the first element, and the level of the first element is level 4. The user wants to adjust the first element from level 4 to level 2, so the user can long press the left mouse button to adjust the level of the first element upward. After the user presses the left mouse button to select the first element, the previous level element of the first element displays the previous level mark 3, and the next level element of the first element displays the next level mark 5.
[0113] The user continues to keep the left mouse button pressed, and the level of the first element at level 4 is adjusted up to level 3, the previous level element of the first element at level 3 becomes the element of level 2, and the next level element becomes the element of level 4. Then, the element at level 2 can display the previous level mark 2, and the element at level 4 can display the next level mark 4.
[0114] Through the previous level mark 2 and the next level mark 4, the user can determine that the first element is currently located at level 3, which is not the level the user wants. The user will continue to maintain the operation of pressing the left mouse button. Under the operation of continuing to press the left mouse button, the level of the first element at level 3 is adjusted up to level 2, the previous level element of the first element at level 2 becomes the element of level 1, and the next level element becomes the element of level 3. Then the element at level 1 can display the previous level mark 1, and the element at level 3 can display the next level mark 3. Through the previous level mark 1 and the next level mark 3, the user can determine that the first element is currently located at level 2, which is the level the user wants, and the user can stop pressing the left mouse button.
[0115] In this embodiment, the first method and the second method make the shading of the upper-level elements and the lower-level elements different from other elements, and the shading of the upper-level elements is different from the shading of the lower-level elements, so as to clarify the position of the first element through different shadings, such as clarifying between which two elements the first element is located through different shadings.
[0116] The shading includes at least one of a color and a pattern, so as to distinguish the upper level element from the lower level element by the color and / or the pattern. The color can be different shades of the same color, such as different shades of gray.
[0117] like Figure 8 As shown, the user can adjust the hierarchy of model elements in the relationship model. After the user selects a model element, when adjusting the hierarchy of the model element, the upper-level elements and the lower-level elements of the model element can be displayed in different grays to make it clear through the gray between which two model elements the model element is currently located.
[0118] Above Figure 7 and Figure 8Taking the adjustment of a first element as an example, if the first operation can select multiple second elements of the same element type and level as the first element, the levels of these multiple second elements will also change with the change of the first element, and this embodiment will not give any examples.
[0119] In this embodiment, the hierarchical adjustment can be targeted at an element in the first object, such as the first element selected by the first operation, and the corresponding control method includes: obtaining the first operation of the operating body, the first operation selects at least one first element in the first object, based on the first operation, generating a first instruction, and executing the first instruction on the first element to change the hierarchical relationship between the first element and other elements. For the description of the first instruction, please refer to the above embodiment and it will not be described here.
[0120] Regardless of whether it is for multiple elements of the same level or for a first element, the above control method can simplify the process of adjusting the hierarchical relationship of the elements and reduce the time spent.
[0121] Above Figures 2 to 8 shows a control method when the element types of the first element and the second element are the same, Fig. 9 The control method when the element types of the first element and the second element are different is shown, and may include the following steps:
[0122] 401. Obtain a first operation of an operation body, where the first operation selects at least one first element in a first object.
[0123] 402. According to the first operation, all second elements in multiple types of elements are selected, wherein the multiple types of elements also include at least a third element, the third element has the same element type as the first element, the second element has a different element type from the first element, and multiple second elements related to at least one first element have the same element type.
[0124] That is, the first object includes at least a first element, a second element, and a third element, the first element and the third element have the same element type, but the first element and the second element have different element types. After the first operation of the operating body selects the first element, the electronic device can select the second element of the first object that has a different element type from the first element according to the element type of the first element.
[0125] When selecting the second element according to the first operation, all second elements can be selected, or multiple second elements related to the first element can be selected, where related means that in addition to the different element types of the first element and the second element, there is a certain association relationship between the first element and the multiple second elements, and the association relationship can include at least one of the following relationships: the second element runs on the first element, the second element is a component of the first element, the first element includes the second element, the second element and the first element are in a parent-child relationship (such as the first element is the parent node and the second element is the child node), and the second element is connected to the first element (such as the second element is a line connected to the first element).
[0126] For example, the first object includes multiple device elements, multiple model elements, and multiple connection elements. According to the first operation, all second elements of the multiple types of elements are selected, including but not limited to the following methods:
[0127] One way is to determine, according to a first operation, all the lines connected to at least one first element, where the element type of the first element is a model element or a device element.
[0128] Another way is to determine, according to the first operation, model elements related to at least one first element and all lines connected to the related model elements, where the element type of the first element is a device element, wherein the related model elements may be model elements running on the device element, which is not limited here.
[0129] 403. Generate a first instruction based at least on the first operation.
[0130] One way is to generate a first instruction based on the operation data of a first operation, so that through the first operation, a first element can be selected to determine multiple second elements and the display of elements of the same element type can be adjusted; another way is to obtain a second operation of the operating body when the operating body maintains the first operation, the first operation and the second operation are different, and the second operation is another operation performed continuously by the operating body after the first operation; according to the second operation, a first instruction corresponding to the second operation is generated, so that elements of the same element type in the first object are adjusted through two consecutive different operations of the operating body; for instructions on the two ways of generating the first instruction, please refer to the above embodiments.
[0131] 404. Execute the first instruction on the plurality of second elements to change display of the plurality of second elements in the first object.
[0132] The first instruction can be used to change the order between the multiple second elements and other elements, delete the multiple second elements, adjust the positions of the multiple second elements, adjust the colors and patterns of the multiple second elements, etc.; for example, execute a delete instruction on the multiple second elements to delete the multiple second elements.
[0133] In this embodiment, the electronic device can pre-set the correspondence between the first instruction and the first operation. The correspondence indicates the adjustments that the electronic device may make to the first object after the operator performs at least the first operation. For example, the operator repeatedly moves left and right after a click operation. The first instruction may be to delete multiple second elements. The electronic device can set the first instructions corresponding to various operations in advance according to user needs, so as to be able to make a variety of different adjustments to elements of the same element type in the first object.
[0134] The following is an example of executing a delete command on multiple second elements in a relational model. Fig.10 As shown, the electronic device displays a relationship model, and the user selects a model element in the relationship model by clicking the left mouse button. While the user maintains the left mouse button pressed, the user can move the mouse left and then right, then left again, and then right again. After repeatedly moving left and right multiple times (such as twice or three times), all connections connecting the selected model element are deleted.
[0135] like Fig.11 As shown, the user selects multiple model elements in the relationship model through the box selection operation. Similarly, when the user keeps the left mouse button pressed, the user can move the mouse to the left and then to the right, then to the left again, and then to the right again. After repeatedly moving left and right multiple times (such as twice or three times), all the connections connecting all the model elements selected in the box are deleted.
[0136] If the user selects a device element in the relationship model, all model elements running on the device element and all the lines connecting all the model elements running on it are determined, and after the user repeatedly moves the mouse left and right multiple times, all model elements on the selected device element and all the lines connecting all the model elements are deleted, such as Fig.12 If the user selects multiple device elements in the relationship model, all model elements on all the selected device elements and all the lines connecting all the model elements will be deleted after the user repeatedly moves the mouse left and right.
[0137] The above-mentioned deleting elements by repeatedly moving the left and right mouse button while keeping it pressed is an example. In actual application, other instructions for deleting elements can also be set, such as setting a gesture operation to delete elements. Fig.13 As shown, when the electronic device detects that the user makes a "cross" action on a model element in the relationship model, the electronic device can delete all the lines connected to the model element pointed to by the "cross".
[0138] Corresponding to the above method embodiment, the present application embodiment also provides an electronic device, whose optional structure is as follows: Fig.14 As shown, it may include: a display screen 100 and a processor 200 .
[0139] Display screen 100 is used to display a first object; processor 200 is used to obtain a first operation of an operating body, the first operation selects at least one first element in the first object; according to the first operation, multiple second elements related to the at least one first element are determined, and the element types of the multiple second elements related to the at least one first element are the same; at least based on the first operation, a first instruction is generated; at least the first instruction is executed on the multiple second elements to change the display of the multiple second elements in the first object.
[0140] In one example, the first element and the second element are of the same element type, and the corresponding processor 200 is used to select all second elements from multiple types of elements according to a first operation, wherein the multiple types of elements also include at least a third element, and the third element is of a different element type from the first element; and execute a first instruction on the first element and the multiple second elements to change the display of the first element and the multiple second elements in the first object.
[0141] In one example, the first element and the second element are of different element types, and the corresponding processor 200 is used to select all second elements in multiple types of elements according to the first operation, where the multiple types of elements also include at least a third element, and the third element has the same element type as the first element.
[0142] In one example, the processor 200 selects all second elements from multiple types of elements according to the first operation, including: according to the first operation, determining all connections connected to at least one first element, and the element type of the first element is a model element or a device element; or, according to the first operation, determining model elements related to at least one first element and all connections connected to the related model elements, and the element type of the first element is a device element.
[0143] In one example, the processor 200 executes the first instruction on at least the plurality of second elements, including: executing a delete instruction on the plurality of second elements.
[0144] In one example, the processor 200 selects all second elements from multiple types of elements according to the first operation, including: determining all second elements of the same element type and the same level as the first element according to the first operation.
[0145] In one example, the processor 200 executes the first instruction on at least the plurality of second elements, including: executing the first instruction on the first element and the plurality of second elements, the first instruction changing the hierarchical relationship between the first element and the plurality of second elements and other elements.
[0146] In one example, the processor 200 is also used to, when the operating body maintains the first operation, at least determine the upper-level elements of the first element and the lower-level elements of the first element; control the upper-level elements to be displayed in a first manner, and control the lower-level elements to be displayed in a second manner, and the first manner and the second manner make the display of the upper-level elements and the lower-level elements different from other elements.
[0147] Optionally, the first method is to mark the upper level element with the upper level identifier, and the second method is to mark the lower level element with the lower level identifier;
[0148] or
[0149] The first method and the second method make the shading of the upper-level element and the lower-level element different from other elements, and the shading of the upper-level element is different from the shading of the lower-level element.
[0150] It should be noted that the various embodiments in this specification can be described in a progressive manner, and the features recorded in the various embodiments in this specification can be replaced or combined with each other. Each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0151] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0152] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
[0153] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A control method, the method comprising: Obtaining a first operation of an operation body, wherein the first operation selects at least one first element in a first object; According to the first operation, searching the first object for all second elements that have a preset association relationship with the first element, and determining a plurality of second elements related to the at least one first element according to the search result, wherein the plurality of second elements related to the at least one first element have the same element type; generating a first instruction based at least on the first operation; The first instruction is executed at least on the plurality of second elements to change display of the plurality of second elements in the first object.
2. The method according to claim 1, wherein the first element and the second element are of the same element type, and wherein according to the first operation, searching from the first object for all second elements that have a preset association relationship with the first element, and determining a plurality of second elements related to the at least one first element according to the search result, comprises: According to the first operation, all second elements in a plurality of types of elements are selected, wherein the plurality of types of elements further include at least a third element, and the third element is of a different element type from the first element; The at least executing the first instruction on the plurality of second elements to change display of the plurality of second elements in the first object includes: The first instruction is executed on the first element and the plurality of second elements to change display of the first element and the plurality of second elements in the first object.
3. The method according to claim 1, wherein the first element and the second element are of different element types, and the step of searching the first object for all second elements that have a preset association relationship with the first element according to the first operation, and determining a plurality of second elements related to the at least one first element according to the search result, comprises: According to the first operation, all second elements in a plurality of types of elements are selected, wherein the plurality of types of elements further include at least a third element, and the third element has the same element type as the first element.
4. The method according to claim 3, wherein selecting all second elements from multiple types of elements according to the first operation comprises: According to the first operation, determining all lines connected to the at least one first element, the element type of the first element being a model element or a device element; or According to the first operation, a model element related to the at least one first element and all lines connected to the related model element are determined, and the element type of the first element is a device element.
5. The method according to claim 3 or 4, wherein the at least executing the first instruction on the plurality of second elements comprises: A delete instruction is executed on the plurality of second elements.
6. The method according to claim 2, wherein selecting all second elements from multiple types of elements according to the first operation comprises: According to the first operation, all second elements having the same element type and the same level as the first element are determined.
7. The method according to claim 6, wherein the at least executing the first instruction on the plurality of second elements comprises: A first instruction is executed on the first element and the plurality of second elements, wherein the first instruction changes a hierarchical relationship between the first element and the plurality of second elements and other elements.
8. The method according to claim 7, further comprising: In the case where the operator maintains the first operation, at least determining an element at a previous level of the first element and an element at a next level of the first element; The upper-level element is controlled to be displayed in a first manner, and the lower-level element is controlled to be displayed in a second manner, wherein the first manner and the second manner make the display of the upper-level element and the lower-level element different from other elements.
9. The method according to claim 8, wherein the first mode is that the upper level element is marked with an upper level identifier, and the second mode is that the lower level element is marked with a lower level identifier; or The first method and the second method make the shading of the upper-level element and the lower-level element different from other elements, and the shading of the upper-level element is different from the shading of the lower-level element.
10. An electronic device comprising: A display screen, configured to display a first object; A processor, configured to obtain a first operation of an operation body, wherein the first operation selects at least one first element in a first object; According to the first operation, all second elements that have a preset association relationship with the first element are searched from the first object, and multiple second elements related to the at least one first element are determined according to the search result, and the element types of the multiple second elements related to the at least one first element are the same; based on at least the first operation, a first instruction is generated; and the first instruction is executed on at least the multiple second elements to change the display of the multiple second elements in the first object.
Citation Information
Patent Citations
Chart processing method and device and electronic equipment
CN112596650A