CN114911534B - Page information extraction method, setting method, device, electronic equipment and medium - Google Patents

Page information extraction method, setting method, device, electronic equipment and medium Download PDF

Info

Publication number
CN114911534B
CN114911534B CN202110181055.7A CN202110181055A CN114911534B CN 114911534 B CN114911534 B CN 114911534B CN 202110181055 A CN202110181055 A CN 202110181055A CN 114911534 B CN114911534 B CN 114911534B
Authority
CN
China
Prior art keywords
page information
page
target
template
tag
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110181055.7A
Other languages
Chinese (zh)
Other versions
CN114911534A (en
Inventor
吴郑燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang Uniview Technologies Co Ltd
Original Assignee
Zhejiang Uniview Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang Uniview Technologies Co Ltd filed Critical Zhejiang Uniview Technologies Co Ltd
Priority to CN202110181055.7A priority Critical patent/CN114911534B/en
Publication of CN114911534A publication Critical patent/CN114911534A/en
Application granted granted Critical
Publication of CN114911534B publication Critical patent/CN114911534B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • Stored Programmes (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application discloses a page information extraction method, a setting method, a device, electronic equipment and a medium. The method comprises the following steps: determining a target label from labels contained in a target page area of the display page; extracting page information corresponding to the target label according to the label code of the target label; and generating a page information template corresponding to the target page area according to the page information, so as to be imported into the page to be set for setting the page information. According to the scheme, through automatic extraction of the page information corresponding to the target tag in the target page area and generation of the page information template for direct import, the problems that repeated input and copy and paste are complex in the page information setting process and the fixed initial information template cannot be flexibly changed are solved, custom generation of the page information template is achieved, the form of the page information template is enriched, direct import during subsequent page information setting is facilitated, and page information setting efficiency is improved.

Description

Page information extraction method, setting method, device, electronic equipment and medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a page information extraction method, a page information setting device, electronic equipment and a page information medium.
Background
In the operation process of inputting data at the web page end, for example, in the process of managing the newly-added device on the platform website, the process generally displays the parameter information needing to be input by popup pages, including the information of the device name, the device model, the device parameters and the like, and the user inputs the parameter information to add the device.
In the case where there is a relatively large amount of parameter information to be input, the parameter information needs to be input repeatedly every time a new device is added. Some input items are regularly and circularly available, for example, only the last few characters need to be changed, and each time of repeated input causes the input process to be complicated. If the newly added data is opened and copy-pasted, the copy-pasting process is also complicated under the condition that more parameter information needs to be input. If a set of initial values is set for a page configuration item, the initial values are generally fixed, and are difficult to flexibly change for different situations, so that the setting of parameter information is difficult to be completed efficiently and quickly.
Disclosure of Invention
The embodiment of the application provides a page information extraction method, a page information setting device, electronic equipment and a page information medium, so that page information setting efficiency is improved.
In one embodiment, an embodiment of the present application provides a method for extracting page information, where the method includes:
determining a target label from labels contained in a target page area of the display page;
extracting page information corresponding to the target tag according to the tag code of the target tag;
and generating a page information template corresponding to the target page area according to the page information so as to be imported into a page to be set for setting page information.
In another embodiment, an embodiment of the present application provides a method for setting page information, including:
selecting a target page information template from the page information templates;
importing the target page information template into a region to be set of a page to be set;
according to the page information in the target page information template, setting page information of the page to be set;
wherein the page information template is determined based on the page information extraction method of any one of the above embodiments.
In an embodiment, the embodiment of the present application further provides a page information extraction apparatus, where the apparatus includes:
the target label is a determining module, which is used for determining the target label from labels contained in a target page area of the display page;
the page information extraction module is used for extracting page information corresponding to the target tag according to the tag code of the target tag;
and the page information template generation module is used for generating a page information template corresponding to the target page area according to the page information so as to be imported into a page to be set for page information setting.
In another embodiment, an embodiment of the present application further provides a page information setting device, where the device includes:
the selection module is used for selecting a target page information template from the page information templates;
the importing module is used for importing the target page information template into a region to be set of a page to be set;
the setting module is used for setting the page information of the page to be set according to the page information in the target page information template;
wherein the page information template is determined based on the page information extraction method of any one of the above embodiments.
In yet another embodiment, an electronic device is provided in an embodiment of the present application, including: one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for extracting page information provided in any embodiment of the present application, or implement the method for setting page information provided in any embodiment of the present application.
In still another embodiment, the present application further provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the page information extracting method provided in any of the embodiments of the present application, or implements the page information setting method provided in any of the embodiments of the present application.
One of the above technical solutions has the following technical effects: determining a target label from labels contained in a target page area of the display page; extracting page information corresponding to the target tag according to the tag code of the target tag; according to the page information, generating a page information template corresponding to the target page area to be imported into a page to be set for page information setting, solving the problems that repeated input and copy pasting are complex in the page information setting process and the fixed initial information template cannot be flexibly changed, realizing custom generation of the page information template, enriching the form of the page information template, facilitating direct import in subsequent page information setting and improving the page information setting efficiency.
Drawings
Fig. 1 is a flowchart of a page information extraction method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a display page for extracting page information according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for extracting page information according to another embodiment of the present disclosure;
FIG. 4 is a flowchart of a method for setting page information according to an embodiment of the present application;
fig. 5 is a schematic diagram of a page to be set for setting page information according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a page information extracting device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a page information setting device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The present application is described in further detail below with reference to the drawings and examples.
Fig. 1 is a flowchart of a page information extraction method according to an embodiment of the present application. The page information extraction method provided by the embodiment of the invention can be suitable for the situation that the page information in the target page area of the display page is extracted to generate the page information template. The method may in particular be performed by a page information extraction device, which may be implemented in software and/or hardware, which may be integrated in an electronic device capable of implementing the page information extraction method. Referring to fig. 1, the method in the embodiment of the present application specifically includes:
S110, determining a target label from labels contained in a target page area of the display page.
Wherein the display page may be a page for displaying information. The display page may be, for example, a web page in a browser, a page in a software application, a page on a management system, etc. The tag is an element for displaying page information, and may be an html tag, for example. The display page in the embodiment of the application is a page which is developed and displayed. In the display page, a label for displaying information has been assigned a value. The target page area is an area to be subjected to subsequent operation selected from the display page, can be the whole area of the display page or can be a partial area of the display page, and the specific selection mode can be interception according to the position information and the size information of the preset target display area or determination according to the circle operation of a user. The target labels are determined from all labels, can be all labels or part of labels, are specifically set according to actual conditions, can be determined according to attribute names and attribute values of the labels, and can be selected in a personalized way.
For example, in the target page area, a plurality of tags may be included. Not all of the page information corresponding to the tags may need to be extracted for generating the page information template. For example, it is possible that the page information corresponding to a part of the tag is not information that can be multiplexed, and is not suitable for generating a page information template. Alternatively, it is possible that part of the tag does not include the page information required to generate the page information template. Thus, the target tag may be determined from the tags contained in the target page area to generate the page information template.
In the embodiment of the present application, the determining process of the target page area includes: identifying an area selection operation acted on the display page by a user; and determining a target page area from the display page according to the area selection operation.
The user may perform an area selection operation on the display page by clicking or by clipping the frame to be circled, for example. And identifying the region selection operation of the user on the display page, and determining the region selected by the user according to the region selection operation to serve as a target page region. As shown in fig. 2, the user may circle and obtain a target page area in the dashed box, and extract the page information in the target page area in a targeted manner.
S120, extracting page information corresponding to the target label according to the label code of the target label.
The tag code may be a code segment corresponding to the target tag. When writing the tag code of the target tag, page information displayed by the target tag is already written into the tag code. Therefore, the page information corresponding to the target tag can be extracted according to the tag code of the target tag.
S130, generating a page information template corresponding to the target page area according to the page information so as to be imported into a page to be set for setting page information.
The specific form of the page information template can be set according to actual conditions. For example, the page information may be stored in a form of a table, so as to obtain a page information template corresponding to the target page area. The page information can be stored in the form of a document, and a page information template corresponding to the target page area is obtained. The page information template can be called so as to be directly imported into the page to be set for setting the page information.
For example, the user can manually select the page information template, and the page information template is imported into the page to be set to set the page information. And when the page to be set exists, automatically selecting a page information template according to a matching result of the page to be set and the target page area, and importing the page information template into the page to be set to set page information.
In this embodiment of the present application, generating, according to the page information, a page information template corresponding to the target page area includes: binding the page information template with the triggerable labels in the display page so as to call the page information template through the triggerable labels.
For example, the generated page information template can be bound with the triggerable tag, so that when the triggerable tag is triggered by a user, the page information template corresponding to the triggerable tag is called, and the page information template is directly imported into a page to be set for setting page information. The triggerable label can be a draggable label, a user can click and drag the draggable label, and drag the draggable label to a to-be-set area of a to-be-set page, so that a page information template bound by the draggable label is imported into the to-be-set area, the to-be-set area is set with page information, and the user does not need to input page information or copy and paste again, and can freely select the page information template to drag and import, so that the page information template is richer, and the problem that a fixed initial value is difficult to flexibly change is solved.
According to the scheme, the target label is determined from the labels contained in the target page area of the display page; extracting page information corresponding to the target tag according to the tag code of the target tag; the method and the device can extract the page information in the target page area in a targeted manner, generate the page information template corresponding to the target page area according to the page information, and conduct page information setting in the page to be set, so that the page information template corresponding to the target page area is generated in a customized manner, the problems that repeated input and copy and paste are complicated in the page information setting process and the fixed initial information template cannot be flexibly changed are solved, custom customization generation of the page information template is achieved, the form of the page information template is enriched, direct introduction in subsequent page information setting is facilitated, and the page information setting efficiency is improved.
In an embodiment of the present application, the method further includes: and packaging the page information extraction method into a callable code frame so as to realize method multiplexing.
The method for extracting the page information can be integrated into a JavaScript library, so that the scheme is tooled, different webpages can be conveniently loaded into the JavaScript library, the method in the JavaScript library is directly called through a data interface, the extraction of the page information and the direct calling of the page information template are realized, and the method can be conveniently and flexibly applied to other webpages.
Fig. 3 is a flowchart of a page information extraction method according to another embodiment of the present application. The embodiments of the present application are further optimized for the above embodiments, and details not described in detail in the embodiments of the present application are detailed in the above embodiments. Referring to fig. 3, the method for extracting page information provided in the embodiment of the present application may include:
s210, selecting a target attribute identifier with a mapping relation from the attribute identifiers of the page tags.
Wherein the attribute identification of the page tag is used to represent the uniqueness of the page tag attribute, which typically occurs in the form of an attribute name/value, for example: name= "value", the attribute is generally the content following the tag name in the start tag. There may be multiple attributes of the page tag. For page tags, not all attributes need to be assigned values. In addition, it is not necessary to extract all the attributes and attribute values of the page tag, and some of the attributes may not be required by the user, or the attribute values may not be multiplexed as templates, so that the target attribute identifier with a mapping relationship may be selected from the attribute identifiers of the page tag in a targeted manner, so as to extract the attribute name and attribute value associated with the target attribute identifier in a targeted manner. The target attribute identifier with the mapping relationship may be an identifier capable of representing an attribute name and an attribute value, for example, a target attribute identifier id and a value of a page tag are selected, so that the attribute name and the attribute value of the page information are extracted correspondingly.
S220, in the development process of the display page, the target attribute identifiers are respectively associated with the attribute names and the attribute values configured for the page tags.
The attribute names and attribute values configured for the page tags may be attribute values set by the user according to actual situations, for example, the user sets a device name and specific content for the device to be added, where the set device name and specific content need to be displayed in the display page. In the development process of the display page, the target attribute identifier is associated with the attribute name and the attribute value configured for the page tag, so that the attribute name and the attribute value associated with the target attribute identifier are conveniently locked by searching the target attribute identifier.
For example, if the user assigns "softName" to the target attribute identification id, the target attribute identification id and the attribute name softName are associated, and if the user assigns "notis_android-R2021" to the target attribute identification value, the target attribute identification value and the attribute name notis_android-R2021 are associated, so that the attribute name and the attribute value associated with the target attribute can be found through the target attribute in the following.
It should be noted that, the foregoing solution may be executed once before each execution of the subsequent steps in the embodiments of the present application, or may be executed once, and then the subsequent steps in the embodiments of the present application may be executed multiple times.
S230, traversing the labels contained in the target page area.
For example, when extracting the page information, the tag contained in the target page area needs to be comprehensively traversed and identified, so that the required page information is comprehensively and fully searched and acquired. The traversed tags may be text tags (e.g., input, textarea tags), form tags (e.g., table tags), picture tags (e.g., img tags), and the like.
S240, if the target attribute identifier of the label is associated with the attribute name and the attribute value, the label is taken as the target label.
Illustratively, the target attribute identifier corresponds to an attribute selected by the user to be used for generating the page information template, and thus the target attribute identifier is searched in a targeted manner. If the target attribute identification of the label is associated with the attribute name and the attribute value, the attribute of the label is assigned, and the assigned label is taken as the target label.
Specifically, for example, if the target attribute identifier is id and value, traversing the labels contained in the target page area, and determining that the labels with the target attribute identifier id and the target attribute identifier value exist. For a tag with a target attribute identification id and a target attribute identification value, whether an attribute name and an attribute value are associated, for example, id is associated with an attribute name softName, and value is associated with an attribute value tis_android-R2021. If the target attribute identification id and the target attribute identification value of the tag are associated with the attribute name and the attribute value, the tag is determined to be the target tag, targeted subsequent processing is carried out on the target tag, and page information extraction is carried out according to the content contained in the target tag.
S250, extracting the attribute name and the attribute value associated with the target attribute identifier of the target label according to the label code of the target label so as to generate a page information template.
For the assigned tag, the assigned tag code is assigned with the target attribute identifier, so that the attribute name and the attribute value associated with the target attribute identifier of the target tag can be extracted from the tag code of the target tag, and the page information template can be generated by comprehensively and accurately reflecting the attribute name and the attribute value associated with the target attribute identifier of the target tag of the page information.
Specifically, for example, for a tag code of a target tag: < textarea id= "softName" value= "Notis_android-R2021" > </textarea >, extracting the target attribute identification id and the associated attribute name softName, the target attribute identification value and the associated attribute value Notis_android-R2021, thereby extracting the page information for generating the template.
And S260, locally storing the attribute name and the attribute value associated with the target attribute identifier of the target tag in the page information as an object array, and taking the object array as a page information template corresponding to the target page area.
For example, the attribute names and the attribute values associated with the target attribute identifications may be stored as an object array, so as to facilitate corresponding storage and management of the attribute names and the attribute values associated with the target attribute identifications. In this embodiment of the present application, the object array is stored locally, for example, by means of global variables in a browser, localStorage, sessionStoreage, etc., where localStorage is to store data directly to be local, which is equivalent to a database for pages. The sessionstore is used to temporarily store data of a page, and the stored data is deleted after closing the page. The scheme has the beneficial effects that the page information template is directly stored locally and does not need to be transmitted to the server, so that the safety of the page information template is improved, and the page information template is prevented from being illegally stolen.
S270, carrying out visual display on the page information template.
For example, the page information template can be visually displayed on a display page or other display areas, so that the generated page information template is displayed for a user, and the user can conveniently select, import and use. For the visualized page information template, the page information template can be imported into a page to be set according to the operation of a user or the automatic operation, and the attribute name and the attribute value associated with the target attribute identifier in the page information template are assigned to the corresponding tag in the page to be set. The visual display form can be set according to actual conditions.
In this embodiment of the present application, performing visual display on the page information template includes: and assigning the attribute name and the attribute value associated with the target attribute identifier of the target tag in the page information to the display tag of the display page so as to display the page information template on the display page through the display tag.
The display label can be a display label which can be used for displaying the attribute name and the attribute value associated with the target attribute identifier, for example, a table label, a text label and the like, and is used for intuitively displaying the attribute name and the attribute value associated with the target attribute identifier. And assigning the attribute name and the attribute value associated with the target attribute identifier to a display tag of the display page, so that the page information template is displayed on the display page through the display tag, a user can intuitively determine the generated page information template, and the user can conveniently and directly select the required page information template from the displayed page information templates for importing and using. As shown in fig. 2, the attribute name corresponding to the target attribute identifier id and the attribute value corresponding to the target attribute identifier value are displayed in a table form on the display page, so that a user can conveniently check and select, and a required page information template is determined.
The other technical scheme has the following technical effects: the target attribute identifiers with the mapping relation are selected and bound with the attribute names and the attribute values, and the attribute names and the attribute values associated with the target attribute identifiers are extracted, so that the target page area is extracted with page information pertinently, the page information required by a user is acquired, and the page information template is conveniently generated. Through the visual display of the page information templates, the user can intuitively determine the generated page information templates, and directly call the importing to set the page information, so that the efficiency of setting the page information is improved, and the operation of the user is facilitated.
Fig. 4 is a flowchart of a page information setting method according to an embodiment of the present application. The page information setting method provided by the embodiment of the application can be suitable for the situation of setting page information. Typically, the page information setting method of the embodiment of the application can be applied to the situation that page information is set based on the page information template. The method may in particular be performed by a page information setting device, which may be implemented in software and/or hardware, which may be integrated in an electronic apparatus capable of implementing the page information setting method. Details not described in detail in the embodiments of the present application, see the above embodiments. Referring to fig. 4, the method in the embodiment of the present application specifically includes:
S310, selecting a target page information template from the page information templates.
Wherein the page information template is determined based on the page information extraction method of any one of the above embodiments.
The page information template can be displayed on a page to be set or other pages so as to be convenient for a user to view. The target page information template is selected from the page information templates, so that the target page information template can be selected for identifying the operation of a user, or the target page information template can be automatically selected according to the information such as the position, the size and the like of the area to be set of the page to be set.
In the embodiment of the application, selecting a target page information template from page information templates includes: if the triggering operation of the user on the visually displayed page information template is detected, determining a target page information template bound by the triggerable label triggered by the user, and calling the target page information template.
By way of example, the page information template may be presented on a page to be set or other page. The page information template which is visually displayed can be bound with the triggerable label, when a user performs triggering operation on the triggerable label, such as clicking selection, dragging and the like, the target page information template bound with the triggerable label is determined according to the triggerable label triggered by the user, and the page information template is called, so that information is filled into a region to be set of a page to be set according to the target page information template, and page information setting is performed. Through setting the draggable tag, the target page information template is bound with the page information template, so that a user can directly select and import the target page information template through dragging the draggable tag, the operation of the user is facilitated, and the direct import of the target page information template is realized. As shown in fig. 5, for the displayed page information template, the user may perform a triggering operation, so that the target page information template is selected and invoked directly through the triggering operation.
In the embodiment of the application, the number of the page information templates in the visual display is at least two; accordingly, selecting a target page information template from the page information templates, including: and selecting the same or different target page information templates from at least two visually displayed page information templates aiming at different areas to be set in the page to be set.
By way of example, at least two page information templates may be presented in fig. 5. When the user sets information in at least two different areas to be set on the page to be set, the same target page information template can be selected from the at least two page information templates, and the target page information template is imported into the at least two different areas to be set for information setting. Different target page information templates can be selected from at least two page information templates, and the target page information templates are respectively imported into at least two different areas to be set for setting information. According to the scheme, the automatic setting is carried out on one page to be set by importing a plurality of target page information templates, the information setting efficiency is improved, and the operation of a user is facilitated.
S320, importing the target page information template into a region to be set of a page to be set.
By way of example, since the target page information template includes the page information for setting the area to be set, the target page information template is imported into the area to be set of the page to be set, the page information setting can be directly performed on the area to be set through the page information in the target page information template, repeated filling or copy and paste are not required, and a fixed initial template is not required, so that the page information template can be flexibly selected to perform the page information setting.
In this embodiment of the present application, importing the target page information template into the to-be-set area of the to-be-set page includes: determining the region to be set according to the target operation region defined by the triggering operation; and importing the target page information template into the region to be set.
For example, the user may perform a trigger operation on the page to be set, and determine the area to be set according to the target operation area defined by the trigger operation. For example, the user may outline the target operation area on the page to be set, with the target operation area as the area to be set. The user can drag the draggable label, and the target operation area which is dragged by the draggable label is used as the area to be set, so that the targeted setting of the page information in the area to be set is realized, and the flexibility of regional page information setting is improved.
In this embodiment of the present application, the triggerable tag is a draggable tag, and the triggering operation is a drag operation; correspondingly, determining the region to be set according to the target operation region defined by the triggering operation comprises the following steps: and determining a region to be set associated with the target point according to the target point reached by the drag operation.
For example, the user may preset the correspondence between the point and the area in the page to be set, for example, a circular area with a point as the center of a circle and within a preset radius range is used as the area corresponding to the point. Alternatively, a rectangular region having a diagonal length is preset with a point as the center, and the rectangular region is used as the region corresponding to the point. And dragging the draggable label to the target point, and determining a preset area corresponding to the target point, namely the area to be set.
S330, setting page information of the page to be set according to the page information in the target page information template.
By way of example, the page information in the target page information template can be directly filled into the corresponding position of the page to be set, so that automatic setting of the page information of the page to be set is realized without manual input and setting, automatic setting is realized, and the operation of a user is facilitated.
In this embodiment of the present application, according to the page information in the target page information template, setting the page information on the page to be set includes: determining an attribute name and an attribute value associated with a target attribute identifier of a target tag contained in the page information according to the page information in the target page information template; and in the area to be set, determining a page tag matched with the attribute name, and assigning an attribute value corresponding to the attribute name to the page tag.
Specifically, according to the target attribute identifier in the target page information template, matching the attribute name in the target page information template with the attribute name of the page tag in the area to be set, if matching is successful, assigning the attribute value corresponding to the attribute name in the target page information template to the page tag, thereby realizing the page information setting of the page to be set.
For example, as shown in fig. 5, a user may select and drag a target page information template in the right page information template, drag the target page information template to a left area to be set, where an attribute name corresponding to a device name in the area to be set is softName, and is consistent with the attribute name softName in the target page information template, and assign an attribute value notis_android-R2021 corresponding to the softName in the target page information template to a value of a page tag corresponding to the device name in the area to be set, so that notis_android-R2021 is automatically filled in a text input area corresponding to the device name in the area to be set, and automatic filling of page information is achieved.
One of the above technical solutions has the following technical effects: by selecting the target page information template from the page information templates, importing the target page information template into a to-be-set area of the to-be-set page, and setting page information of the to-be-set page according to page information in the target page information template, automatic importing and setting of page information is achieved, the problems of complex manual filling and copying and pasting processes are solved, and information setting efficiency is improved. And the page information templates are diversified in form and can be reused, so that the flexibility of the page information templates is improved.
Fig. 6 is a schematic structural diagram of a page information extracting apparatus according to an embodiment of the present application. The device can be suitable for the situation that page information in a target page area of a display page is extracted to generate a page information template. The apparatus may be implemented in software and/or hardware, and the apparatus may be integrated in an electronic device. Referring to fig. 6, the apparatus specifically includes:
a target tag determining module 410, configured to determine a target tag from tags included in a target page area of the display page;
the page information extraction module 420 is configured to extract page information corresponding to the target tag according to a tag code of the target tag;
And the page information template generating module 430 is configured to generate a page information template corresponding to the target page area according to the page information, so as to import the page to be set to perform page information setting.
In an embodiment of the present application, the apparatus further includes:
the target attribute selection module is used for selecting a target attribute identifier with a mapping relation from the attribute identifiers of the page tags;
and the association module is used for respectively associating the target attribute identifier with the attribute name and the attribute value configured for the page tag in the development process of the display page.
In the embodiment of the present application, the target tag determining module 410 includes:
the traversing unit is used for traversing the labels contained in the target page area;
and the determining unit is used for taking the label as the target label if the target attribute identifier of the label is associated with the attribute name and the attribute value.
In the embodiment of the present application, the page information extraction module 420 includes:
and the searching unit is used for extracting the attribute name and the attribute value associated with the target attribute identifier of the target label according to the label code of the target label so as to generate the page information template.
In an embodiment of the present application, the apparatus further includes:
the identification module is used for identifying the region selection operation acted on the display page by the user;
and the area determining module is used for determining a target page area from the display page according to the area selection operation.
In the embodiment of the present application, the page information template generating module 430 includes:
the storage unit is used for locally storing the attribute name and the attribute value associated with the target attribute identifier of the target tag in the page information as an object array, and taking the object array as a page information template corresponding to the target page area;
and the display unit is used for visually displaying the page information template.
In this embodiment of the present application, the display unit is specifically configured to:
and assigning the attribute name and the attribute value associated with the target attribute identifier of the target tag in the page information to the display tag of the display page so as to display the page information template on the display page through the display tag.
In the embodiment of the present application, the page information template generating module 430 includes:
and the binding unit is used for binding the page information template with the triggerable labels in the display page so as to call the page information template through the triggerable labels.
In an embodiment of the present application, the apparatus further includes:
and the packaging module is used for packaging the page information extraction method into a callable code frame so as to realize method multiplexing.
The page information extraction device provided by the embodiment of the application can execute the page information extraction method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 7 is a schematic structural diagram of a page information extracting apparatus according to an embodiment of the present application. The device can be suitable for the situation of setting page information. Typically, the page information setting method of the embodiment of the application can be applied to the situation that page information is set based on the page information template. The apparatus may be implemented in software and/or hardware, and the apparatus may be integrated in an electronic device. Referring to fig. 7, the apparatus may include:
a selecting module 510, configured to select a target page information template from the page information templates;
an importing module 520, configured to import the target page information template into a region to be set of a page to be set;
the setting module 530 is configured to set page information of the page to be set according to page information in the target page information template;
The page information template is generated based on the page information extraction method provided by any one of the embodiments.
In this embodiment of the present application, the template determining module 510 includes:
the detection unit is used for determining a target page information template bound by the triggerable label triggered by the user and calling the target page information template if the triggering operation of the user on the page information template in the visual display is detected.
In the embodiment of the present application, the importing module 520 includes:
a to-be-set area determining unit, configured to determine the to-be-set area according to a target operation area defined by the trigger operation;
and the template importing unit is used for importing the target page information template into the area to be set.
In the embodiment of the application, at least two page information templates are visually displayed;
accordingly, the selection module 510 is specifically configured to:
selecting the same or different target page information templates from at least two visually displayed page information templates aiming at different areas to be set in the page to be set;
in this embodiment of the present application, the triggerable tag is a draggable tag, and the triggering operation is a drag operation;
Accordingly, the area to be set determining unit is specifically configured to:
and determining a region to be set associated with the target point according to the target point reached by the drag operation.
In the embodiment of the present application, the setting module 530 includes:
the attribute information determining unit is used for determining an attribute name and an attribute value associated with a target attribute identifier of a target tag contained in the page information according to the page information in the target page information template;
and the assignment unit is used for determining the page tag matched with the attribute name in the area to be set and assigning the attribute value corresponding to the attribute name to the page tag.
The page information setting device provided by the embodiment of the application can execute the page information setting method provided by any embodiment of the application, and has the corresponding functional modules and beneficial effects of the execution method.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Fig. 8 illustrates a block diagram of an exemplary electronic device 612 suitable for use in implementing embodiments of the present application. The electronic device 612 depicted in fig. 8 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present application.
As shown in fig. 8, the electronic device 612 may include: one or more processors 616; a memory 628 for storing one or more programs that, when executed by the one or more processors 616, cause the one or more processors 616 to implement the page information extraction method provided by the embodiments of the present application, including:
determining a target label from labels contained in a target page area of the display page;
extracting page information corresponding to the target tag according to the tag code of the target tag;
and generating a page information template corresponding to the target page area according to the page information so as to be imported into a page to be set for setting page information.
Or the method for setting the page information provided by the embodiment of the application comprises the following steps:
selecting a target page information template from the page information templates;
importing the target page information template into a region to be set of a page to be set;
according to the page information in the target page information template, setting page information of the page to be set;
the page information template is generated based on the page information extraction method provided by any one of the embodiments.
Components of the electronic device 612 may include, but are not limited to: one or more processors or processors 616, a memory 628, and a bus 618 that connects the various device components, including the memory 628 and the processor 616.
Bus 618 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The electronic device 612 typically includes a variety of computer device readable storage media. Such storage media can be any available storage media that can be accessed by the electronic device 612 and includes both volatile and nonvolatile storage media, removable and non-removable storage media.
Memory 628 may include computer device-readable storage media in the form of volatile memory, such as Random Access Memory (RAM) 630 and/or cache memory 632. The electronic device 612 may further include other removable/non-removable, volatile/nonvolatile computer device storage media. By way of example only, storage system 634 can be used to read from or write to non-removable, nonvolatile magnetic storage media (not shown in FIG. 8, commonly referred to as a "hard disk drive"). Although not shown in fig. 8, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical storage medium), may be provided. In such cases, each drive may be coupled to bus 618 through one or more data storage medium interfaces. Memory 628 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of the embodiments of the present application.
A program/utility 640 having a set (at least one) of program modules 642 may be stored in, for example, the memory 628, such program modules 642 including, but not limited to, an operating device, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 642 generally perform the functions and/or methods in the embodiments described herein.
The electronic device 612 may also communicate with one or more external devices 614 (e.g., keyboard, pointing device, display 624, etc.), one or more devices that enable a user to interact with the electronic device 612, and/or any device (e.g., network card, modem, etc.) that enables the electronic device 612 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 622. Also, the electronic device 612 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through a network adapter 620. As shown in fig. 8, network adapter 620 communicates with other modules of electronic device 612 over bus 618. It should be appreciated that although not shown in fig. 8, other hardware and/or software modules may be used in connection with the electronic device 612, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID devices, tape drives, data backup storage devices, and the like.
The processor 616 executes various functional applications and data processing by running at least one of the other programs among the plurality of programs stored in the memory 628, for example, to implement a page information extraction method provided in the embodiments of the present application.
One embodiment of the present application provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are for performing a page information extraction method, comprising:
determining a target label from labels contained in a target page area of the display page;
extracting page information corresponding to the target tag according to the tag code of the target tag;
and generating a page information template corresponding to the target page area according to the page information so as to be imported into a page to be set for setting page information.
Or for executing a page information setting method, comprising:
selecting a target page information template from the page information templates;
importing the target page information template into a region to be set of a page to be set;
according to the page information in the target page information template, setting page information of the page to be set;
The page information template is generated based on the page information extraction method provided by any one of the embodiments.
Any combination of one or more computer-readable storage media may be employed as the computer storage media of the embodiments herein. The computer readable storage medium may be a computer readable signal storage medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor device, apparatus, or means, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of the present application, a computer-readable storage medium may be any tangible storage medium that can contain, or store a program for use by or in connection with an instruction execution apparatus, device, or means.
The computer readable signal storage medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal storage medium may also be any computer readable storage medium that is not a computer readable storage medium and that can transmit, propagate, or transport a program for use by or in connection with an instruction execution apparatus, device, or apparatus.
Program code embodied on a computer readable storage medium may be transmitted using any appropriate storage medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present application may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or device. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present application and the technical principle applied. Those skilled in the art will appreciate that the present application is not limited to the particular embodiments described herein, but is capable of numerous obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the present application. Therefore, while the present application has been described in connection with the above embodiments, the present application is not limited to the above embodiments, but may include many other equivalent embodiments without departing from the spirit of the present application, the scope of which is defined by the scope of the appended claims.

Claims (10)

1. A method for extracting page information, the method comprising:
determining a target label from labels contained in a target page area of the display page; the display page is a page which is developed and displayed; in the display page, a label for displaying information has been assigned;
extracting page information corresponding to the target tag according to the tag code of the target tag; and generating a page information template corresponding to the target page area according to the page information so as to be imported into a page to be set for setting page information.
2. The method of claim 1, wherein prior to determining the target tag from the tags contained in the target page area of the display page, the method further comprises:
selecting a target attribute identifier with a mapping relation from the attribute identifiers of the page tags;
and in the development process of the display page, respectively associating the target attribute identifier with the attribute name and the attribute value configured for the page tag.
3. The method according to claim 1 or 2, wherein extracting page information corresponding to the target tag according to a tag code of the target tag includes:
and extracting the attribute name and the attribute value associated with the target attribute identifier of the target label according to the label code of the target label so as to generate the page information template.
4. The method of claim 1, wherein generating a page information template corresponding to the target page area according to the page information comprises:
binding the page information template with the triggerable labels in the display page so as to call the page information template through the triggerable labels.
5. A page information setting method, characterized in that the method comprises:
Selecting a target page information template from the page information templates;
importing the target page information template into a region to be set of a page to be set;
according to the page information in the target page information template, setting page information of the page to be set;
wherein the page information template is determined based on the page information extraction method of any one of claims 1 to 4.
6. The method of claim 5, wherein selecting a target page information template from page information templates comprises:
if the triggering operation of a user on the page information template in visual display is detected, determining a target page information template bound by a triggerable label triggered by the user, and calling the target page information template;
selecting the same or different target page information templates from at least two visually displayed page information templates aiming at different areas to be set in the page to be set;
according to the page information in the target page information template, setting the page information of the page to be set, including:
determining an attribute name and an attribute value associated with a target attribute identifier of a target tag contained in the page information according to the page information in the target page information template;
And in the area to be set, determining a page tag matched with the attribute name, and assigning an attribute value corresponding to the attribute name to the page tag.
7. A page information extraction apparatus, characterized in that the apparatus comprises:
the target label is a determining module, which is used for determining the target label from labels contained in a target page area of the display page; the display page is a page which is developed and displayed; in the display page, a label for displaying information has been assigned;
the page information extraction module is used for extracting page information corresponding to the target tag according to the tag code of the target tag;
and the page information template generation module is used for generating a page information template corresponding to the target page area according to the page information so as to be imported into a page to be set for page information setting.
8. A page information setting apparatus, characterized by comprising:
the selection module is used for selecting a target page information template from the page information templates;
the importing module is used for importing the target page information template into a region to be set of a page to be set;
The setting module is used for setting the page information of the page to be set according to the page information in the target page information template;
wherein the page information template is determined based on the page information extraction method of any one of claims 1 to 4.
9. An electronic device, the electronic device comprising:
one or more processors;
a memory for storing one or more programs;
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the page information extraction method of any one of claims 1 to 4, or the page information setting method of claim 5 or 6.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when executed by a processor, implements the page information extracting method according to any one of claims 1 to 4, or implements the page information setting method according to claim 5 or 6.
CN202110181055.7A 2021-02-09 2021-02-09 Page information extraction method, setting method, device, electronic equipment and medium Active CN114911534B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110181055.7A CN114911534B (en) 2021-02-09 2021-02-09 Page information extraction method, setting method, device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110181055.7A CN114911534B (en) 2021-02-09 2021-02-09 Page information extraction method, setting method, device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN114911534A CN114911534A (en) 2022-08-16
CN114911534B true CN114911534B (en) 2024-02-20

Family

ID=82761003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110181055.7A Active CN114911534B (en) 2021-02-09 2021-02-09 Page information extraction method, setting method, device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN114911534B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102279862A (en) * 2011-05-10 2011-12-14 中兴通讯股份有限公司 Data processing device and method based on Ajax
CN109840083A (en) * 2018-12-27 2019-06-04 杭州亚信云信息科技有限公司 Web pages component template construction method, device, computer equipment and storage medium
CN110297999A (en) * 2019-05-09 2019-10-01 京东方科技集团股份有限公司 A kind of web page template generation method and device, webpage loading method and front-end server and Website server
CN110879937A (en) * 2019-10-12 2020-03-13 平安国际智慧城市科技股份有限公司 Method and device for generating webpage from document, computer equipment and storage medium
CN110941784A (en) * 2019-11-13 2020-03-31 北京三快在线科技有限公司 Page generation method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102279862A (en) * 2011-05-10 2011-12-14 中兴通讯股份有限公司 Data processing device and method based on Ajax
CN109840083A (en) * 2018-12-27 2019-06-04 杭州亚信云信息科技有限公司 Web pages component template construction method, device, computer equipment and storage medium
CN110297999A (en) * 2019-05-09 2019-10-01 京东方科技集团股份有限公司 A kind of web page template generation method and device, webpage loading method and front-end server and Website server
CN110879937A (en) * 2019-10-12 2020-03-13 平安国际智慧城市科技股份有限公司 Method and device for generating webpage from document, computer equipment and storage medium
CN110941784A (en) * 2019-11-13 2020-03-31 北京三快在线科技有限公司 Page generation method and device

Also Published As

Publication number Publication date
CN114911534A (en) 2022-08-16

Similar Documents

Publication Publication Date Title
US10929449B2 (en) Generating a structured document guiding view
CN105868166B (en) Regular expression generation method and system
CN109359194B (en) Method and apparatus for predicting information categories
CN106919711B (en) Method and device for labeling information based on artificial intelligence
CN110321504B (en) Page processing method and device
CN111796809A (en) Interface document generation method and device, electronic equipment and medium
CN107592334A (en) A kind of information popularization method, apparatus and equipment
CN111797351A (en) Page data management method and device, electronic equipment and medium
CN113377653B (en) Method and device for generating test cases
US10255249B1 (en) Previewing electronic book content within third-party websites
US20160328110A1 (en) Method, system, equipment and device for identifying image based on image
CN111666201A (en) Regression testing method, device, medium and electronic equipment
CN110659210A (en) Information acquisition method and device, electronic equipment and storage medium
CN115599386A (en) Code generation method, device, equipment and storage medium
CN113360106B (en) Webpage printing method and device
CN113869789A (en) Risk monitoring method and device, computer equipment and storage medium
US10545640B1 (en) Previewing electronic content within third-party websites
CN113760894A (en) Data calling method and device, electronic equipment and storage medium
US10140278B2 (en) Computer-implemented methods and systems for associating files with cells of a collaborative spreadsheet
CN114911534B (en) Page information extraction method, setting method, device, electronic equipment and medium
CN108628909B (en) Information pushing method and device
CN109948251B (en) CAD-based data processing method, device, equipment and storage medium
CN113656041A (en) Data processing method, device, equipment and storage medium
CN114510908A (en) Data export method and device, computer equipment and storage medium
CN113590564A (en) Data storage method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant