A method, system, device and medium for implementing EPG component dragging
By setting the adaptation size information and automatically detecting adaptability when dragging EPG components, the problem of component and position adaptation judgment is solved, clear misfit prompts are provided, and user experience and system efficiency are improved.
Patent Information
- Application Number
- CN202410909660.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-09
AI Technical Summary
The existing EPG component dragging method cannot quickly determine whether the component and position are suitable in page layout, and lacks a clear prompt when it is not suitable, resulting in inconvenient use.
By setting the component properties and adaptation size information, the adaptability is automatically detected when the component is dragged into the position box, and the reason for the incompatibility is displayed when it does not fit. The adaptation is re-detected when the size of the position box is changed.
It achieves automatic detection of components and locations and clear prompts for adaptation status, reducing system usage costs and significantly improving user experience.
Smart Images

Figure CN118474471B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of network television, and in particular to a method, system, device and medium for implementing dragging of EPG components. Background Art
[0002] EPG (Electronic Program Guide) is a basic service of IPTV, providing users with good navigation services for watching TV programs. At present, the common way to arrange EPG components is to drag and select components. However, there are still many inconveniences in actual use. Among them, the first problem faced by operators is whether the component is adapted.
[0003] In order to provide a variety of display methods, the layout system often provides a large number of components for operators to choose from. However, due to the limitations of the display form of the components, not all sizes of positions are suitable for each component, and the adaptation rules must follow relevant business specifications. Summary of the invention
[0004] The present application provides an EPG component dragging implementation method, system, device and medium, which are used to solve the technical problem that it is impossible to quickly judge and prompt whether the component and position are compatible and display the reason for the incompatibility in the existing page layout.
[0005] On the one hand, the present application provides an EPG component dragging implementation method, the method comprising the following steps: step S1: setting component properties according to business specifications, and setting component adaptation size information; step S2: after dragging the component into a position box, displaying the component in the position box; step S3: obtaining and comparing the adaptable size of the component and the size information of the current position, and displaying the component in the position box; step S4: when dragging to change the size of the position box, recalculating the adaptable size of the component and the size information of the current position in the size change event to see whether they are adapted.
[0006] In an implementation of the present application, after step S1, the method further includes: adding a mouse overlay event on the component, and displaying adaptable size information when the mouse moves to the component and stays for a preset period of time.
[0007] In one implementation of the present application, in step S3, if the position size does not conform to the adaptable size of the component, a mask is displayed in the position box to cover the component, and the reason for the size non-conformity is displayed on the mask.
[0008] In one implementation of the present application, the process of determining the adaptation specifically includes: when dragging a component to a position box, storing information of the current component in a global variable current element in a start event of dragging;
[0009] When dragging ends, the current position box information is obtained in the drag completion event of the position box, and the component information in the global variable current element is set to the component property of the current position information; the width and height of the current position box are obtained and the aspect ratio is calculated, and the width and aspect ratio of the position box are compared with the information of the current component stored in the global variable current element; the position box width is compared to see if it meets the minimum width requirement of the component. If not, the state property of the current position is set to 0, and the error information property is set to minimum width does not match, minimum width: xx, current width: xx; the aspect ratio of the position box is compared to see if it meets the component requirements. If the aspect ratio of the component is not between the minimum aspect ratio and the maximum aspect ratio of the component, the state property of the current position is set to 0, and the error information property is set to aspect ratio does not match, aspect ratio range: xx~xx, current aspect ratio: xx.
[0010] In one implementation of the present application, the process of judging adaptation after the position box changes size is specifically as follows: use the mouse to click and drag the lower right corner of the position box to change the size of the position box; in the size change event of the position box, obtain the position information corresponding to the current position box; judge whether the component attribute in the current position information is empty; when the component attribute in the position information is not empty, obtain the component, width, and height attributes in the position information and calculate the aspect ratio; compare the width and aspect ratio of the position box with the information of the component; compare whether the width of the position box meets the minimum width requirement of the component, if not, set the status attribute of the current position to 0, and set the error information attribute to minimum width mismatch, minimum width: xx, current width: xx; if compliant, set the status attribute of the current position to 1, and set the error information attribute to empty; compare whether the aspect ratio of the position box meets the requirements of the component.
[0011] In one implementation of the present application, when the component attribute in the location information is empty, the method ends.
[0012] In one implementation of the present application, if the aspect ratio of a component is not between the minimum adaptation aspect ratio and the maximum adaptation aspect ratio of the component, the status attribute of the current position is set to 0, and the error information attribute is set to aspect ratio mismatch, aspect ratio range: xx~xx, current aspect ratio: xx; if it is compliant, the status attribute of the current position is set to 1, and the error information attribute is set to empty.
[0013] The present application also provides an EPG component dragging implementation system, which applies the aforementioned EPG component dragging implementation method, and is characterized in that the system includes: an attribute information configuration unit, which is used to set component attributes according to business specifications and set component adaptation size information; a component dragging display unit, which is used to display the component in the position box after dragging the component into the position box; a size information comparison unit, which is used to obtain and compare the adaptable size of the component and the size information of the current position, and display the component in the position box; an adaptation calculation unit, which is used to recalculate whether the adaptable size of the component and the size information of the current position are adapted in the size change event when the size of the position box is changed by dragging.
[0014] The present application also provides an EPG component dragging implementation device, the device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can complete the aforementioned EPG component dragging implementation method.
[0015] The present application also provides a non-volatile computer storage medium for implementing EPG component dragging, which stores computer executable instructions, and the computer executable instructions are used to execute the aforementioned EPG component dragging implementation method.
[0016] The present application provides an EPG component dragging implementation method, system, device and medium, which realizes automatic detection of whether the component and the position are compatible when the component is dragged into the position box, and prompts the reason for the incompatibility when it is not compatible. When the size of the position box is changed, the display is re-detected to see whether it is compatible. This makes the adaptation situation clear at a glance, reduces the cost of using the system, and greatly improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1 A flow chart of a method for implementing EPG component dragging provided in an embodiment of the present application;
[0019] Figure 2 A schematic diagram of the arrangement page provided in the embodiment of the present application;
[0020] Figure 3 A flowchart for determining the adaptation after dragging a component provided in an embodiment of the present application into a position box;
[0021] Figure 4A flowchart for determining adaptation after the location box changes size provided in an embodiment of the present application;
[0022] Figure 5 A diagram showing the composition of an EPG component dragging implementation system provided in an embodiment of the present application;
[0023] Figure 6 A schematic diagram of an EPG component dragging implementation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only 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 making creative work are within the scope of protection of the present application.
[0025] The embodiment of the present application provides a method, system, device and medium for implementing dragging of EPG components. The technical solution proposed in the embodiment of the present application is described in detail below with reference to the accompanying drawings.
[0026] Figure 1 A flowchart of a method for implementing EPG component dragging provided by an embodiment of the present application. Figure 1 As shown, the method mainly includes the following steps:
[0027] Step S1: Set component attributes according to business specifications and set component adaptation size information.
[0028] Step S2: After dragging the component into the position box, the component is displayed in the position box.
[0029] Step S3: Acquire and compare the adaptable size of the component and the size information of the current position, and display the component in the position box.
[0030] Step S4: When the size of the position box is changed by dragging, the adaptable size of the component and the size information of the current position are recalculated in the size change event to see whether they are adapted.
[0031] In the embodiment of the present application, the schematic diagram of arranging pages is as follows: Figure 2 As shown, the specific process includes the following:
[0032] (1) Create responsive data elements on the page to store information about each component, including component ID, component name, icon, minimum width for component adaptation, minimum aspect ratio for component adaptation, and maximum aspect ratio for component adaptation.
[0033] (2) Bind data elements to the component area, and render the component name and icon on the page based on the information of each component.
[0034] (3) Use el-popover pop-up box component to wrap each component, set the pop-up mode of the pop-up box component to hover, set the display delay open-delay to 3000, and the pop-up content is the adaptable width range of the EPG component. When the mouse moves over the component, a pop-up prompt will pop up after a delay of 3s to indicate the minimum width and aspect ratio range that the component can adapt to.
[0035] (4) Create responsive data positions on the page to store all position box information, including position x coordinate, y coordinate, width, height, status, error message, and included component information.
[0036] (5) The position layout area is bound to data positions, and the position box is rendered on the page according to the positioning and width and height information of each position. The display component is rendered in the position box according to the component information of the position. The default state of the position box is 1 (normal). If the state is 0 (abnormal), a mask is displayed in the position box to cover the component, and an error message is displayed on the mask. If it is 1 (normal), the mask in the position box is hidden.
[0037] (6) Use vue.draggable to drag components from the component area to the location box.
[0038] In the embodiment of the present application, after the component is dragged into the position box, the adaptation flow chart is as follows: Figure 3 As shown, the specific process includes the following:
[0039] (1) When dragging a component to the location box, the information of the current component is stored in the global variable currentElement in the start event of dragging.
[0040] (2) When dragging ends, the current position box information is obtained in the drag completion event of the position box, and the component information in the current element of the global variable currentElement is set to the component attribute of the current position information in positions.
[0041] (3) Get the width and height of the current position frame and calculate the aspect ratio.
[0042] (4) Compare the width and aspect ratio of the position box with the information of the current component stored in the global variable currentElement.
[0043] (5) Compare the width of the position box to see if it meets the minimum width requirement of the component. If it does not meet the requirement, set the status attribute of the current position in positions to 0, and set the error message attribute to "minimum width does not meet the requirement, minimum width: xx, current width: xx".
[0044] (6) Compare the aspect ratio of the position box to see if it meets the requirements of the component. If the aspect ratio of the component is not between the minimum and maximum aspect ratios of the component, set the status attribute of the current position in positions to 0, and set the error message attribute to "aspect ratio does not match, aspect ratio range: xx~xx, current aspect ratio: xx".
[0045] In the embodiment of the present application, the flow chart of determining the adaptation after the position box changes size is as follows Figure 4 As shown, the specific process includes the following:
[0046] (1) Use the mouse to click and drag the lower right corner of the position box to change the size of the position box.
[0047] (2) In the resize event of the position box, obtain the position information corresponding to the current position box in positions.
[0048] (3) Determine whether the component attribute in the current location information is empty.
[0049] (4) When the component attribute in the location information is empty, the method ends.
[0050] (5) When the component attribute in the position information is not empty, obtain the component, width, and height attributes in the position information and calculate the aspect ratio.
[0051] (6) Compare the width and aspect ratio of the location box with the component information.
[0052] (7) Compare the width of the position box to see if it meets the minimum width requirement of the component. If not, set the status attribute of the current position in positions to 0, and set the error message attribute to "minimum width does not match, minimum width: xx, current width: xx". If it meets the requirement, set the status attribute of the current position in positions to 1, and set the error message attribute to empty.
[0053] (8) Compare the aspect ratio of the position frame to see if it meets the requirements of the component. If the aspect ratio of the component is not between the minimum and maximum aspect ratios of the component, set the status attribute of the current position in positions to 0, and set the error information attribute to "aspect ratio does not match, aspect ratio range: xx~xx, current aspect ratio: xx". If it meets the requirements, set the status attribute of the current position in positions to 1, and set the error information attribute to empty.
[0054] The above is a method for implementing dragging of EPG components provided by an embodiment of the present application. Based on the same inventive concept, an embodiment of the present application also provides a system for implementing dragging of EPG components. Figure 5 A diagram of the composition of an EPG component dragging implementation system provided in an embodiment of the present application, such as Figure 5 As shown, the system mainly includes: an attribute information configuration unit 501, which is used to set component attributes according to business specifications and set component adaptation size information; a component dragging and displaying unit 502, which is used to display the component in the position box after dragging the component into the position box; a size information comparison unit 503, which is used to obtain and compare the adaptable size of the component and the size information of the current position, and display the component in the position box; an adaptation calculation unit 504, which is used to recalculate whether the adaptable size of the component and the size information of the current position are adapted in the size change event when the size of the position box is changed by dragging.
[0055] The above is an EPG component dragging implementation system provided by the embodiment of the present application. Based on the same inventive concept, the embodiment of the present application also provides an EPG component dragging implementation device. Figure 6 A schematic diagram of an EPG component dragging implementation device provided in an embodiment of the present application, such as Figure 6 As shown, the device mainly includes: at least one processor 601; and a memory 602 communicatively connected to the at least one processor; wherein the memory 602 stores instructions executable by the at least one processor 601, and the instructions are executed by the at least one processor 601 so that the at least one processor 601 can complete the aforementioned EPG component dragging implementation method.
[0056] In addition, an embodiment of the present application further provides a non-volatile computer storage medium for implementing EPG component dragging, which stores computer executable instructions, and the computer executable instructions are used to execute the aforementioned EPG component dragging implementation method.
[0057] The present application provides a method, system, device and medium for implementing EPG component dragging, which automatically detects whether the component and the position are compatible when the component is dragged into the position box, and prompts the reason for the incompatibility when it is not compatible. Re-check whether the display is compatible when the position box size is changed. This makes the adaptation situation clear at a glance, reduces the cost of using the system, and greatly improves the user experience. The key process of the present application is a method for determining whether a component and the position box are compatible by dragging a trigger in the EPG page layout, and a method for providing real-time prompts on whether the component and the position box are compatible when the position box size is changed by dragging in the EPG page layout.
[0058] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0059] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0060] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0061] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0062] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, 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.
[0063] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity 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, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0064] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for implementing EPG component dragging, characterized in that: The method comprises the following steps: Step S1: Set component attributes according to business specifications and set component adaptation size information; Step S2: after dragging the component into the position box, displaying the component in the position box; Step S3: obtaining and comparing the adaptable size of the component and the size information of the current position, and displaying the component in the position box; Step S4: when dragging to change the size of the position box, recalculate the adaptable size of the component and whether the size information of the current position is adapted in the size change event; wherein, the process of judging the adaptation is specifically as follows: when dragging the component to the position box, storing the information of the current component in the global variable current element in the drag start event; when dragging ends, obtaining the current position box information in the drag completion event of the position box, and setting the component information in the global variable current element to the component attribute of the current position information; obtaining the width and height of the current position box and calculating the aspect ratio, and comparing the width and aspect ratio of the position box with the information of the current component stored in the global variable current element; comparing whether the width of the position box meets the minimum width requirement of the component, if not, setting the state attribute of the current position to 0, and setting the error information attribute to the minimum width does not match; comparing whether the aspect ratio of the position box meets the requirements of the component, if the aspect ratio of the component is not between the minimum adaptation aspect ratio and the maximum adaptation aspect ratio of the component, setting the state attribute of the current position to 0, and setting the error information attribute to the aspect ratio does not match.
2. The method for implementing EPG component dragging according to claim 1, characterized in that: After step S1, the method further includes: A mouse overlay event is added to the component, and when the mouse moves to the component and stays for a preset period of time, the adaptable size information is displayed.
3. The method for implementing EPG component dragging according to claim 1, characterized in that: In step S3, if the position size does not conform to the adaptable size of the component, a mask is displayed in the position box to cover the component, and the reason for the size non-conformity is displayed on the mask.
4. The method for implementing EPG component dragging according to claim 1, characterized in that: The process of determining the adaptation after the position box changes size is as follows: Use the mouse to click and drag the lower right corner of the position box to change the size of the position box; In the event of the position box changing its size, obtain the position information corresponding to the current position box; Determine whether the component attribute in the current location information is empty; When the component attribute in the position information is not empty, obtain the component, width, and height attributes in the position information and calculate the aspect ratio; Compare the width and aspect ratio of the position box with the component's information; Compare the width of the position box to see if it meets the minimum width requirement of the component. If not, set the current position's state attribute to 0 and the error message attribute to "minimum width does not match, minimum width: xx, current width: xx"; if it meets, set the current position's state attribute to 1 and the error message attribute to empty. Compare the aspect ratio of the position box to see if it meets the component's requirements.
5. The method for implementing EPG component dragging according to claim 4, characterized in that: When the component attribute in the location information is empty, the method ends.
6. The method for implementing EPG component dragging according to claim 4, characterized in that: If the aspect ratio of the component is not between the minimum and maximum aspect ratios of the component, the status attribute of the current position is set to 0, and the error information attribute is set to aspect ratio mismatch, aspect ratio range: xx~xx, current aspect ratio: xx; if it is compliant, the status attribute of the current position is set to 1, and the error information attribute is set to empty.
7. An EPG component dragging implementation system, applying an EPG component dragging implementation method according to any one of claims 1 to 6, characterized in that: The system comprises: The attribute information configuration unit is used to set the component attributes according to the business specifications and set the component adaptation size information; A component dragging and displaying unit, used to display the component in the position box after dragging the component into the position box; A size information comparison unit, used to obtain and compare the adaptable size of the component and the size information of the current position, and display the component in a position box; The adaptation calculation unit is used to recalculate the adaptable size of the component and whether the size information of the current position is adapted in the size change event when the size of the position box is changed by dragging.
8. An EPG component dragging implementation device, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can complete the EPG component dragging implementation method described in any one of claims 1-6.
9. A non-volatile computer storage medium for implementing EPG component dragging, storing computer executable instructions, characterized in that: The computer executable instructions are used to execute the EPG component dragging implementation method described in any one of claims 1-6.
