Webpage classification method, electronic equipment and storage medium

By obtaining and comparing the request key-value pairs in the initial cookie data of the web page, the problem of the inability to classify the web page by the browser that opens the web page in the prior art is solved, and effective classification of classified web pages is realized to meet user needs.

CN119003902AActive Publication Date: 2024-11-22ZHEJIANG MEIRI HUDONG NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411229459.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-11-22
Estimated Expiration
2044-09-03

AI Technical Summary

Technical Problem

The prior art lacks a method of classifying web pages by browsers that open web pages, and cannot meet user needs.

Method used

By obtaining the initial cookie data of the web page to be classified, the initial request key-value pair is extracted, and it is compared with the target request key-value pair. After deduplication processing, the web page to be classified is classified according to the browser to be opened.

Benefits of technology

It realizes the classification of web pages to be classified according to the browser they are opened to meet user needs and provides a method to meet user classification needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003902A_ABST
    Figure CN119003902A_ABST
Patent Text Reader

Abstract

The invention provides a webpage classification method, electronic equipment and a storage medium, and the method can obtain initial Cookie data corresponding to a to-be-classified webpage ID, the initial Cookie data comprises an initial request key value pair, the initial request key value pair is used as a key request key value to further obtain a target request key value pair, and the target request key value pair is used as a target request key value; and when the initial request key value pair is the same as the target request key value pair, taking the to-be-classified webpage corresponding to the to-be-classified webpage ID corresponding to the initial request key value pair as the target webpage corresponding to the browser corresponding to the target request key value pair. According to the method, a plurality of to-be-classified web pages can be classified according to opened browsers so as to obtain target web pages corresponding to the browsers, and when the requirement of a user is that the web pages are classified according to the browsers which open the web pages, the user requirement can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a web page classification method, electronic equipment and storage medium. Background Art

[0002] Classifying web pages can enable users to further understand the relevant information of the web pages, so that users can adjust and optimize the web pages. In the prior art, classifying web pages requires selecting a corresponding classification method according to user needs to classify the web pages to be classified. The classification methods in the prior art include: classification by content theme of the web pages; classification by function and purpose of the web pages; classification by user interactivity of the web pages; classification by technical implementation of the web pages; classification by business model of the web pages; classification by target audience of the web pages; classification by information update frequency of the web pages; classification by design and layout of the web pages; classification by source of web page content; classification by region and service scope of the web pages; classification by browser type of the browser that opens the web pages. However, the above methods also have the following technical problems: in the prior art, web pages are only classified by the browser type of the browser that opens the web pages, and there is no method for classifying web pages by the browser that opens the web pages. When the user's demand is to classify the web pages by the browser that opens the web pages, the user's demand cannot be met. Summary of the invention

[0003] In view of the above technical problems, the technical solution adopted by the present invention is:

[0004] According to a first aspect of the present invention, a web page classification method is provided, the method is used to classify a number of web pages to be classified according to the browsers in which they are opened to obtain target web pages corresponding to the browsers, the method comprising the following steps:

[0005] S1. Obtain a list of web page IDs to be classified A = {A1, A2, ..., A i , ..., A m}, where A i is the web page ID of the i-th web page to be classified, the value of i ranges from 1 to m, and m is the number of web pages to be classified.

[0006] S2, obtain the initial Cookie data list B corresponding to A = {B1, B2, ..., B i , ..., B m}, where B i A iThe corresponding initial Cookie data includes the initial request key-value pair. The initial Cookie data corresponding to the ID of the web page to be classified is the data in the Cookie returned by the target server to the target SDK after the target server receives the request sent to the target server by the target SDK corresponding to the web page to be classified corresponding to the ID of the web page to be classified.

[0007] S3, B i The initial request key-value pair in A i The corresponding key request key-value pair C i To obtain the key request key-value pair list C corresponding to A = {C1, C2, ..., C i , ..., C m}.

[0008] S4. Perform deduplication processing on C to obtain a target request key-value pair list D = {D1, D2, ..., D j , ..., D n}, where D j It is the jth target request key-value pair, where the value of j ranges from 1 to n, n is the number of target request key-value pairs, and each target request key-value pair corresponds to a browser.

[0009] S5, when C i =D j When C i The corresponding A i The corresponding web page to be classified is D j The corresponding browser corresponds to the target web page and A i as the target web page ID of the target web page to obtain a target web page ID list set E = {E1, E2, ..., E j ,……,E n}, E j ={E j1 , E j2 ,……,E jk ,……,E jt(j)}, where E j D j The corresponding browser corresponding to the target web page ID list, E jk D j The target webpage ID of the kth target webpage corresponding to the corresponding browser, k ranges from 1 to t(j), t(j) is D j The number of target web pages corresponding to the corresponding browser.

[0010] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the aforementioned method.

[0011] According to a third aspect of the present invention, there is provided an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the aforementioned method when executing the computer program.

[0012] The present invention has at least the following beneficial effects:

[0013] The present invention provides a web page classification method, an electronic device and a storage medium. The method can obtain initial Cookie data corresponding to a web page ID to be classified, the initial Cookie data includes an initial request key-value pair, and the initial request key-value pair is used as a key request key value to further obtain a target request key-value pair. When the initial request key-value pair is the same as the target request key-value pair, the web page to be classified corresponding to the web page ID to be classified corresponding to the initial request key-value pair is used as the target web page corresponding to the browser corresponding to the target request key-value pair. It can be seen that the method can classify several web pages to be classified according to the browsers in which they are opened to obtain the target web pages corresponding to the browsers. When the user's demand is to classify the web pages according to the browsers that open the web pages, the user's demand can be met. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0015] Figure 1 The present invention provides a flowchart of a web page classification method. DETAILED DESCRIPTION

[0016] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0017] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar tasks, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0018] An embodiment of the present invention provides a web page classification method, which is used to classify a plurality of web pages to be classified according to the browsers in which they are opened to obtain a target web page corresponding to the browser. The target web page corresponding to the browser can be understood as the web page to be classified opened by the browser among the plurality of web pages to be classified. The method comprises the following steps: Figure 1 As shown:

[0019] S1. Obtain a list of web page IDs to be classified A = {A1, A2, ..., A i , ..., A m}, where A i is the web page ID of the i-th web page to be classified, the value of i ranges from 1 to m, and m is the number of web pages to be classified.

[0020] Specifically, the web page ID to be classified is a unique identification mark of the web page to be classified. Those skilled in the art know that the web page to be classified is a web page predetermined by those skilled in the art according to actual needs, and will not be described in detail here.

[0021] S2, obtain the initial Cookie data list B corresponding to A = {B1, B2, ..., B i , ..., B m}, where B i A i The corresponding initial Cookie data includes the initial request key-value pair. The initial Cookie data corresponding to the web page ID to be classified is the data in the Cookie returned by the target server to the target SDK after the target server receives the request sent to the target server by the target SDK corresponding to the web page to be classified corresponding to the web page ID to be classified. Cookie is a simple text file saved in the client, which can be understood as cached data.

[0022] Specifically, the target SDK is an SDK (Software Development Kit) that is integrated in the web page to be classified and can send a request to the target server when the web page to be classified is opened by a browser.

[0023] Specifically, the target server is a server that interacts with the target SDK to provide services, data or functions.

[0024] Specifically, the initial request key-value pair includes a request name and a request address.

[0025] Specifically, the initial Cookie data corresponding to the web page to be classified ID is stored in the Cookie data storage space corresponding to the browser that opens the web page to be classified corresponding to the web page to be classified ID. Among them, those skilled in the art know that the Cookie data storage space corresponding to the browser is determined by those skilled in the art according to actual needs, and will not be repeated here. For example: the Cookie data storage space corresponding to the browser can be a storage area dedicated to the browser, a folder set by the user using the browser, or a memory.

[0026] Furthermore, if no initial Cookie data is stored in the Cookie data storage space corresponding to the browser before the web page to be classified is opened by the browser, then the request name of the initial request key-value pair in the initial Cookie data corresponding to the web page to be classified ID is the request name of the request sent by the target SDK corresponding to the web page to be classified to the target server when the web page to be classified is opened by the browser, and the request address of the initial request key-value pair in the initial Cookie data corresponding to the web page to be classified ID is the request address of the request sent by the target SDK corresponding to the web page to be classified to the target server when the web page to be classified is opened by the browser; the fact that no initial Cookie data is stored in the Cookie data storage space corresponding to the browser before the web page to be classified is opened by the browser can be understood as: the browser has not opened any web page before opening the web page to be classified or the data in the Cookie data storage space corresponding to the browser is cleared before the browser opens the web page to be classified.

[0027] Furthermore, if at least one initial Cookie data is stored in the Cookie data storage space corresponding to the browser before the web page to be classified is opened by the browser, then when the web page to be classified is opened by the browser, the request sent by the target SDK corresponding to the web page to be classified to the target server includes an initial request key-value pair in any initial Cookie data in the Cookie data storage space, and uses the initial request key-value pair as the initial request key-value pair in the initial Cookie data corresponding to the web page to be classified ID corresponding to the web page to be classified; at least one initial Cookie data is stored in the Cookie data storage space corresponding to the browser before the web page to be classified is opened by the browser, which can be understood as: the browser has opened at least one web page before opening the web page to be classified and the data in the Cookie data storage space corresponding to the browser has not been cleared before the browser opens the web page to be classified.

[0028] Optionally, the request sent by the target SDK corresponding to the web page to be classified to the target server is used to load a blank image in the browser that opens the web page to be classified.

[0029] Specifically, the request names and request addresses of the requests sent by the target SDK corresponding to two to-be-classified web pages opened by different browsers to the target server are different; it can be understood that: if to-be-classified web page 1 is opened by browser 1, and to-be-classified web page 2 is opened by browser 2, then the request name and request address of the request sent by the target SDK in to-be-classified web page 1 to the target server and the request name and request address of the request sent by the target SDK in to-be-classified web page 2 to the target server are different, and further, the initial request key-value pair in the initial Cookie data corresponding to the to-be-classified web page ID corresponding to to-be-classified web page 1 is different from the initial request key-value pair in the initial Cookie data corresponding to the to-be-classified web page ID corresponding to to-be-classified web page 1.

[0030] S3, B i The initial request key-value pair in A i The corresponding key request key-value pair C i To obtain the key request key-value pair list C corresponding to A = {C1, C2, ..., C i , ..., C m}.

[0031] S4. Perform deduplication processing on C to obtain a target request key-value pair list D = {D1, D2, ..., D j , ..., D n}, where D jis the j-th target request key-value pair, the value of j is 1 to n, n is the number of target request key-value pairs, each target request key-value pair corresponds to a browser and the two browsers corresponding to any two target request key-value pairs are different. Those skilled in the art know that any deduplication processing method in the prior art belongs to the protection scope of the present invention and will not be repeated here.

[0032] Specifically, the target request key-value pair is the same as the initial request key-value pair in any initial Cookie data stored in the Cookie data storage space corresponding to the browser corresponding to the target request key-value pair.

[0033] S5, when C i =D j When C i The corresponding A i The corresponding web page to be classified is D j The corresponding browser corresponds to the target web page and A i as the target web page ID of the target web page to obtain a target web page ID list set E={E1, E2, . . . , E j ,……,E n}, E j ={E j1 , E j2 ,……,E jk ,……,E jt(j)}, where E j D j The corresponding browser corresponding to the target web page ID list, E jk D j The target webpage ID of the kth target webpage corresponding to the corresponding browser, k ranges from 1 to t(j), t(j) is D j The number of target web pages corresponding to the corresponding browser.

[0034] Through the above steps, the initial Cookie data corresponding to the ID of the web page to be classified is obtained, and the initial Cookie data includes an initial request key-value pair. The initial request key-value pair is used as the key request key value to further obtain the target request key-value pair. When the initial request key-value pair is the same as the target request key-value pair, the web page to be classified corresponding to the web page ID to be classified corresponding to the initial request key-value pair is used as the target web page corresponding to the browser corresponding to the target request key-value pair. Several web pages to be classified can be classified according to the browsers in which they are opened to obtain the target web pages corresponding to the browsers. When the user's demand is to classify the web pages according to the browsers that open the web pages, the user's demand can be met.

[0035] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store a computer program related to a method in a method embodiment, and the computer program is loaded and executed by the processor to implement the method provided in the above embodiment.

[0036] An embodiment of the present invention further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in the above embodiment when executing the computer program.

[0037] An embodiment of the present invention further provides a computer program product, which includes program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.

[0038] The present invention provides a web page classification method, an electronic device and a storage medium. The method can obtain initial Cookie data corresponding to a web page ID to be classified, the initial Cookie data includes an initial request key-value pair, and the initial request key-value pair is used as a key request key value to further obtain a target request key-value pair. When the initial request key-value pair is the same as the target request key-value pair, the web page to be classified corresponding to the web page ID to be classified corresponding to the initial request key-value pair is used as the target web page corresponding to the browser corresponding to the target request key-value pair. It can be seen that the method can classify several web pages to be classified according to the browsers in which they are opened to obtain the target web pages corresponding to the browsers. When the user's demand is to classify the web pages according to the browsers that open the web pages, the user's demand can be met.

[0039] Although some specific embodiments of the present invention have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are only for illustration, not for limiting the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention.

Claims

1. A web page classification method, characterized in that: The method is used to classify a plurality of web pages to be classified according to the browsers in which they are opened to obtain target web pages corresponding to the browsers, and the method comprises the following steps: S1. Obtain a list of web page IDs to be classified A = {A1, A2, ..., A i ,……,A m }, where A i is the ID of the i-th web page to be classified, i ranges from 1 to m, and m is the number of web pages to be classified; S2. Get the initial Cookie data list B corresponding to A = {B1, B2, ..., B i ,……,B m }, where B i A i The corresponding initial cookie data includes the initial request key-value pair. The initial cookie data corresponding to the ID of the web page to be classified is the data in the cookie returned by the target server to the target SDK after the target server receives the request sent by the target SDK corresponding to the web page to be classified corresponding to the ID of the web page to be classified. S3, B i The initial request key-value pair in A i Corresponding key request key-value pair C i To obtain the key request key-value pair list C corresponding to A = {C1, C2, ..., C i ,……,C m }; S4. De-duplicate C to obtain a target request key-value pair list D = {D1, D2, ..., D j ,……,D n }, where D j The jth target request key-value pair, where j ranges from 1 to n, and n is the number of target request key-value pairs. Each target request key-value pair corresponds to a browser. S5, when C i =D j When C i Corresponding A i The corresponding web page to be classified is D j The corresponding browser corresponds to the target web page and A i As the target web page ID of the target web page, obtain a target web page ID list set E={E1, E2, . . . , E j ,……,E n }, E j ={E j1 , E j2 ,……,E jk ,……,E jt(j) }, where E j D j The target web page ID list corresponding to the browser, E jk D j The target webpage ID of the kth target webpage corresponding to the corresponding browser, k ranges from 1 to t(j), t(j) is D j The number of target web pages corresponding to the corresponding browser.

2. The web page classification method according to claim 1, characterized in that: The initial request key-value pair includes the request name and the request address.

3. The web page classification method according to claim 2, characterized in that: The initial Cookie data corresponding to the ID of the web page to be classified is stored in the Cookie data storage space corresponding to the browser that opens the web page to be classified corresponding to the ID of the web page to be classified.

4. The web page classification method according to claim 3, characterized in that: If no initial cookie data is stored in the cookie data storage space corresponding to the browser before the web page to be classified is opened by the browser, then the request name of the initial request key-value pair in the initial cookie data corresponding to the web page to be classified ID is the request name of the request sent by the target SDK corresponding to the web page to be classified to the target server when the web page to be classified is opened by the browser, and the request address of the initial request key-value pair in the initial cookie data corresponding to the web page to be classified ID is the request address of the request sent by the target SDK corresponding to the web page to be classified to the target server when the web page to be classified is opened by the browser.

5. The web page classification method according to claim 3, characterized in that: If at least one initial cookie data is stored in the cookie data storage space corresponding to the browser before the web page to be classified is opened by the browser, then when the web page to be classified is opened by the browser, the request sent by the target SDK corresponding to the web page to be classified to the target server includes the initial request key-value pair in any initial cookie data in the cookie data storage space, and uses the initial request key-value pair as the initial request key-value pair in the initial cookie data corresponding to the web page to be classified ID corresponding to the web page to be classified.

6. The web page classification method according to claim 3, characterized in that: The target request key-value pair is identical to the initial request key-value pair in any initial cookie data stored in the cookie data storage space corresponding to the browser corresponding to the target request key-value pair.

7. The web page classification method according to claim 1, characterized in that: The ID of the web page to be classified is the unique identification of the web page to be classified.

8. The web page classification method according to claim 1, characterized in that: The key-value pairs of any two target requests are not the same for any two browsers.

9. A non-transitory computer-readable storage medium, characterized in that The storage medium stores a computer program, which is loaded and executed by a processor to implement the web page classification method according to any one of claims 1 to 8.

10. An electronic device comprising: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements the web page classification method according to any one of claims 1 to 8 when executing the computer program.

Citation Information

Patent Citations

  • Control method and device for browser skipping to application program

    CN106528657A

  • Data processing method and device for switching browser kernel, terminal and storage medium

    CN109634753A

  • Multi-phase IP-flow-based classifier with domain name and HTTP header awareness

    US20160323186A1

  • Cross-application data sharing

    US20190114216A1