CN116127945A - Network link processing method and device, electronic equipment and storage medium - Google Patents

Network link processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116127945A
CN116127945A CN202211674049.6A CN202211674049A CN116127945A CN 116127945 A CN116127945 A CN 116127945A CN 202211674049 A CN202211674049 A CN 202211674049A CN 116127945 A CN116127945 A CN 116127945A
Authority
CN
China
Prior art keywords
link
data
data request
information source
accessed
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.)
Pending
Application number
CN202211674049.6A
Other languages
Chinese (zh)
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.)
Shenzhen Zhonghong Online Co ltd
Original Assignee
Shenzhen Zhonghong Online 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 Shenzhen Zhonghong Online Co ltd filed Critical Shenzhen Zhonghong Online Co ltd
Priority to CN202211674049.6A priority Critical patent/CN116127945A/en
Publication of CN116127945A publication Critical patent/CN116127945A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/186Templates

Abstract

The embodiment of the application provides a network link processing method and device, electronic equipment and a storage medium, and relates to the technical field of Internet. The method comprises the following steps: acquiring a link to be accessed and a keyword field; screening a preset information source database according to the links to be accessed and the keyword fields to obtain a selected information source; screening a preset analysis template database according to the selected information source to obtain a selected analysis template; analyzing the link to be accessed according to the selected analysis template to obtain a target data request; and sending the target data request to the link to be accessed to obtain target link data. In the embodiment of the application, the obtained target data request is paired with the information source, so that the integrity of acquiring the link data can be improved.

Description

Network link processing method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of internet technologies, and in particular, to a network link processing method and apparatus, an electronic device, and a storage medium.
Background
In general, in the case of a web link to an article, access to the web link is required to acquire link data of the article. The link data includes the title of the article, the release time of the article, the release author of the article, the body of the article, and the like. However, due to the limitation of the network link, it is highly likely that relatively complete link data cannot be obtained by directly accessing the network link, for example, some network links need to be charged for viewing the text of the article, so that the obtained text of the linked article is not complete. Therefore, how to provide a network link processing method, which can improve the integrity of the acquired link data, is a technical problem to be solved.
Disclosure of Invention
The main purpose of the embodiments of the present application is to provide a network link processing method and apparatus, an electronic device, and a storage medium, which can improve the integrity of acquired link data.
To achieve the above object, a first aspect of an embodiment of the present application provides a network link processing method, where the method includes:
acquiring a link to be accessed and a keyword field;
screening a preset information source database according to the links to be accessed and the keyword fields to obtain a selected information source;
screening a preset analysis template database according to the selected information source to obtain a selected analysis template;
analyzing the link to be accessed according to the selected analysis template to obtain a target data request;
and sending the target data request to the link to be accessed to obtain target link data.
In some embodiments, screening a preset information source database according to the link to be accessed and the keyword field to obtain a selected information source, including:
if the keyword field is an empty field, performing domain name resolution on the link to be accessed to obtain a link domain name;
screening the information source database according to the link domain name to obtain the selected information source; wherein the information source database includes matching information linking domain names with selected information sources.
In some embodiments, screening a preset information source database according to the link to be accessed and the keyword field to obtain a selected information source, including:
if the keyword field is a non-null field, extracting keywords from the keyword field;
performing similarity calculation according to the keywords and the names of each information source of the information source database to obtain similarity;
and obtaining the selected information source according to the information sources with the similarity meeting the preset similarity condition.
In some embodiments, parsing the link to be accessed according to the selected parsing template to obtain a target data request includes:
identifying the request parameters of the link to be accessed to obtain an information identification code; the information identification code is used for representing the identification of the target link data corresponding to the link to be accessed;
screening a preset data request database according to the information identification code to obtain the target data request; the data request database comprises information identification codes and matching information of the target data request, and the target data request is used for requesting to acquire the link data to be accessed.
In some embodiments, before the screening the preset data request database according to the information identification code to obtain the target data request, the method further includes:
the creating of the data request database specifically comprises:
acquiring at least one initial data request of a preset information source;
and carrying out parameter modification on the initial data request to obtain at least one intermediate data request: the parameter modification includes deleting a parameter or modifying a value of a parameter;
sending the intermediate data request to the link to be accessed to obtain intermediate link data;
screening the intermediate data request of which the integrity of the intermediate link data meets a preset integrity condition to obtain the target data request;
and obtaining the data request database according to the target data request.
In some embodiments, before the screening the intermediate data request with the integrity of the intermediate link data meeting a preset integrity condition, the method further includes:
filtering the intermediate data request, specifically including:
any two pieces of intermediate link data are obtained, and first intermediate link data and second intermediate link data are obtained;
comparing the data volume of the first intermediate link data with the data volume of the second intermediate link data to obtain a comparison result;
deleting the intermediate data request corresponding to the first intermediate link data or deleting the intermediate data request corresponding to the second intermediate link data according to the comparison result.
In some embodiments, deleting the intermediate data request corresponding to the first intermediate link data or deleting the intermediate data request corresponding to the second intermediate link data according to the comparison result includes:
if the comparison result is that the data volume of the first intermediate link data is larger than or equal to the data volume of the second intermediate link data, deleting the intermediate data request corresponding to the first intermediate link data;
and if the comparison result is that the data volume of the first intermediate link data is smaller than the data volume of the second intermediate link data, deleting the intermediate data request corresponding to the second intermediate link data.
To achieve the above object, a second aspect of the embodiments of the present application proposes a network link processing apparatus, including:
the acquisition module is used for acquiring the links to be accessed and the keyword fields;
the information source screening module is used for screening a preset information source database according to the links to be accessed and the keyword fields to obtain a selected information source;
the target screening module is used for screening a preset analysis template database according to the selected information source to obtain a selected analysis template;
the analysis module is used for analyzing the link to be accessed according to the selected analysis template to obtain a target data request;
and the sending module is used for sending the target data request to the link to be accessed so as to obtain target link data.
To achieve the above object, a third aspect of the embodiments of the present application proposes an electronic device, which includes a memory and a processor, the memory storing a computer program, the processor implementing the method according to the first aspect when executing the computer program.
To achieve the above object, a fourth aspect of the embodiments of the present application proposes a storage medium, which is a computer-readable storage medium, storing a computer program, which when executed by a processor implements the method described in the first aspect.
According to the network link processing method and device, the electronic equipment and the storage medium, a matched information source is determined according to the links to be accessed and the keyword fields, an analysis template is selected according to the information source, the links with access are analyzed according to the analysis template to obtain a target data request, and then the target data request is sent to the links to be accessed, so that a server to which the links with access belong returns link data according to the target data request, and finally target link data is obtained. In the embodiment of the application, the obtained target data request is paired with the information source, so that the integrity of acquiring the link data can be improved.
Drawings
Fig. 1 is a flowchart of a network link processing method provided in an embodiment of the present application;
FIG. 2 is a schematic diagram of one embodiment of step S101 of FIG. 1;
FIG. 3 is a schematic diagram of another embodiment of step S101 in FIG. 1;
fig. 4 is a flowchart of step S102 in fig. 1;
fig. 5 is a flowchart of step S102 in fig. 1;
fig. 6 is a flowchart of step S104 in fig. 1;
FIG. 7 is a flowchart of a network link processing method according to another embodiment of the present application;
FIG. 8 is a flowchart of a network link processing method according to another embodiment of the present application;
fig. 9 is a block diagram of a network link processing apparatus according to an embodiment of the present application;
fig. 10 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
It should be noted that although functional block division is performed in a device diagram and a logic sequence is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the block division in the device, or in the flowchart. The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
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 application belongs. The terminology used herein is for the purpose of describing embodiments of the present application only and is not intended to be limiting of the present application.
First, the nouns referred to in this application are parsed:
uniform resource locator (Uniform Resource Locator, URL): each web page on the network (Internet) has a unique name identification, commonly referred to as a URL. It is a uniform resource locator of a web page, simply referred to as a URL, which is a web page (web) address, commonly known as a "web site". The web links referred to in the embodiments of the present application are URLs, also referred to as link addresses, or web page addresses.
The URL typically starts with http:// or https:// and the basic URL contains, for example, protocol type, domain name, path and parameters, etc. Protocol types such as http or https, where http is the hypertext transfer protocol (HyperText Transfer Protocol), https is the hypertext transfer security protocol (Hyper Text Transfer Protocol over Secure Socket Layer), and https is the hypertext transfer protocol transferred using the secure socket layer. The httphsearer parameter includes the operation parameters of the http request and response. Domain name, path, parameters, etc., the parameters including parameters of the requested data.
In general, in the case of taking a web link to an article, if it is desired to acquire link data of the article: the title of the article, the time of release of the article, the author of release of the article, the text of the article, etc. generally need to go to a browser to check whether the network link is valid or not, and manually search the link data of the linked article. But some web links look at the text of the article and charge is required, the text of the article will be missing from the link data. Therefore, how to provide a network link processing method, which can improve the integrity of the acquired link data, is a technical problem to be solved.
In addition, when the network link is obtained, whether the link is effective or not can be manually verified, if so, the article data information is judged, and when different information sources (websites and APP) are inspected, a great deal of manpower is required for the inspection, and the inspection efficiency is low. Therefore, the embodiment of the application can improve the efficiency of verifying the validity of the network link besides improving the integrity of the acquired link data.
The technical scheme of the embodiment of the application is mainly suitable for a master-slave architecture, namely a communication network of a client and a server architecture, wherein the client can send a request to the server and receive data returned by the server. The client may be, for example, an APP installed on the user device. The user equipment can be various smart phones, tablet computers and the like. The server may be, for example, a computer server.
The network link processing method provided by the embodiments of the present application can be used in a number of general-purpose or special-purpose computer system environments or configurations. For example: server computers, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments of the present application provide a network link processing method, a network link processing apparatus, an electronic device, and a storage medium, and specifically, the following description will be given by way of example, first describing the network link processing method in the embodiments of the present application.
According to one embodiment of the present application, a network link processing method is provided.
The network link specifically refers to a URL, and corresponding link data can be obtained by accessing the network link. The process of accessing the network link comprises the steps of obtaining a plurality of data requests according to network link assembly, then sending the plurality of data requests to a server corresponding to the network link, and obtaining link data returned by the server based on the data requests to complete the access process of the network link.
Fig. 1 is an optional flowchart of a network link processing method provided in an embodiment of the present application, which may include, but is not limited to, steps S101 to S105.
Step S101, obtaining a link to be accessed and a keyword field;
step S102, screening a preset information source database according to the links to be accessed and the keyword fields to obtain a selected information source;
step S103, screening a preset analysis template database according to the selected information source to obtain a selected analysis template;
step S104, analyzing the link to be accessed according to the selected analysis template to obtain a target data request;
step S105, a target data request is sent to the link to be accessed to obtain target link data.
Step S101 to step S105 illustrated in the embodiment of the present application, first, determining a matched information source according to a link to be accessed and a keyword field, then selecting an analysis template according to the information source, then analyzing the link with access according to the analysis template to obtain a target data request, and then sending the target data request to the link to be accessed, so that a server to which the link with access belongs returns link data according to the target data request, and finally obtaining target link data. In the embodiment of the application, the analysis efficiency of the link can be improved by determining the analysis template through the information source, and the obtained target data request is paired with the information source, so that the integrity of acquiring the link data can be improved.
Steps S101 to S105 are described in detail below.
In step S101 of some embodiments, the link to be accessed is specifically a URL, which may also be referred to as a network link, a network address, a web page address, or the like. The keyword field is an optional field, which may be a null field or a non-null field. If the keyword field is a null field, indicating that no keyword exists; if the keyword field is a non-null field, the description may extract keywords from the keyword field.
The different scenarios for obtaining the links to be accessed and the keyword fields are described below in connection with fig. 2.
In one embodiment, the user enters a URL into the input box of the verification system, but does not enter a keyword, at which point the verification system will obtain the network link to be accessed and a keyword field, but the keyword field is a null field.
In another embodiment, the user enters a URL and a keyword into an input box of the verification system, at which point the verification system will obtain the network link to be accessed and the keyword field, and the keyword field is a non-null field.
In the case that the user inputs a keyword to the verification system, referring to fig. 3, when the cursor moves to the input box corresponding to the keyword, a plurality of candidate keywords preset by the verification system are displayed. The information sources in the embodiment of the application comprise websites and APP, so that candidate keywords comprise microblogs, present-day headings, knowledge keywords and the like, and one keyword field serving as input can be selected from a plurality of candidate keywords in response to touching or clicking of a user.
In step S102 of some embodiments, a preset information source database is screened according to the links to be accessed and the keyword fields, so as to obtain a selected information source.
Specifically, the information source to which the link belongs can be known from the domain name of the URL, but domain name resolution is required for the URL to obtain the link domain name, and then information source screening is performed for the link domain name to obtain the selected information source.
Referring specifically to fig. 4, step S102 may include, but is not limited to, steps S201 to S202:
step S201, if the keyword field is a null field, carrying out domain name resolution on the link to be accessed to obtain a link domain name;
step S202, screening the information source database according to the link domain name to obtain a selected information source; wherein the information source database includes matching information linking domain names with selected information sources.
In step S201 to step S202 illustrated in the embodiment of the present application, the URL includes a domain name, so that the domain name of the link to be accessed may be resolved, and then the information source matching is performed on the domain name of the link obtained by the resolution, so as to obtain the selected information source.
In another embodiment, considering that the time consumed for performing domain name resolution and information source matching affects the processing efficiency, a keyword field is introduced, and if the keyword field is a non-null field, a keyword is extracted from the keyword field, and an information source corresponding to the keyword is used as a selected information source.
It should be noted that, if the keyword field is a candidate keyword selected by touching or clicking by the user, no information source matching is required, and the selected keyword is used as the selected information source. Alternatively, referring to fig. 5, step S102 further includes, but is not limited to, steps S301 to S303:
step S301, extracting keywords from the keyword field if the keyword field is a non-null field;
step S302, similarity calculation is carried out according to the keywords and the names of each information source of the information source database, and similarity is obtained;
step S303, obtaining the selected information source according to the information sources with the similarity meeting the preset similarity condition.
In the steps S301 to S303 illustrated in the embodiments of the present application, the manner of selecting the information source is determined by the similarity between the keyword and the information source, so that domain name resolution is not required, and the processing efficiency is greatly improved.
In step S302 of some embodiments, the keyword is vectorized to obtain a first vector; vectorizing the names of the information sources to obtain second vectors; and calculating cosine similarity or Euclidean distance according to the first vector and the second vector to obtain similarity.
In step S303 of some embodiments, the selected information source is obtained according to the information source with the greatest similarity.
In step S103 of some embodiments, a preset parsing template database is screened according to the selected information source to obtain a selected parsing template. Specifically, the parsing template database includes a plurality of candidate parsing templates, and matching information of each candidate parsing template and an information source. After the selected information source is obtained in step S102, the parsing template database is screened according to the selected information source, which is actually searching for matching information, and finding out the candidate parsing template paired with the selected information source, thereby obtaining the selected parsing template.
In step S104 of some embodiments, the link to be accessed is parsed according to the selected parsing template, resulting in a target data request.
Referring to fig. 6, step S104 includes, but is not limited to, steps S401 to S402:
step S401, identifying request parameters of a link to be accessed to obtain an information identification code; the information identification code is used for representing the identification of target link data of the link data to be accessed;
step S402, screening a preset data request database according to the information identification code to obtain a target data request; the data request database comprises matching information of the information identification code and a target data request, wherein the target data request is used for requesting to acquire target link data.
In this embodiment of the present application, each URL of the links to be accessed has a corresponding request parameter, where the request parameter is used to indicate an information identifier to be acquired, and the information identifier may indicate which target link data is specifically acquired. For example, in the case that the information source is a today's top, the URL unique identifier, that is, the information identifier referred to in the embodiment of the present application, may be obtained from the URL link to be accessed, so that it is known which article is obtained or which video is obtained. The data request database comprises a plurality of candidate data requests and matching information of the information identification codes and the candidate data requests. And screening candidate data requests of the data request database according to the information identification code to obtain target data requests. Then, by sending the target data request, the target link data can be obtained.
Referring to fig. 7, before step S402, the network link processing method provided in the embodiment of the present application further includes:
the data request database is created, specifically including steps S501 to S505:
step S501, at least one initial data request of a preset information source is obtained;
step S502, performing parameter modification on the initial data request to obtain at least one intermediate data request: parameter modification includes deleting a parameter or modifying a value of a parameter;
step S503, the intermediate data request is sent to the link to be accessed to obtain intermediate link data;
step S504, screening the intermediate data request with the integrity of the intermediate link data conforming to the preset integrity condition to obtain a target data request;
step S505, a data request database is obtained according to the target data request.
In step S501 to step S505 illustrated in the embodiment of the present application, at least one initial data request of a preset information source is acquired by a packet capturing tool, and a designated link is accessed according to the initial data request, so that corresponding link data is received. However, the parameters can be deleted and the values of the parameters can be modified for the initial data request to obtain the intermediate data request, considering that redundant parameters exist in the separate initial data request or the values of the parameters are dynamically changed. And sending the obtained multiple intermediate data requests to the link to be accessed so as to receive the returned intermediate link data. And determining the target data request according to the integrity of the intermediate link data. It will be appreciated that the higher the integrity of the intermediate link data, the easier the corresponding intermediate link data is selected as the target data request. And finally, matching the target data request with the information type, and storing the matched information type into a database to finally obtain a data request database.
It should be noted that, in step S504, if the integrity of the intermediate link data meets the preset integrity condition, the corresponding intermediate data request may be added to the target data request. In this way, there may be two identical intermediate data requests, both of which can acquire intermediate link data with consistent data, resulting in redundant data requests in the target data request.
Therefore, referring to fig. 8, before step S504, the network link processing method in the embodiment of the present application further includes:
filtering the intermediate data request specifically comprises:
step S601, acquiring any two pieces of intermediate link data to obtain first intermediate link data and second intermediate link data;
step S602, comparing the first intermediate link data with the second intermediate link data to obtain a comparison result;
step S603, deleting the intermediate data request corresponding to the first intermediate link data or deleting the intermediate data request corresponding to the second intermediate link data according to the comparison result.
In step S601 to step S603 illustrated in the embodiment of the present application, considering that the same intermediate data request can obtain the same intermediate link data, filtering the intermediate data request can reduce the number of times of sending the request to the link to be accessed, and improve the communication efficiency.
If the comparison result shows that the data volume of the first intermediate link data is larger than or equal to the data volume of the second intermediate link data, deleting the intermediate data request corresponding to the first intermediate link data;
and if the comparison result shows that the data volume of the first intermediate link data is smaller than the data volume of the second intermediate link data, deleting the intermediate data request corresponding to the second intermediate link data.
Specifically, if the comparison result is that the data volume of the first intermediate link data is equal to the data volume of the second intermediate link data, deleting the intermediate data request corresponding to the first intermediate link data; or if the comparison result shows that the data volume of the first intermediate link data is equal to the data volume of the second intermediate link data, deleting the intermediate data request corresponding to the second intermediate link data.
In some embodiments, considering the size of the parameter number, deleting the intermediate data request with the larger parameter number may include: acquiring an intermediate data request corresponding to the first intermediate link data to obtain a first intermediate data request; acquiring the intermediate data request corresponding to the second intermediate link data to obtain a second intermediate data request; parameter quantity comparison is carried out on the first intermediate data request and the second intermediate data request, and a quantity comparison result is obtained; if the parameter number of the first intermediate data request is greater than or equal to the parameter number of the second intermediate data request, deleting the intermediate data request corresponding to the first intermediate link data; and if the parameter number of the first intermediate data request is smaller than that of the second intermediate data request, deleting the intermediate data request corresponding to the second intermediate link data. Through the steps, the intermediate data requests with smaller parameter number are deleted, and under the condition of reducing the access times, the parameter analysis is reduced, the parameter analysis speed is improved, and the speed of acquiring the connection data is further improved.
In step S105 of some embodiments, a target data request is sent to the link to be accessed to obtain target link data.
It should be noted that the target data request may include one data request to be sent, or may include a plurality of data requests to be sent. Each data request to be sent may include a request header or may include a plurality of request headers. The request header may be a User-Agent, cookie, token, host, etc.
1. Obtaining target link data by sending a data request to be sent to obtain all data information in the link, wherein the method specifically comprises the following steps:
1) The data request with the request header added to the most basic User-Agent request header can access the link to be accessed, and all required data fields of the data information can be obtained to obtain the target link data.
2) And a plurality of request heads are required to be added, the access of the parameters of part of request heads is time-efficient, and the links to be accessed are accessed through dynamic change of real-time data requests, so that target link data is obtained.
And II: and obtaining the target link data by sending a plurality of data requests to be sent to obtain the link data information. Considering that the link to be accessed can not obtain the most complete link data in a single access, the link to be accessed needs to be accessed for multiple times, which is equivalent to sending multiple data requests to the link to be accessed, so as to obtain the most complete data information and obtain the target link data. The multiple accesses are the same as the single accesses in the above embodiment, and will not be described again.
In one embodiment, after step S105, the network link processing method further includes:
determining a data format analysis method according to the selected information source;
analyzing the target link data according to the data format analysis method to obtain target analysis data;
and returning target analysis data to the front end.
It should be noted that, by sending the link data requested to be obtained through the above embodiment, according to different parsing modes: the final data returned by each information source (website, APP) has different data structures, some are html, json format, XML and some returned data encryption needs to be cracked to obtain the final data. And returns the data to the front end.
Referring to fig. 9, the embodiment of the present application further provides a network link processing apparatus, which may implement the above network link processing method, and fig. 9 is a block diagram of a module structure of the network link processing apparatus provided in the embodiment of the present application, where the apparatus includes: an acquisition module 701, an information source screening module 702, a target screening module 703, an analysis module 704 and a sending module 705. The acquiring module 701 is configured to acquire a link to be accessed and a keyword field; the information source screening module 702 is configured to screen a preset information source database according to the link to be accessed and the keyword field to obtain a selected information source; the target screening module 703 is configured to screen a preset analysis template database according to the selected information source to obtain a selected analysis template; the parsing module 704 is configured to parse the link to be accessed according to the selected parsing template to obtain a target data request; and the sending module 705 is configured to send a target data request to the link to be accessed, so as to obtain target link data.
It should be noted that, the specific implementation of the network link processing apparatus is substantially the same as the specific embodiment of the network link processing method described above, and will not be described herein again.
The embodiment of the application also provides electronic equipment, which comprises: the system comprises a memory, a processor, a program stored on the memory and capable of running on the processor, and a data bus for realizing connection communication between the processor and the memory, wherein the program realizes the cross-domain session data processing method when being executed by the processor. The electronic equipment can be any intelligent terminal including a tablet personal computer, a vehicle-mounted computer and the like.
Referring to fig. 10, fig. 10 illustrates a hardware structure of an electronic device according to another embodiment, the electronic device includes:
the processor 801 may be implemented by a general purpose CPU (Central Processing Unit ), a microprocessor, an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc. for executing related programs to implement the technical solutions provided by the embodiments of the present application;
the Memory 802 may be implemented in the form of a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a random access Memory (Random Access Memory, RAM). The memory 802 may store an operating system and other application programs, and when the technical solutions provided in the embodiments of the present application are implemented by software or firmware, relevant program codes are stored in the memory 802, and the processor 801 invokes a cross-domain session data processing method for executing the embodiments of the present application;
an input/output interface 803 for implementing information input and output;
the communication interface 804 is configured to implement communication interaction between the device and other devices, and may implement communication in a wired manner (e.g., USB, network cable, etc.), or may implement communication in a wireless manner (e.g., mobile network, WIFI, bluetooth, etc.);
a bus 805 that transfers information between the various components of the device (e.g., the processor 801, the memory 802, the input/output interface 803, and the communication interface 804);
wherein the processor 801, the memory 802, the input/output interface 803, and the communication interface 804 implement communication connection between each other inside the device through a bus 805.
The embodiment of the application also provides a storage medium, which is a computer readable storage medium and is used for computer readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to realize the cross-domain session data processing method.
The memory, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
According to the network link processing method, the network link processing device, the electronic equipment and the storage medium, the matched information source is determined according to the links to be accessed and the keyword fields, the analysis template is selected according to the information source, the accessed links are analyzed according to the analysis template to obtain target data requests, and then the target data requests are sent to the links to be accessed, so that the server to which the accessed links belong returns link data according to the target data requests, and finally the target link data is obtained. In the embodiment of the application, the analysis efficiency of the link can be improved by determining the analysis template through the information source, and the obtained target data request is paired with the information source, so that the integrity of acquiring the link data can be improved.
The embodiments described in the embodiments of the present application are for more clearly describing the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application, and as those skilled in the art can know that, with the evolution of technology and the appearance of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
It will be appreciated by those skilled in the art that the solutions shown in fig. 1, 4-8 are not limiting to embodiments of the present application, and may include more or fewer steps than shown, or may combine certain steps, or different steps.
The above described apparatus embodiments are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, i.e. may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Those of ordinary skill in the art will appreciate that all or some of the steps of the methods, systems, functional modules/units in the devices disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof.
The terms "first," "second," "third," "fourth," and the like in the description of the present application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in this application, "at least one" means one or more, and "a plurality" means two or more. "and/or" for describing the association relationship of the association object, the representation may have three relationships, for example, "a and/or B" may represent: only a, only B and both a and B are present, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including multiple instructions for causing an electronic device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing a program.
Preferred embodiments of the present application are described above with reference to the accompanying drawings, and thus do not limit the scope of the claims of the embodiments of the present application. Any modifications, equivalent substitutions and improvements made by those skilled in the art without departing from the scope and spirit of the embodiments of the present application shall fall within the scope of the claims of the embodiments of the present application.

