CN111797334B - Website access method and device, electronic equipment and storage medium - Google Patents

Website access method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111797334B
CN111797334B CN202010567887.8A CN202010567887A CN111797334B CN 111797334 B CN111797334 B CN 111797334B CN 202010567887 A CN202010567887 A CN 202010567887A CN 111797334 B CN111797334 B CN 111797334B
Authority
CN
China
Prior art keywords
website
template
preset
accessed
matching degree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010567887.8A
Other languages
Chinese (zh)
Other versions
CN111797334A (en
Inventor
刘志健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010567887.8A priority Critical patent/CN111797334B/en
Publication of CN111797334A publication Critical patent/CN111797334A/en
Application granted granted Critical
Publication of CN111797334B publication Critical patent/CN111797334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]

Abstract

The disclosure provides a website access method, a website access device, electronic equipment and a storage medium, relates to the technical field of computers, and is used for reducing consumption of storage resources in short website service. The method comprises the following steps: acquiring corresponding key characters for web site conversion to be accessed from the received web site access request; acquiring website template identification information and website parameter values matched with the key characters of the website to be accessed based on the mapping relation of the key characters, the website template identification information and the website parameter values which are created and stored in advance, wherein the website template identification information comprises identification information of a preset website template matched with the website to be accessed; and adding the website parameter value to a position corresponding to the set parameter in a preset website template corresponding to the matched website template identification information, obtaining a corresponding website to be accessed and jumping to the website to be accessed. In the method, the website to be accessed does not need to be stored in the mapping relation, so that the consumption of storage resources is reduced.

Description

Website access method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to a website access method, a website access device, electronic equipment and a storage medium.
Background
In the related art, in the process of realizing the short website service, a mapping relationship between a long website and a short website needs to be stored in a database each time when the long website is converted into the short website, when a user requests to access the corresponding long website, the long website corresponding to the short website can be obtained from the pre-stored mapping relationship, and then the long website is jumped to, but in the process, the mapping relationship between the long website and the short website needs to be stored for each long website, when the long website is more, more storage resources are consumed, and the long website generally occupies more storage resources, so that the storage resources are further insufficient.
Disclosure of Invention
The embodiment of the disclosure provides a website access method, a website access device, electronic equipment and a storage medium, which are used for reducing consumption of storage resources in short website service.
In a first aspect of the present disclosure, a website access method is provided, including:
acquiring key characters of the website conversion to be accessed corresponding to the website access request from the received website access request, wherein the character length of the key characters of the website conversion to be accessed is smaller than that of the website to be accessed; and
acquiring website template identification information and website parameter values matched with the key characters of the website to be accessed based on the pre-created and stored mapping relation of the key characters, the website template identification information and the website parameter values, wherein the website template identification information comprises identification information of a preset website template matched with the website to be accessed;
adding the website parameter value to a position corresponding to a set parameter in a preset website template corresponding to the matched website template identification information to obtain a website to be accessed corresponding to the website access request;
and jumping to a website to be accessed corresponding to the website access request.
In one possible implementation, the mapping relationship is created by:
converting a web address into key characters different from key characters converted by the web address except the web address; and
acquiring a preset website template matched with the website from a website template set, acquiring website template identification information of the matched preset website template, and acquiring a website parameter value matched with a website parameter set in the matched preset website template from the website;
and creating the key characters for website conversion, the acquired website template identification information and the acquired website parameter values as a matching relation and storing the matching relation to obtain the mapping relation.
In one possible implementation manner, the step of obtaining a preset website template matched with the website from the website template set includes:
respectively acquiring the matching degree of each preset website template in the website template set and the website, and acquiring the preset website templates of which the matching degree meets a matching degree threshold, wherein the matching degree is acquired according to the matching degree of the website parameters of each preset website template and the website parameters of the website; or (b)
Judging whether the matching degree of each preset website template and the website meets a matching degree threshold or not in sequence, and obtaining the preset website template with the matching degree meeting the matching degree threshold from the preset website template with the matching degree meeting the matching degree threshold, wherein the matching degree is obtained according to the matching degree of the website parameters of each preset website template and the website parameters of the website.
In one possible implementation, the step of converting the web address into a key character different from the key character of web address conversion except the web address includes:
setting a character sequence which is different from a character sequence corresponding to a website except the website for the website, and converting the character sequence set for the website into key characters through a setting algorithm, wherein the character sequence comprises at least one character, and the characters comprise integer numbers or letters.
In one possible implementation manner, after the step of obtaining the website template identification information and the website parameter value matched with the key character of the website to be accessed, the step of obtaining the website to be accessed corresponding to the website access request further includes:
and acquiring a preset website template corresponding to the website template identification information matched with the website to be accessed according to the corresponding relation between the website template identification information and the preset website template.
In one possible implementation manner, the preset website template includes a link address of the website to be accessed and the setting parameter.
In a second aspect of the present disclosure, there is provided a web site access apparatus, including:
a key character acquisition unit configured to acquire key characters of a website to be accessed corresponding to a received website access request from the received website access request, wherein the character length of the key characters of the website to be accessed is smaller than the character length of the website to be accessed; and
the website mapping unit is configured to execute mapping relation based on pre-created and stored key characters, website template identification information and website parameter values, and acquire website template identification information and website parameter values matched with the key characters of the website to be accessed, wherein the website template identification information comprises identification information of a preset website template matched with the website to be accessed;
the website determining unit is configured to add the website parameter value to a position corresponding to a set parameter in a preset website template corresponding to the matched website template identification information, so as to obtain a website to be accessed corresponding to the website access request;
and the website jump unit is configured to execute the jump to the website to be accessed corresponding to the website access request.
In a possible implementation, the web address mapping unit is configured to create the mapping relation by:
converting a web address into key characters different from key characters converted by the web address except the web address; and
acquiring a preset website template matched with the website from a website template set, acquiring website template identification information of the matched preset website template, and acquiring a website parameter value matched with a website parameter set in the matched preset website template from the website;
and creating the key characters for website conversion, the acquired website template identification information and the acquired website parameter values as a matching relation and storing the matching relation to obtain the mapping relation.
In a possible implementation manner, the website mapping unit is specifically configured to perform:
respectively acquiring the matching degree of each preset website template in the website template set and the website, and acquiring the preset website templates of which the matching degree meets a matching degree threshold, wherein the matching degree is acquired according to the matching degree of the website parameters of each preset website template and the website parameters of the website; or (b)
Judging whether the matching degree of each preset website template and the website meets a matching degree threshold or not in sequence, and obtaining the preset website template with the matching degree meeting the matching degree threshold from the preset website template with the matching degree meeting the matching degree threshold, wherein the matching degree is obtained according to the matching degree of the website parameters of each preset website template and the website parameters of the website.
In a possible implementation manner, the website mapping unit is specifically configured to perform:
setting a character sequence which is different from a character sequence corresponding to a website except the website for the website, and converting the character sequence set for the website into key characters through a setting algorithm, wherein the character sequence comprises at least one character, and the characters comprise integer numbers or letters.
In a possible implementation, the website determining unit is further configured to perform:
before the step of obtaining the website to be accessed corresponding to the website access request, obtaining a preset website template corresponding to the website template identification information matched with the website to be accessed according to the corresponding relation between the website template identification information and the preset website template.
In one possible implementation manner, the preset website template includes a link address of the website to be accessed and the setting parameter.
In a third aspect of the disclosure, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of the first aspect and one of the possible implementations when executing the program.
In a fourth aspect of the disclosure, there is provided a computer readable storage medium storing computer instructions that, when run on a computer, cause the computer to perform a method as described in any one of the first aspect and one of the possible implementations.
The scheme of the present disclosure brings at least the following technical effects:
in the embodiment of the disclosure, the mapping relation of the key characters, the website template identification information and the website parameter values is pre-created and stored, and then the website template identification information and the website parameter values matched with the website to be accessed are obtained through the mapping relation in the website access process, and then the obtained website template identification information and the obtained website parameter values are jumped to the website to be accessed, and in the process, each website to be accessed does not need to be stored in the pre-stored mapping relation, and further the website to be accessed is a long website which occupies more storage resources, or when the websites to be accessed are too many, the consumption of the storage resources can be obviously reduced.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure and do not constitute an undue limitation on the disclosure.
FIG. 1 is a schematic flow chart of converting a long web address into a short web address according to an exemplary embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of a short web site service provided in an exemplary embodiment of the present disclosure;
fig. 3 is a schematic diagram of an application scenario of web site access provided in an exemplary embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a process for creating a mapping relationship between key characters, website template identification information and website parameter values according to an exemplary embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a website access process provided in an exemplary embodiment of the present disclosure;
FIG. 6 is an interactive schematic diagram of a web site access provided by an exemplary embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a website access apparatus according to an exemplary embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure.
Detailed Description
In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures 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 the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein.
In order to facilitate a better understanding of the technical solutions of the present disclosure by those skilled in the art, the technical terms related to the present disclosure are described below.
Short web site: the network address with the function of automatically redirecting to the appointed link is shorter in finger form, and usually, word number limitation is caused when the message is sent by instant social application such as microblog, short message and the like, and a website with too long length occupies a large number of bytes and even cannot be input, so that the use of a short website is quite convenient.
Long web site: the longer websites in form such as information type website links, instant messaging type website links, electronic commodity website links, shop website links of internet electronic commerce and the like are more in characters under the common condition, and more storage resources are needed.
The short website service is a service capable of shortening lengthy website conversion of various long websites such as information website links, instant messaging website links, electronic commodity website links, shop website links of internet electronic commerce and the like into shorter and convenient short websites.
And (3) a terminal: may be a mobile terminal, a fixed terminal, or a portable terminal, such as a mobile handset, a site, a unit, a device, a multimedia computer, a multimedia tablet, an internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a Personal Communications System (PCS) device, a personal navigation device, a Personal Digital Assistant (PDA), an audio/video player, a digital camera/camcorder, a positioning device, a television receiver, a radio broadcast receiver, an electronic book device, a game device, or any combination thereof, including the accessories and peripherals of these devices, or any combination thereof.
The following is a description of the design concept of the present disclosure.
In order to realize the short website service, the mapping relation between the long website and the short website is required to be obtained and stored in advance, and then when a user requests access through the short website, the corresponding long website can be accessed based on the pre-stored mapping relation, which specifically comprises the following two processes:
the first process comprises the following steps: and obtaining the mapping relation between the long website and the short website.
Each time long web site L is converted into short web site S, a module of a sender is responsible for generating a globally unique integer identification id, based on the integer id, the integer id is converted into short character string m by a certain algorithm, and then a record of the long web site L and the short character string m is inserted into a corresponding relation table of a database.
Referring to fig. 1, the method specifically includes the following steps:
step S101, the user sends the long website to the server through the terminal.
In step S102, the server obtains the globally unique integer id from the sender, and converts the integer id into a short string through an algorithm.
Step S103, the server stores the mapping relation between the short character strings and the long websites in a database, and converts the short character strings into a short website to be sent to the terminal after placing the short character strings in the corresponding domain names.
The second process is as follows: the long web site is accessed through the short web site.
Referring to fig. 2, the second process mainly includes the following steps:
in step S201, the user sends a short website to the server through the terminal.
In step S202, the server determines to obtain a short string from the short web address, and obtains a long web address corresponding to the short string from the mapping relationship stored in the database.
Step S203, the server jumps to the link of the corresponding long website through the redirection function of the http protocol.
As the access amount of the short website service increases, the conversion frequency of converting the long website into the short character string increases, the storage space of the database for maintaining the mapping relation between the short character string and the long website decreases, the length of the long website is generally long, more storage resources are occupied, the capacity of each table in the database is limited, once the limit is exceeded, the performance of the table is greatly reduced, and even if a method for dividing the database into tables is adopted, the problem cannot be fundamentally solved.
In view of this, the present disclosure relates to a website access method, apparatus, electronic device, and storage medium for reducing consumption of storage resources in a short website service, where the method of the present disclosure includes: the method comprises the steps of pre-storing a preset website template corresponding to a long website, firstly obtaining a preset website template matched with the long website in the process of converting the long website into a short website, and storing some characteristic information of the long website and the matched preset website template and key characters converted by the long website as mapping relations; and when the website access request carrying the key characters for long website conversion is used, the characteristic information matched with the key characters carried in the access request can be obtained from the stored mapping relation, and then the corresponding long website is obtained according to the characteristic information and the corresponding preset website template, and the corresponding long website is jumped to.
The character length of the key characters for converting the long website is smaller than the character length of the long website, and the long website in the embodiment of the disclosure can include, but is not limited to, a website with a relatively long website form; some characteristic information of the long website and the matched preset website template can comprise website template identification information of the preset website template and website parameter values matched with the set website parameters in the preset website template in the long website.
The following describes aspects of the present disclosure in detail with reference to the drawings.
Referring to fig. 3, an application scenario of web site access is provided, where the application scenario includes at least one terminal 301 and a server 302, where:
the terminal 301 is configured to send a website to be accessed indicated by a user to the server 302, receive a short website obtained by adding a service domain name to a key character for converting the website to be accessed sent by the server, and send a website access request to the server 302 according to the short website indicated by the user.
The server 302 is configured to receive a website to be accessed sent by a terminal, obtain website template identification information of a preset website template matched with the website to be accessed and a corresponding website parameter value, store the obtained matching relationship between the website template identification information, the website parameter value and key characters of the website conversion to be accessed in a mapping relationship in a database, and send a short website obtained by adding the key characters of the website conversion to be accessed with a service domain name to the terminal; and acquiring key characters for converting the website to be accessed from the website access request sent by the terminal, and jumping to the website to be accessed corresponding to the website access request based on the preset mapping relation among the key characters, the website template identification information and the website parameter values.
The server may be, but is not limited to, a cloud server, a blockchain server, a distributed server, or the like.
The website access method provided by the embodiment of the present disclosure is described in detail below.
In the embodiment of the disclosure, some preset website templates, such as websites of the type of https:// www.zzzz.com/shareuid = { xxxx } & time = { xxx are determined according to the characteristics of the websites to be accessed, when the parameter values of the set parameters uid and time are different, the websites to be accessed are different, and at this time, the https:// www.zzzz.com/shareuid = { mm } & time = { mm } are processed into one preset website template, the preset website template comprises a link address and a set parameter, wherein https:// www.zzzz.com/shareuid in the preset website template is the link address, the parameters uid and time are the set parameters, and mm can be but are not limited to the placeholders of the set parameters uid and time.
A certain amount of websites to be accessed are obtained and analyzed, a corresponding preset website template is obtained, and globally unique website template identification information is allocated to each preset website template, wherein the website template identification information can be randomly generated integer random numbers such as 6789 and 0231 or globally unique character strings such as 00xx and y12y and the like, and can be set according to actual requirements by a person skilled in the art.
After a certain number of preset website templates are acquired, the mapping relation between the preset website templates and the website template identification information can be saved so as to inquire when acquiring the mapping relation between preset key characters, the website template identification information and website parameter values and realizing website access, specifically, the mapping relation between the preset website templates and the website template identification information can be saved in a website template set in a database, the website template set can be a table, but is not limited to a table, and the mapping relation is not excessively limited, so that a person skilled in the art can set according to actual requirements.
Further, after the preset website template is obtained, the following two processes can be performed:
the first process comprises the following steps: and obtaining the mapping relation among the preset key characters, the website template identification information and the website parameter values.
Referring to fig. 4, for any website, the process of obtaining the mapping relationship between the key character, the website template identification information and the website parameter value by the server is as follows:
step S401, receiving the website sent by the terminal, and converting the website into key characters different from the key characters converted by the website except the website.
Specifically, the key characters may be, but are not limited to, character sequences, and a unique character sequence may be set for each web site in this step; when the received web address is converted into the key character, a character sequence different from the character sequence corresponding to the web address except the web address can be set for the web address (the received web address), and the character sequence set for the web address is converted into the key character through a setting algorithm.
The character sequence includes at least one character, the character includes integer numbers or letters, for example, the character sequence is integer random numbers such as 1234 and 5867, the character sequence can also be ccss and m321, etc., and the character sequence can be set by those skilled in the art according to actual requirements.
Step S402, obtaining a preset website template matched with the website from the website template set.
As an embodiment, a preset website template matched with the website can be obtained according to the matching condition of the link address and the website parameter of the website and the link address and the website parameter in the preset website template, and the following two methods for obtaining the preset website template matched with the website are provided in the embodiment of the present disclosure:
the first acquisition mode is as follows:
and respectively acquiring the matching degree of each preset website template in the website template set and the website, and acquiring the preset website templates with the matching degree meeting the matching degree threshold, wherein the matching degree is acquired according to the matching degree of the website parameters of each preset website template and the website parameters of the website.
Further, the matching condition of the link address of the preset website template and the link address of the website and the number of parameter matching of the website parameter of the preset website template and the website parameter of the website can be determined as the matching degree, the condition that the link address is matched and the website parameter is completely matched is determined as that the matching degree meets the matching degree threshold, namely, the preset website template of which the website parameter is completely matched with the website parameter of the website is determined as the preset website template matched with the website.
The exemplary illustrations are presented herein for ease of understanding. If one of the preset website templates is http:// www.zzz.com/pay/info, 1, m, 2, sys, 3, the preset website template comprises two parts of a link address and a link parameter, wherein the link address is http:// www.zzz.com/pay/info, the link parameter is t, m and sys, and the link parameter is the set parameter in the preset website template.
If the preset website template is http:// www.zzz.com/pay/info = # {1} & m = # {2} & sys = # {3}, there are the following websites:
the first website is http:// www.zzz.com/pay/info=123 & m=shop & sys=android;
the second website is http:// www.zzz.com/pay/info=8836 & m=user & sys=ios;
the third website is http:// www.zzz.com/pay/info=8836 & m=user & sys=ios & from=1;
the fourth website is http:// www.zzz.com/pay/info=8836 & m=user & sys2=ios;
the fifth web address is http:// www.yyy.com/pay/info=123 & m=shop & sys=android.
And the link address and the website parameters in the first website are completely matched with the set parameters t, m and sys in the preset website template, so that the preset website template is the preset website template matched with the first website, and similarly, the preset website template is the preset website template matched with the second website.
Because the third website is compared with the preset website template, one more website parameter from is added, the ratio of the third website to the preset website template is not matched; because the website parameter sys2 in the fourth website is matched with the setting parameter sys in the preset website template, the fourth website is not matched with the preset website template, and because the link address in the fifth website is different from the link address in the preset website template, the fifth website is not matched with the preset website template.
The second acquisition mode is as follows:
judging whether the matching degree of each preset website template and the website meets a matching degree threshold or not in sequence until judging that the matching degree meets the preset website template of the matching degree threshold, and acquiring the preset website template of which the matching degree meets the matching degree threshold, wherein the matching degree is acquired according to the matching degree of the website parameter of each preset website template and the website parameter of the website.
As an embodiment, whether the matching degree between each preset website template and the website meets the matching degree threshold value can be determined in sequence according to the storage sequence of the preset website templates in the website template set, or according to the importance level of the preset website templates, or according to a random sequence, and can be flexibly set by those skilled in the art according to actual requirements.
For the content of the matching degree and the content of the matching degree satisfying the matching degree threshold, reference may be made to the description in the first acquisition mode, and the description will not be repeated here.
Step S403, obtaining the website template identification information of the matched preset website template, and obtaining the website parameter value matched with the website parameter set in the matched preset website template from the website.
The server can obtain the website template identification information of the matched preset website template mapping from the mapping relation in the website template set.
Step S404, creating the key characters for the web site conversion, the acquired web site template identification information and the acquired web site parameter values as a matching relationship, and storing the matching relationship to obtain the mapping relationship.
Further, after the mapping relation is obtained, the mapping relation can be stored in a database so as to realize inquiry when the website service is realized. It should be noted that, the mapping relationship between the key character, the website template identification information and the website parameter value obtained herein, and the mapping relationship between the preset website template and the website template identification information obtained in advance may be respectively stored in different positions in the database, for example, in different tables in the database.
It should be noted that, the above step S401 and step S402 are not performed in sequence, and the two steps may be performed simultaneously or not simultaneously.
As an embodiment, if in step S402, the web site template set does not have a preset web site template matching the web site, the network parameter of the web site may be used as a setting parameter, the link address and the setting parameter of the web site may be used as a new preset web site template, a globally unique web site template identification information is generated for the new preset web site template, the mapping relationship between the new preset web site template and the web site template identification information is stored in a database, and the processes in step S403 and step S404 are performed based on the new preset web site template.
The second process is as follows: and (5) a website access process.
Referring to fig. 5, after receiving a website access request sent by a user through a terminal, the server performs the following steps:
step S501, obtaining, from the received web site access request, a key character of web site conversion to be accessed corresponding to the web site access request, where the character length of the key character of web site conversion to be accessed is smaller than the character length of the web site to be accessed.
Step S502, acquiring the website template identification information and the website parameter value matched with the key characters of the website to be accessed based on the mapping relation of the key characters, the website template identification information and the website parameter value which are created and stored in advance.
Step S503, adding the website parameter value to a position corresponding to a set parameter in a preset website template corresponding to the matched website template identification information, and obtaining a website to be accessed corresponding to the website access request.
Specifically, after step S502 and before step S503, the server obtains a preset website template corresponding to the website template identification information matched with the website to be accessed according to the corresponding relationship between the website template identification information and the preset website template, and further adds the website parameter value to the position corresponding to the setting parameter in the obtained preset website template.
Step S504, jumping to the website to be accessed corresponding to the website access request.
Specifically, the website to be accessed can be jumped to through the redirection function of the http protocol.
The following of embodiments of the present disclosure provides a specific example of web site access; the website to be accessed is http:// www.zzz.com/pay/info t= 1&m =3 & sys= 12999348384u; the key character of the web site conversion to be accessed is http:// x.cn/1n4lqk3NGpm; the preset website template matched with the website to be accessed is http:// www.zzz.com/pay/info t = # {1} & m = # {2} & sys = # {3}, and the setting parameters in the preset website template are t, m and sys; and the mapping relationship between the keyword and the website template mode information and the website parameter value matched with the website to be accessed is pre-established, please refer to fig. 6, the data interaction between the terminal, the server and the database is as follows:
in step S601, a user sends a website access request carrying http:// x.cn/1n4lqk NGpm to a server through a terminal.
In step S602, the server obtains key characters http:// x.cn/1n4lqk NGpm from the web site access request.
In step S603, the server determines the website template identification information and the website parameter value matched with http:// x.cn/1n4lqk NGpm based on the mapping relationship of the preset key character, the website template identification information and the website parameter value.
The values of the web site parameters obtained in this example are 1, 3 and 12999348384u, respectively.
Step S604, the server acquires a preset website template matched with the determined website template identification information from the website template set.
And obtaining a preset website template http:// www.zzz.com/pay/info {1} & m = # {2} & sys = # {3}.
In step S605, the server adds the obtained website parameter value to the obtained preset website template to obtain the website to be accessed, http:// www.zzz.com/pay/info= 1&m =3 & sys= 12999348384u.
Namely, 1, 3 and 12999348384u of the website parameter values are respectively added to the positions corresponding to the setting parameters t, m and sys in the acquired preset website template, so that the website to be accessed can be obtained.
In step S606, the server jumps to the website to be accessed http:// www.zzz.com/pay/info= 1&m =3 & sys= 12999348384u through the website redirection function in the http protocol.
In the website access method provided in the embodiment of the present disclosure, each website to be accessed does not need to be stored in a mapping relationship stored in advance, and therefore, when the website to be accessed is a long website occupying more storage resources, or the websites to be accessed are too many, consumption of the storage resources can be obviously reduced.
As shown in fig. 7, based on the same inventive concept, the embodiment of the present disclosure further provides a web site access apparatus 700, which includes:
a key character obtaining unit 701 configured to obtain, from a received web address access request, a key character of a web address conversion to be accessed corresponding to the web address access request, where a character length of the key character of the web address conversion to be accessed is smaller than a character length of the web address to be accessed; and
a website mapping unit 702 configured to perform mapping based on the pre-created and stored key character, website template identification information and website parameter value, and obtain website template identification information and website parameter value matched with the key character of the website to be accessed, where the website template identification information includes identification information of a preset website template matched with the website to be accessed;
a website determining unit 703 configured to perform adding the website parameter value to a position corresponding to a setting parameter in a preset website template corresponding to the matched website template identification information, so as to obtain a website to be accessed corresponding to the website access request;
and a website address jumping unit 704 configured to perform jumping to the website address to be accessed corresponding to the website address access request.
As an embodiment, the web address mapping unit 702 is configured to create the above-described mapping relationship by:
converting a web address into a key character different from the key character converted by the web address except the web address; and
acquiring a preset website template matched with the website from a website template set, acquiring website template identification information of the matched preset website template, and acquiring a website parameter value matched with a website parameter set in the matched preset website template from the website;
and creating the key characters for converting the website, the acquired website template identification information and the acquired website parameter values into a matching relationship and storing the matching relationship to obtain the mapping relationship.
As one embodiment, the web address mapping unit 702 is specifically configured to perform:
respectively acquiring the matching degree of each preset website template in the website template set and the website, and acquiring the preset website templates with the matching degree meeting the matching degree threshold, wherein the matching degree is acquired according to the matching degree of the website parameters of each preset website template and the website parameters of the website; or (b)
Judging whether the matching degree of each preset website template and the website meets a matching degree threshold or not in sequence until judging that the matching degree meets the preset website template of the matching degree threshold, and acquiring the preset website template of which the matching degree meets the matching degree threshold, wherein the matching degree is acquired according to the matching degree of the website parameter of each preset website template and the website parameter of the website.
As one embodiment, the web address mapping unit 702 is specifically configured to perform:
setting a character sequence which is different from a character sequence corresponding to a website other than the website for the website, and converting the character sequence set for the website into key characters through a setting algorithm, wherein the character sequence comprises at least one character, and the characters comprise integer numbers or letters.
As an embodiment, the web address determination unit 703 is further configured to perform:
before the step of obtaining the website to be accessed corresponding to the website access request, obtaining a preset website template corresponding to the website template identification information matched with the website to be accessed according to the corresponding relation between the website template identification information and the preset website template.
As an embodiment, the preset website template includes the link address of the website to be accessed and the setting parameter.
As shown in fig. 8, the present disclosure provides an electronic device 800 comprising a processor 801, a memory 802 for storing the processor-executable instructions described above;
wherein the processor is configured to perform any one of the web site access methods described above.
In an exemplary embodiment, a storage medium is also provided, e.g., a memory, comprising instructions executable by a processor of the electronic device to perform the above-described method. Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, the above-described non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (14)

1. A web site access method, comprising:
acquiring key characters of the website conversion to be accessed corresponding to the website access request from the received website access request, wherein the character length of the key characters of the website conversion to be accessed is smaller than that of the website to be accessed; and
acquiring website template identification information and website parameter values matched with the key characters of the website to be accessed based on the pre-created and stored mapping relation of the key characters, the website template identification information and the website parameter values, wherein the website template identification information comprises identification information of a preset website template matched with the website to be accessed;
adding the website parameter value to a position corresponding to a set parameter in a preset website template corresponding to the matched website template identification information to obtain a website to be accessed corresponding to the website access request;
and jumping to a website to be accessed corresponding to the website access request.
2. The method of claim 1, wherein the mapping is created by:
converting a web address into key characters different from key characters converted by the web address except the web address; and
acquiring a preset website template matched with the website from a website template set, acquiring website template identification information of the matched preset website template, and acquiring a website parameter value matched with a website parameter set in the matched preset website template from the website;
and creating the key characters for website conversion, the acquired website template identification information and the acquired website parameter values as a matching relation and storing the matching relation to obtain the mapping relation.
3. The method of claim 2, wherein the step of obtaining a preset web site template matching the web site from a set of web site templates comprises:
respectively acquiring the matching degree of each preset website template in the website template set and the website, and acquiring the preset website templates of which the matching degree meets a matching degree threshold, wherein the matching degree is acquired according to the matching degree of the website parameters of each preset website template and the website parameters of the website; or (b)
Judging whether the matching degree of each preset website template and the website meets a matching degree threshold or not in sequence, and obtaining the preset website template with the matching degree meeting the matching degree threshold from the preset website template with the matching degree meeting the matching degree threshold, wherein the matching degree is obtained according to the matching degree of the website parameters of each preset website template and the website parameters of the website.
4. The method of claim 2, wherein the step of converting the web address into a key character different from key characters of web address conversion other than the web address comprises:
setting a character sequence which is different from a character sequence corresponding to a website except the website for the website, and converting the character sequence set for the website into key characters through a setting algorithm, wherein the character sequence comprises at least one character, and the characters comprise integer numbers or letters.
5. The method of claim 1, wherein after the step of obtaining the web site template identification information and the web site parameter value matched with the key character of the web site to be accessed, the step of obtaining the web site to be accessed corresponding to the web site access request further comprises:
and acquiring a preset website template corresponding to the website template identification information matched with the website to be accessed according to the corresponding relation between the website template identification information and the preset website template.
6. The method according to any one of claims 1-5, wherein the preset web site template comprises a link address of the web site to be accessed and the setting parameters.
7. A web site access device, comprising:
a key character acquisition unit configured to acquire key characters of a website to be accessed corresponding to a received website access request from the received website access request, wherein the character length of the key characters of the website to be accessed is smaller than the character length of the website to be accessed; and
the website mapping unit is configured to execute mapping relation based on pre-created and stored key characters, website template identification information and website parameter values, and acquire website template identification information and website parameter values matched with the key characters of the website to be accessed, wherein the website template identification information comprises identification information of a preset website template matched with the website to be accessed;
the website determining unit is configured to add the website parameter value to a position corresponding to a set parameter in a preset website template corresponding to the matched website template identification information, so as to obtain a website to be accessed corresponding to the website access request;
and the website jump unit is configured to execute the jump to the website to be accessed corresponding to the website access request.
8. The apparatus of claim 7, wherein the web address mapping unit is configured to create the mapping relationship by:
converting a web address into key characters different from key characters converted by the web address except the web address; and
acquiring a preset website template matched with the website from a website template set, acquiring website template identification information of the matched preset website template, and acquiring a website parameter value matched with a website parameter set in the matched preset website template from the website;
and creating the key characters for website conversion, the acquired website template identification information and the acquired website parameter values as a matching relation and storing the matching relation to obtain the mapping relation.
9. The apparatus of claim 8, wherein the web address mapping unit is specifically configured to perform:
respectively acquiring the matching degree of each preset website template in the website template set and the website, and acquiring the preset website templates of which the matching degree meets a matching degree threshold, wherein the matching degree is acquired according to the matching degree of the website parameters of each preset website template and the website parameters of the website; or (b)
Judging whether the matching degree of each preset website template and the website meets a matching degree threshold or not in sequence, and obtaining the preset website template with the matching degree meeting the matching degree threshold from the preset website template with the matching degree meeting the matching degree threshold, wherein the matching degree is obtained according to the matching degree of the website parameters of each preset website template and the website parameters of the website.
10. The apparatus of claim 8, wherein the web address mapping unit is specifically configured to perform:
setting a character sequence which is different from a character sequence corresponding to a website except the website for the website, and converting the character sequence set for the website into key characters through a setting algorithm, wherein the character sequence comprises at least one character, and the characters comprise integer numbers or letters.
11. The apparatus of claim 7, wherein the web address determination unit is further configured to perform:
before the step of obtaining the website to be accessed corresponding to the website access request, obtaining a preset website template corresponding to the website template identification information matched with the website to be accessed according to the corresponding relation between the website template identification information and the preset website template.
12. The apparatus according to any one of claims 7-11, wherein the preset web site template comprises a link address of the web site to be accessed and the setting parameters.
13. An electronic device comprising a processor, a memory for storing instructions executable by the processor;
wherein the processor is configured to perform the method of any one of claims 1 to 6.
14. A computer readable storage medium storing computer instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1-6.
CN202010567887.8A 2020-06-19 2020-06-19 Website access method and device, electronic equipment and storage medium Active CN111797334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010567887.8A CN111797334B (en) 2020-06-19 2020-06-19 Website access method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010567887.8A CN111797334B (en) 2020-06-19 2020-06-19 Website access method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111797334A CN111797334A (en) 2020-10-20
CN111797334B true CN111797334B (en) 2024-01-23

Family

ID=72803563

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010567887.8A Active CN111797334B (en) 2020-06-19 2020-06-19 Website access method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111797334B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434231B (en) * 2020-11-05 2023-09-08 北京奇艺世纪科技有限公司 Data processing method and device and electronic equipment
CN113704664A (en) * 2021-08-26 2021-11-26 北京房江湖科技有限公司 Method and device for generating routing address for accessing page

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003076626A (en) * 2001-08-28 2003-03-14 Viagold Direct Network Ltd Web site linking method and system therefor
CN104601736A (en) * 2013-10-30 2015-05-06 腾讯科技(深圳)有限公司 Method and device for realizing short uniform resource locator (URL) service
KR20170046531A (en) * 2015-10-21 2017-05-02 주식회사 스마트앤스페이스 Apparatus for creating url shortening
CN107423324A (en) * 2017-03-31 2017-12-01 北京小米移动软件有限公司 Access method, device and the equipment of webpage
CN109313660A (en) * 2018-08-17 2019-02-05 福建联迪商用设备有限公司 A kind of method and terminal generating short network address
WO2019042240A1 (en) * 2017-08-28 2019-03-07 阿里巴巴集团控股有限公司 Short-link parsing method, apparatus and device
CN110147507A (en) * 2019-04-08 2019-08-20 深圳市物联天下技术有限公司 A kind of method, apparatus obtaining short chained address and server
CN110213397A (en) * 2019-05-29 2019-09-06 北京达佳互联信息技术有限公司 Data creation method, device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003076626A (en) * 2001-08-28 2003-03-14 Viagold Direct Network Ltd Web site linking method and system therefor
CN104601736A (en) * 2013-10-30 2015-05-06 腾讯科技(深圳)有限公司 Method and device for realizing short uniform resource locator (URL) service
KR20170046531A (en) * 2015-10-21 2017-05-02 주식회사 스마트앤스페이스 Apparatus for creating url shortening
CN107423324A (en) * 2017-03-31 2017-12-01 北京小米移动软件有限公司 Access method, device and the equipment of webpage
WO2019042240A1 (en) * 2017-08-28 2019-03-07 阿里巴巴集团控股有限公司 Short-link parsing method, apparatus and device
CN109313660A (en) * 2018-08-17 2019-02-05 福建联迪商用设备有限公司 A kind of method and terminal generating short network address
CN110147507A (en) * 2019-04-08 2019-08-20 深圳市物联天下技术有限公司 A kind of method, apparatus obtaining short chained address and server
CN110213397A (en) * 2019-05-29 2019-09-06 北京达佳互联信息技术有限公司 Data creation method, device, electronic equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
短URL系统是怎么设计的?;田鹏晨;;计算机与网络(第10期);全文 *
短网址服务系统的实现及相关技术研究;郭一华;;软件(第01期);全文 *

