Automatic jump focus method, device, computer equipment and storage medium
By receiving click entry instructions, obtaining information and identifiers, building a style tree and calculating location information, the high efficiency of automatic focusing in the Internet of Things platform is achieved, which solves the problem of low efficiency of manual matching in the existing technology and improves focusing efficiency.
Patent Information
- Application Number
- CN202111175555.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-09
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2041-10-09
AI Technical Summary
The manual matching and focusing method of massive device information management pages in existing IoT platforms is inefficient and difficult to efficiently focus on massive amounts of information.
By receiving preset click item instructions, obtaining click information and identifiers, using Xpath and JavaScript technology to build a style tree, calculating the position information of the click item, and automatically focusing according to the overflow processing method.
Improves the efficiency of focusing on click items in the IoT page management platform, reduces the need for manual matching, and ensures the completeness and accuracy of information display.
Smart Images

Figure CN113918848B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things, and in particular to an automatic jump focus method, device, computer equipment and storage medium. Background Art
[0002] The massive device information management pages of the Internet of Things platform all display information in the form of lists. Often, a page will have hundreds of device information entries. In the existing technology, relevant content is usually searched through keywords and then manually matched and focused on the searched related content. However, manual matching and focusing methods are too difficult to match massive amounts of information, and the focusing efficiency is low. Summary of the Invention
[0003] The embodiments of the present invention provide an automatic jump focus method, apparatus, computer equipment and storage medium, aiming to improve the focus efficiency in the existing Internet of Things page management platform.
[0004] In a first aspect, an embodiment of the present invention provides an automatic focus jump method, which includes:
[0005] If a preset click entry instruction is received, obtaining click information and a preset identifier corresponding to the preset click entry instruction;
[0006] Jumping from the current option in the current page to the option to be jumped to on the page to be jumped to according to the click information, the preset identifier, and the preset item, and displaying all items in the current option in the option to be jumped to, wherein the current option and the option to be jumped to are the same option;
[0007] Acquire page information of the page to be redirected using a preset technology according to the preset identifier, and construct a style tree corresponding to the page to be redirected according to the page information;
[0008] Calculating position information of a click item corresponding to the preset click item instruction according to the style tree and a preconfigured overflow processing method;
[0009] The clicked item in the to-be-jumped option is focused according to the position information.
[0010] In a second aspect, an embodiment of the present invention further provides an automatic focus jump device, comprising:
[0011] an acquiring unit, configured to acquire click information and a preset identifier corresponding to the preset click entry instruction upon receiving the preset click entry instruction;
[0012] a jump unit, configured to jump from a current option in a current page to an option to be jumped to in a page to be jumped to according to the click information, the preset identifier, and the preset item, and to display all items in the current option in the option to be jumped to, wherein the current option and the option to be jumped to are the same option;
[0013] a construction unit, configured to obtain page information of the page to be redirected using a preset technology according to the preset identifier, and to construct a style tree corresponding to the page to be redirected according to the page information;
[0014] a calculation unit, configured to calculate position information of a click item corresponding to the preset click item instruction according to the style tree and a preconfigured overflow processing method;
[0015] A focusing unit is used to focus the clicked item in the to-be-jumped option according to the position information.
[0016] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.
[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program can implement the above method when executed by a processor.
[0018] An embodiment of the present invention provides an automatic jump focus method, apparatus, computer device, and storage medium. The method includes: if a preset click entry instruction is received, obtaining click information and a preset identifier corresponding to the preset click entry instruction; jumping from a current option in a current page to a to-be-jumped option on a to-be-jumped page based on the click information, the preset identifier, and a preset item, and displaying all items in the current option in the to-be-jumped option, wherein the current option and the to-be-jumped option are the same option; obtaining page information of the to-be-jumped page using a preset technology based on the preset identifier, and constructing a style tree corresponding to the to-be-jumped page based on the page information; calculating position information of a click entry corresponding to the preset click entry instruction based on the style tree and a preconfigured overflow processing method; and focusing the click entry in the to-be-jumped option based on the position information. The technical solution of an embodiment of the present invention calculates the position information of the clicked item according to the constructed style tree and the preconfigured overflow processing method after jumping from the current option in the current page to the option to be jumped to in the page to be jumped to, and focuses on the clicked item based on the position information, without the need for manual matching of the focus, thereby improving the efficiency of focusing on the clicked item. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 A schematic flow chart of an automatic focus jump method provided by an embodiment of the present invention;
[0021] Figure 2 A schematic diagram of a sub-flow diagram of an automatic focus jump method provided by an embodiment of the present invention;
[0022] Figure 3 A schematic diagram of a sub-flow diagram of an automatic focus jump method provided by an embodiment of the present invention;
[0023] Figure 4 A schematic block diagram of an automatic focus jump device provided by an embodiment of the present invention; and
[0024] Figure 5 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0026] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0027] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in the specification and appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.
[0028] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0029] As used in this specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0030] See also Figure 1 , Figure 1 This is a flow chart of an automatic jump focus method provided by an embodiment of the present invention. The automatic jump focus method of the embodiment of the present invention can be applied to an Internet of Things page management platform. For example, the automatic jump focus method can be implemented by a software program configured on the Internet of Things page management platform to improve the efficiency of focusing on click items. Figure 1 As shown, the method includes the following steps S100-S140.
[0031] S100: If a preset click entry instruction is received, obtain click information and a preset identifier corresponding to the preset click entry instruction.
[0032] In an embodiment of the present invention, the Internet of Things page management platform includes multiple pages, such as a workbench page, a task page, a weekly report page, a daily page, a project page, etc. Each page includes multiple options, such as options such as "To be processed," "Cc me," and "To be published," and each option includes multiple clickable items. In actual applications, a user clicking any item in any option on any page can trigger the sending of a preset click item instruction. The Internet of Things page management platform receives the preset click item instruction and obtains click information and a preset identifier corresponding to the preset click item instruction, wherein the click information includes a jump attribute value and a page attribute value.
[0033] S110. Jump from the current option in the current page to the option to be jumped to in the page to be jumped to according to the click information, the preset identifier and the preset item, and display all items in the current option in the option to be jumped to, wherein the current option and the option to be jumped to are the same option.
[0034] In an embodiment of the present invention, after obtaining the click information and the preset identifier, the page is jumped from the current option in the current page to the option to be jumped to on the page to be jumped to according to the click information, the preset identifier and the preset item, wherein the current option and the option to be jumped to are the same option; the preset item includes a preset default option value and preset style information. For example, jump from the Cc me option on the workbench page to the Cc me option on the matter page. After the jump, all items in the current option are displayed on the option to be jumped to. It can be understood that in an embodiment of the present invention, the option is a tab option, and in other embodiments, the option may also be a select option.
[0035] In some embodiments, such as the present embodiment, Figure 2 As shown, the step S110 may include steps S111-S115.
[0036] S111, determining a page to be jumped to according to a jump attribute value in the click information;
[0037] S112, jumping from the current option in the current page to the option to be jumped to on the page to be jumped to according to the page to be jumped to and a preset default option value;
[0038] S113, obtaining entry retrieval information from a preset database according to the preset identifier;
[0039] S114. Acquire, from the preset database, item information corresponding to all items in the current option except the clicked item according to the page attribute value in the click information;
[0040] S115 : Display all items in the current option on the option to be jumped to according to the preset style information, the item information, and the item search information.
[0041] In an embodiment of the present invention, after obtaining the click information and the preset identifier, the page to be jumped to is first determined based on the jump attribute value in the click information, and then the page to be jumped to is jumped from the current option in the current page to the option to be jumped to in the page to be jumped to based on the page to be jumped to and the preset default option value in the preset item, wherein the current option and the option to be jumped to are the same option; the preset default option value is the value corresponding to the default option in the page to be jumped to. It is understandable that in actual applications, the default option in the matter page before the jump is pending, that is, the value corresponding to the pending option is the preset default option value. In order to achieve the jump from the Cc me option on the workbench page to the Cc me option on the matter page, the value corresponding to the Cc me option should be set to the preset default option value. After jumping from the current option in the current page to the option to be jumped to in the page to be jumped to, item retrieval information is obtained from the preset database according to the preset identifier, and the item retrieval information is the detailed information of the clicked item corresponding to the preset click instruction; item information corresponding to all items in the current option except the clicked item is obtained from the preset database according to the page attribute value in the click information, and the item information is simplified information; all items in the current option are displayed in the option to be jumped to according to the preset style information, the item information and the item retrieval information, that is, the clicked item in the option to be jumped to is displayed with detailed information, while other items are displayed with simplified information. It should be noted that obtaining the detailed information of the clicked item through the preset identifier, rather than through keyword search, can ensure the completeness of the information.
[0042] S120: Obtain page information of the page to be redirected using a preset technology according to the preset identifier, and construct a style tree corresponding to the page to be redirected according to the page information.
[0043] In an embodiment of the present invention, after all the items in the current option are displayed on the option to be jumped to, the page information of the page to be jumped to is obtained through a preset technology according to the preset identifier, and a style tree corresponding to the page to be jumped to is constructed according to the page information, wherein the preset technology includes Xpath technology and JavaScript technology. Specifically, according to the preset root node information in the page to be jumped to, the node information corresponding to the page to be jumped to is obtained through Xpath technology and JavaScript technology until the identifier corresponding to the node in the node information matches the preset identifier to obtain the target node information; based on the target node information and the preset root node information, a style tree corresponding to the page to be jumped to is constructed, wherein the preset root node information includes the root node and root node attribute information, and the root node attribute information includes the root node position information and the root node identifier.
[0044] In some embodiments, such as the present embodiment, Figure 3 As shown, the step S120 may include steps S121-S125.
[0045] S121, according to the preset root node information in the page to be jumped to, using XPath technology to obtain the child nodes corresponding to the preset root node information and the structure information corresponding to the child nodes layer by layer from the HTML node tree corresponding to the page to be jumped to;
[0046] S122. Obtain attribute information corresponding to the child node through JavaScript technology;
[0047] S123. Determine, based on the attribute information, whether the identifier corresponding to the child node matches the preset identifier;
[0048] S124: If the identifier corresponding to the child node matches the preset identifier, construct a node tree corresponding to the page to be jumped to from top to bottom according to the preset root node information, all the acquired child nodes, and the structure information;
[0049] S125: Add all the acquired attribute information to corresponding nodes in the node tree to obtain a style tree corresponding to the page to be redirected.
[0050] In an embodiment of the present invention, according to the preset root node information in the page to be jumped, the child nodes corresponding to the preset root node information and the structural information corresponding to the child nodes are obtained layer by layer from the HTML node tree corresponding to the page to be jumped, wherein the structural information is a parent-child relationship and a sibling relationship; the attribute information corresponding to the child node is obtained by JavaScript technology, wherein the attribute information includes node position information and a node identifier; after obtaining the attribute information, whether the identifier corresponding to the child node matches the preset identifier is detected according to the attribute information; if the identifier corresponding to the child node matches the preset identifier, it is indicated If it is understood that the node corresponding to the clicked item has been obtained, the obtained child node, the structural information and the attribute information will be used as the target node information; understandably, if the identifier corresponding to the child node does not match the preset identifier, indicating that the node corresponding to the clicked item has not been obtained, then continue to detect whether the identifier of the next child node matches the preset identifier; construct a node tree corresponding to the page to be jumped to from top to bottom according to the child nodes, the structural information and the preset root node information in the target node information; add the attribute information in the target node information to the corresponding node in the node tree to obtain a style tree corresponding to the page to be jumped to.
[0051] S130: Calculate position information of a click item corresponding to the preset click item instruction according to the style tree and a preconfigured overflow processing method.
[0052] In an embodiment of the present invention, if the preconfigured overflow processing method is scrolling overflow, indicating that the overflowed items in the options to be jumped are displayed in a scrolling manner, then it is necessary to calculate the height information from the node corresponding to the click item instruction to the root node in the style tree; understandably, if the preconfigured overflow processing method is paging overflow, indicating that the overflowed items in the options to be jumped are displayed in a paging manner, then the page number information of the click item corresponding to the click item instruction is calculated according to the preset identifier; finally, the height information or the page number information is used as the position information of the click item corresponding to the click item instruction to focus on displaying the click item.
[0053] S140: Focus the clicked item in the to-be-jumped options according to the position information.
[0054] In an embodiment of the present invention, if the position information is the height information, the scrolling distance of the scroll bar is set according to the height information to focus the clicked item in the options to be jumped to; if the position information is the page number information, the jump page number is set according to the page number information to focus the clicked item in the options to be jumped to. It should be noted that in this embodiment of the present invention, focusing is achieved by replacing the background color of the clicked item with a color that is different from other items. In other embodiments of the invention, the clicked item can also be focused and displayed by a pop-up window.
[0055] Figure 4 FIG is a schematic block diagram of an automatic focus jump device 200 provided by an embodiment of the present invention. Figure 4 As shown, corresponding to the above automatic jump focus method, the present invention also provides an automatic jump focus device 200. The automatic jump focus device 200 includes a unit for executing the above automatic jump focus method. Figure 4 The automatic jump focusing device 200 includes an acquisition unit 201, a jump unit 202, a construction unit 203, a calculation unit 204 and a focusing unit 205.
[0056] Among them, the acquisition unit 201 is used to obtain the click information and preset identifier corresponding to the preset click entry instruction if a preset click entry instruction is received; the jump unit 202 is used to jump from the current option in the current page to the option to be jumped to the page to be jumped to according to the click information, the preset identifier and the preset item, and display all entries in the current option in the option to be jumped to, wherein the current option and the option to be jumped to are the same option; the construction unit 203 is used to obtain the page information of the page to be jumped to by a preset technology according to the preset identifier, and construct a style tree corresponding to the page to be jumped to according to the page information; the calculation unit 204 is used to calculate the position information of the click entry corresponding to the preset click entry instruction according to the style tree and the preconfigured overflow processing method; the focusing unit 205 is used to focus the click entry in the option to be jumped to according to the position information.
[0057] In some embodiments, such as this embodiment, the jump unit 202 includes a determination unit 2021 , a jump subunit 2022 , a first acquisition subunit 2023 , a second acquisition subunit 2024 , and a display unit 2025 .
[0058] Among them, the determination unit 2021 is used to determine the page to be jumped to according to the jump attribute value in the click information; the jump subunit 2022 is used to jump from the current option in the current page to the option to be jumped to of the page to be jumped to according to the page to be jumped to and the preset default option value; the first acquisition subunit 2023 is used to obtain entry retrieval information from the preset database according to the preset identifier; the second acquisition subunit 2024 is used to obtain entry information corresponding to all entries in the current option except the clicked entry from the preset database according to the page attribute value in the click information; the display unit 2025 is used to display all entries in the current option in the option to be jumped to according to the preset style information, the entry information and the entry retrieval information.
[0059] In some embodiments, such as this embodiment, the construction unit 203 includes a third acquisition subunit 2031 and a first construction subunit 2032 .
[0060] Among them, the third acquisition sub-unit 2031 is used to obtain the node information corresponding to the page to be jumped to through Xpath technology and JavaScript technology according to the preset root node information in the page to be jumped to until the identifier corresponding to the node in the node information matches the preset identifier, so as to obtain the target node information; the first construction sub-unit 2032 is used to construct a style tree corresponding to the page to be jumped to based on the target node information and the preset root node information.
[0061] In some embodiments, such as this embodiment, the third acquiring subunit 2031 includes a fourth acquiring subunit 20311 , a fifth acquiring subunit 20312 , a detecting unit 20313 and a first acting unit 20314 .
[0062] Among them, the fourth acquisition sub-unit 20311 is used to obtain the child nodes corresponding to the preset root node information and the structural information corresponding to the child nodes layer by layer from the html node tree corresponding to the page to be jumped through the Xpath technology according to the preset root node information in the page to be jumped; the fifth acquisition sub-unit 20312 is used to obtain the attribute information corresponding to the child node through JavaScript technology; the detection unit 20313 is used to detect whether the identifier corresponding to the child node matches the preset identifier based on the attribute information; the first action unit 20314 is used to use all the acquired child nodes, the structural information and the attribute information as the target node information if the identifier corresponding to the child node matches the preset identifier.
[0063] In some embodiments, such as this embodiment, the first construction subunit 2032 includes a second construction subunit 20321 and an adding unit 20322 .
[0064] The second construction subunit 20321 is used to construct a node tree corresponding to the page to be jumped to from top to bottom according to the child nodes, the structure information and the preset root node information in the target node information;
[0065] The adding unit 20322 is configured to add the attribute information in the target node information to a corresponding node in the node tree to obtain a style tree corresponding to the page to be jumped to.
[0066] In some embodiments, such as this embodiment, the calculation unit 204 includes a first calculation subunit 2041 , a second calculation subunit 2042 , and a second operation unit 2043 .
[0067] Among them, the first calculation sub-unit 2041 is used to calculate the height information from the node corresponding to the click entry instruction to the root node in the style tree if the preconfigured overflow processing method is scrolling overflow; the second calculation sub-unit 2042 is used to calculate the page number information of the click entry corresponding to the click entry instruction according to the preset identifier if the preconfigured overflow processing method is paging overflow; the second action unit 2043 is used to use the height information or the page number information as the position information of the click entry corresponding to the click entry instruction.
[0068] In some embodiments, such as this embodiment, the focusing unit 205 includes a first focusing sub-unit 2051 and a second focusing sub-unit 2052 .
[0069] Among them, the first focusing sub-unit 2051 is used to set the scrolling distance of the scroll bar according to the height information to focus the clicked item in the options to be jumped to if the position information is the height information; the second focusing sub-unit 2052 is used to set the jump page number according to the page number information to focus the clicked item in the options to be jumped to if the position information is the page number information.
[0070] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned automatic jump focus device 200 and each unit can refer to the corresponding description in the aforementioned method embodiment. For the convenience and brevity of description, it will not be repeated here.
[0071] The automatic focus jump device can be implemented as a computer program. Figure 5 Runs on the computer device shown.
[0072] See also Figure 5 , Figure 5 1 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 900 is a server with an Internet of Things page management platform.
[0073] See Figure 5 The computer device 900 includes a processor 902 , a memory, and an interface 907 connected via a system bus 901 , wherein the memory may include a storage medium 903 and an internal memory 904 .
[0074] The storage medium 903 may store an operating system 9031 and a computer program 9032. When the computer program 9032 is executed, the processor 902 may execute an automatic focus jump method.
[0075] The processor 902 is used to provide computing and control capabilities to support the operation of the entire computer device 900.
[0076] The internal memory 904 provides an environment for the operation of the computer program 9032 in the storage medium 903. When the computer program 9032 is executed by the processor 902, the processor 902 can execute an automatic focus jump method.
[0077] The interface 905 is used to communicate with other devices. Those skilled in the art will appreciate that Figure 5The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 900 to which the solution of the present application is applied. The specific computer device 900 may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0078] Among them, the processor 902 is used to run the computer program 9032 stored in the memory to implement the following steps: if a preset click entry instruction is received, the click information and preset identifier corresponding to the preset click entry instruction are obtained; according to the click information, the preset identifier and the preset item, the page is jumped from the current option in the current page to the option to be jumped to the page to be jumped to, and all entries in the current option are displayed in the option to be jumped to, wherein the current option and the option to be jumped to are the same option; according to the preset identifier, the page information of the page to be jumped to is obtained through a preset technology, and a style tree corresponding to the page to be jumped to is constructed according to the page information; according to the style tree and the preconfigured overflow processing method, the position information of the click entry corresponding to the preset click entry instruction is calculated; according to the position information, the click entry in the option to be jumped to is focused.
[0079] In certain embodiments, such as the present embodiment, the processor 902 specifically implements the following steps when jumping from the current option in the current page to the option to be jumped to of the page to be jumped to according to the click information, the preset identifier, and the preset item, and displaying all entries in the current option on the option to be jumped to: determining the page to be jumped to according to the jump attribute value in the click information; jumping from the current option in the current page to the option to be jumped to of the page to be jumped to according to the page to be jumped to and the preset default option value; obtaining entry retrieval information from a preset database according to the preset identifier; obtaining entry information corresponding to all entries in the current option except the clicked entry from the preset database according to the page attribute value in the click information; and displaying all entries in the current option on the option to be jumped to according to the preset style information, the entry information, and the entry retrieval information.
[0080] In certain embodiments, such as the present embodiment, when the processor 902 implements the step of obtaining the page information of the page to be jumped to by using a preset technology according to the preset identifier, and constructing a style tree corresponding to the page to be jumped to according to the page information, the processor 902 specifically implements the following steps: according to the preset root node information in the page to be jumped to, obtaining the node information corresponding to the page to be jumped to by using Xpath technology and JavaScript technology until the identifier corresponding to the node in the node information matches the preset identifier, so as to obtain the target node information; and constructing a style tree corresponding to the page to be jumped to according to the target node information and the preset root node information.
[0081] In certain embodiments, such as the present embodiment, when the processor 902 implements the step of obtaining the node information corresponding to the page to be jumped to by using Xpath technology and JavaScript technology according to the preset root node information in the page to be jumped to until the identifier corresponding to the node in the node information matches the preset identifier to obtain the target node information, the processor 902 specifically implements the following steps: obtaining the child nodes corresponding to the preset root node information and the structural information corresponding to the child nodes layer by layer from the html node tree corresponding to the page to be jumped to by using Xpath technology according to the preset root node information in the page to be jumped to; obtaining the attribute information corresponding to the child nodes by using JavaScript technology; detecting whether the identifier corresponding to the child node matches the preset identifier according to the attribute information; if the identifier corresponding to the child node matches the preset identifier, all the obtained child nodes, the structural information and the attribute information are used as the target node information.
[0082] In certain embodiments, such as the present embodiment, when the processor 902 implements the step of constructing a style tree corresponding to the page to be jumped to based on the target node information and the preset root node information, it specifically implements the following steps: constructing a node tree corresponding to the page to be jumped to from top to bottom based on the child nodes, the structural information and the preset root node information in the target node information; adding the attribute information in the target node information to the corresponding node in the node tree to obtain a style tree corresponding to the page to be jumped to.
[0083] In certain embodiments, such as the present embodiment, the processor 902, when implementing the step of calculating the position information of the click entry corresponding to the preset click entry instruction based on the style tree and the preconfigured overflow processing method, specifically implements the following steps: if the preconfigured overflow processing method is scrolling overflow, then calculate the height information from the node corresponding to the click entry instruction to the root node in the style tree; if the preconfigured overflow processing method is paging overflow, then calculate the page number information of the click entry corresponding to the click entry instruction based on the preset identifier; and use the height information or the page number information as the position information of the click entry corresponding to the click entry instruction.
[0084] In certain embodiments, such as the present embodiment, when the processor 902 implements the step of focusing the clicked item in the option to be jumped to according to the position information, it specifically implements the following steps: if the position information is the height information, the scrolling distance of the scroll bar is set according to the height information to focus the clicked item in the option to be jumped to; if the position information is the page number information, the jump page number is set according to the page number information to focus the clicked item in the option to be jumped to.
[0085] It should be understood that in the embodiment of the present application, the processor 902 may be a central processing unit (CPU), and the processor 902 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0086] Those skilled in the art will appreciate that all or part of the steps in the method of the above-described embodiment can be implemented by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. The computer program is executed by at least one processor in the wireless communication system to implement the steps in the method of the above-described embodiment.
[0087] Therefore, the present invention further provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program. When executed by a processor, the computer program causes the processor to execute any embodiment of the above-mentioned automatic focus jump method.
[0088] The storage medium may be any computer-readable storage medium that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.
[0089] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, wireless communication software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0090] In the several embodiments provided herein, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the various units is merely a logical functional division, and actual implementation may employ other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0091] The steps in the methods of the embodiments of the present invention may be adjusted in order, combined, or deleted as needed. The units in the devices of the embodiments of the present invention may be combined, divided, or deleted as needed. Furthermore, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0092] If this integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the existing technology, or all or part of the technical solution, can be embodied in the form of a software product. This wireless communication software product is stored in a storage medium and includes several instructions for causing a computer device (such as a personal wireless communication device, terminal, or network device) to execute all or part of the steps of the method described in various embodiments of the present invention.
[0093] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0094] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, to the extent such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to encompass such changes and modifications.
[0095] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. An automatic jump focus method, applied to the Internet of Things page management platform, characterized in that: include: If a preset click entry instruction is received, obtaining click information and a preset identifier corresponding to the preset click entry instruction; Jumping from the current option in the current page to the option to be jumped to on the page to be jumped to according to the click information, the preset identifier, and the preset item, and displaying all items in the current option in the option to be jumped to, wherein the current option and the option to be jumped to are the same option; Acquire page information of the page to be redirected using a preset technology according to the preset identifier, and construct a style tree corresponding to the page to be redirected according to the page information; Calculating position information of a click item corresponding to the preset click item instruction according to the style tree and a preconfigured overflow processing method; Focusing the clicked item in the to-be-jumped options according to the position information; The acquiring of the page information of the page to be redirected by using a preset technology according to the preset identifier, and constructing a style tree corresponding to the page to be redirected according to the page information, includes: According to the preset root node information in the page to be jumped, the child nodes corresponding to the preset root node information and the structural information corresponding to the child nodes are obtained layer by layer from the HTML node tree corresponding to the page to be jumped by using XPath technology; Obtaining attribute information corresponding to the child node through JavaScript technology; Detecting, according to the attribute information, whether the identifier corresponding to the child node matches the preset identifier; If the identifier corresponding to the child node matches the preset identifier, all the child nodes, the structure information, and the attribute information obtained are used as target node information; Constructing a style tree corresponding to the page to be jumped to according to the target node information and the preset root node information; The step of jumping from the current option in the current page to the option to be jumped to on the page to be jumped to according to the click information, the preset identifier, and the preset item, and displaying all items in the current option on the option to be jumped to, includes: Determine the page to be jumped to according to the jump attribute value in the click information; Jumping from the current option in the current page to the option to be jumped to on the page to be jumped to according to the page to be jumped to and the preset default option value; Acquiring entry retrieval information from a preset database according to the preset identifier; Acquire, from the preset database according to the page attribute value in the click information, item information corresponding to all items in the current option except the clicked item; All items in the current option are displayed in the option to be jumped to according to the preset style information, the item information and the item search information, wherein clicking an item in the option to be jumped to displays detailed information, while other items display brief information.
2. The automatic jump focus method according to claim 1, wherein: The step of constructing a style tree corresponding to the page to be redirected according to the target node information and the preset root node information includes: Constructing a node tree corresponding to the page to be jumped to from top to bottom according to the child nodes, the structure information and the preset root node information in the target node information; The attribute information in the target node information is added to a corresponding node in the node tree to obtain a style tree corresponding to the page to be jumped to.
3. The automatic jump focus method according to claim 2, wherein: The calculating, according to the style tree and the preconfigured overflow processing method, the position information of the click item corresponding to the preset click item instruction includes: If the preconfigured overflow handling method is scroll overflow, calculating the height information from the node corresponding to the click item instruction to the root node in the style tree; If the preconfigured overflow processing method is page overflow, calculating the page number information of the click item corresponding to the click item instruction according to the preset identifier; The height information or the page number information is used as position information of the click item corresponding to the click item instruction.
4. The automatic jump focus method according to claim 3, wherein: The focusing the clicked item in the to-be-jumped options according to the position information includes: If the position information is the height information, setting a scroll distance of the scroll bar according to the height information to focus the clicked item in the to-be-jumped option; If the position information is the page number information, the jump page number is set according to the page number information to focus the clicked item in the to-be-jumped option.
5. An automatic jump focus device, applied to the Internet of Things page management platform, characterized in that: include: an acquiring unit, configured to acquire click information and a preset identifier corresponding to the preset click entry instruction upon receiving the preset click entry instruction; a jump unit, configured to jump from a current option in a current page to an option to be jumped to in a page to be jumped to according to the click information, the preset identifier, and the preset item, and to display all items in the current option in the option to be jumped to, wherein the current option and the option to be jumped to are the same option; a construction unit, configured to obtain page information of the page to be redirected using a preset technology according to the preset identifier, and to construct a style tree corresponding to the page to be redirected according to the page information; a calculation unit, configured to calculate position information of a click item corresponding to the preset click item instruction according to the style tree and a preconfigured overflow processing method; a focusing unit, configured to focus the clicked item in the to-be-jumped options according to the position information; Wherein, the construction unit includes: A fourth acquisition sub-unit is configured to acquire, based on the preset root node information in the page to be jumped to, the child nodes corresponding to the preset root node information and the structural information corresponding to the child nodes layer by layer from the HTML node tree corresponding to the page to be jumped to by using XPath technology; A fifth acquiring subunit, configured to acquire attribute information corresponding to the child node through JavaScript technology; A detection unit, configured to detect, based on the attribute information, whether the identifier corresponding to the child node matches the preset identifier; The first unit is configured to use all the acquired child nodes, the structure information, and the attribute information as target node information if the identifier corresponding to the child node matches the preset identifier; A first construction subunit is configured to construct a style tree corresponding to the page to be redirected according to the target node information and the preset root node information; The jump unit includes: a determining unit, configured to determine a page to be jumped to according to a jump attribute value in the click information; A jump subunit, configured to jump from a current option in a current page to an option to be jumped to on the page to be jumped to according to the page to be jumped to and a preset default option value; A first acquiring subunit, configured to acquire entry retrieval information from a preset database according to the preset identifier; A second acquiring subunit is configured to acquire, from the preset database, item information corresponding to all items in the current option except the clicked item according to the page attribute value in the click information; The display unit is used to display all items in the current option in the option to be jumped to according to the preset style information, the item information and the item retrieval information, wherein clicking an item in the option to be jumped to displays detailed information, while other items display brief information.
6. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 4 can be implemented.
Citation Information
Patent Citations
Tag generation method and device and information acquisition method and device
CN106156189A
A method for jumping to a page designated position, a storage medium, a device and a system
CN109426535A
Page element positioning method and device
CN110046090A