CN112905934B - Data import method and device, electronic equipment and storage medium - Google Patents

Data import method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112905934B
CN112905934B CN202110169563.3A CN202110169563A CN112905934B CN 112905934 B CN112905934 B CN 112905934B CN 202110169563 A CN202110169563 A CN 202110169563A CN 112905934 B CN112905934 B CN 112905934B
Authority
CN
China
Prior art keywords
browser
user data
user
condition
under
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
CN202110169563.3A
Other languages
Chinese (zh)
Other versions
CN112905934A (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.)
Longxin Zhongke Hefei Technology Co ltd
Original Assignee
Longxin Zhongke Hefei 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 Longxin Zhongke Hefei Technology Co ltd filed Critical Longxin Zhongke Hefei Technology Co ltd
Priority to CN202110169563.3A priority Critical patent/CN112905934B/en
Publication of CN112905934A publication Critical patent/CN112905934A/en
Application granted granted Critical
Publication of CN112905934B publication Critical patent/CN112905934B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/214Database migration support

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the invention provides a data import method, a data import device, electronic equipment and a storage medium, and relates to the technical field of computers. Wherein, the method comprises the following steps: under the condition that the first browser is closed, a plurality of user data paths corresponding to the first browser are obtained through the second browser; displaying an identifier corresponding to user data under the condition that the user data exists in a user data path; and when a selection instruction of at least one target identifier in the displayed identifiers is received, importing the user data corresponding to each target identifier into a specified directory of the second browser. In the embodiment of the invention, a plurality of sets of user data of the first browser can be provided for a user to select, and at least one set of user data selected by the user is imported into the second browser, so that the migration of a plurality of sets of browsing user data can be realized according to the user requirements, the user data loss is prevented, and the convenience of using the second browser by the user is improved.

Description

Data import method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data importing method, a data importing apparatus, an electronic device, and a storage medium.
Background
At present, migration of user data is supported among a plurality of browsers, namely, a user can export the user data in one browser and then import the user data into another browser, so that the user can use the user conveniently.
However, when the inventor performs user data migration through a browser, the inventor finds that other browsers may import user data of a fire fox browser (Firefox), but multiple sets of user data under different paths may exist in the fire fox browser, and when the user data of the fire fox browser is imported through other browsers, if the multiple sets of user data under different paths coexist on one electronic device, one set of default user data of the fire fox browser may be directly imported, so that user data may be lost, and inconvenience may be caused to a user in using a new browser.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present invention are provided to provide a data importing method for overcoming the foregoing problems or at least partially solving the foregoing problems, so as to solve the problems that when multiple sets of user data under different paths of a browser coexist on one electronic device, only one default set of user data can be imported, which results in user data loss and inconvenience for a user to use a new browser.
Correspondingly, the embodiment of the invention also provides a data import device, electronic equipment and a storage medium, which are used for ensuring the realization and the application of the method.
In order to solve the above problem, an embodiment of the present invention discloses a data importing method, including:
under the condition that a first browser is closed, a plurality of user data paths corresponding to the first browser are obtained through a second browser;
displaying an identifier corresponding to the user data under the condition that the user data exists in the user data path;
when a selection instruction of at least one target identifier in the displayed identifiers is received, importing the user data corresponding to each target identifier into a designated directory of the second browser.
Optionally, the obtaining, by a second browser, a plurality of user data paths corresponding to a first browser when the first browser is closed includes:
under the condition that a first browser is closed, reading an initialization configuration file of the first browser through a second browser, and searching sections meeting preset conditions from the initialization configuration file;
and for each section meeting the preset conditions, combining a preset directory field with the path key value of the section to obtain a user data path corresponding to each section.
Optionally, the preset condition comprises a combination of a section name Profile and a number.
Optionally, the displaying, when the user data exists in the user data path, an identifier corresponding to the user data includes:
determining the name key value of the section corresponding to the user data path as the option name of the user data under the user data path under the condition that the user data exists under the user data path;
and displaying the option marked with the option name as an identifier corresponding to the user data in the user data path.
Optionally, when a selection instruction for at least one target identifier of the displayed identifiers is received, importing, to a designated directory of the second browser, user data corresponding to each target identifier, where the importing includes:
when a selection instruction of at least one target identifier in the displayed identifiers is received, for each target identifier, connecting a database corresponding to the target identifier;
acquiring user data corresponding to the target identification from the database;
and storing the acquired user data in a specified directory of the second browser.
Optionally, before the obtaining, by the second browser, the multiple user data paths corresponding to the first browser when the first browser is closed, the method further includes:
and displaying prompt information for closing the first browser under the condition that the first browser is opened.
Optionally, the user data includes at least one of a history of the first browser, bookmark information, and Cookies.
Optionally, the first browser comprises a Firefox browser.
The embodiment of the invention also discloses a data importing device, which comprises:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a plurality of user data paths corresponding to a first browser through a second browser under the condition that the first browser is closed;
the display module is used for displaying the identification corresponding to the user data under the condition that the user data exists in the user data path;
and the importing module is used for importing the user data corresponding to each target identifier into the specified directory of the second browser when a selection instruction of at least one target identifier in the displayed identifiers is received.
Optionally, the obtaining module includes:
the search sub-module is used for reading the initialization configuration file of the first browser through the second browser under the condition that the first browser is closed, and searching sections meeting preset conditions from the initialization configuration file;
and the combining submodule is used for combining a preset directory field with the path key value of each section according with the preset condition to obtain a user data path corresponding to each section.
Optionally, the preset condition comprises a combination of a section name Profile and a number.
Optionally, the display module comprises:
a determining sub-module, configured to determine, when user data exists in the user data path, a name key value of a section corresponding to the user data path as an option name of the user data in the user data path;
and the display sub-module is used for displaying the option marked with the option name as an identifier corresponding to the user data in the user data path.
Optionally, the importing module includes:
the connection sub-module is used for connecting a database corresponding to at least one target identifier in the displayed identifiers when a selection instruction of the at least one target identifier is received;
the acquisition submodule is used for acquiring user data corresponding to the target identification from the database;
and the storage sub-module is used for storing the acquired user data in the specified directory of the second browser.
Optionally, the apparatus further comprises:
and the prompt module is used for displaying prompt information for closing the first browser under the condition that the first browser is opened.
Optionally, the user data includes at least one of a history of the first browser, bookmark information, and Cookies.
Optionally, the first browser comprises a Firefox browser.
An embodiment of the present invention further discloses an electronic device, which includes a memory, and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs configured to be executed by the one or more processors include instructions for:
under the condition that a first browser is closed, a plurality of user data paths corresponding to the first browser are obtained through a second browser;
displaying an identifier corresponding to the user data under the condition that the user data exists in the user data path;
and when a selection instruction of at least one target identifier in the displayed identifiers is received, importing the user data corresponding to each target identifier into a specified directory of the second browser.
The embodiment of the invention also discloses a readable storage medium, and when instructions in the storage medium are executed by a processor of the electronic equipment, the electronic equipment can execute one or more data importing methods in the embodiment of the invention.
The embodiment of the invention has the following advantages:
in the embodiment of the present invention, when a first browser is closed, a second browser may obtain multiple user data paths corresponding to the first browser, and when user data exists in the user data paths, that is, when multiple sets of user data exist, an identifier corresponding to each user data is displayed, and when a selection instruction for at least one target identifier in the displayed identifiers is received, the second browser may import the user data corresponding to each target identifier into a designated directory, thereby implementing migration of at least one set of browser user data. In the embodiment of the invention, a plurality of sets of user data of the first browser can be provided for a user to select, and at least one set of user data selected by the user is imported into the second browser, so that the migration of a plurality of sets of browsing user data can be realized according to the user requirements, the user data loss is prevented, and the convenience of using the second browser by the user is improved.
Drawings
FIG. 1 is a flow chart of steps of an embodiment of a data import method of the present invention;
FIG. 2 is a flow chart of steps in another embodiment of a data import method of the present invention;
FIG. 3 is a block diagram of an embodiment of a data importing apparatus according to the present invention;
FIG. 4 is a block diagram illustrating an architecture of an electronic device for importing data, according to an example embodiment.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Before describing the embodiment of the present invention in detail, a description will be given to a current browser data importing process, and the following description will take an example of user data imported into a first browser by a second browser. It should be noted in advance that, the device user in the following refers to an electronic device with independent functions, that is, one electronic device is considered as one user, and generally, an electronic device with an operating system and no virtual machine exists is considered as one device user. In particular, for electronic devices with multiple systems or multiple virtual machines, one virtual machine may be considered as a device user, and one operating system may also be considered as a device user. And hereinafter a user refers to a person operating the electronic device.
The electronic device is provided with a first browser and a second browser, and in the case that a device user logs in the electronic device, the first browser may be in a case that a single device user has multiple sets of user data, and the inventor finds that the reason for this case in the process of implementing the present invention includes, but is not limited to, the following two points:
1. uninstalling and reinstalling the first browser: when the user uninstalls the first browser, the user data is not deleted, and when the user reinstalls the first browser, the first browser prompts the user whether to adopt the configuration file of the previous user data, and if the user chooses not to adopt the configuration file, the first browser creates a new set of configuration file of the user data, so that a plurality of sets of user data are generated.
2. Adding a configuration file of user data by the user: the user can manually add new user data configuration files under the relevant directory of the first browser, and the new user data configuration files and the original user data configuration files coexist, so that a plurality of sets of user data are generated.
Taking the first browser as an example of a fire fox browser, when user data of different paths in the fire fox browser exist in a computer at the same time, different paths are created for management under a user directory/-. Mozilla/firefox/, for example: two paths of subscriber data exist, i.e.,/. Mozilla/Firefox/ohlpqwz0,/. Mozilla/Firefox/i7ldxfgs.
However, when the inventor uses the fire fox browser as the first browser to perform data migration, it is found that when a user needs to import multiple sets of user data of the fire fox browser into the second browser, the default export tool of the fire fox browser only exports one set of default user data, but cannot export all user data, and cannot allow the user to select which set of user data to export by himself, so that user data is lost, and inconvenience is caused to the user in using a new browser.
One of the core concepts of the embodiments of the present invention is that when a user needs to import multiple sets of user data of a first browser into a second browser, the second browser may obtain multiple user data paths corresponding to the first browser, and then display an identifier corresponding to the user data in each user data path for the user to select. The second browser can provide the multiple sets of user data of the first browser for a user to select, and guides at least one set of user data selected by the user into the second browser, so that the user data of the multiple sets of browsers can be migrated, the user data is prevented from being lost, and the convenience of using a new browser by the user is improved.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a data importing method according to the present invention is shown, which may specifically include the following steps:
step 101: and under the condition that the first browser is closed, acquiring a plurality of user data paths corresponding to the first browser through the second browser.
In the embodiment of the present invention, when the first browser is in the closed state, the user data of the first browser is completely written into the local file and is in an accessible state. The second browser may obtain a plurality of user data paths corresponding to the first browser when the first browser is in a closed state. The user data paths may indicate specific user data, wherein different user data paths may indicate differently configured user data, which may be considered data corresponding to different device users, for example, history records under different user data paths may be different.
Step 102: and displaying the identifier corresponding to the user data under the condition that the user data exists in the user data path.
In this step, for any user data path, if there is user data in the user data path, that is, if the user data path indicates an effective user data file, an identifier corresponding to the user data in the user data path may be displayed in an interface of the second browser, so as to provide the user with a selection. Because there may be multiple user data paths, there are multiple identities, where identities correspond to user data one-to-one, and user data corresponds to user data paths one-to-one.
In the embodiment of the present invention, the identifier may specifically be a virtual key, an option in a drop-down selection box, or the like, and the user may select the identifier by clicking or the like.
Step 103: and when a selection instruction of at least one target identifier in the displayed identifiers is received, importing the user data corresponding to each target identifier into a specified directory of the second browser.
When the user selects at least one target identifier from the displayed identifiers, the second browser can receive a selection instruction of each target identifier, and at this time, the second browser can acquire user data from a user data path corresponding to each target identifier in sequence, and import the acquired at least one set of user data into a specified directory of the second browser to serve as the user data of the second browser, so that the migration of the at least one set of browser user data is realized.
In the embodiment of the present invention, when the first browser is closed, the second browser may obtain a plurality of user data paths corresponding to the first browser, and when user data exists in the user data paths, that is, when a plurality of sets of user data exist, an identifier corresponding to each user data is displayed, and when a selection instruction for at least one target identifier in the displayed identifiers is received, the second browser may import the user data corresponding to each target identifier into the designated directory, thereby implementing migration of the at least one set of browser user data. In the embodiment of the invention, a plurality of sets of user data of the first browser can be provided for a user to select, and at least one set of user data selected by the user is imported into the second browser, so that the migration of a plurality of sets of browsing user data can be realized according to the user requirements, the user data loss is prevented, and the convenience of using the second browser by the user is improved.
Referring to fig. 2, a flowchart of steps of another embodiment of a data importing method according to the present invention is shown, which specifically includes the following steps:
step 201: and displaying prompt information for closing the first browser under the condition that the first browser is opened.
In the embodiment of the present invention, when a user needs to import multiple sets of user data of a first browser into a second browser, if the first browser is in an open state, in order to ensure that the user data of the first browser is completely written into a local file and is in an accessible state, the second browser may display a prompt message to prompt the user to close the first browser.
Step 202: and under the condition that the first browser is closed, reading the initialization configuration file of the first browser through the second browser, and searching sections meeting preset conditions from the initialization configuration file.
In the embodiment of the present invention, optionally, the first browser may include a Firefox browser (Firefox), and the second browser may include a google browser (Chrome) and a 360 browser.
Under the condition that the first browser is closed, the user data of the first browser is completely written into the local file and is in an accessible state, and at this time, the second browser can read the initialization configuration file, namely the ini configuration file, of the first browser. The initialization configuration file is composed of a plurality of sections (sections), each Section also comprises a plurality of keys (keys), each Key can represent one attribute of the Section, for example, a path Key can represent the path of the Section, a path Key value can represent the specific number of the path of the Section, for example, a name Key can represent the name of the Section, and a name Key value can represent the specific number of the name of the Section.
And the second browser reads the initialization configuration file of the first browser and can search sections meeting preset conditions from the initialization configuration file. Optionally, the preset condition comprises a combination of a section name Profile and a number. That is, the second browser may look up a combination of the section name Profile and number, such as Profile0, profile1, profile2, \ 8230, \ 8230, from each section of the initialization configuration file, and if this naming rule is met, may use the section as a set of user data.
The data importing method provided by the embodiment of the invention can be applied to a Linux system, and under the Linux system, a first browser is a fire fox browser, a second browser is a google browser (Chrome) for example, under the condition that the fire fox browser is closed, the google browser can read an ini configuration file of/-. Mozilla/firefox/profiles.ini of the fire fox browser, the ini configuration file is composed of a plurality of sections, each Section comprises a plurality of keys, all the sections are analyzed, and then whether each Section is a combination of Profile + numbers, such as Profile0, profile1 and Profile2, the sections meeting the naming rule can be used as a set of user data.
Step 203: and for each section meeting the preset conditions, combining the preset directory field with the path key value of the section to obtain a user data path corresponding to each section.
The sections meeting the preset conditions can be used as a set of user data, so that a user data path corresponding to the sections meeting the preset conditions, namely a path of the user data configuration folder, needs to be obtained.
Taking the first browser as an example of a Firefox browser, the preset directory field may be-/. Mozilla/Firefox/, and the Key value of the Path Key of a certain Section1 that meets the preset condition is i7ldxfgs.default, then the-/. Mozilla/Firefox/i7ldxfgs.default may be combined to obtain the user data Path-/. Mozilla/Firefox/i7ldxfgs.default corresponding to the Section 1.
Step 204: and under the condition that the user data exists in the user data path, determining the name key value of the section corresponding to the user data path as the option name of the user data in the user data path.
After obtaining the user data path corresponding to each section meeting the preset condition, the second browser may determine whether a user data configuration folder indicated by the user data path exists, and if so, may determine the name key value of the section corresponding to the user data path as the option name of the user data in the user data path.
For example, the google browser may determine whether a user data configuration folder indicated by a user data path of the Firefox browser —/. Mozilla/Firefox/i7ldxfgs.default exists, and if so, determine the Key value default of the Name Key of Section1 corresponding to the user data path as the option Name of the user data under the user data path.
Step 205: and displaying the options marked with the option names as identifications corresponding to the user data in the user data path.
In this step, the second browser may display the option marked with the option name as an identifier corresponding to the user data in the user data path, so as to provide the user with the option name for selection. One identifier corresponds to a set of user data from which the user can select one or more sets of user data to import into the second browser.
For example, the google browser may display the option marked with the option name default as the identifier corresponding to the user data in the user data path:/. Mozilla/Firefox/i7ldxfgs.
Step 206: and when a selection instruction of at least one target identifier in the displayed identifiers is received, importing the user data corresponding to each target identifier into a specified directory of the second browser.
In the embodiment of the present invention, the step may be specifically implemented by the following steps, including:
when a selection instruction for at least one target identifier in the displayed identifiers is received, for each target identifier, connecting a database corresponding to the target identifier;
acquiring user data corresponding to the target identification from a database;
and storing the acquired user data in a specified directory of the second browser.
The second browser can provide the user with the identification of multiple sets of user data for selection, and the user can select one or multiple sets of user data from the identification and import the user data into the second browser. In practical application, the second browser can simultaneously display a plurality of identifiers, and allows the user to select one user and select more users simultaneously, so that the user can select at least one set of user data at one time for importing. Of course, the second browser may also display multiple identifiers at the same time, but only allow the user to select one identifier, and if the user wants to select multiple sets of user data, the user may import multiple times, and only one set of user data is imported each time, which is not specifically limited in the embodiment of the present invention.
When the user selects at least one target identifier from the displayed identifiers, the second browser may receive a selection instruction for the at least one target identifier. For the first target identifier, the second browser may connect to the corresponding database, acquire the user data corresponding to the first target identifier from the connected database, and then store the acquired user data in an assigned directory of the second browser, which may be a user directory of the second browser. For the second target identifier, the second browser may connect to the corresponding database, obtain user data corresponding to the second target identifier from the connected database, store the obtained user data in the designated directory of the second browser, and so on, and the second browser may sequentially import multiple sets of user data of the first browser. In a particular application, multiple sets of user data for a first browser may be stored in different paths of a second browser.
In the embodiment of the present invention, optionally, the user data may include at least one of a history, bookmark information, and Cookies of the first browser.
In practical applications, one identifier may correspond to at least one database, and the second browser may obtain at least one type of user data from the at least one database. For example, in a fire fox browser, both history records and bookmark information in the same set of user data can be managed by a places.
Specifically, when the history and the bookmark information in a certain set of user data need to be obtained, the google browser can be connected with the places. When Cookies in a set of user data need to be obtained, the google browser can be connected with a cookie.
For example, when a user selects a set of user data identifiers for a fire fox browser, the second browser may connect to the database of the fire fox browser, sql, and then query the history of the set of user data using sql statements. sql is a database query and programming language for accessing data and querying, updating, and managing relational database systems. In addition, the second browser may also query the bookmark information for the set of user data in the database places using the sql statement. The second browser can also connect to the database cookie of the Firefox browser, sqlite, and then query Cookies for the set of user data using the sql statement. Cookies are data (usually encrypted) stored on a user's local terminal by a website for session tracking purposes to identify the user's identity, and are information that is temporarily or permanently stored by the user's client computer. And then, the history records, bookmark information and Cookies which can be inquired by the second browser are imported into a user directory specified by the second browser.
In the embodiment of the invention, the second browser can analyze and read the initialization configuration file of the first browser, then judge whether a plurality of user data paths in the initialization configuration file exist or not, then list a plurality of sets of user data of the first browser for a user to select, analyze the user data under a corresponding directory after the user selects the user data, including bookmark information, history records and Cookies, and then import the user data into the second browser for sharing.
It should be noted that, the embodiment of the present invention only uses a specific operating system and a browser as examples to assist in describing the technical details of the embodiment of the present invention, and the present invention is not limited thereto. It is understood that other browsers may also apply the data importing method provided by the embodiment of the present invention to solve the technical problem provided by the present invention or to implement data importing.
In the embodiment of the present invention, when the first browser is closed, the second browser may search for a section that meets the preset condition from the initialization configuration file of the first browser, and for each section that meets the preset condition, may combine the preset directory field with the path key value of the section to obtain the user data path corresponding to each section; then, under the condition that user data exists in the user data path, namely under the condition that a plurality of sets of user data exist, the second browser can display the name key values of the sections corresponding to the user data path as the identifications corresponding to the user data in the user data path; when a selection instruction of at least one target identifier in the displayed identifiers is received, the second browser can import the user data corresponding to each target identifier into the specified directory, so that migration of at least one set of browser user data is realized. In the embodiment of the invention, a plurality of sets of user data of the first browser can be provided for a user to select, and at least one set of user data selected by the user is imported into the second browser, so that the migration of a plurality of sets of browsing user data can be realized according to the user requirements, the user data loss is prevented, and the convenience of using the second browser by the user is improved.
It should be noted that for simplicity of description, the method embodiments are shown as a series of combinations of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, which shows a block diagram of an embodiment of a data importing apparatus according to the present invention, the data importing apparatus 300 may specifically include the following modules:
an obtaining module 301, configured to obtain, by a second browser, multiple user data paths corresponding to a first browser when the first browser is closed;
a display module 302, configured to display an identifier corresponding to user data when the user data exists in the user data path;
an importing module 303, configured to import, when a selection instruction for at least one target identifier of the displayed identifiers is received, user data corresponding to each target identifier into a designated directory of the second browser.
Optionally, the obtaining module 301 includes:
the search sub-module is used for reading the initialization configuration file of the first browser through the second browser under the condition that the first browser is closed, and searching sections meeting preset conditions from the initialization configuration file;
and the combining submodule is used for combining a preset directory field with the path key value of each section according with the preset condition to obtain a user data path corresponding to each section.
Optionally, the preset condition comprises a combination of a section name Profile and a number.
Optionally, the display module 302 includes:
a determining submodule, configured to determine, when user data exists in the user data path, a name key value of a section corresponding to the user data path as an option name of the user data in the user data path;
and the display sub-module is used for displaying the option marked with the option name as an identifier corresponding to the user data in the user data path.
Optionally, the importing module 303 includes:
the connection sub-module is used for connecting a database corresponding to at least one target identifier in the displayed identifiers when a selection instruction of the at least one target identifier is received;
the acquisition submodule is used for acquiring user data corresponding to the target identification from the database;
and the storage sub-module is used for storing the acquired user data in the specified directory of the second browser.
Optionally, the apparatus further comprises:
and the prompt module is used for displaying prompt information for closing the first browser under the condition that the first browser is opened.
Optionally, the user data includes at least one of a history of the first browser, bookmark information, and Cookies.
Optionally, the first browser comprises a firefox browser.
In the embodiment of the present invention, a plurality of user data paths corresponding to a first browser may be acquired by an acquisition module when the first browser is closed, then an identifier corresponding to each user data is displayed by a display module when the user data exists in the user data paths, that is, when a plurality of sets of user data exist, and then, when a selection instruction for at least one target identifier in the displayed identifiers is received, the user data corresponding to each target identifier may be imported into a specified directory of a second browser by an import module, thereby implementing migration of the user data of at least one set of browsers. In the embodiment of the invention, a plurality of sets of user data of the first browser can be provided for the user to select, and at least one set of user data selected by the user is imported into the second browser, so that the migration of the plurality of sets of browsing user data can be realized according to the user requirements, the user data loss is prevented, and the convenience of the user for using the second browser is improved.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
FIG. 4 is a block diagram illustrating a structure of an electronic device 400 for importing data according to an example embodiment. For example, the electronic device 400 may be a computer, server, or the like.
Referring to fig. 4, electronic device 400 may include one or more of the following components: processing components 402, memory 404, power components 406, multimedia components 408, audio components 410, input/output (I/O) interfaces 412, sensor components 414, and communication components 416.
The processing component 402 generally controls overall operation of the electronic device 400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing element 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 402 can include one or more modules that facilitate interaction between the processing component 402 and other components. For example, the processing component 402 can include a multimedia module to facilitate interaction between the multimedia component 408 and the processing component 402.
The memory 404 is configured to store various types of data to support operations at the device 400. Examples of such data include instructions for any application or method operating on the electronic device 400, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 404 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 406 provides power to the various components of the electronic device 400. Power components 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 400.
The multimedia component 408 comprises a screen providing an output interface between the electronic device 400 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 400 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 410 is configured to output and/or input audio signals. For example, the audio component 410 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 400 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 404 or transmitted via the communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.
The I/O interface 412 provides an interface between the processing component 402 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor component 414 can detect an open/closed state of the device 400, the relative positioning of components, such as a display and keypad of the electronic device 400, the sensor component 414 can also detect a change in position of the electronic device 400 or a component of the electronic device 400, the presence or absence of user contact with the electronic device 400, orientation or acceleration/deceleration of the electronic device 400, and a change in temperature of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other devices. The electronic device 400 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 400 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 404 comprising instructions, executable by the processor 420 of the electronic device 400 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a terminal, enable the terminal to perform a method of data import, the method comprising:
under the condition that a first browser is closed, a plurality of user data paths corresponding to the first browser are obtained through a second browser;
displaying an identifier corresponding to the user data under the condition that the user data exists in the user data path;
when a selection instruction of at least one target identifier in the displayed identifiers is received, importing the user data corresponding to each target identifier into a designated directory of the second browser.
Optionally, the obtaining, by a second browser, a plurality of user data paths corresponding to a first browser when the first browser is closed includes:
under the condition that a first browser is closed, reading an initialization configuration file of the first browser through a second browser, and searching sections meeting preset conditions from the initialization configuration file;
and for each section meeting the preset conditions, combining a preset directory field with the path key value of the section to obtain a user data path corresponding to each section.
Optionally, the preset condition comprises a combination of a section name Profile and a number.
Optionally, the displaying, when the user data exists in the user data path, an identifier corresponding to the user data includes:
determining the name key value of the section corresponding to the user data path as the option name of the user data under the user data path under the condition that the user data exists under the user data path;
and displaying the option marked with the option name as an identifier corresponding to the user data under the user data path.
Optionally, when a selection instruction for at least one target identifier in the displayed identifiers is received, importing the user data corresponding to each target identifier into a designated directory of the second browser, where the importing includes:
when a selection instruction of at least one target identifier in the displayed identifiers is received, for each target identifier, connecting a database corresponding to the target identifier;
acquiring user data corresponding to the target identification from the database;
and storing the acquired user data in a specified directory of the second browser.
Optionally, before the obtaining, by the second browser, the multiple user data paths corresponding to the first browser when the first browser is closed, the method further includes:
and displaying prompt information for closing the first browser under the condition that the first browser is opened.
Optionally, the user data includes at least one of a history of the first browser, bookmark information, and Cookies.
Optionally, the first browser comprises a Firefox browser.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a predictive manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the true scope of the embodiments of the present invention.
Finally, it should also be noted that, in this document, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrases "comprising one of \ 8230; \8230;" does not exclude the presence of additional like elements in a process, method, article, or terminal device that comprises the element.
The data importing method and apparatus, the electronic device, and the storage medium provided by the present invention are described in detail above, and a specific example is applied in the present disclosure to explain the principles and embodiments of the present invention, and the description of the above embodiment is only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A data import method, comprising:
under the condition that a first browser is closed, acquiring a plurality of user data paths corresponding to the first browser through a second browser, wherein the first browser comprises a Firefox browser, and the type of the second browser is different from that of the first browser;
displaying an identifier corresponding to the user data in an interface of the second browser under the condition that the user data exists in the user data path;
when a selection instruction of at least one target identifier in the displayed identifiers is received, importing user data corresponding to each target identifier into a specified directory of the second browser;
the obtaining, by a second browser, a plurality of user data paths corresponding to a first browser under a condition that the first browser is closed includes:
under the condition that a first browser is closed, reading an initialization configuration file of the first browser through a second browser, and searching sections meeting preset conditions from the initialization configuration file;
and for each section meeting the preset conditions, combining a preset directory field with the path key value of the section to obtain a user data path corresponding to each section.
2. The method according to claim 1, wherein the preset condition comprises a combination of a section name Profile and a number.
3. The method according to claim 1, wherein the displaying, in the case that user data exists in the user data path, an identifier corresponding to the user data includes:
determining the name key value of the section corresponding to the user data path as the option name of the user data under the user data path under the condition that the user data exists under the user data path;
and displaying the option marked with the option name as an identifier corresponding to the user data in the user data path.
4. The method according to claim 1, wherein when receiving a selection instruction for at least one of the displayed identifiers, importing user data corresponding to each of the displayed identifiers into a designated directory of the second browser, including:
when a selection instruction of at least one target identifier in the displayed identifiers is received, connecting a database corresponding to the target identifier for each target identifier;
acquiring user data corresponding to the target identification from the database;
and storing the acquired user data in a specified directory of the second browser.
5. The method according to claim 1, wherein before the obtaining, by the second browser, the plurality of user data paths corresponding to the first browser when the first browser is closed, further comprises:
and displaying prompt information for closing the first browser under the condition that the first browser is opened.
6. The method of claim 1, wherein the user data comprises at least one of a history of the first browser, bookmark information, and Cookies.
7. A data importing apparatus, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a plurality of user data paths corresponding to a first browser through a second browser under the condition that the first browser is closed, the first browser comprises a Firefox browser, and the type of the second browser is different from that of the first browser;
the display module is used for displaying an identifier corresponding to the user data in an interface of the second browser under the condition that the user data exists in the user data path;
the import module is used for importing user data corresponding to each target identifier into a designated directory of the second browser when a selection instruction of at least one target identifier in the displayed identifiers is received;
the acquisition module comprises:
the search sub-module is used for reading the initialization configuration file of the first browser through the second browser under the condition that the first browser is closed, and searching sections meeting preset conditions from the initialization configuration file;
and the combining sub-module is used for combining the preset directory field with the path key values of the sections for each section meeting the preset condition to obtain the user data path corresponding to each section.
8. An electronic device comprising memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by one or more processors the one or more programs comprising instructions for:
under the condition that a first browser is closed, a plurality of user data paths corresponding to the first browser are obtained through a second browser, wherein the first browser comprises a Firefox browser;
displaying an identifier corresponding to the user data under the condition that the user data exists in the user data path;
and when a selection instruction of at least one target identifier in the displayed identifiers is received, importing the user data corresponding to each target identifier into a specified directory of the second browser.
9. A readable storage medium, characterized in that instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the data import method of one or more of method claims 1-6.
CN202110169563.3A 2021-02-07 2021-02-07 Data import method and device, electronic equipment and storage medium Active CN112905934B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110169563.3A CN112905934B (en) 2021-02-07 2021-02-07 Data import method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110169563.3A CN112905934B (en) 2021-02-07 2021-02-07 Data import method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112905934A CN112905934A (en) 2021-06-04
CN112905934B true CN112905934B (en) 2022-10-28

Family

ID=76124423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110169563.3A Active CN112905934B (en) 2021-02-07 2021-02-07 Data import method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112905934B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369276B (en) * 2008-09-28 2011-09-21 杭州电子科技大学 Evidence obtaining method for Web browser caching data
US9565232B2 (en) * 2013-05-03 2017-02-07 Dropbox, Inc. Importing content items
CN103714119B (en) * 2013-11-29 2017-04-05 北京奇虎科技有限公司 A kind for the treatment of method and apparatus of browser data
CN104182493B (en) * 2014-08-12 2019-01-18 可牛网络技术(北京)有限公司 A kind of method of data synchronization and device, terminal
CN106095883B (en) * 2016-06-03 2021-01-15 腾讯科技(深圳)有限公司 Method and device for importing browser data
CN106648455A (en) * 2016-09-14 2017-05-10 广东欧珀移动通信有限公司 Data migration method and mobile terminal

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Synchronizing web browsing data with Browserver;Leandro G. de Carvalho 等;《The IEEE symposium on Computers and Communications》;20100812;第738-743页 *
制作自己的浏览器便携版;万立夫;《电脑迷》;20130601(第06期);第73页 *

Also Published As

Publication number Publication date
CN112905934A (en) 2021-06-04

Similar Documents

Publication Publication Date Title
CN108932253B (en) Multimedia search result display method and device
CN105930536B (en) Index establishing method, page jumping method and device
CN104869569A (en) Network permission control method and apparatus of application program
CN106919629B (en) Method and device for realizing information screening in group chat
CN104462296B (en) File management method and device and terminal
CN108334623B (en) Song display method, device and system
CN107562497B (en) Information display method and device and terminal
CN106815291B (en) Search result item display method and device and search result item display device
CN104636164A (en) Generating method and device for starting page
CN111510556B (en) Call information processing method and device and computer storage medium
RU2734780C1 (en) Method of presenting information, device and storage medium for information therefor
CN111814088A (en) Page processing method and device
KR101787918B1 (en) Search method, apparatus, program and recording medium
EP3261324A1 (en) Method and device for application switching
CN110213062B (en) Method and device for processing message
CN112905934B (en) Data import method and device, electronic equipment and storage medium
CN105094510A (en) Text processing method, device and system
CN107885571B (en) Display page control method and device
CN112667852B (en) Video-based searching method and device, electronic equipment and storage medium
CN106354595B (en) Mobile terminal, hardware component state detection method and device
CN110457084B (en) Loading method and device
CN107679123B (en) Picture naming method and device
CN106936885B (en) Favorite processing method and system and server
CN104991901A (en) Method and apparatus for accessing webpage
CN111179011A (en) Insurance product recommendation method and device

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