Also Published As

Publication number Publication date
CN111797334A (en) 2020-10-20

Similar Documents

Publication Publication Date Title
CN108090064B (en) Data query method and device, data storage server and system
JP6306187B2 (en) Dynamic telephone number assignment
US20160105521A1 (en) Method and apparatus for pushing target information
CN113364853B (en) Business service system, business request method and gateway equipment
KR20100048571A (en) Method, apparatus and system for providing muti user-multi service
CN110471848B (en) Method and device for dynamically returning message
CN111797334B (en) Website access method and device, electronic equipment and storage medium
US11706172B2 (en) Method and device for sending information
CN107844488B (en) Data query method and device
CN111225018A (en) Request message processing method and device and electronic equipment
CN104811485A (en) Resource sharing method
CN111367870A (en) Method, device and system for sharing picture book
CN108549586B (en) Information processing method and device
CN112307058B (en) Short link processing method and device, storage medium and computer equipment
CN108959294B (en) Method and device for accessing search engine
JP7217181B2 (en) WEARABLE DEVICE, INFORMATION PROCESSING METHOD, APPARATUS AND SYSTEM
CN107977381B (en) Data configuration method, index management method, related device and computing equipment
CN111444448B (en) Data processing method, server and system
WO2014169497A1 (en) Method and server for pushing media file
CN114817794A (en) Webpage content control method, device, equipment and medium
CN110580212B (en) Data export method and device of application program, electronic equipment and storage medium
CN110460512B (en) System message generation method, device, server and storage medium
KR101250213B1 (en) Method and content service server for providing content request service
WO2019186566A1 (en) System, device and method for digital content sharing using a dynamic link
JP2020095584A (en) Content providing system, program, and information processing method

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