CN107102978B - Data backfilling method and device and mobile terminal - Google Patents

Data backfilling method and device and mobile terminal Download PDF

Info

Publication number
CN107102978B
CN107102978B CN201710374712.3A CN201710374712A CN107102978B CN 107102978 B CN107102978 B CN 107102978B CN 201710374712 A CN201710374712 A CN 201710374712A CN 107102978 B CN107102978 B CN 107102978B
Authority
CN
China
Prior art keywords
component
backfilled
data
input
backfill
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
CN201710374712.3A
Other languages
Chinese (zh)
Other versions
CN107102978A (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.)
Beijing Xingxuan Technology Co Ltd
Original Assignee
Beijing Xingxuan Technology 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 Beijing Xingxuan Technology Co Ltd filed Critical Beijing Xingxuan Technology Co Ltd
Priority to CN201710374712.3A priority Critical patent/CN107102978B/en
Publication of CN107102978A publication Critical patent/CN107102978A/en
Application granted granted Critical
Publication of CN107102978B publication Critical patent/CN107102978B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents

Abstract

The embodiment of the invention provides a data backfill method, a data backfill device and a mobile terminal, and relates to the technical field of computer application. According to the invention, whether the component to be backfilled exists in the content display page is detected, the backfilling data is searched according to the component identification of the component to be backfilled, and the backfilling data is filled in the component to be backfilled. The components may exist not only in web pages but also in android systems or ios systems, such as APP. Therefore, the method of the embodiment of the invention is not only limited to be applied to web pages, but also can be applied to android systems or ios systems, so that the application range of the embodiment of the invention is wider compared with the prior art.

Description

Data backfilling method and device and mobile terminal
Technical Field
The embodiment of the invention relates to the technical field of computer application, in particular to a data backfilling method, a data backfilling device and a mobile terminal.
Background
Currently, more and more users browse web pages, which often include input tags in which users can input data.
For example, a user needs to log in a mailbox in a web page, the user can control the terminal to display a mailbox login page, the mailbox login page comprises input boxes corresponding to two input tags, namely a mailbox account input box and a mailbox password input box, the user needs to input a mailbox account of the user in the mailbox account input box and input a mailbox password of the user in the mailbox password input box, and therefore the user can log in the mailbox.
However, if the user needs to input the mailbox account and the mailbox password each time the user logs in the mailbox through the web page, the user operation is cumbersome.
Therefore, in order to simplify the operation of the user, the prior art provides a data backfilling method, which includes:
when a user inputs data in an input tag in a web page for the first time, the terminal forms a record by the tag name of the input tag and the data, and stores the record in the corresponding relation between the locally stored tag name and the backfill data.
And then, if the terminal displays the web page on the screen again, the terminal searches the input label in the web page, acquires the label name of the input label, searches the backfill data corresponding to the label name of the label in the corresponding relation, fills the searched backfill data into the input box corresponding to the input label, and further completes data backfill.
However, the inventors found that the prior art has the following drawbacks:
the data backfilling method in the prior art can only be applied to input tags in web pages, cannot be separated from the web pages, and is narrow in application range.
Disclosure of Invention
The embodiment of the invention provides a data backfilling method, a data backfilling device and a mobile terminal, and aims to solve the problems that the data backfilling method in the prior art can only be applied to an input label in a web page, cannot be separated from the web page and is narrow in application range.
In a first aspect, an embodiment of the present invention provides a data backfill method, where the method includes:
detecting whether a component to be backfilled exists in the content display page or not; the component to be backfilled is used for filling input data;
in response to the existence of the component to be backfilled, acquiring a component identifier of the component to be backfilled in the content display page, wherein the component identifier is used for uniquely identifying the component;
searching backfill data corresponding to the component identification in a corresponding relation between the pre-stored component identification and the backfill data;
and filling the backfill data in the component to be backfilled.
With reference to the first aspect, in a first implementation manner of the first aspect, the obtaining a component identifier of a component to be backfilled in the content presentation page includes:
acquiring a page identifier of the content display page;
acquiring the component name of the component to be backfilled;
acquiring a user identifier of a user;
and calculating the component identification of the component to be backfilled according to the page identification, the component name and the user identification.
With reference to the first aspect, in a second implementation manner of the first aspect, the method further includes:
in response to the fact that the component to be backfilled does not exist, acquiring a DOM tree of the content display page;
searching an input tag in the DOM tree;
acquiring a label identifier of the searched input label;
searching backfill data corresponding to the label identification in a corresponding relation between the label identification and the backfill data which are stored in advance;
and filling backfill data corresponding to the tag identification in the input tag.
With reference to the second implementation manner of the first aspect, in a third implementation manner of the first aspect, the searching for the input tag in the DOM tree includes:
searching for a form tag in the DOM tree by using a first working process and adopting a breadth-first traversal algorithm;
when a from label is found, searching an input label in the searched sub-labels in the form label by using a depth-first traversal algorithm by using a second working process;
with reference to the first aspect, in a fourth implementation manner of the first aspect, the found backfill data includes backfill data of multiple versions;
the filling of the backfill data in the component to be backfilled comprises:
displaying the found backfill data of each version;
acquiring backfill data selected by a user from the backfill data of each version;
and filling backfill data selected by a user into the component to be backfilled.
With reference to the first aspect, in a fifth implementation manner of the first aspect, the method further includes:
receiving a modification operation for modifying backfill data in a component to be backfilled;
according to the modification, modifying backfill data filled in the component to be backfilled;
in response to receiving a submission operation for submitting the data filled in the component to be backfilled to a server, acquiring the data currently filled in the component to be backfilled;
and forming a record by the component identification and the data currently filled in the component to be backfilled and storing the record in the corresponding relation.
With reference to the fifth implementation manner of the first aspect, in a sixth implementation manner of the first aspect, the correspondence relationship is located in the local and the cloud;
the forming a record by the component identifier and the data and storing the record in the corresponding relationship includes:
forming a record by the component identification and the data currently filled in the component to be backfilled, and storing the record in the corresponding relation stored in advance locally;
and the number of the first and second groups,
and sending a storage request to a cloud end, wherein the storage request carries the component identification and the data currently filled in the component to be backfilled, and the storage request is used for requesting the cloud end to form a record by the component identification and the data currently filled in the component to be backfilled and store the record in the corresponding relation pre-stored in the cloud end.
In a second aspect, an embodiment of the present invention provides a data backfill apparatus, where the apparatus includes:
the detection module is used for detecting whether the content display page has a component to be backfilled; the component to be backfilled is used for filling input data;
the first obtaining module is used for responding to the existence of the component to be backfilled and obtaining a component identifier of the component to be backfilled in the content display page, wherein the component identifier is used for uniquely identifying the component;
the first searching module is used for searching backfill data corresponding to the component identification in a corresponding relation between the prestored component identification and the backfill data;
the first filling module is used for filling the backfill data in the component to be backfilled.
With reference to the second aspect, in a first implementation manner of the second aspect, the first obtaining module includes:
the first acquisition unit is used for acquiring the page identifier of the content display page;
the second obtaining unit is used for obtaining the component name of the component to be backfilled;
a third obtaining unit, configured to obtain a user identifier of a user;
and the calculating unit is used for calculating the component identification of the component to be backfilled according to the page identification, the component name and the user identification.
With reference to the second aspect, in a second implementation manner of the second aspect, the apparatus further includes:
the second obtaining module is used for responding to the situation that the component to be backfilled does not exist, and obtaining a DOM tree of the content display page;
the second searching module is used for searching the input tag in the DOM tree;
the third acquisition module is used for acquiring the label identification of the searched input label;
the third searching module is used for searching the backfill data corresponding to the label identification in the corresponding relation between the label identification and the backfill data which are stored in advance;
and the second filling module is used for filling backfill data corresponding to the label identification into the input label.
With reference to the second implementation manner of the second aspect, in a third implementation manner of the second aspect, the present invention provides that the second searching module includes:
the first searching unit is used for searching for a form tag in the DOM tree by using a first working process and adopting a breadth-first traversal algorithm;
the second searching unit is used for searching the input label in the searched sub-label in the form label by using a depth-first traversal algorithm by using a second working process when one from label is searched;
with reference to the second aspect, in a fourth implementation manner of the second aspect, the found backfill data includes backfill data of multiple versions;
the first fill-in module includes:
the display unit is used for displaying the found backfill data of each version;
the fourth acquisition unit is used for acquiring backfill data selected by a user from the backfill data of each version;
and the filling unit is used for filling the backfill data selected by the user into the component to be backfilled.
With reference to the second aspect, in a fifth implementation manner of the second aspect, the apparatus further includes:
the receiving module is used for receiving modification operation for modifying backfill data in the component to be backfilled;
the modification module is used for modifying backfill data filled in the component to be backfilled according to the modification;
the fourth acquisition module is used for acquiring the data currently filled in the component to be backfilled in response to receiving the operation of submitting the data filled in the component to be backfilled to a server;
and the storage module is used for forming a record by the component identification and the data currently filled in the component to be backfilled and storing the record in the corresponding relation.
With reference to the fifth implementation manner of the second aspect, in a sixth implementation manner of the second aspect, the correspondence relationship is located in the local area and the cloud end;
the memory module includes:
the storage unit is used for forming a record by the component identification and the data currently filled in the component to be backfilled and storing the record in the corresponding relation stored in advance locally;
the sending unit is used for sending a storage request to a cloud end, wherein the storage request carries the component identification and the data currently filled in the component to be backfilled, and the storage request is used for requesting the cloud end to form a record by the component identification and the data currently filled in the component to be backfilled and store the record in the corresponding relation pre-stored in the cloud end.
The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In one possible design, the data backfilling device includes a processor and a memory, the memory is used for storing a program supporting the data backfilling device to execute the data backfilling method in the first aspect, and the processor is configured to execute the program stored in the memory. The data backfilling device may further comprise a communication interface for communicating the data backfilling device with other equipment or a communication network.
In a third aspect, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for a data backfilling device, which includes a program for executing the data backfilling method in the first aspect as the data backfilling device.
According to the invention, whether the component to be backfilled exists in the content display page is detected, the backfilling data is searched according to the component identification of the component to be backfilled, and the backfilling data is filled in the component to be backfilled. The components may exist not only in web pages but also in android systems or ios systems, such as APP. Therefore, the method of the embodiment of the invention is not only limited to be applied to web pages, but also can be applied to android systems or ios systems, so that the application range of the embodiment of the invention is wider compared with the prior art.
In embodiments of the present invention, a component is a collection of multiple input tags, such as a time selector or a city selector, among others.
Secondly, in the embodiment of the present invention, the component includes, in addition to the plurality of input tags, an operation logic for operating the data filled in the input tags. The arithmetic logic is used for acquiring data input by a user in a part of input tags in the plurality of input tags, then calculating data required to be input in another part of input tags in the plurality of input tags according to the data input by the user in the part of input tags, and automatically inputting the calculated data in the another part of input tags. The user is not required to manually calculate the data required to be input in the other part of the input tags according to the data input in the one part of the input tags, and the user is not required to manually input the calculated data in the other part of the input tags, so that the operation of the user is simplified.
In addition, if the user can input data only in the one part of the input tags and cannot manually calculate data for input in the other part of the input tags from the data input in the one part of the input tags, the user cannot manually input data in the other part of the input tags.
In this way, the terminal can only store the data input by the user in the part of the input tags, and when the terminal backfills the data in the assembly, the terminal can only backfill the data in the part of the input tags, and cannot backfill the data in the other part of the input tags. At this time, the user also needs to manually calculate the data to be input in the other part of input tags according to the data input in the part of input tags and manually input the calculated data in the other part of input tags, otherwise, the backfilling cannot be completed, so that the user operation is complicated.
The embodiment of the invention supports that the user inputs data in only one part of the input tags, so that the data can be input in all the input tags of the input tags, and the data can be backfilled in all the input tags of the input tags after the data is input, thereby simplifying the operation of the user.
For example, assume that the component includes four input tags, which are respectively used for inputting the pre-tax payroll, the social security payment amount, the personal income tax and the post-tax payroll of the user, and the component further includes operation logic for calculating the personal income tax and the post-tax payroll according to the pre-tax payroll and the social security payment amount, and supports that after the personal income tax and the post-tax payroll are calculated, the personal income tax and the post-tax payroll are automatically filled into the corresponding input tags.
Therefore, the assembly can support the user to only input the pre-tax wage and the social security payment amount, after the pre-tax wage and the social security payment amount input by the user are obtained, the personal income tax and the post-tax wage are calculated according to the pre-tax wage and the social security payment amount and the operation logic included in the assembly, and the personal income tax and the post-tax wage are respectively filled in the corresponding input labels. The user does not need to manually calculate the personal income tax and the post-tax payroll according to the pre-tax payroll and the social security payment amount and manually input the calculated personal income tax and the post-tax payroll in the corresponding input box, so that the operation of the user is simplified.
These and other aspects of the invention are apparent from and will be elucidated with reference to the embodiments described hereinafter.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flow diagram illustrating a data backfill method according to one embodiment of the present invention;
FIG. 2 is a flow chart of a data backfilling method according to another embodiment of the present invention;
FIG. 3 shows a schematic view of a scenario according to another embodiment of the present invention;
FIG. 4 is a flow diagram illustrating a data backfill method according to yet another embodiment of the present invention;
fig. 5 shows a block diagram of a data backfill apparatus according to one embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
In some of the flows described in the present specification and claims and in the above figures, a number of operations are included that occur in a particular order, but it should be clearly understood that these operations may be performed out of order or in parallel as they occur herein, with the order of the operations being indicated as 101, 102, etc. merely to distinguish between the various operations, and the order of the operations by themselves does not represent any order of performance. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
FIG. 1 is a flow chart illustrating a method of data backfilling, as shown in FIG. 1, including the following steps in accordance with an exemplary embodiment.
In step S101, detecting whether there is a component to be backfilled in the content display page; the component to be backfilled is used for filling input data;
in the embodiment of the present invention, the content display page may be a web page, or an operation interface of an APP in an Android or IOS system.
The component to be backfilled comprises a plurality of input tags, and a user can fill data in the input tags. For example, the component to be backfilled may be a time selector, a city selector, and the like.
The time selector may include a plurality of input tags, such as a year input tag, a month input tag, a day input tag, a time input tag, a minute input tag, a second input tag, and the like. The city selector may include a plurality of input tags, such as a country input tag, a province input tag, a city input tag, and a district/county input tag.
In the embodiment of the present invention, when a technician develops a content presentation page in advance, if an element including a plurality of input tags exists in the content presentation page and the technician needs the element to support a backfill function, the technician may register the element through a predefined registration function, where the registration function at least includes an element name of the element.
When the terminal executes the code of the content display page, the terminal traverses the registration function for registering the component and acquires the component name from the registration function, and because the registered function registration components are all components supporting the backfill function, the component corresponding to the component name can be determined as the component to be backfilled.
In response to the existence of the component to be backfilled, in step S102, obtaining a component identifier of the component to be backfilled in the content display page, where the component identifier is used to uniquely identify the component;
in the embodiment of the present invention, there may be a case where two content presentation pages simultaneously include the same component, but data to be filled in the components in the two content presentation pages are different.
For example, a time selector is included in content presentation page a, and a time selector is also included in content presentation page B. The two time selectors have the same component name and are both "DatePicker".
After the user inputs the data a in the time selector included in the content presentation page a, the terminal forms a record with the component name of the time selector and the data a, and stores the record in the corresponding relationship between the component name and the data stored in advance.
After the user inputs the data B in the time selector included in the content presentation page B, the terminal forms a record with the component name of the time selector and the data B, and stores the record in the correspondence between the component name and the data stored in advance.
If the user opens the content display page B in the terminal later, the terminal needs to fill backfill data in the time selector included in the content display page B, the terminal searches corresponding data in the corresponding relationship between the prestored component name and the data according to the component name "DatePicker" included in the content display page B, and at this time, two data, namely data a and data B, may be found, because the data a is not the data previously filled in the time selector included in the content display page B by the user, if the data a is filled in the time selector included in the content display page B, a filling error may occur, and in order to correct the filled data, the user needs to manually re-input the data B in the time selector included in the content display page B, which may result in a cumbersome user operation, thereby reducing data backfill efficiency.
In another embodiment of the present invention, there may be a case where different users have different data to be filled in the components in the same content presentation page.
For example, after the user a inputs the data a in the time selector included in the content presentation page, the terminal may combine the component name of the time selector and the data a into one record, and store the record in the correspondence between the component name and the data stored in advance.
After the user B inputs the data B in the time selector included in the content presentation page, the terminal forms a record with the component name of the time selector and the data B, and stores the record in the correspondence between the component name and the data stored in advance.
If the user B opens the content presentation page in the terminal later, the terminal needs to fill backfill data in the time selector included in the content presentation page, the terminal will perform a process according to the component name "DatePicker" of the time selector included in the content presentation page, the corresponding data is found in the pre-stored correspondence between the component name and the data, where two data, data a and data B, since the data a is not data that the user B previously filled in the time selector included in the content presentation page, therefore, if data a is filled into a content presentation page, including a time selector, a filling error situation occurs, in order to correct the filled-in data, the user B needs to manually re-input the data B in the time selector included in the content presentation page, which may result in a cumbersome operation of the user, thereby reducing the data refilling efficiency.
Therefore, in order to avoid the problems that the operation of a user is more complicated due to filling errors and the data backfilling efficiency is reduced, in the embodiment of the invention, the page identification of the content display page can be obtained, the component name of the component to be backfilled can be obtained, and the user identification of the user can be obtained; then, the component identifier of the component to be refilled is calculated according to the page identifier, the component name and the user identifier, for example, the component identifier of the component to be refilled is calculated according to a hash algorithm or MD5 (fifth version of digital digest algorithm).
In the embodiment of the present invention, the page identifiers of different content display pages are different, and if the content display page is a web page, the page identifier of the content display page may be a URL (Uniform Resource Location) of the web page.
In the embodiment of the invention, the user identifications of different users are different. Before step S102, the terminal may prompt the user to log in the backend server, the user may input a user identifier registered in the backend server corresponding to the terminal in advance in the terminal, and submit a login request to log in the backend server, and the terminal obtains the user identifier input by the user.
Therefore, even if the same assemblies to be backfilled exist in different content display pages, even if the same assembly names of the assemblies to be backfilled are the same, since the assembly identification of the assemblies to be backfilled is calculated according to the page identification of the content display pages, the user identification of the user and the assembly names of the assemblies to be backfilled, the assembly identification of the assemblies to be backfilled can be unique, namely, the condition that the assembly identifications of the two assemblies to be backfilled are the same can not exist. Therefore, the situation of filling errors can be avoided, and the situations that the user operation is more complicated and the data backfilling efficiency is reduced due to the filling errors are further avoided.
In step S103, in the correspondence between the pre-stored component identifier and the backfill data, the backfill data corresponding to the component identifier is searched for;
in the embodiment of the invention, when a user fills data in the component to be backfilled of the content display page, the terminal calculates the component identifier of the component to be backfilled according to the user identifier of the user, the page identifier of the content display page and the component name of the component to be backfilled, and forms a record by the component identifier and the data, and stores the record in the corresponding relation between the prestored component identifier and the backfilling data.
Therefore, in this step, after obtaining the component identifier of the component to be backfilled, the backfill data corresponding to the component identifier may be searched in the correspondence between the pre-stored component identifier and the backfill data, and then step S104 is performed.
In another embodiment of the present invention, if the backfill data corresponding to the component identifier is not found, it indicates that the user has not filled data in the component to be backfilled before, and therefore cannot automatically backfill data in the component to be backfilled, and can prompt the user to need to manually input data in the component to be backfilled.
In step S104, the backfill component is filled with the backfill data.
According to the invention, whether the component to be backfilled exists in the content display page is detected, the backfilling data is searched according to the component identification of the component to be backfilled, and the backfilling data is filled in the component to be backfilled. The components may exist not only in web pages but also in android systems or ios systems, such as APP. Therefore, the method of the embodiment of the invention is not only limited to be applied to web pages, but also can be applied to android systems or ios systems, so that the application range of the embodiment of the invention is wider compared with the prior art.
In embodiments of the present invention, a component is a collection of multiple input tags, such as a time selector or a city selector, among others.
Secondly, in the embodiment of the present invention, the component includes, in addition to the plurality of input tags, an operation logic for operating the data filled in the input tags. The arithmetic logic is used for acquiring data input by a user in a part of input tags in the plurality of input tags, then calculating data required to be input in another part of input tags in the plurality of input tags according to the data input by the user in the part of input tags, and automatically inputting the calculated data in the another part of input tags. The user is not required to manually calculate the data required to be input in the other part of the input tags according to the data input in the one part of the input tags, and the user is not required to manually input the calculated data in the other part of the input tags, so that the operation of the user is simplified.
In addition, if the user can input data only in the one part of the input tags and cannot manually calculate data for input in the other part of the input tags from the data input in the one part of the input tags, the user cannot manually input data in the other part of the input tags.
In this way, the terminal can only store the data input by the user in the part of the input tags, and when the terminal backfills the data in the assembly, the terminal can only backfill the data in the part of the input tags, and cannot backfill the data in the other part of the input tags. At this time, the user also needs to manually calculate the data to be input in the other part of input tags according to the data input in the part of input tags and manually input the calculated data in the other part of input tags, otherwise, the backfilling cannot be completed, so that the user operation is complicated.
The embodiment of the invention supports that the user inputs data in only one part of the input tags, so that the data can be input in all the input tags of the input tags, and the data can be backfilled in all the input tags of the input tags after the data is input, thereby simplifying the operation of the user.
For example, assume that the component includes four input tags, which are respectively used for inputting the pre-tax payroll, the social security payment amount, the personal income tax and the post-tax payroll of the user, and the component further includes operation logic for calculating the personal income tax and the post-tax payroll according to the pre-tax payroll and the social security payment amount, and supports that after the personal income tax and the post-tax payroll are calculated, the personal income tax and the post-tax payroll are automatically filled into the corresponding input tags.
Therefore, the assembly can support the user to only input the pre-tax wage and the social security payment amount, after the pre-tax wage and the social security payment amount input by the user are obtained, the personal income tax and the post-tax wage are calculated according to the pre-tax wage and the social security payment amount and the operation logic included in the assembly, and the personal income tax and the post-tax wage are respectively filled in the corresponding input labels. The user does not need to manually calculate the personal income tax and the post-tax payroll according to the pre-tax payroll and the social security payment amount and manually input the calculated personal income tax and the post-tax payroll in the corresponding input box, so that the operation of the user is simplified.
Further, referring to fig. 2, the method further includes:
in response to the absence of the component to be backfilled, in step S201, a DOM (Document Object Model) tree of the content presentation page is acquired;
in the embodiment of the invention, if the content display page is a web page, the page data of the content display page can be acquired, and the HTML DOM tree of the content display page is generated in real time according to the page data. If the content display page is an operation interface of an APP in an Android or IOS system, page data of the content display page can be obtained, and a Native DOM tree of the content display page is generated in real time according to the page data.
In step S202, an input tag is searched in the DOM tree;
in the embodiment of the present invention, in the content presentation page, the input tag is a sub-tag of the form tag, that is, if the input tag exists in the content presentation page, the input tag is a sub-tag of the form tag in the DOM tree of the content presentation page.
In order to improve the searching efficiency of searching the input tag in the DOM tree, in the embodiment of the invention, a form tag can be searched in the DOM tree by utilizing a first working process and adopting a breadth-first traversal algorithm; and when one form label is found, searching the input label in the searched sub-labels in the form label by using a depth-first traversal algorithm by using a second working process.
In the prior art, when an input tag is searched, a working thread is usually used for searching the input tag in a DOM tree by adopting a depth-first traversal algorithm; when a form label is found, the engineering thread is continuously utilized to traverse the sub-labels of the form label.
In the prior art, traversing the DOM tree by using only one working thread is equivalent to serial traversal, and if unit time is consumed for traversing one tag, the unit time is consumed for how many tags are included in the DOM tree.
In the embodiment of the invention, if the form tag is found in the DOM tree by using the first working thread, the found sub-tag of the form is not traversed by using the first working thread, but the input tag is searched in the found sub-tag of the form tag by using the depth-first traversal algorithm by using the second working thread, and the form tag is searched in the DOM tree by using the first working thread and continuously using the breadth-first traversal algorithm.
For example, as shown in fig. 3, the DOM tree of the content presentation page includes a total of 6 tags, where a tag includes two sub-tags, namely a B tag and a C tag, B tag includes two sub-tags, namely a D tag and an E tag, and C tag includes one sub-tag, namely an F tag. And the B label is a form label.
In the prior art, a working thread is utilized to traverse the label A, traverse the label B and traverse the label D, traverse the label E again because D does not comprise the sub-label, traverse the label C again because E does not comprise the sub-label, and traverse the label F finally. Suppose that traversing a tag takes 1 s. Since the 6 tags are a serial traversal, a total of 6s would be consumed.
In the embodiment of the present invention, the first working thread is used to traverse the tag a first and then traverse the tag B, and since the tag B is a form tag, the first working thread is no longer used to traverse the sub-tag of the tag B: tag D and tag E, but begin traversing the sub-tags of tag B with the second worker thread: traversing the label D first, then traversing the label E, then continuously traversing the brother label C of the label B by using the first working thread while beginning to traverse the child label of the label B by using the second working thread, and then traversing the child label F of the label C.
In the process, the first working thread is used for traversing 4 tags in total, namely the tag A, the tag B, the tag C and the tag F, the second working thread is used for traversing two tags in total, namely the tag D and the tag E, the process of traversing the tag D and the tag E by the second working thread is synchronous with the process of traversing the tag C and the tag F by the first working thread, and if it is assumed that 1s is consumed for traversing one tag, the 6 tags are traversed, so that 4s is consumed in total.
Therefore, compared with the prior art, the data backfilling method and device can save 2s of time, so that traversal time is saved, and data backfilling efficiency is improved.
In step S203, a tag identifier of the searched input tag is acquired;
in order to ensure the uniqueness of the tag identifier of the input tag, in the embodiment of the present invention, a page identifier of a content display page needs to be obtained, a tag name of a searched input tag is obtained, and a user identifier of a user is obtained; calculating the tag identifier of the searched input tag according to the page identifier, the tag name, and the user identifier, for example, calculating the page identifier, the tag name, and the user identifier according to a hash algorithm or an MD5 algorithm to obtain the tag identifier of the input tag.
In step S204, in the correspondence between the pre-stored tag identifier and the backfill data, the backfill data corresponding to the tag identifier is searched;
in the embodiment of the invention, when a user fills data in an input frame corresponding to an input label which is not registered by a predefined function in a content display page, a terminal calculates the component identifier of the input label according to the user identifier of the user, the page identifier of the content display page and the label name of the input label, combines the label identifier and the data into a record, and stores the record in the corresponding relation between the prestored component identifier and backfill data.
Therefore, in this step, after the tag identifier of the input tag is found, the backfill data corresponding to the tag identifier may be found from the correspondence between the pre-stored tag identifier and the backfill data, and then step S205 is performed.
In step S205, backfill data corresponding to the tag identifier is filled in the searched input tag.
In the embodiment of the invention, in the history process, the data filled in the component to be backfilled of the content display page by the user is the data of different versions each time.
When the user fills data of one version in the component to be backfilled of the content display page, the terminal forms a record by the component identification of the component to be backfilled and the data of the version, and stores the record in the corresponding relation between the prestored component identification and the backfilled data.
Therefore, in step S103, according to the component identifier of the component to be backfilled, the backfill data of the multiple versions are found from the correspondence, and in order to accurately select the backfill data that the user wants to fill in the component to be backfilled at this time from the backfill data of the multiple versions, in the embodiment of the present invention, the terminal may display the found backfill data of each version on the screen; after the user sees the backfill data of each version displayed on the screen, the user can select the backfill data to be filled at the moment from the backfill data of the plurality of versions, and the terminal acquires the backfill data selected by the user from the backfill data of each version; and filling the backfill components to be backfilled with backfill data selected by a user.
By the method of the embodiment of the invention, the terminal stores the data of each historical version filled in the component to be backfilled by the user in the corresponding relation between the pre-stored component identification and the backfilling data, so that when the backfilling data needs to be filled in the component to be backfilled in the content display page, the user can directly select the data to be backfilled from the data of the historical versions.
However, if only the data of the version closest to the current time is saved, and if the user needs to fill in the data of the version farther from the current time, the terminal does not store the data of the version farther from the current time in the corresponding relationship, so the user can only manually input the data in the component to be refilled at this time, which wastes time, reduces refilling efficiency, and leads to more complicated user operation.
Therefore, the embodiment of the invention can improve the backfill efficiency and simplify the user operation.
In the embodiment of the present invention, after the terminal fills the backfill data in the component to be backfilled in the content presentation page, sometimes a certain part of the data in the component to be backfilled may not be the data that the user needs to fill in the component to be backfilled at this time, and therefore, the user may need to modify a part of the data in the backfill data filled in the component to be backfilled. For example, the terminal's backfill data in one or more input tags in the component to be backfilled is modified.
Therefore, in order to support that the user can modify part of the backfill data filled in the component to be backfilled, referring to fig. 4, the method further comprises:
in step S301, a modification operation for modifying backfill data in a component to be backfilled is received;
in the embodiment of the invention, a user can input a modification operation for modifying backfill data in a component to be backfilled in the terminal, for example, deleting data backfilled in one or more input tags, and refilling new data in the data tags. The terminal receives the modification operation input by the user and performs step S302.
In step S302, modifying the backfill data filled in the component to be backfilled according to the modification;
in step S303, in response to receiving a commit operation for committing the data filled in the component to be backfilled to the server, acquiring the data currently filled in the component to be backfilled;
in the embodiment of the present invention, after the modification is completed, the user often controls the terminal to submit the data to be currently filled in the backfill component to the server.
In order to enable the terminal to backfill the data currently filled in the modified component to be refilled in the content display page, in the embodiment of the invention, the data currently filled in the component to be refilled is acquired in response to receiving the data used for submitting the data filled in the component to be refilled to a server submitting operation; then, step S304 is performed.
In step S304, the component identifier and the currently filled data in the component to be backfilled are combined into a record and stored in the corresponding relationship between the pre-stored component identifier and the backfilling data.
In this way, when the terminal can backfill data in the component to be backfilled in the content display page, the terminal can display the data currently filled in the modified component to be backfilled on the screen of the terminal for the user to select backfilling.
In general, the corresponding relationship between the component identifier and the backfill data is located locally at the terminal, however, if the corresponding relationship between the component identifier located locally at the terminal and the backfill data is lost, data to be backfilled cannot be found when the data needs to be backfilled in the component to be backfilled in the content display page, and then data backfilling cannot be completed. The user can only manually input data in the component to be backfilled, so that the user operation is complicated, the time is wasted, and the backfilling efficiency is reduced.
Therefore, in the embodiment of the present invention, in addition to the correspondence between the local storage component identifier of the terminal and the backfill data, the correspondence between the cloud storage component identifier and the backfill data may also be used.
Therefore, in this step, the component identifier and the currently filled data in the component to be refilled may be combined into a record and stored in the corresponding relationship between the locally pre-stored component identifier and the refilling data. And sending a storage request to the cloud, wherein the storage request carries the component identification and the data currently filled in the component to be backfilled, and the storage request is used for requesting the cloud to form a record by the component identification and the data currently filled in the component to be backfilled, and is stored in the corresponding relation between the component identification and the backfilling data stored in the cloud in advance. Therefore, after the cloud end receives the storage request, the component identification and the data currently filled in the component to be backfilled form a record, and the record is stored in the corresponding relation between the component identification and the backfilling data stored in the cloud end in advance.
Therefore, even if the corresponding relation between the locally stored component identification and the backfill data is lost, the terminal can also acquire the backfill data from the corresponding relation between the component identification and the backfill data stored in the cloud, and the situation that the data to be backfilled cannot be found when the data needs to be backfilled in the component to be backfilled in the content display page later, so that a user is forced to input the data in the component to be backfilled manually is avoided, the operation of the user can be simplified, and the backfilling efficiency is improved.
Fig. 5 is a block diagram illustrating a data backfill apparatus according to an exemplary embodiment, as shown in fig. 5, including:
the detection module 11 is used for detecting whether a component to be backfilled exists in the content display page; the component to be backfilled is used for filling input data;
the first obtaining module 12 is configured to obtain, in response to the existence of the component to be backfilled, a component identifier of the component to be backfilled in the content display page, where the component identifier is used to uniquely identify the component;
the first searching module 13 is configured to search backfill data corresponding to the component identifier in a correspondence between a pre-stored component identifier and the backfill data;
a first filling module 14 for filling the component to be backfilled with the backfill data.
Wherein the first obtaining module 12 includes:
the first acquisition unit is used for acquiring the page identifier of the content display page;
the second obtaining unit is used for obtaining the component name of the component to be backfilled;
a third obtaining unit, configured to obtain a user identifier of a user;
and the calculating unit is used for calculating the component identification of the component to be backfilled according to the page identification, the component name and the user identification.
Further, the apparatus further comprises:
the second obtaining module is used for responding to the situation that the component to be backfilled does not exist, and obtaining a DOM tree of the content display page;
the second searching module is used for searching the input tag in the DOM tree;
the third acquisition module is used for acquiring the label identification of the searched input label;
the third searching module is used for searching the backfill data corresponding to the label identification in the corresponding relation between the label identification and the backfill data which are stored in advance;
and the second filling module is used for filling backfill data corresponding to the label identification into the input label.
Wherein the second lookup module comprises:
the first searching unit is used for searching for a form tag in the DOM tree by using a first working process and adopting a breadth-first traversal algorithm;
the second searching unit is used for searching the input label in the searched sub-label in the form label by using a depth-first traversal algorithm by using a second working process when one from label is searched;
the found backfill data comprises backfill data of a plurality of versions;
the first stuffing module 14 includes:
the display unit is used for displaying the found backfill data of each version;
the fourth acquisition unit is used for acquiring backfill data selected by a user from the backfill data of each version;
and the filling unit is used for filling the backfill data selected by the user into the component to be backfilled.
Further, the apparatus further comprises:
the receiving module is used for receiving modification operation for modifying backfill data in the component to be backfilled;
the modification module is used for modifying backfill data filled in the component to be backfilled according to the modification;
the fourth acquisition module is used for acquiring the data currently filled in the component to be backfilled in response to receiving the operation of submitting the data filled in the component to be backfilled to a server;
and the storage module is used for forming a record by the component identification and the data currently filled in the component to be backfilled and storing the record in the corresponding relation.
Wherein, the corresponding relation is located in the local and the cloud;
the memory module includes:
the storage unit is used for forming a record by the component identification and the data currently filled in the component to be backfilled and storing the record in the corresponding relation stored in advance locally;
the sending unit is used for sending a storage request to a cloud end, wherein the storage request carries the component identification and the data currently filled in the component to be backfilled, and the storage request is used for requesting the cloud end to form a record by the component identification and the data currently filled in the component to be backfilled and store the record in the corresponding relation pre-stored in the cloud end.
According to the invention, whether the component to be backfilled exists in the content display page is detected, the backfilling data is searched according to the component identification of the component to be backfilled, and the backfilling data is filled in the component to be backfilled. The components may exist not only in web pages but also in android systems or ios systems, such as APP. Therefore, the method of the embodiment of the invention is not only limited to be applied to web pages, but also can be applied to android systems or ios systems, so that the application range of the embodiment of the invention is wider compared with the prior art.
In embodiments of the present invention, a component is a collection of multiple input tags, such as a time selector or a city selector, among others.
Secondly, in the embodiment of the present invention, the component includes, in addition to the plurality of input tags, an operation logic for operating the data filled in the input tags. The arithmetic logic is used for acquiring data input by a user in a part of input tags in the plurality of input tags, then calculating data required to be input in another part of input tags in the plurality of input tags according to the data input by the user in the part of input tags, and automatically inputting the calculated data in the another part of input tags. The user is not required to manually calculate the data required to be input in the other part of the input tags according to the data input in the one part of the input tags, and the user is not required to manually input the calculated data in the other part of the input tags, so that the operation of the user is simplified.
In addition, if the user can input data only in the one part of the input tags and cannot manually calculate data for input in the other part of the input tags from the data input in the one part of the input tags, the user cannot manually input data in the other part of the input tags.
In this way, the terminal can only store the data input by the user in the part of the input tags, and when the terminal backfills the data in the assembly, the terminal can only backfill the data in the part of the input tags, and cannot backfill the data in the other part of the input tags. At this time, the user also needs to manually calculate the data to be input in the other part of input tags according to the data input in the part of input tags and manually input the calculated data in the other part of input tags, otherwise, the backfilling cannot be completed, so that the user operation is complicated.
The embodiment of the invention supports that the user inputs data in only one part of the input tags, so that the data can be input in all the input tags of the input tags, and the data can be backfilled in all the input tags of the input tags after the data is input, thereby simplifying the operation of the user.
For example, assume that the component includes four input tags, which are respectively used for inputting the pre-tax payroll, the social security payment amount, the personal income tax and the post-tax payroll of the user, and the component further includes operation logic for calculating the personal income tax and the post-tax payroll according to the pre-tax payroll and the social security payment amount, and supports that after the personal income tax and the post-tax payroll are calculated, the personal income tax and the post-tax payroll are automatically filled into the corresponding input tags.
Therefore, the assembly can support the user to only input the pre-tax wage and the social security payment amount, after the pre-tax wage and the social security payment amount input by the user are obtained, the personal income tax and the post-tax wage are calculated according to the pre-tax wage and the social security payment amount and the operation logic included in the assembly, and the personal income tax and the post-tax wage are respectively filled in the corresponding input labels. The user does not need to manually calculate the personal income tax and the post-tax payroll according to the pre-tax payroll and the social security payment amount and manually input the calculated personal income tax and the post-tax payroll in the corresponding input box, so that the operation of the user is simplified.
In one possible design, the data backfilling device includes a processor and a memory, the memory is used for storing programs supporting the data backfilling device to execute the data backfilling method shown in fig. 1, fig. 2 and fig. 4, and the processor is configured to execute the programs stored in the memory.
The program includes one or more computer instructions, wherein the one or more computer instructions are for execution invoked by the processor.
The processor is configured to: detecting whether a component to be backfilled exists in the content display page or not; the component to be backfilled is used for filling input data;
in response to the existence of the component to be backfilled, acquiring a component identifier of the component to be backfilled in the content display page, wherein the component identifier is used for uniquely identifying the component;
searching backfill data corresponding to the component identification in a corresponding relation between the pre-stored component identification and the backfill data;
and filling the backfill data in the component to be backfilled.
An embodiment of the present invention provides a computer storage medium for storing computer software instructions for a data backfilling device, which includes a program for executing the data backfilling method shown in fig. 1, fig. 2 and fig. 4 as the data backfilling device.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.
The invention discloses A1 and a data backfilling method, which comprises the following steps:
detecting whether a component to be backfilled exists in the content display page or not; the component to be backfilled is used for filling input data;
in response to the existence of the component to be backfilled, acquiring a component identifier of the component to be backfilled in the content display page, wherein the component identifier is used for uniquely identifying the component;
searching backfill data corresponding to the component identification in a corresponding relation between the pre-stored component identification and the backfill data;
and filling the backfill data in the component to be backfilled.
A2, the method as in A1, the obtaining component identifications of components to be backfilled in the content presentation page, comprising:
acquiring a page identifier of the content display page;
acquiring the component name of the component to be backfilled;
acquiring a user identifier of a user;
and calculating the component identification of the component to be backfilled according to the page identification, the component name and the user identification.
A3, the method of a1, the method further comprising:
responding to the situation that the component to be backfilled does not exist, and acquiring a Document Object Model (DOM) tree of the content display page;
searching an input tag in the DOM tree;
acquiring a label identifier of the searched input label;
searching backfill data corresponding to the label identification in a corresponding relation between the label identification and the backfill data which are stored in advance;
and filling backfill data corresponding to the tag identification in the input tag.
A4, the method as in A3, wherein the finding an input tag in the DOM tree comprises:
searching for a form tag in the DOM tree by using a first working process and adopting a breadth-first traversal algorithm;
and when one from label is found, searching the input label in the searched sub-labels in the form label by using a depth-first traversal algorithm by using a second working process.
A5, in the method as described in a1, the found backfill data includes backfill data of multiple versions;
the filling of the backfill data in the component to be backfilled comprises:
displaying the found backfill data of each version;
acquiring backfill data selected by a user from the backfill data of each version;
and filling backfill data selected by a user into the component to be backfilled.
A6, the method of a1, the method further comprising:
receiving a modification operation for modifying backfill data in a component to be backfilled;
according to the modification, modifying backfill data filled in the component to be backfilled;
in response to receiving a submission operation for submitting the data filled in the component to be backfilled to a server, acquiring the data currently filled in the component to be backfilled;
and forming a record by the component identification and the data currently filled in the component to be backfilled and storing the record in the corresponding relation.
A7, the method of A6, wherein the corresponding relationship is located in local and cloud;
the forming a record by the component identifier and the data and storing the record in the corresponding relationship includes:
forming a record by the component identification and the data currently filled in the component to be backfilled, and storing the record in the corresponding relation stored in advance locally;
and the number of the first and second groups,
and sending a storage request to a cloud end, wherein the storage request carries the component identification and the data currently filled in the component to be backfilled, and the storage request is used for requesting the cloud end to form a record by the component identification and the data currently filled in the component to be backfilled and store the record in the corresponding relation pre-stored in the cloud end.
The invention also discloses B8, a data backfill device, the device comprises:
the detection module is used for detecting whether the content display page has a component to be backfilled; the component to be backfilled is used for filling input data;
the first obtaining module is used for responding to the existence of the component to be backfilled and obtaining a component identifier of the component to be backfilled in the content display page, wherein the component identifier is used for uniquely identifying the component;
the first searching module is used for searching backfill data corresponding to the component identification in a corresponding relation between the prestored component identification and the backfill data;
the first filling module is used for filling the backfill data in the component to be backfilled.
B9, the apparatus as described in B8, the first obtaining module comprising:
the first acquisition unit is used for acquiring the page identifier of the content display page;
the second obtaining unit is used for obtaining the component name of the component to be backfilled;
a third obtaining unit, configured to obtain a user identifier of a user;
and the calculating unit is used for calculating the component identification of the component to be backfilled according to the page identification, the component name and the user identification.
B10, the apparatus of B8, further comprising:
the second obtaining module is used for responding to the situation that the component to be backfilled does not exist, and obtaining a Document Object Model (DOM) tree of the content display page;
the second searching module is used for searching the input tag in the DOM tree;
the third acquisition module is used for acquiring the label identification of the searched input label;
the third searching module is used for searching the backfill data corresponding to the label identification in the corresponding relation between the label identification and the backfill data which are stored in advance;
and the second filling module is used for filling backfill data corresponding to the label identification into the input label.
B11, the apparatus as described in B10, the second lookup module comprising:
the first searching unit is used for searching for a form tag in the DOM tree by using a first working process and adopting a breadth-first traversal algorithm;
and the second searching unit is used for searching the input label in the searched sub-label in the form label by using a depth-first traversal algorithm by using a second working process every time when one from label is searched.
B12, in the device as in B8, the found backfill data comprises backfill data of a plurality of versions;
the first fill-in module includes:
the display unit is used for displaying the found backfill data of each version;
the fourth acquisition unit is used for acquiring backfill data selected by a user from the backfill data of each version;
and the filling unit is used for filling the backfill data selected by the user into the component to be backfilled.
B13, the apparatus of B8, further comprising:
the receiving module is used for receiving modification operation for modifying backfill data in the component to be backfilled;
the modification module is used for modifying backfill data filled in the component to be backfilled according to the modification;
the fourth acquisition module is used for acquiring the data currently filled in the component to be backfilled in response to receiving the operation of submitting the data filled in the component to be backfilled to a server;
and the storage module is used for forming a record by the component identification and the data currently filled in the component to be backfilled and storing the record in the corresponding relation.
B14, the device as in B13, the corresponding relation is located in local and cloud;
the memory module includes:
the storage unit is used for forming a record by the component identification and the data currently filled in the component to be backfilled and storing the record in the corresponding relation stored in advance locally;
the sending unit is used for sending a storage request to a cloud end, wherein the storage request carries the component identification and the data currently filled in the component to be backfilled, and the storage request is used for requesting the cloud end to form a record by the component identification and the data currently filled in the component to be backfilled and store the record in the corresponding relation pre-stored in the cloud end.
The invention also discloses C15, a mobile terminal, comprising a memory and a processor; wherein the content of the first and second substances,
the memory is to store one or more computer instructions, wherein the one or more computer instructions are for the processor to invoke for execution;
the processor is configured to:
detecting whether a component to be backfilled exists in the content display page or not; the component to be backfilled is used for filling input data;
in response to the existence of the component to be backfilled, acquiring a component identifier of the component to be backfilled in the content display page, wherein the component identifier is used for uniquely identifying the component;
searching backfill data corresponding to the component identification in a corresponding relation between the pre-stored component identification and the backfill data;
and filling the backfill data in the component to be backfilled.
The invention also discloses D16 and a computer storage medium, which is characterized in that the computer storage medium stores one or more computer instructions, and the computer instructions realize the method A1-A7 when executed.

Claims (14)

1. A method of data backfilling, the method comprising:
detecting whether a component to be backfilled exists in the content display page or not; the assembly to be backfilled is used for filling input data, the assembly to be backfilled comprises a plurality of input tags, and the assembly to be backfilled is suitable for a web page, an iOS system and an Android system;
in response to the existence of the component to be backfilled, acquiring a component identifier of the component to be backfilled in the content display page, wherein the component identifier is used for uniquely identifying the component;
searching backfill data corresponding to the component identification in a corresponding relation between the pre-stored component identification and the backfill data;
filling the backfill data into the component to be backfilled;
responding to the situation that the component to be backfilled does not exist, and acquiring a Document Object Model (DOM) tree of the content display page; searching for a form tag in the DOM tree by using a first working process and adopting a breadth-first traversal algorithm; and when one from label is found, searching the input label in the searched sub-label in the form label by using a depth-first traversal algorithm by using a second working process so as to fill the corresponding backfill data in the searched input label.
2. The method of claim 1, wherein obtaining component identifications for components to be backfilled in the content presentation page comprises:
acquiring a page identifier of the content display page;
acquiring the component name of the component to be backfilled;
acquiring a user identifier of a user;
and calculating the component identification of the component to be backfilled according to the page identification, the component name and the user identification.
3. The method of claim 1, wherein populating the looked-up input tags with corresponding backfill data comprises:
acquiring a label identifier of the searched input label;
searching backfill data corresponding to the label identification in a corresponding relation between the label identification and the backfill data which are stored in advance;
and filling backfill data corresponding to the tag identification in the input tag.
4. The method of claim 1, wherein the found backfill data comprises multiple versions of backfill data;
the filling of the backfill data in the component to be backfilled comprises:
displaying the found backfill data of each version;
acquiring backfill data selected by a user from the backfill data of each version;
and filling backfill data selected by a user into the component to be backfilled.
5. The method of claim 1, further comprising:
receiving a modification operation for modifying backfill data in a component to be backfilled;
according to the modification, modifying backfill data filled in the component to be backfilled;
in response to receiving a submission operation for submitting the data filled in the component to be backfilled to a server, acquiring the data currently filled in the component to be backfilled;
and forming a record by the component identification and the data currently filled in the component to be backfilled and storing the record in the corresponding relation.
6. The method of claim 5, wherein the correspondence is in a local and cloud location;
the forming a record by the component identifier and the data and storing the record in the corresponding relationship includes:
forming a record by the component identification and the data currently filled in the component to be backfilled, and storing the record in the corresponding relation stored in advance locally;
and the number of the first and second groups,
and sending a storage request to a cloud end, wherein the storage request carries the component identification and the data currently filled in the component to be backfilled, and the storage request is used for requesting the cloud end to form a record by the component identification and the data currently filled in the component to be backfilled and store the record in the corresponding relation pre-stored in the cloud end.
7. A data backfill apparatus, characterized in that the apparatus comprises:
the detection module is used for detecting whether the content display page has a component to be backfilled; the assembly to be backfilled is used for filling input data, the assembly to be backfilled comprises a plurality of input tags, and the assembly to be backfilled is suitable for a web page, an iOS system and an Android system;
the first obtaining module is used for responding to the existence of the component to be backfilled and obtaining a component identifier of the component to be backfilled in the content display page, wherein the component identifier is used for uniquely identifying the component;
the first searching module is used for searching backfill data corresponding to the component identification in a corresponding relation between the prestored component identification and the backfill data;
the first filling module is used for filling the backfill data into the component to be backfilled;
the second obtaining module is used for responding to the situation that the component to be backfilled does not exist, and obtaining a Document Object Model (DOM) tree of the content display page;
the second searching module is used for searching the form tag in the DOM tree by using the first working process and adopting a breadth-first traversal algorithm; and searching the input label in the searched sub-label in the form label by using a depth-first traversal algorithm by using a second working process every time when one from label is searched, so as to fill the corresponding backfill data in the searched input label.
8. The apparatus of claim 7, wherein the first obtaining module comprises:
the first acquisition unit is used for acquiring the page identifier of the content display page;
the second obtaining unit is used for obtaining the component name of the component to be backfilled;
a third obtaining unit, configured to obtain a user identifier of a user;
and the calculating unit is used for calculating the component identification of the component to be backfilled according to the page identification, the component name and the user identification.
9. The apparatus of claim 7, further comprising:
the third acquisition module is used for acquiring the label identification of the searched input label;
the third searching module is used for searching the backfill data corresponding to the label identification in the corresponding relation between the label identification and the backfill data which are stored in advance;
and the second filling module is used for filling backfill data corresponding to the label identification into the input label.
10. The apparatus of claim 7, wherein the found backfill data comprises multiple versions of backfill data;
the first fill-in module includes:
the display unit is used for displaying the found backfill data of each version;
the fourth acquisition unit is used for acquiring backfill data selected by a user from the backfill data of each version;
and the filling unit is used for filling the backfill data selected by the user into the component to be backfilled.
11. The apparatus of claim 7, further comprising:
the receiving module is used for receiving modification operation for modifying backfill data in the component to be backfilled;
the modification module is used for modifying backfill data filled in the component to be backfilled according to the modification;
the fourth acquisition module is used for acquiring the data currently filled in the component to be backfilled in response to receiving the operation of submitting the data filled in the component to be backfilled to a server;
and the storage module is used for forming a record by the component identification and the data currently filled in the component to be backfilled and storing the record in the corresponding relation.
12. The apparatus of claim 11, wherein the correspondence is in a local and cloud;
the memory module includes:
the storage unit is used for forming a record by the component identification and the data currently filled in the component to be backfilled and storing the record in the corresponding relation stored in advance locally;
the sending unit is used for sending a storage request to a cloud end, wherein the storage request carries the component identification and the data currently filled in the component to be backfilled, and the storage request is used for requesting the cloud end to form a record by the component identification and the data currently filled in the component to be backfilled and store the record in the corresponding relation pre-stored in the cloud end.
13. A mobile terminal comprising a memory and a processor; wherein the content of the first and second substances,
the memory is to store one or more computer instructions, wherein the one or more computer instructions are for the processor to invoke for execution;
the processor is configured to:
detecting whether a component to be backfilled exists in the content display page or not; the assembly to be backfilled is used for filling input data, the assembly to be backfilled comprises a plurality of input tags, and the assembly to be backfilled is suitable for a web page, an iOS system and an Android system;
in response to the existence of the component to be backfilled, acquiring a component identifier of the component to be backfilled in the content display page, wherein the component identifier is used for uniquely identifying the component;
searching backfill data corresponding to the component identification in a corresponding relation between the pre-stored component identification and the backfill data;
filling the backfill data into the component to be backfilled;
responding to the situation that the component to be backfilled does not exist, and acquiring a Document Object Model (DOM) tree of the content display page; searching for a form tag in the DOM tree by using a first working process and adopting a breadth-first traversal algorithm; and when one from label is found, searching the input label in the searched sub-label in the form label by using a depth-first traversal algorithm by using a second working process so as to fill the corresponding backfill data in the searched input label.
14. A computer storage medium having one or more computer instructions stored thereon that, when executed, implement the method of any one of claims 1-6.
CN201710374712.3A 2017-05-24 2017-05-24 Data backfilling method and device and mobile terminal Active CN107102978B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710374712.3A CN107102978B (en) 2017-05-24 2017-05-24 Data backfilling method and device and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710374712.3A CN107102978B (en) 2017-05-24 2017-05-24 Data backfilling method and device and mobile terminal

