CN111797334A - 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
CN111797334A
CN111797334A CN202010567887.8A CN202010567887A CN111797334A CN 111797334 A CN111797334 A CN 111797334A CN 202010567887 A CN202010567887 A CN 202010567887A CN 111797334 A CN111797334 A CN 111797334A
Authority
CN
China
Prior art keywords
website
template
preset
identification information
matched
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.)
Granted
Application number
CN202010567887.8A
Other languages
Chinese (zh)
Other versions
CN111797334B (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

Images

Classifications

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

Landscapes

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

Abstract

The 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 the consumption of storage resources in short website service. The method comprises the following steps: acquiring a corresponding key character of website conversion to be accessed from a received website access request; acquiring website template identification information and website parameter values matched with the key characters of the website to be accessed based on a mapping relation among 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 to obtain a corresponding website to be visited and jumping to the website to be visited. In the method, the website to be accessed does not need to be stored in the mapping relation, thereby reducing the consumption of storage resources.

Description

Website access method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for accessing a website, an electronic device, and a storage medium.
Background
In the process of realizing the short website service, a mapping relation between a long website and a short website needs to be stored in a database every time the long website is converted into the short website, and when a user short website requests to access the corresponding long website, the long website corresponding to the short website can be obtained from the pre-stored mapping relation and then jumps to the long website.
Disclosure of Invention
The embodiment of the disclosure provides a website access method, a website access device, an electronic device and a storage medium, which are used for reducing the consumption of storage resources in a short website service.
In a first aspect of the present disclosure, a website access method is provided, including:
acquiring a key character of website conversion to be accessed corresponding to a website access request from the received website access request, wherein the character length of the key character 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 a mapping relation among key characters, website template identification information and 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;
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 the website to be accessed corresponding to the website access request.
In one possible implementation, the mapping relationship is created by:
converting the web address into a key character different from the key character of the web address conversion 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 set website parameter in the matched preset website template from the website;
and establishing a matching relationship among the key characters of the website conversion, the acquired website template identification information and the acquired website parameter values, and storing the matching relationship to obtain the mapping relationship.
In a possible implementation manner, the step of obtaining a preset website template matching the website from the website template set includes:
respectively obtaining the matching degree of each preset website template in the website template set and the website, and obtaining the preset website template with the matching degree meeting the matching degree threshold value, 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; or
Whether the matching degree of each preset website template and the website meets a matching degree threshold value or not is sequentially judged, and the preset website template with the matching degree meeting the matching degree threshold value is obtained when the preset website template with the matching degree meeting the matching degree threshold value is judged, 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 manner, the step of converting the website into a keyword different from a keyword of website conversion other than the website includes:
setting a character sequence different from the character sequence corresponding to the website except the website, and converting the character sequence set for the website into a key character by a set algorithm, wherein the character sequence comprises at least one character, and the character comprises integer numbers or letters.
In a possible implementation manner, after the step of obtaining the website template identification information and the website parameter value that are matched with the key character of the website to be visited, and before the step of obtaining the website to be visited corresponding to the website visiting request, the method 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 a 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 website address accessing apparatus, including:
the key character acquisition unit is configured to execute the acquisition of a key character of website conversion to be accessed corresponding to a received website access request, wherein the character length of the key character of the website conversion to be accessed is smaller than that 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 visited, wherein the website template identification information comprises identification information of a preset website template matched with the website to be visited;
a website determining unit 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 jumping unit is configured to execute jumping to a website to be visited corresponding to the website visiting request.
In one possible implementation manner, the website mapping unit is configured to create the mapping relationship by:
converting the web address into a key character different from the key character of the web address conversion 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 set website parameter in the matched preset website template from the website;
and establishing a matching relationship among the key characters of the website conversion, the acquired website template identification information and the acquired website parameter values, and storing the matching relationship to obtain the mapping relationship.
In one possible implementation, the website mapping unit is specifically configured to perform:
respectively obtaining the matching degree of each preset website template in the website template set and the website, and obtaining the preset website template with the matching degree meeting the matching degree threshold value, 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; or
Whether the matching degree of each preset website template and the website meets a matching degree threshold value or not is sequentially judged, and the preset website template with the matching degree meeting the matching degree threshold value is obtained when the preset website template with the matching degree meeting the matching degree threshold value is judged, 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 website mapping unit is specifically configured to perform:
setting a character sequence different from the character sequence corresponding to the website except the website, and converting the character sequence set for the website into a key character by a set algorithm, wherein the character sequence comprises at least one character, and the character comprises integer numbers or letters.
In one possible implementation manner, 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, a preset website template corresponding to the website template identification information matched with the website to be accessed is obtained according to the corresponding relationship between the website template identification information and the preset website template.
In a 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 present disclosure, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the program, the method of any one of the first aspect and one possible implementation manner is implemented.
In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, which stores computer instructions that, when executed on a computer, cause the computer to perform the method according to any one of the first aspect and one of the possible embodiments.
The scheme of the disclosure brings at least the following technical effects:
in the embodiment of the disclosure, a mapping relationship between a key character, website template identification information and a website parameter value is created and stored in advance, so that in the website access process, the website template identification information and the website parameter value which are matched with a website to be accessed are obtained through the mapping relationship, and then the website to be accessed is skipped through the obtained website template identification information and the website parameter value.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
Fig. 1 is a schematic flow chart illustrating a process of converting a long website into a short website according to an exemplary embodiment of the present disclosure;
fig. 2 is a schematic flow chart of a short address service provided in an exemplary embodiment of the present disclosure;
fig. 3 is a schematic diagram of an application scenario of website address 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 a key character, website template identification information, and a website parameter value according to an exemplary embodiment of the present disclosure;
fig. 5 is a schematic process diagram of website address access provided in an exemplary embodiment of the present disclosure;
FIG. 6 is an interaction diagram of website address access provided by an exemplary embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a website address accessing 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 make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in 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 above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein.
In order to facilitate better understanding of the technical solutions of the present disclosure by those skilled in the art, the following technical terms related to the present disclosure are explained.
Short web site: the network address is short in form and has the function of automatically redirecting to the designated link, the number of words of messages sent by instant social applications such as microblogs, short messages and the like is limited, a large number of bytes can be occupied by a too long website and even the website cannot be input, and the short website is convenient to use.
Long web site: the web sites with longer form, such as information web site link, instant communication web site link, electronic goods web site link, and shop web site link of internet e-commerce, etc., usually have more characters and more required storage resources.
The short web site service is a service capable of converting various long web sites such as information web site links, instant communication web site links, electronic commodity web site links, shop web site links of Internet and electronic commerce and the like into shorter and more convenient short web sites.
A terminal: may be a mobile terminal, a fixed terminal, or a portable terminal such as a mobile handset, station, unit, device, multimedia computer, multimedia tablet, internet node, communicator, desktop computer, laptop computer, notebook computer, netbook computer, tablet computer, Personal Communication System (PCS) device, personal navigation device, Personal Digital Assistant (PDA), audio/video player, digital camera/camcorder, positioning device, television receiver, radio broadcast receiver, electronic book device, game device, or any combination thereof, including accessories and peripherals of these devices, or any combination thereof.
The following explains the design concept of the present disclosure.
In order to implement the short website service, the mapping relationship between the long website and the short website needs to be obtained and stored in advance, and then when a user requests access through the short website, the user can access the corresponding long website based on the pre-stored mapping relationship, which specifically includes the following two processes:
the first process is as follows: and acquiring the mapping relation between the long website and the short website.
Each time a long website L is converted into a short website S, a module of a number sender is responsible for generating a globally unique integer identifier id, based on the integer id, the integer id is converted into a short character string m through a certain algorithm, and then a record of the long website 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 network address to the server through the terminal.
And S102, the server acquires a globally unique integer id from the number sender, and converts the integer id into a short character string through an algorithm.
And step S103, the server stores the mapping relation between the short character string and the long network address into a database, and converts the short character string into a short network address after putting the short character string into a corresponding domain name and sends the short network address to the terminal.
The second process: and accessing the long website through the short website.
Referring to fig. 2, the second process mainly includes the following steps:
step S201, the user sends the short website to the server through the terminal.
Step S202, the server determines to obtain the short character string from the short network address, and obtains the long network address corresponding to the short character string from the mapping relation stored in the database.
And step S203, the server jumps to the link of the corresponding long website through the redirection function of the http protocol.
With the increasing access of short network address services, the number of times of converting long network addresses into short character strings is increasing, the storage space of a database maintaining the mapping relation between short character strings and long network addresses is decreasing, the length of long network addresses 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 database is sharply reduced, and the problem cannot be fundamentally solved even by adopting a method of dividing tables of a database.
In view of this, the present disclosure provides a website access method, apparatus, electronic device and storage medium, for reducing consumption of storage resources in a short website service, where the method includes: the method comprises the steps that a preset website template corresponding to a long website is stored in advance, in the process of converting the long website into a short website, the preset website template matched with the long website is obtained firstly, and some characteristic information of the long website and the matched preset website template and key characters for converting the long website are stored as a mapping relation; and when the website access request carrying the key characters of the long website conversion is carried out, the feature 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 feature information and the corresponding preset website template, and the corresponding long website is jumped to.
The character length of the key character of the long web address conversion is smaller than that of the long web address, the long web address in the embodiment of the present disclosure may include, but is not limited to, a web address that is relatively long in the form of a web address, and the long web address in the following contents of the embodiment of the present disclosure represents the same description as the web address to be accessed; some characteristic information of the long website and the matched preset website template may include website template identification information of the preset website template and a website parameter value in the long website matched with the set website parameter in the preset website template.
The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
Referring to fig. 3, an application scenario for website 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 the website to be accessed, which is indicated by the user, to the server 302, receive the short website which is sent by the server and obtained by adding the service domain name to the key character for converting the website to be accessed, 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, acquire website template identification information of a preset website template matched with the website to be accessed and corresponding website parameter values, store the acquired website template identification information, the acquired website parameter values and a matching relationship of key characters of website conversion to be accessed in a mapping relationship in a database, and send a short website obtained by adding a service domain name to the key characters of website conversion to be accessed to the terminal; and acquiring key characters of website conversion 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 block chain server, a distributed server, or the like.
The following describes the website access method provided by the embodiment of the present disclosure in detail.
Some preset website templates are determined according to the characteristics of the websites to be accessed in the embodiment of the disclosure, such as https:// www.zzzz.com/share? Setting parameter values of uid and time to be different, namely different websites to be accessed, wherein https:// www.zzzz.com/share? Processing uid ═ mm } & time ═ mmm ═ to a preset website template, wherein the preset website template comprises a link address and setting parameters, and https:// www.zzzz.com/share? uid is the link address, parameters uid and time are the setting parameters, mm and mmm may be, but are not limited to, placeholders for setting parameters uid and time.
Acquiring a certain amount of websites to be accessed, analyzing the websites, acquiring corresponding preset website templates, and allocating globally unique website template identification information to each preset website template, where the website template identification information may be randomly generated integer random numbers such as 6789 and 0231, or globally unique character strings such as 00xx and y12y, and those skilled in the art can set the website according to actual requirements.
After a certain number of preset website templates are obtained, the mapping relationship between the preset website templates and the website template identification information may be stored, so as to facilitate query when obtaining the mapping relationship between the preset key characters, the website template identification information, and the website parameter values and implementing website access, specifically, the mapping relationship between the preset website templates and the website template identification information may be stored in a website template set in a database, the website template set may be, but is not limited to, a table, and the number of the website templates is not limited too much, and those skilled in the art may set the mapping relationship according to actual needs.
Further, after the preset website template is obtained, the following two processes can be performed:
the first process is as follows: and acquiring a mapping relation among preset key characters, website template identification information and website parameter values.
Referring to fig. 4, for any website, the process of the server obtaining the mapping relationship between the key character, the website template identification information, and the website parameter value is as follows:
step S401, receiving the website sent by the terminal, and converting the website into a key character different from the key character of the website conversion 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 website in this step; when the received website is converted into a key character, a character sequence different from the character sequence corresponding to the website other than the website may be set for the website (the received website), and the character sequence set for the website may be converted into the key character by 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, 5867, the character sequence may also be ccss, m321, etc., and those skilled in the art can set the character sequence according to actual needs.
Step S402, obtaining a preset website template matched with the website from the website template set.
As an embodiment, the preset website template matched with the website may be obtained according to a matching condition between 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:
respectively obtaining the matching degree of each preset website template in the website template set and the website, and obtaining the preset website template with the matching degree meeting the matching degree threshold value, 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.
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 matches between the website parameters of the preset website template and the website parameters of the website may be determined as the matching degree, and the condition that the link address matches and the website parameters completely match is determined as the matching degree satisfying the threshold value of the matching degree, that is, the preset website template whose website parameters completely match with the website parameters of the website is determined as the preset website template matching with the website.
The illustration is here for ease of understanding. If any one of the preset web site templates is http:// www.zzz.com/pay/info? the preset website template comprises two parts, namely a link address and link parameters, wherein the link address is http:// www.zzz.com/pay/info, the link parameters are t, m and sys parameters, and the link parameters are setting parameters in the preset website template.
If the preset web site template is http:// www.zzz.com/pay/info? t # {1} & m # {2} & sys # {3}, where there are several web sites, there are:
the first web address is http:// www.zzz.com/pay/info? t 123& m shop & sys android;
the second web address is http:// www.zzz.com/pay/info? t 8836& m & yes IOS;
the third web address is http:// www.zzz.com/pay/info? t 8836& m & yes & ios & from 1;
the fourth web address is http:// www.zzz.com/pay/info? t 8836& m user & sys2 ios;
the fifth web address is http:// www.yyy.com/pay/info? t 123& m shop & sys android.
Further, the link address and the website parameter in the first website are completely matched with the set parameters t, m, and sys in the preset website template, and the preset website template is a preset website template matched with the first website, and similarly, the preset website template is a preset website template matched with the second website.
The third website is compared with the preset website template and one more website parameter from is added, so that the third website is not matched with the preset website template; since the website parameter sys2 of the fourth website is matched with the set parameter sys of the default website template, the fourth website is not matched with the default website template, and since the link address of the fifth website is different from the link address of the default website template, the fifth website is not matched with the default website template.
The second acquisition mode is as follows:
and sequentially judging whether the matching degree of each preset website template and the website meets a matching degree threshold value or not, and obtaining the preset website template with the matching degree meeting the matching degree threshold value when judging the preset website template with the matching degree meeting the matching degree threshold value, 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.
As an embodiment, whether the matching degree of each preset website template and the website meets the matching degree threshold value or not may be sequentially determined according to the sequence of storage 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 those skilled in the art may flexibly set the matching degree threshold value according to actual requirements.
The content of the matching degree and the content of the matching degree satisfying the threshold of the matching degree can be referred to the description of the first obtaining method, and the description is not repeated here.
Step S403, acquiring website template identification information of the matched preset website template, and acquiring a 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 mapped by the matched preset website template from the mapping relation in the website template set.
Step S404, the key characters of the website conversion, the acquired website template identification information and the acquired website parameter values are established as a matching relationship and stored, and the mapping relationship is obtained.
Further, after the mapping relationship is obtained, the mapping relationship can be stored in a database so as to realize query during website service. It should be noted that the mapping relationship between the key character, the website template identification information and the website parameter value obtained here, and the mapping relationship between the preset website template and the website template identification information obtained in advance may be respectively stored in different locations 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 in the order of execution, and may be executed simultaneously or not.
As an embodiment, in step S402, if there is no preset website template matching the website in the website template set, the network parameter of the website may be used as a setting parameter, the link address and the setting parameter of the website are used as a new preset website template, a globally unique website template identification information is generated for the new preset website template, the mapping relationship between the new preset website template and the website template identification information is stored in the database, and the processes of step S403 and step S404 are performed based on the new preset website template.
The second process: and (5) a website access process.
Referring to fig. 5, after receiving a website access request sent by a user through a terminal, a server performs the following steps:
step S501, obtaining a key character of the website to be accessed conversion corresponding to the website access request from the received website access request, wherein the character length of the key character of the website to be accessed conversion is smaller than the character length of the website to be accessed.
Step S502, based on the mapping relationship between the key characters, the website template identification information and the website parameter values which are created and stored in advance, the website template identification information and the website parameter values which are matched with the key characters of the website to be accessed are obtained.
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, to obtain 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.
And step S504, jumping to the website to be accessed corresponding to the website access request.
Specifically, the website to be accessed can be skipped to through the redirection function of the http protocol.
The following of the embodiments of the present disclosure provides a specific example of website access; wherein the web address to be accessed is http:// www.zzz.com/pay/info? t 1& m 3& sys 12999348384 u; the key character of the website to be accessed is http:// x.cn/1n4lqk3 NGpm; the preset website template matched with the website to be accessed is http:// www.zzz.com/pay/info? t ═ 1} & m ═ 2} & sys & # {3}, the setting parameters in the preset website template are t, m and sys; and the mapping relationship between the key characters and the website template mode information and the website parameter values matched with the website to be accessed is established in advance, please refer to fig. 6, the data interaction among the terminal, the server and the database is as follows:
step S601, the user sends the website access request carrying http:// x.cn/1n4lqk3NGpm to the server through the terminal.
In step S602, the server obtains the key character http:// x.cn/1n4lqk3NGpm from the website access request.
And step S603, the server determines the website template identification information and the website parameter value matched with http:// x.cn/1n4lqk3NGpm based on the preset mapping relation among the key characters, the website template identification information and the website parameter value.
The values of the website parameters obtained in this example are 1, 3 and 12999348384u, respectively.
In step S604, the server obtains a preset website template matching the determined website template identification information from the website template set.
Get the preset website template http:// www.zzz.com/pay/info? t ═ 1} & m ═ 2} & sys #{3 }.
Step S605, the server adds the acquired website parameter value to the acquired preset website template to obtain the website to be accessed http:// www.zzz.com/pay/info? t 1& m 3& sys 12999348384 u.
That is, 1, 3 and 12999348384u in the website parameter values are added to the corresponding positions of the setting parameters t, m and sys in the obtained preset website template, respectively, so as to obtain the website to be accessed.
Step S606, the server jumps to the website to be accessed http:// www.zzz.com/pay/info? t 1& m 3& sys 12999348384 u.
In the website access method provided in the embodiment of the present disclosure, each to-be-accessed website does not need to be stored in the pre-stored mapping relationship, and further, when the to-be-accessed website is a long website that occupies a large amount of storage resources, or when the to-be-accessed websites are too many, consumption of the storage resources can be significantly reduced.
As shown in fig. 7, based on the same inventive concept, the disclosed embodiment further provides a website address accessing apparatus 700, which includes:
a key character obtaining unit 701 configured to perform obtaining, from a received website access request, a key character of a to-be-accessed website conversion corresponding to the website access request, where a character length of the to-be-accessed website conversion key character is smaller than a character length of the to-be-accessed website; and
a website mapping unit 702 configured to execute a mapping relationship based on pre-created and stored key characters, website template identification information, and website parameter values, to obtain website template identification information and website parameter values that match the key characters of the website to be visited, where the website template identification information includes identification information of a preset website template that matches the website to be visited;
a website determining unit 703 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 visited corresponding to the website visiting request;
and a website jumping unit 704 configured to perform jumping to a website to be visited corresponding to the website access request.
As an embodiment, the website mapping unit 702 is configured to create the mapping relationship by:
converting the website into a key character different from the key character of the website conversion except the website; 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 set website parameter in the matched preset website template from the website;
and establishing a matching relationship among the key characters of the website conversion, the acquired website template identification information and the acquired website parameter values, and storing the matching relationship to obtain the mapping relationship.
As an embodiment, the website mapping unit 702 is specifically configured to perform:
respectively obtaining the matching degree of each preset website template in the website template set and the website, and obtaining the preset website template with the matching degree meeting a matching degree threshold value, 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; or
And sequentially judging whether the matching degree of each preset website template and the website meets a matching degree threshold value or not, and obtaining the preset website template with the matching degree meeting the matching degree threshold value when judging the preset website template with the matching degree meeting the matching degree threshold value, 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.
As an embodiment, the website mapping unit 702 is specifically configured to perform:
setting a character sequence different from the character sequence corresponding to the website except the website, and converting the character sequence set for the website into a key character by a set algorithm, wherein the character sequence comprises at least one character, and the character comprises integer numbers or letters.
As an embodiment, the website determining unit 703 is further configured to perform:
before the step of obtaining the website to be accessed corresponding to the website access request, a preset website template corresponding to the website template identification information matched with the website to be accessed is obtained according to the corresponding relationship between the website template identification information and the preset website template.
As an embodiment, the preset website template includes a 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 processor-executable instructions as described above;
wherein the processor is configured to execute any one of the above website address access methods.
In an exemplary embodiment, a storage medium comprising instructions, such as a memory comprising instructions, executable by a processor of the electronic device to perform the method is also provided. Alternatively, the storage medium may be a non-transitory computer readable storage medium, for example, which 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 variations, uses, or adaptations of the disclosure following, in general, the 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 will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A website address access method, comprising:
acquiring a key character of website conversion to be accessed corresponding to a website access request from the received website access request, wherein the character length of the key character 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 a mapping relation among key characters, website template identification information and 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;
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 the website to be accessed corresponding to the website access request.
2. The method of claim 1, wherein the mapping relationship is created by:
converting the web address into a key character different from the key character of the web address conversion 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 set website parameter in the matched preset website template from the website;
and establishing a matching relationship among the key characters of the website conversion, the acquired website template identification information and the acquired website parameter values, and storing the matching relationship to obtain the mapping relationship.
3. The method of claim 2, wherein the step of obtaining a preset web site template matching the web site from the set of web site templates comprises:
respectively obtaining the matching degree of each preset website template in the website template set and the website, and obtaining the preset website template with the matching degree meeting the matching degree threshold value, 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; or
Whether the matching degree of each preset website template and the website meets a matching degree threshold value or not is sequentially judged, and the preset website template with the matching degree meeting the matching degree threshold value is obtained when the preset website template with the matching degree meeting the matching degree threshold value is judged, 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 keyword different from a keyword of a web address conversion other than the web address comprises:
setting a character sequence different from the character sequence corresponding to the website except the website, and converting the character sequence set for the website into a key character by a set algorithm, wherein the character sequence comprises at least one character, and the character comprises integer numbers or letters.
5. The method of claim 1, wherein 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 visited, and before the step of obtaining the website to be visited corresponding to the website visiting request, the method 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 to 5, wherein the preset website template comprises a link address of the website to be accessed and the setting parameter.
7. A website address accessing apparatus, comprising:
the key character acquisition unit is configured to execute the acquisition of a key character of website conversion to be accessed corresponding to a received website access request, wherein the character length of the key character of the website conversion to be accessed is smaller than that 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 visited, wherein the website template identification information comprises identification information of a preset website template matched with the website to be visited;
a website determining unit 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 jumping unit is configured to execute jumping to a website to be visited corresponding to the website visiting request.
8. The apparatus of claim 7, wherein the website mapping unit is configured to create the mapping relationship by:
converting the web address into a key character different from the key character of the web address conversion 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 set website parameter in the matched preset website template from the website;
and establishing a matching relationship among the key characters of the website conversion, the acquired website template identification information and the acquired website parameter values, and storing the matching relationship to obtain the mapping relationship.
9. 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.
10. A computer-readable storage medium having stored thereon computer instructions which, when executed 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 true CN111797334A (en) 2020-10-20
CN111797334B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434231A (en) * 2020-11-05 2021-03-02 北京奇艺世纪科技有限公司 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系统是怎么设计的?", 计算机与网络, no. 10 *
郭一华;: "短网址服务系统的实现及相关技术研究", 软件, no. 01 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112434231A (en) * 2020-11-05 2021-03-02 北京奇艺世纪科技有限公司 Data processing method and device and electronic equipment
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

Also Published As

Publication number Publication date
CN111797334B (en) 2024-01-23

Similar Documents

Publication Publication Date Title
US9544355B2 (en) Methods and apparatus for realizing short URL service
KR20100048571A (en) Method, apparatus and system for providing muti user-multi service
US8126962B1 (en) Systems and methods for tracking user activity at website
CN103944944A (en) Webpage link sharing method and system, and electronic device
CN105264821A (en) Methods and apparatus for generating a message for a wireless device
CN108737252B (en) Information pushing method and device based on block chain
CN109753586A (en) A kind of video recommendation method and equipment
US20170155712A1 (en) Method and device for updating cache data
CN111797334B (en) Website access method and device, electronic equipment and storage medium
CN104811485A (en) Resource sharing method
CN110647634A (en) Method and device for searching media resource, storage medium and electronic device
JP7217181B2 (en) WEARABLE DEVICE, INFORMATION PROCESSING METHOD, APPARATUS AND SYSTEM
US8037067B1 (en) Systems and methods for tracking user activity at website
CN111444448B (en) Data processing method, server and system
CN112579877B (en) Control method, device, storage medium and equipment of information source system
US9363665B1 (en) Targeting insertion work-around for long term evolution (LTE) path
JP5898132B2 (en) Advertisement selection device, advertisement processing system, advertisement selection method, and program
WO2014169497A1 (en) Method and server for pushing media file
CN110944037B (en) Method, computer device and storage medium for client cache change configuration
CN114817794A (en) Webpage content control method, device, equipment and medium
US11423109B2 (en) Information processing method, server and computer program product
CN110427379A (en) The cochain method and device thereof of user's search associated data
CN104901945A (en) Terminal
CN104794165A (en) Page display method, device and system
US12041139B2 (en) Apparatus, method and computer readable medium for ranking network function service producers

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