Claims (10)

1. A network link processing method, the method comprising:
acquiring a link to be accessed and a keyword field;
screening a preset information source database according to the links to be accessed and the keyword fields to obtain a selected information source;
screening a preset analysis template database according to the selected information source to obtain a selected analysis template;
analyzing the link to be accessed according to the selected analysis template to obtain a target data request;
and sending the target data request to the link to be accessed to obtain target link data.
2. The method of claim 1, wherein screening a preset information source database according to the link to be accessed and the keyword field to obtain a selected information source, comprises:
if the keyword field is an empty field, performing domain name resolution on the link to be accessed to obtain a link domain name;
screening the information source database according to the link domain name to obtain the selected information source; wherein the information source database includes matching information linking domain names with selected information sources.
3. The method of claim 2, wherein screening a preset information source database according to the link to be accessed and the keyword field to obtain a selected information source, comprises:
if the keyword field is a non-null field, extracting keywords from the keyword field;
performing similarity calculation according to the keywords and the names of each information source of the information source database to obtain similarity;
and obtaining the selected information source according to the information sources with the similarity meeting the preset similarity condition.
4. The method of claim 1, wherein parsing the link to be accessed according to the selected parsing template results in a target data request, comprising:
identifying the request parameters of the link to be accessed to obtain an information identification code; the information identification code is used for representing the identification of the target link data corresponding to the link to be accessed;
screening a preset data request database according to the information identification code to obtain the target data request; the data request database comprises information identification codes and matching information of the target data requests, and the target data requests are used for requesting to acquire the target link data.
5. The method of claim 4, wherein before screening a preset data request database according to the information identification code to obtain the target data request, the method further comprises:
the creating of the data request database specifically comprises:
acquiring at least one initial data request of a preset information source;
and carrying out parameter modification on the initial data request to obtain at least one intermediate data request: the parameter modification includes deleting a parameter or modifying a value of a parameter;
sending the intermediate data request to the link to be accessed to obtain intermediate link data;
screening the intermediate data request of which the integrity of the intermediate link data meets a preset integrity condition to obtain the target data request;
and obtaining the data request database according to the target data request.
6. The method of claim 5, wherein before said screening said intermediate data request for integrity of said intermediate link data that meets a preset integrity condition, said method further comprises:
filtering the intermediate data request, specifically including:
any two pieces of intermediate link data are obtained, and first intermediate link data and second intermediate link data are obtained;
comparing the first intermediate link data with the second intermediate link data to obtain a comparison result;
deleting the intermediate data request corresponding to the first intermediate link data or deleting the intermediate data request corresponding to the second intermediate link data according to the comparison result.
7. The method according to claim 6, wherein deleting the intermediate data request corresponding to the first intermediate link data or deleting the intermediate data request corresponding to the second intermediate link data according to the comparison result includes:
if the comparison result is that the data volume of the first intermediate link data is equal to the data volume of the second intermediate link data, deleting the intermediate data request corresponding to the first intermediate link data;
or if the comparison result is that the data volume of the first intermediate link data is equal to the data volume of the second intermediate link data, deleting the intermediate data request corresponding to the second intermediate link data.
8. A network link processing apparatus, the apparatus comprising:
the acquisition module is used for acquiring the links to be accessed and the keyword fields;
the information source screening module is used for screening a preset information source database according to the links to be accessed and the keyword fields to obtain a selected information source;
the target screening module is used for screening a preset analysis template database according to the selected information source to obtain a selected analysis template;
the analysis module is used for analyzing the link to be accessed according to the selected analysis template to obtain a target data request;
and the sending module is used for sending the target data request to the link to be accessed so as to obtain target link data.
9. An electronic device comprising a memory storing a computer program and a processor implementing the method of any of claims 1 to 7 when the computer program is executed by the processor.
10. A computer readable storage medium storing a computer program, characterized in that the computer program, when executed by a processor, implements the method of any one of claims 1 to 7.
CN202211674049.6A 2022-12-26 2022-12-26 Network link processing method and device, electronic equipment and storage medium Pending CN116127945A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211674049.6A CN116127945A (en) 2022-12-26 2022-12-26 Network link processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211674049.6A CN116127945A (en) 2022-12-26 2022-12-26 Network link processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116127945A true CN116127945A (en) 2023-05-16

Family

ID=86303821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211674049.6A Pending CN116127945A (en) 2022-12-26 2022-12-26 Network link processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116127945A (en)

Similar Documents

Publication Publication Date Title
US10747505B1 (en) API specification generation
CN104125209B (en) Malice website prompt method and router
CN110083789B (en) Applet page acquisition method, server, client and electronic equipment
CN105027121A (en) Indexing application pages of native applications
CN106534268B (en) Data sharing method and device
US20190179965A1 (en) Method and apparatus for generating information
CN104333531A (en) Network resource sharing and obtaining method, device, terminal
JP6520513B2 (en) Question and Answer Information Providing System, Information Processing Device, and Program
TW201800962A (en) Webpage file sending method, webpage rendering method and device and webpage rendering system
CN111625782B (en) Access authority control method and device for source code, computer equipment and storage medium
CN103347092A (en) Method and device for recognizing cacheable file
US20230106266A1 (en) Indexing Access Limited Native Applications
US20130024394A1 (en) Server apparatus, reaction transmitting program, recording medium having computer-readable reaction transmitting program recorded thereon, terminal device, reaction counting method, and reaction counting system
CN102955850A (en) Method and device for loading sequencing website
CN115563600A (en) Data auditing method and device, electronic equipment and storage medium
US20180337930A1 (en) Method and apparatus for providing website authentication data for search engine
CN107786529B (en) Website detection method, device and system
CN103399968A (en) Microblog information acquisition method and microblog information acquisition system
CN111488386B (en) Data query method and device
CN102780730A (en) Method and system for integrating web applications and mashup server
CN110413861B (en) Link extraction method, device, equipment and storage medium based on web crawler
CN111209325A (en) Service system interface identification method, device and storage medium
Ham et al. Big Data Preprocessing Mechanism for Analytics of Mobile Web Log.
CN116127945A (en) Network link processing method and device, electronic equipment and storage medium
CN104899320A (en) Webpage repair method, terminal, server and system

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