Publications (2)

Publication Number Publication Date
CN107102978A CN107102978A (en) 2017-08-29
CN107102978B true CN107102978B (en) 2020-11-24

Family

ID=59670595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710374712.3A Active CN107102978B (en) 2017-05-24 2017-05-24 Data backfilling method and device and mobile terminal

Country Status (1)

Country Link
CN (1) CN107102978B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342858A (en) * 2021-06-28 2021-09-03 数贸科技(北京)有限公司 Page component curing method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101223505A (en) * 2005-06-27 2008-07-16 微软公司 Data centric workflows
CN103136238A (en) * 2011-11-28 2013-06-05 百度在线网络技术(北京)有限公司 Method and server of processing page interactive elements at time of converting web page into wireless application protocol (WAP) page
CN103455338A (en) * 2013-09-22 2013-12-18 广州中国科学院软件应用技术研究所 Method and device for acquiring data
CN103577578A (en) * 2012-03-30 2014-02-12 奇智软件(北京)有限公司 Marker file parsing method and device
CN105335404A (en) * 2014-07-29 2016-02-17 北京奇虎科技有限公司 Page information loading method and device
CN106293685A (en) * 2015-06-23 2017-01-04 阿里巴巴集团控股有限公司 Component generation method and assembly generating means
CN106598580A (en) * 2016-12-06 2017-04-26 重庆首亨软件有限公司 Method for constructing service software
CN106681973A (en) * 2016-12-20 2017-05-17 北京奇虎科技有限公司 Method and device for achieving automatically filling browser sheet in test

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101223505A (en) * 2005-06-27 2008-07-16 微软公司 Data centric workflows
CN103136238A (en) * 2011-11-28 2013-06-05 百度在线网络技术(北京)有限公司 Method and server of processing page interactive elements at time of converting web page into wireless application protocol (WAP) page
CN103577578A (en) * 2012-03-30 2014-02-12 奇智软件(北京)有限公司 Marker file parsing method and device
CN103455338A (en) * 2013-09-22 2013-12-18 广州中国科学院软件应用技术研究所 Method and device for acquiring data
CN105335404A (en) * 2014-07-29 2016-02-17 北京奇虎科技有限公司 Page information loading method and device
CN106293685A (en) * 2015-06-23 2017-01-04 阿里巴巴集团控股有限公司 Component generation method and assembly generating means
CN106598580A (en) * 2016-12-06 2017-04-26 重庆首亨软件有限公司 Method for constructing service software
CN106681973A (en) * 2016-12-20 2017-05-17 北京奇虎科技有限公司 Method and device for achieving automatically filling browser sheet in test

Also Published As

Publication number Publication date
CN107102978A (en) 2017-08-29

Similar Documents

Publication Publication Date Title
CN109542529B (en) Function name-based point burying method and device, computer equipment and storage medium
CN103078945B (en) To the method and system that browser crash data processes
CN107102908B (en) Data verification method, data fault tolerance method and device
CN109739725A (en) Monitoring method, device and system based on browser and storage medium
CN113268261B (en) Page content display method and device and electronic equipment
CN105956136B (en) Method and device for acquiring login information
CN106411970A (en) Fault handling method, device and system based on service call
CN111949607A (en) Method, system and device for monitoring UDT file
CN107480117B (en) Recovery method and device for automatic page table single data
CN107102978B (en) Data backfilling method and device and mobile terminal
CN106598804A (en) Abnormality processing method and apparatus
CN113094287A (en) Page compatibility detection method, device, equipment and storage medium
CN112765601A (en) Website homepage structure monitoring method based on cloud
CN104268244A (en) Method and device for processing form
US20170177570A1 (en) Method for processing dose information images
CN108804889B (en) Website registration method and device
CN113948164A (en) Clinical medicine management method, device, equipment and computer readable storage medium
CN113722225A (en) Page testing method and device, computer equipment and storage medium
CN112114870A (en) Method and device for packaging codes, terminal equipment and storage medium
CN109815426A (en) Page info detection method and device, terminal and computer readable storage medium
CN113434119B (en) Service processing method and device based on flow control
CN110851456B (en) Information processing method, electronic equipment and storage medium
CN113505159B (en) Data detection method, device and equipment
CN111125567B (en) Equipment marking method, device, electronic equipment and storage medium
CN117032688A (en) Page generation method and device, computer readable storage medium and electronic equipment

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
CB02 Change of applicant information

Address after: Building N3, building 12, No. 27, Jiancai Chengzhong Road, Haidian District, Beijing 100096

Applicant after: Beijing Xingxuan Technology Co.,Ltd.

Address before: 100085 Beijing, Haidian District on the road to the information on the ground floor of the 1 to the 3 floor of the 2 floor, room 11, 202

Applicant before: Beijing Xiaodu Information Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant