CN111382381B - User data sharing method and device, mobile terminal and storage medium - Google Patents
User data sharing method and device, mobile terminal and storage medium Download PDFInfo
- Publication number
- CN111382381B CN111382381B CN201811617724.5A CN201811617724A CN111382381B CN 111382381 B CN111382381 B CN 111382381B CN 201811617724 A CN201811617724 A CN 201811617724A CN 111382381 B CN111382381 B CN 111382381B
- Authority
- CN
- China
- Prior art keywords
- user data
- request
- webpage
- page
- container
- 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
Links
Images
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The present disclosure provides a user data sharing method, which is used in a client, and includes: the client receives a request sent by a webpage end; analyzing the received request information and judging the type of the request; when the request type is a cross-page request, processing user data required by the cross-page request through a public process pool corresponding to a webpage plug-in of the webpage end so as to realize sharing of the user data. The disclosure also provides a user data sharing device, a mobile terminal and a storage medium.
Description
Technical Field
The present disclosure relates to a user data sharing technology, and in particular, to a user data sharing method, a device, a mobile terminal, and a storage medium.
Background
In the prior art, a client can perform information interaction with a webpage end in the use process, user data can be stored in the client so as to facilitate the use of the webpage end, improve the webpage loading rate of the webpage end and reduce the waiting time of a user, but when a webpage View (Web View) exists as an independent plug-in, version upgrading of the Web View can possibly cause abnormal call of the user data (cookie) to influence the loading process of the webpage.
Disclosure of Invention
In view of this, embodiments of the present disclosure provide a method, an apparatus, a mobile terminal, and a storage medium for sharing user data, which can analyze received request information and determine a type of the request; when the request type is a cross-page request, processing user data required by the cross-page request through a public process pool corresponding to a webpage plug-in of the webpage end so as to realize sharing of the user data.
The technical scheme of the embodiment of the disclosure is realized as follows:
the present disclosure provides a user data sharing method, which is used in a client, and includes:
the client receives a request sent by a webpage end;
analyzing the received request information and judging the type of the request;
when the request type is a cross-page request, processing user data required by the cross-page request through a public process pool corresponding to a webpage plug-in of the webpage end so as to realize sharing of the user data.
In the above scheme, the processing, by the common process pool corresponding to the web plug-in of the web end, the user data required by the cross-page request includes:
analyzing a target page corresponding to the cross-page request;
the webpage end jumps to the target page, and when the user data is not stored in a container corresponding to the target page, corresponding user data is extracted from a public process pool corresponding to the webpage plug-in;
and injecting the extracted user data into the target page.
In the above scheme, the method further comprises:
when the webpage plug-in monitors that user data appear in the webpage of the webpage end, the monitored user data are stored in a container corresponding to the webpage end, wherein the container corresponds to different webpage levels, and the webpages of the same level can share the user data in the container.
In the above scheme, the storing the monitored user data in a container corresponding to the web page end includes:
classifying the monitored user data;
and encrypting the secret data in the user data to realize classified storage of the user data in the container.
In the above scheme, the method further comprises:
when the request type is a request that does not carry user data,
and rewriting the request through a webpage plug-in of the webpage end, and adding the user data into the head information of the request to form a request carrying the user data.
The disclosure also provides a user data sharing device, the method is used in a client, and the device comprises:
the transmission module is used for receiving the request sent by the webpage end;
the processing module is used for analyzing the received request information and judging the type of the request;
and the processing module is used for processing the user data required by the cross-page request through a public process pool corresponding to the webpage plug-in of the webpage end when the request type is the cross-page request so as to realize the sharing of the user data.
In the above-described arrangement, the first and second embodiments,
the processing module is used for analyzing a target page corresponding to the cross-page request;
the processing module is used for jumping to the target page by the webpage end, and extracting corresponding user data from a public process pool corresponding to the webpage plug-in when the user data is not stored in a container corresponding to the target page;
and the processing module is used for injecting the extracted user data into the target page.
In the above-described arrangement, the first and second embodiments,
the processing module is used for storing the monitored user data in a container corresponding to the webpage end when the webpage plug-in monitors that the user data appears in the webpage of the webpage end,
wherein the containers correspond to different levels of web pages, and web pages of the same level can share user data in the containers.
In the above-described arrangement, the first and second embodiments,
the processing module is used for classifying the monitored user data;
the processing module is used for carrying out encryption processing on the secret data in the user data so as to realize classified storage of the user data in the container.
In the above-described arrangement, the first and second embodiments,
and the processing module is used for rewriting the request through a webpage plug-in of the webpage end when the request type is a request without carrying user data, and adding the user data into the header information of the request to form the request with the user data.
The embodiment of the disclosure also provides a client, which comprises:
a memory for storing executable instructions;
and the processor is used for realizing any one of the user data sharing methods provided by the embodiment of the disclosure when executing the executable instructions.
The embodiment of the disclosure also provides a storage medium, which is characterized in that executable instructions are stored, and the executable instructions are used for realizing the user data sharing method of any one of the disclosure when being executed.
The embodiment of the disclosure has the following technical effects:
the received request information can be analyzed, and the type of the request can be judged;
when the request type is a cross-page request, processing user data required by the cross-page request through a public process pool corresponding to a webpage plug-in of the webpage end, and extracting corresponding user data from the public process pool corresponding to the webpage plug-in; the extracted user data is injected into the target page, whereby sharing of the user data can be achieved. The method and the device avoid influencing the webpage loading rate of the webpage end by the fact that the existing user data cannot be carried or utilized in the new version of Web View.
Drawings
Fig. 1 is an application scenario schematic diagram of a user data sharing method provided in an embodiment of the present disclosure;
fig. 2 is a schematic diagram of an alternative hardware structure of a mobile terminal 200 according to an embodiment of the disclosure;
FIG. 3 is a schematic diagram of an alternative composition of a user data sharing device according to an embodiment of the present disclosure;
fig. 4 is an alternative flowchart of a user data sharing method according to an embodiment of the present disclosure;
fig. 5 is an optional flowchart of a user data sharing method according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of an alternative usage of the user data sharing method according to the embodiment of the disclosure;
fig. 7 is a schematic diagram of an alternative data structure of a container for storing user data provided by an embodiment of the present disclosure.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present disclosure more apparent, the present disclosure will be further described in detail with reference to the accompanying drawings, and the described embodiments should not be construed as limiting the present disclosure, and all other embodiments obtained by those skilled in the art without making inventive efforts are within the scope of protection of the present disclosure.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing embodiments of the present disclosure only and is not intended to be limiting of the present disclosure.
It should be noted that, in the embodiments of the present disclosure, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a method or server comprising a list of elements does not include only those elements explicitly recited, but may include other elements not expressly listed or inherent to such method or server. Without further limitation, the element defined by the phrase "comprising one … …" does not exclude the presence of additional related elements in a method or client comprising the element (e.g., a step in a method or a module in a client, e.g., a module may be part of a circuit, part of a processor, part of a program or software, etc.).
For example, the user data sharing method provided in the embodiment of the present disclosure includes a series of steps, but the user data sharing method provided in the embodiment of the present disclosure is not limited to the described steps, and similarly, the terminal provided in the embodiment of the present disclosure includes a series of units, but the terminal provided in the embodiment of the present disclosure is not limited to including the explicitly described units, and may include units that are required to be set when acquiring related information or performing processing based on the information. It should be noted that in the following description reference is made to "some embodiments" which describe a subset of all possible embodiments, but it should be understood that "some embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
Before explaining the embodiments of the present disclosure in further detail, terms and terminology involved in the embodiments of the present disclosure are explained, and the terms and terminology involved in the embodiments of the present disclosure are applicable to the following explanation.
1) An interface, (API Application Programming Interface) is a set of definitions, programs and protocols that enable the communication between computer software via an API interface. One of the main functions of the interface is to provide a set of functions.
2) The client refers to a program corresponding to the server and providing local service for the client.
3) In response to a condition or state that is used to represent the condition or state upon which the performed operation depends, the performed operation or operations may be in real-time or with a set delay when the condition or state upon which it depends is satisfied; without being specifically described, there is no limitation in the execution sequence of the plurality of operations performed.
4) Web View is a webkit engine-based control that exposes Web pages, including but not limited to: WKWeb View and UIWeb View.
5) User data, cookies, characterize data stored on a user's local terminal for the purpose of distinguishing user identity for certain websites.
6) load Request, which belongs to an example method in the IOS system UIWEb View class. After the method is called, a network request instance (request parameter) is transmitted, and the method can send a network request to a server according to url and other information contained in the request parameter.
7) The container (Box), also called a Box, an object-oriented component defined by a unique type identifier and length, see fig. 7, is an alternative Data structure schematic of a container provided by an embodiment of the present disclosure, including a container Header (Box Header) and container Data (Box Data), filled with binary Data for expressing various information.
The container header includes a size (size) indicating the length the container occupies in the media file and a type (type) indicating the type of container in which all web pages under the same hierarchical page may share user data.
An exemplary application of an apparatus implementing the embodiments of the present disclosure is described below, and the apparatus provided by the embodiments of the present disclosure may be implemented as various types of electronic devices with a client function, such as a tablet computer, a notebook computer, a central processing unit, and the like.
A use scenario of a user data sharing method implementing an embodiment of the present disclosure will now be described with reference to the accompanying drawings. Referring to fig. 1, fig. 1 is a schematic application scenario of a user data sharing method provided by an embodiment of the present disclosure, in order to support an exemplary application, a server implementing an embodiment of the present disclosure may be a background server, taking a background server 30 as an example, a client 10 (a client 10-1 and a client 10-2 are exemplarily shown) is connected to the background server 30 through a network 20, where the network 20 may be a wide area network or a local area network, or a combination of the two, and data transmission is implemented using a wireless link.
The client 10 is used for receiving a request sent by a webpage end; analyzing the received request information and judging the type of the request; when the request type is a cross-page request, processing user data required by the cross-page request through a public process pool corresponding to a webpage plug-in of the webpage end so as to realize sharing of the user data; the client 10 displays the corresponding interfaces called in the operation process of the client through a graphic interface 110 (the video display interface 110-1 for sharing user data and the video display interface 110-2 for sharing user data are shown in an exemplary manner), and the background server 30 is used for supporting the background data of the data information to be displayed in the process of sharing user data in cooperation with the client 10, so as to ensure that different functions of normally performing data processing in the process of performing information interaction with the web page end by the terminal are realized, for example, receiving video data of different anchor sent by the background server 30 in the process of browsing different anchor pages, and the like.
Based on the usage environment of the user data sharing method shown in fig. 1, a mobile terminal implementing an embodiment of the present disclosure will be described first, where the mobile terminal may be provided as hardware, software, or a combination of hardware and software. Various exemplary implementations of mobile terminals provided by embodiments of the present disclosure are described below.
The implementation of the combination of the software and hardware of the mobile terminal will be described first. Specifically, a hardware structure of a mobile terminal implementing an embodiment of the present disclosure will now be described with reference to the accompanying drawings, and referring to fig. 2, fig. 2 is a schematic diagram of an alternative hardware structure of a mobile terminal 200 provided in an embodiment of the present disclosure.
The mobile terminal 200 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDA, personalDigital Assistant), tablet computers (PAD, portable Android Device), portable multimedia players (PMP, porta ble Media Player), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and various types of electronic devices such as digital Televisions (TVs), desktop computers, and the like, capable of operating clients and performing information-interaction functions with web pages. The mobile terminal 200 shown in fig. 2 is only one example and should not be construed as limiting the functionality and scope of use of the disclosed embodiments.
As shown in fig. 2, the mobile terminal 200 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 201, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 202 or a program loaded from a storage device 208 into a random access Memory (RAM, random Acce ss Memory) 203. In the RAM203, various programs and data required for the operation of the mobile terminal 200 are also stored. The processing device 201, ROM 202, and RAM203 are connected to each other through a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
In general, the following devices may be connected to the I/O interface 205: input devices 206 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 207 including, for example, a liquid crystal display (LCD, liquid Crystal Display), a speaker, a vibrator, and the like; storage 208 including, for example, magnetic tape, hard disk, etc.; and a communication device 209. The communication means 209 may allow the mobile terminal 200 to communicate with other devices wirelessly or by wire to exchange data. While fig. 2 illustrates a mobile terminal 200 having various devices, it is to be understood that not all illustrated devices are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 209, or from the storage means 208, or from the ROM 202. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 201.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a RAM, a ROM, an erasable programmable read-Only Memory (EPROM, erasable Programmable Read-Only Memory), an optical fiber, a portable compact disc read-Only Memory (CD-ROM, compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, radio Frequency (RF), and the like, or any suitable combination thereof.
The computer readable medium may be contained in the server; or may exist alone without being assembled into the server.
The computer readable medium carries one or more programs which, when executed by the server, cause the client to implement: receiving a request sent by a webpage end; analyzing the received request information and judging the type of the request; when the request type is a cross-page request, processing user data required by the cross-page request through a public process pool corresponding to a webpage plug-in of the webpage end so as to realize sharing of the user data.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN, local Area Ne twork) or a wide area network (WAN, wide Area Network), or may be connected to an external computer (e.g., connected through the internet using an internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. The name of a module does not in some cases define the module itself.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
As an example of a hardware implementation or a software implementation of the user data sharing arrangement, the user data sharing arrangement may be provided as a series of modules having a coupling relationship at the signal/information/data level, as will be described below in connection with fig. 3. Referring to fig. 3, fig. 3 is a schematic diagram of an alternative composition structure of a user data sharing apparatus according to an embodiment of the present disclosure, which shows a series of modules included in implementing the user data sharing apparatus, but the module structure of the user data sharing apparatus is not limited to that shown in fig. 3, for example, the modules may be further split or combined according to different functions implemented therein.
In the following, a purely hardware implementation of the user data sharing device is described, the user data sharing device 300 may be used in various types of clients for running applications, such as: fig. 3 is a schematic diagram of an optional functional structure of a user data sharing device according to an embodiment of the present disclosure; as shown in fig. 3, the user data sharing apparatus 300 includes: a transmission module 301 and a processing module 302. The client can interact information with the webpage end and execute corresponding instructions, and the functions of the modules are described in detail below.
A transmission module 301, configured to receive a request sent by a web page end;
the processing module 302 is configured to parse the received request information and determine a type of the request;
and the processing module 302 is configured to process, when the request type is a cross-page request, user data required by the cross-page request through a common process pool corresponding to a web plug-in of the web end, so as to realize sharing of the user data.
In some embodiments of the present disclosure, the processing module 302 is configured to parse a target page corresponding to the cross-page request;
the processing module 302 is configured to skip to the target page from the web page end, and extract corresponding user data from a public process pool corresponding to the web page plug-in when the user data is not stored in a container corresponding to the target page; the processing module 302 is configured to inject the extracted user data into the target page. Specifically, taking an IOS operating system as an example, in the operating system of IOS8.0 and above, providing a new version of Web View, i.e., WKWeb View, to replace the old version of uiwieb View; for a cross-page request sent by a webpage end to the client, when WKWEB View is started, the cross-page request cannot carry user data, the loading process of the webpage end is affected, and corresponding user data is extracted from a public process pool corresponding to the webpage plug-in through the technical scheme shown in the embodiment; the extracted user data is injected into the target page, so that the loading speed of the webpage end can be effectively improved while the target page is prevented from failing due to lack of user data loading, and smooth execution of the cross-page request is ensured.
In some embodiments of the present disclosure, the processing module 302 is configured to store, when the web page plug-in monitors that user data occurs in a web page at a web page end, the monitored user data in a container corresponding to the web page end, where the container corresponds to different web page levels, and web pages at the same level can share the user data in the container. Specifically, taking the IOS operating system as an example, in the IOS8.0 and above operating systems, monitoring of a webpage page with the page loaded by the webpage end plug-in wweeb View can be achieved, monitored user data is stored in a container corresponding to the webpage end, through the technical scheme shown in the embodiment, the user data in the container can be shared by the webpage of the same level, loading waiting time of the page is shortened, and meanwhile, the received cross-page request can be guaranteed that required user data is stored in the corresponding container to achieve execution of the cross-page request.
In some embodiments of the present disclosure, the processing module 302 is configured to classify the monitored user data;
the processing module 302 is configured to encrypt the secret data in the user data, so as to implement classified storage of the user data in the container. According to the technical scheme, when the user data contains the password data and the bank account information of the user, the classified storage of the user data in the container is realized through encryption processing, so that the user data leakage caused by interception of the user data when the user data is stored in a plaintext is avoided, and optionally, the encryption mode of the secret data is asymmetric encryption.
In some embodiments of the present disclosure, the processing module 302 is configured to, when the request type is a request that does not carry user data, rewrite the request through a web plug-in on the web side, and add the user data to header information of the request to form a request that carries user data. Specifically, taking an IOS operating system as an example, in the operating system of the IOS8.0 and above version, WKWeb View replaces the uiwieb View of the old version; for the first Request sent by the web page end to the client, the WKWeb View does not allow the first Request to carry corresponding user data, and the loading of the web page end is affected.
Fig. 4 is a schematic diagram of an alternative flow of a user data sharing method provided by an embodiment of the present disclosure, and as shown in fig. 4, an alternative flow of a user data sharing method provided by an embodiment of the present disclosure includes the following steps:
step 401: the client receives a request sent by a webpage end;
step 402: analyzing the received request information and judging the type of the request;
step 403: when the request type is a cross-page request, processing user data required by the cross-page request through a public process pool corresponding to a webpage plug-in of the webpage end.
Thereby, sharing of the user data can be achieved.
In some embodiments of the present disclosure, the processing, by the common process pool corresponding to the web plug-in at the web end, the user data required by the cross-page request includes:
analyzing a target page corresponding to the cross-page request; the webpage end jumps to the target page, and when the user data is not stored in a container corresponding to the target page, corresponding user data is extracted from a public process pool corresponding to the webpage plug-in; and injecting the extracted user data into the target page. Specifically, taking an IOS operating system as an example, in the operating system of IOS8.0 and above, providing a new version of Web View, i.e., WKWeb View, to replace the old version of uiwieb View; for a cross-page request sent by a webpage end to the client, when WKWEB View is started, the cross-page request cannot carry user data, the loading process of the webpage end is affected, and corresponding user data is extracted from a public process pool corresponding to the webpage plug-in through the technical scheme shown in the embodiment; the extracted user data is injected into the target page, so that the loading speed of the webpage end can be effectively improved while the target page is prevented from failing due to lack of user data loading, and smooth execution of the cross-page request is ensured.
In some embodiments of the present disclosure, the method further comprises:
when the webpage plug-in monitors that user data appear in the webpage of the webpage end, the monitored user data are stored in a container corresponding to the webpage end, wherein the container corresponds to different webpage levels, and the webpages of the same level can share the user data in the container. Specifically, taking the IOS operating system as an example, in the IOS8.0 and above operating systems, monitoring of a webpage page with the page loaded by the webpage end plug-in wweeb View can be achieved, monitored user data is stored in a container corresponding to the webpage end, through the technical scheme shown in the embodiment, the user data in the container can be shared by the webpage of the same level, loading waiting time of the page is shortened, and meanwhile, the received cross-page request can be guaranteed that required user data is stored in the corresponding container to achieve execution of the cross-page request.
In some embodiments of the disclosure, the storing the monitored user data in a container corresponding to the web page end includes:
classifying the monitored user data; and encrypting the secret data in the user data to realize classified storage of the user data in the container. According to the technical scheme, when the user data contains the password data and the bank account information of the user, the classified storage of the user data in the container is realized through encryption processing, so that the user data leakage caused by interception of the user data when the user data is stored in a plaintext is avoided, and optionally, the encryption mode of the secret data is asymmetric encryption.
In some embodiments of the present disclosure, the method further comprises:
and when the request type is a request without carrying user data, rewriting the request through a webpage plug-in of the webpage end, and adding the user data into header information of the request to form the request with the user data. Specifically, taking an IOS operating system as an example, in the operating system of IOS8.0 and above, providing a new version of Web View, i.e., WKWeb View, to replace the old version of uiwieb View; for the first request sent by the web page end to the client, the WKWeb View does not allow the first request to carry corresponding user data, and the web page loading of the web page end is affected.
Fig. 5 is a schematic flow chart of an alternative method for sharing user data provided by an embodiment of the present disclosure, where the client is exemplified by a short video client, and the operating system is exemplified by an IOS8.0 version operating system, as shown in fig. 5, and the alternative flow chart of the method for sharing user data provided by the embodiment of the present disclosure includes the following steps:
step 501: and the client receives the request sent by the webpage end.
Step 502: and analyzing the received request information and judging the type of the request.
Step 503: whether the request type is a cross-page request is determined, if so, step 504 is executed, and if not, step 505 is executed.
Step 504: extracting corresponding user data through a public process pool corresponding to the webpage plug-in of the webpage end; and injecting the extracted user data into the target page corresponding to the cross-page request.
Step 505: and judging whether the request type is a request which does not carry user data, if so, executing step 506, otherwise, executing step 507.
Step 506: and rewriting the Request by a load Request method provided by a webpage plug-in WKWEB View, and adding user data required by a target webpage into header information of the Request to form a Request carrying the user data.
Step 507: and canceling the webpage loading, and carrying out error prompt by the client.
In some embodiments of the present disclosure, taking IOS operating systems as an example, in IOS8.0 and above versions of operating systems, a new version of Web View, i.e., WKWeb View, is provided to replace the old version of UI Web View; for a cross-page request sent by a webpage end to the client, when WKWEb Vie w is started, the cross-page request cannot carry user data, the loading process of the webpage end is affected, and corresponding user data is extracted from a public process pool corresponding to the webpage plug-in through the technical scheme shown in the embodiment; the extracted user data is injected into the target page, so that the loading speed of the webpage end can be effectively improved while the target page is prevented from failing to load due to lack of user data, and smooth execution of the cross-page request is ensured; for the case of enabling the WKWeb View, since the WKWeb View does not allow the first Request to carry the corresponding user data, and also affects the case of loading the web page at the web page end, by the technical scheme shown in the embodiment, the Request is rewritten by the load Request method provided by the web page plug-in WKWeb View, the user data required by the target web page is added to the header information of the Request, so as to form the Request carrying the user data, and the problem that the page at the web page end cannot be loaded due to the lack of the user data in the first Request can be avoided.
Fig. 6 is a schematic diagram of an alternative use process of the user data sharing method provided by the embodiment of the present disclosure, where the client is a client of a short video application, as shown in the drawing, a user wants to skip from a personal page of a host to a personal page of a host in a short video viewing page, and an operating system running on the client is an IOS system. As shown in fig. 6, in the operating system of IOS8.0 and above, a new version of Web View, i.e., WKWeb View, is provided to replace the old version of UIWeb View; when the WKWeb View is adopted, because the web page end sends a cross-page request to the client in the process of jumping from the private page of the host a to the private page of the host B in the short video viewing page, and the private page of the host B and the private page of the host a belong to pages of different levels, corresponding user data can be extracted from a public process pool by using the technical scheme shown in the embodiment; and the extracted user data is injected into the private page of the target B anchor so as to ensure the normal loading of the private page of the B anchor and the smooth execution of the cross-page request.
Fig. 7 is a schematic diagram of an alternative data structure of a container for storing user data provided by an embodiment of the present disclosure. Includes a container Header (Box Header) and container Data (Box Data) filled with binary Data for expressing various information.
The container header includes a size (size) indicating the length the container occupies in the media file and a type (type) indicating the type of container in which all web pages under the same hierarchical page may share user data. The container data portion may store specific data, where the container is referred to as a "data container", and the container data portion may further encapsulate other types of containers, where the container is referred to as a "container of containers".
It will be apparent to those skilled in the art that embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the disclosed embodiments may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present disclosure may take the form of a computer program product on one or more computer-usable storage media (including disk storage, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present disclosure are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. 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 operations. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the operations performed by the processor of the computer or other programmable data processing apparatus produce a server for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program operations may also be stored in a computer readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the operations stored in the computer readable memory produce an article of manufacture including an operation server which implements the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program operations may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the operations performed on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the preferred embodiments of the present disclosure is not intended to limit the scope of the present disclosure, but is intended to cover any modifications, equivalents, and improvements within the spirit and principles of the present disclosure.
Claims (10)
1. A method for sharing user data, the method being used in a client, the method comprising:
the client receives a request sent by a webpage end;
analyzing the received request information and judging the type of the request;
when the request type is a cross-page request, processing user data required by the cross-page request through a public process pool corresponding to a webpage plug-in of the webpage end so as to realize sharing of the user data;
the processing the user data required by the cross-page request through the public process pool corresponding to the webpage plug-in of the webpage end comprises the following steps:
analyzing a target page corresponding to the cross-page request;
the webpage end jumps to the target page, and when the user data is not stored in a container corresponding to the target page, corresponding user data is extracted from a public process pool corresponding to the webpage plug-in;
and injecting the extracted user data into the target page.
2. The method according to claim 1, wherein the method further comprises:
when the webpage plug-in monitors that user data appear in the webpage of the webpage end, the monitored user data are stored in a container corresponding to the webpage end, wherein the container corresponds to different webpage levels, and the webpages of the same level can share the user data in the container.
3. The method according to claim 2, wherein the storing the monitored user data in a container corresponding to the web page end comprises:
classifying the monitored user data;
and encrypting the secret data in the user data to realize classified storage of the user data in the container.
4. The method according to claim 1, wherein the method further comprises:
when the request type is a request that does not carry user data,
and rewriting the request through a webpage plug-in of the webpage end, and adding the user data into the head information of the request to form a request carrying the user data.
5. A user data sharing apparatus for use in a client, the apparatus comprising:
the transmission module is used for receiving the request sent by the webpage end;
the processing module is used for analyzing the received request information and judging the type of the request;
the processing module is used for processing user data required by the cross-page request through a public process pool corresponding to the webpage plug-in of the webpage end when the request type is the cross-page request so as to realize sharing of the user data;
the processing module is used for analyzing a target page corresponding to the cross-page request;
the processing module is used for jumping to the target page by the webpage end, and extracting corresponding user data from a public process pool corresponding to the webpage plug-in when the user data is not stored in a container corresponding to the target page;
and the processing module is used for injecting the extracted user data into the target page.
6. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
the processing module is used for storing the monitored user data in a container corresponding to the webpage end when the webpage plug-in monitors that the user data appears in the webpage of the webpage end,
wherein the containers correspond to different levels of web pages, and web pages of the same level can share user data in the containers.
7. The apparatus of claim 6, wherein the device comprises a plurality of sensors,
the processing module is used for classifying the monitored user data;
the processing module is used for carrying out encryption processing on the secret data in the user data so as to realize classified storage of the user data in the container.
8. The apparatus of claim 5, wherein the device comprises a plurality of sensors,
and the processing module is used for rewriting the request through a webpage plug-in of the webpage end when the request type is a request without carrying user data, and adding the user data into the header information of the request to form the request with the user data.
9. A mobile terminal, comprising:
a memory for storing executable instructions;
a processor configured to implement the user data sharing method according to any one of claims 1 to 4 when executing the executable instructions.
10. A storage medium storing executable instructions which, when executed, are adapted to implement the user data sharing method of any one of claims 1 to 4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811617724.5A CN111382381B (en) | 2018-12-28 | 2018-12-28 | User data sharing method and device, mobile terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811617724.5A CN111382381B (en) | 2018-12-28 | 2018-12-28 | User data sharing method and device, mobile terminal and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111382381A CN111382381A (en) | 2020-07-07 |
CN111382381B true CN111382381B (en) | 2023-07-11 |
Family
ID=71216503
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811617724.5A Active CN111382381B (en) | 2018-12-28 | 2018-12-28 | User data sharing method and device, mobile terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111382381B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114079653B (en) * | 2021-11-17 | 2023-10-20 | 抖音视界有限公司 | Communication method, device, computer equipment and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015123891A1 (en) * | 2014-02-24 | 2015-08-27 | 华为技术有限公司 | Multi-page management method and device |
WO2016032480A1 (en) * | 2014-08-28 | 2016-03-03 | Hewlett Packard Enterprise Development Lp | Cross-domain information management |
CN105843814A (en) * | 2015-01-14 | 2016-08-10 | 阿里巴巴集团控股有限公司 | Method, device, and system for generating page |
CN105808360B (en) * | 2016-02-26 | 2019-02-15 | 浪潮通用软件有限公司 | Portlet communication method based on shared message |
US10498850B2 (en) * | 2016-12-20 | 2019-12-03 | General Electric Company | Cross-domain context sharing engine |
CN108572965B (en) * | 2017-03-08 | 2020-03-31 | 阿里巴巴集团控股有限公司 | Resource loading method and device |
-
2018
- 2018-12-28 CN CN201811617724.5A patent/CN111382381B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111382381A (en) | 2020-07-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109710870A (en) | Loading method, device, electronic equipment and the readable storage medium storing program for executing of the H5 page | |
US20120317172A1 (en) | Mobile web app infrastructure | |
CN111555940B (en) | Client test method and device, electronic equipment and computer readable storage medium | |
US20220094758A1 (en) | Method and apparatus for publishing video synchronously, electronic device, and readable storage medium | |
CN111367516B (en) | Application interface generation method and device and electronic equipment | |
CN112269959B (en) | Control method and device for display content, readable medium and electronic equipment | |
US11861381B2 (en) | Icon updating method and apparatus, and electronic device | |
CN111930973A (en) | Multimedia data playing method and device, electronic equipment and storage medium | |
CN110865846B (en) | Application management method, device, terminal, system and storage medium | |
CN111177634A (en) | Multi-language supporting file content loading method, device, equipment and medium | |
CN112905281A (en) | View display method and device, electronic equipment and storage medium | |
CN111382381B (en) | User data sharing method and device, mobile terminal and storage medium | |
CN112558933B (en) | Component rendering method and device, readable medium and electronic equipment | |
CN111460432B (en) | On-line document authority control method, device, equipment and computer readable medium | |
CN111083145A (en) | Message sending method and device and electronic equipment | |
CN111381898B (en) | Interface calling method and device, mobile terminal and storage medium | |
CN111552531B (en) | Page display method, device, terminal and storage medium | |
CN111008178B (en) | Data processing method, device, electronic equipment and computer readable storage medium | |
CN111240738B (en) | File processing method, device, equipment and medium | |
CN111324386B (en) | Method and device for starting split application program, electronic equipment and storage medium | |
CN111381897B (en) | Interface calling method and device, mobile terminal and storage medium | |
CN111382378B (en) | Resource loading method and device, mobile terminal and storage medium | |
CN111310175A (en) | iOS application safety monitoring and protecting method and device based on plug-in | |
CN111367590A (en) | Interrupt event processing method and device | |
CN111796802B (en) | Function package generation method and device 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |