Disclosure of Invention
The application provides a system and a method for generating a URL (uniform resource locator), which aim to solve the problems that the existing URL generating mode is insufficient in reliability and cannot be analyzed in a targeted manner.
In a first aspect, to achieve the above object, the present application provides a system for generating a URL, where the system includes:
the platform type acquisition module is used for acquiring a platform type and acquiring a preset parameter corresponding to the platform type from prestored parameter information;
the platform type URL sub-type generating module is used for generating a platform type URL sub-type according to a first preset rule;
the system comprises an entrance type acquisition module, a parameter storage module and a parameter processing module, wherein the entrance type acquisition module is used for acquiring an entrance type and acquiring a preset parameter corresponding to the entrance type from prestored parameter information;
the URL sub-formula generation module of the entry type is used for generating the URL sub-formula of the entry type according to a second preset rule;
the recommendation bit type acquisition module is used for acquiring a recommendation bit type and acquiring a preset parameter corresponding to the recommendation bit type from prestored parameter information;
the URL sub-formula generation module of the recommendation bit type is used for generating the URL sub-formula of the recommendation bit type according to a third preset rule;
and the URL generating module is used for generating a URL according to a fourth preset rule, wherein the URL at least comprises a URL sub-type of an application program entry, a URL sub-type of the platform type, a URL sub-type of the entry type and a URL sub-type of the recommendation bit type, and the URL sub-type of the application program entry is obtained from pre-stored parameter information.
Preferably, the system for generating a URL further includes:
the entry type subtype acquisition module is used for acquiring the subtype of the entry type and acquiring preset parameters corresponding to the subtype of the entry type from pre-stored parameter information;
and the URL sub-type generation module is used for generating URL sub-types of the entry types according to a fifth preset rule.
Preferably, the system for generating URL further includes:
a recommendation bit identifier obtaining module for obtaining a recommendation bit identifier;
and the URL sub-formula generation module of the recommendation bit identifier is used for generating the URL sub-formula of the recommendation bit identifier according to a sixth preset rule.
Preferably, the system for generating a URL further includes:
and the URL sub-type acquisition module of the application program entry is used for acquiring the URL sub-type of the application program entry.
Preferably, the system for generating a URL further includes:
the URL storage module is used for storing URLs;
and the screening module is used for screening out URL subformulae corresponding to the platform type, the entry type and/or the recommendation bit type from the URL storage module.
In a second aspect, the present application further provides a method for generating a URL, the method including:
acquiring a platform type, and acquiring a preset parameter corresponding to the platform type from prestored parameter information;
generating a URL subformula of the platform type according to a first preset rule;
acquiring an entry type, and acquiring a preset parameter corresponding to the entry type from prestored parameter information;
generating a URL subformula of the entry type according to a second preset rule;
acquiring a recommended bit type, and acquiring a preset parameter corresponding to the recommended bit type from prestored parameter information;
generating a URL sub-formula of the recommended bit type according to a third preset rule;
and generating a URL according to a fourth preset rule, wherein the URL at least comprises a URL subformula of an application program entry, a URL subformula of the platform type, a URL subformula of the entry type and a URL subformula of the recommended bit type, and the URL subformula of the application program entry is obtained from prestored parameter information.
Preferably, after the generating the URL subformula of the entry type according to the second preset rule, the method further includes:
acquiring a subtype of the entry type, and acquiring preset parameters corresponding to the subtype of the entry type from pre-stored parameter information;
and generating a URL sub-type of the entry type according to a fifth preset rule.
Preferably, after the generating the URL subformula of the recommendation bit type according to the third preset rule, the method further includes:
acquiring a recommendation bit identifier;
and generating a URL sub-formula of the recommendation bit identifier according to a sixth preset rule.
Preferably, before generating the URL according to the fourth preset rule, the method further includes:
the URL subformula of the application portal is obtained.
Preferably, the first preset rule is: lmsl = preset parameters of the platform type.
As can be seen from the above technical solutions, the system and method for generating a URL provided in the embodiments of the present application specifically acquire a platform type, and acquire preset parameters corresponding to the platform type from pre-stored parameter information; generating a URL subformula of the platform type according to a first preset rule; acquiring an entry type, and acquiring a preset parameter corresponding to the entry type from prestored parameter information; generating a URL sub-formula of the entry type according to a second preset rule; acquiring a recommended bit type, and acquiring a preset parameter corresponding to the recommended bit type from prestored parameter information; generating a URL subformula of the recommended bit type according to a third preset rule; and generating the URL according to a fourth preset rule. The system and the method for generating the URL can quickly obtain and meet the requirement of operators on reliable entry URL. The workload of developers and production personnel can be reduced, the operation personnel can conveniently and quickly obtain the URL report form which the user enters into the application, and the next step of product operation analysis and planning can be conveniently carried out.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Detailed Description
The features and advantages of the present application will become more apparent and appreciated from the following detailed description of the application.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
In the description of the present application, it should be noted that the terms "upper", "lower", "inner", "outer", "front", "rear", "left" and "right", etc. indicate orientations or positional relationships based on operational states of the present application, and are only used for convenience of description and simplification of description, but do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present application. Furthermore, the terms "first," "second," "third," and "fourth" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Uniform resource locators (or Uniform resource locators/locating addresses, URL addresses, etc., english: uniform resource locators, often abbreviated as URLs) are the mainstream methods for accessing, locating and calling web service resources. The URL may be the address of a standard resource on the internet, each resource on the internet having a unique URL. The URL may include components such as transport protocol, server (typically a domain name, sometimes an IP address), port number, path, and query parameters. In the conventional URL communication method, the query parameters are usually written in the URL in the clear text. In a Web page service using the HTTP protocol, a Web server is requested by a URL (domain name + resource address), and the server receives the request and returns a corresponding resource according to the resolved URL address, thereby browsing Web page information. In the traditional Web development, a URL address corresponds to an actually existing html page on an internet Web server, the naming of a URL path of a website is directly related to the frame structure and the design scheme of the website, the good naming of the URL path can not only reduce the difficulty in optimization, but also quickly improve the weight of the website and be beneficial to the grabbing of a search engine, and a user can remember the website more conveniently by observing the structural semantics of the URL.
The URL is colloquially called a web page address, which is the address of a standard resource on the internet. For example, the format of the URL may be: protocol type [/[ credential information required to access a resource @ ] server address [: port number ] ] [/resource level UNIX file path ] file name [? Query ] [ # fragment ID ]. Wherein, the composition that can include is:
transport protocol (e.g. http)
Hierarchical URL markup symbol (being [// ], fixed)
Credential information needed to access a resource (which may be omitted)
Server (usually domain name, sometimes IP address)
Port number (indicated numerically, 80 "may be omitted if it is the default value for HTTP)
Path (distinguish every directory name in path with "/" character)
Query (frame parameters of GET mode, which may be referred to as parameter part, search part, query part, etc., starting with the ".
It is to be understood that the access credential information, port number, fragment, etc. therein belong to optional parts, not essential parts constituting the URL. The original query parameters for querying the resource are included in the query portion, which may include data to the right of "=" since the parameter name and data are separated by "=", e.g., the original query parameters may include the value of the ID. For example, https:// item.mi.com/product.doid =10000030, and the value 10000030 of id is the original query parameter in the plaintext. For another example, ftp:// prep. Ai. Mit. Edu/pub/gnu; type = ditem =123, and item 123 is the plaintext original query parameter.
The operation related to the video inquiry system is executed by a third-party organization, and the product is required to be deployed to a recommendation position of an opposite platform, so that user traffic can enter the product. When the application entry URL is configured to the recommendation position of the opposite platform, the application entry URL of the LES server needs to be provided, wherein the application entry URL comprises a URL entering an application home page, a URL entering an application album and a URL entering an application activity. The existing method is used for manual generation, which is easy to write wrongly, and the reliability of the generated application entry URL can not be effectively ensured; once wrongly written, it may result in the failure to enter our application. In addition, the naming of the URL path of the website is related to the subsequent query and analysis steps, a good naming of the URL path can reduce the difficulty in optimization, is beneficial to the grabbing of a search engine, and a user can remember the website more conveniently by observing the structural semantics of the URL, so that targeted analysis and operation are facilitated.
Fig. 1 is a schematic structural diagram of a system for generating a URL according to an embodiment of the present application, and fig. 2 is a schematic structural diagram of a part of the system for generating a URL, as shown in fig. 1 and fig. 2, the system includes:
the platform type acquiring module 101 is used for acquiring a platform type and acquiring a preset parameter corresponding to the platform type from prestored parameter information;
the platform type URL sub-formula generation module 102 is configured to generate a URL sub-formula of the platform type according to a first preset rule.
Specifically, the platform type is represented by lmsl, the preset parameter corresponding to the platform type is represented by hd for high definition, and sd for standard definition; for another example: a brand of high definition-hd-100, where 100 represents a brand, i.e., desktop type, appended behind in pure numbers. Wherein the first preset rule is as follows: lmsl = preset parameters of the platform type. If the platform type selected by the user is high definition, the URL of the platform type generated according to a first preset rule is sub-formula as follows: lmsl = hd. If the platform type selected by the user is 'certain brand high definition', the URL subformula of the platform type generated according to a first preset rule is as follows: lmsl = hd-100,
the parameter information pre-stored in the parameter information storage module 701 forms a corresponding relationship between the type and the preset parameter, and the following parameter information may be pre-stored in the same rule and is not described again.
An entry type obtaining module 201, configured to obtain an entry type, and obtain a preset parameter corresponding to the entry type from pre-stored parameter information;
and the URL subformulation generation module 202 of the entry type is used for generating the URL subformulation of the entry type according to a second preset rule.
Specifically, the entry type is represented by lmuf, and the preset parameter corresponding to the entry type is as follows: 0-home, 1-album, 2-activity. Wherein the second preset rule is: lmuf = preset parameters of the entry type. If the entry type selected by the user is the 'home page', the URL of the entry type generated according to the second preset rule is sub-formula as follows: lmuf =0.
A recommended bit type obtaining module 301, configured to obtain a recommended bit type, and obtain a preset parameter corresponding to the recommended bit type from pre-stored parameter information;
and a URL subformula generation module 302 of the recommendation bit type, configured to generate a URL subformula of the recommendation bit type according to a third preset rule.
In particular, the recommended bit type is denoted lmcid, i.e. area ID, such as some operator ID-xxxxx. Wherein the third preset rule is: lmcid = preset parameter of the recommended bit type, and the URL of the recommended bit type generated according to a third preset rule is sub-formula: lmcid = xxxxx.
And a URL subformer acquiring module 401 of the application program entry, configured to acquire a URL subformer of the application program entry.
A URL generating module 402, configured to generate a URL according to a fourth preset rule, where the URL includes at least a URL subformula of an application entry, a URL subformula of the platform type, a URL subformula of the entry type, and a URL subformula of the recommendation bit type, and the URL subformula of the application entry is obtained from pre-stored parameter information.
Specifically, the URL of the application program entry is preset in the parameter information storage module 800, and has a format of: http:// ip: port/index. Php? Wherein, ip is the ip address of the host where the lWS server is located, port is the Port monitored by the lWS server, and other areas only change ip and Port.
Generating a URL according to the fourth preset rule as follows:
http://ip:port/index.phplmuf=0&lmsl=hd-100&lmcid=xxxxxx。
wherein the fourth rule generates the URL for each URL sub-combination. In the generated URL, the order of acquiring URL subformulae is not limited. And acquiring the generated URL sub-formula before generating the URL. When generating a URL, none of the above conditions may be null.
Further, the system further comprises an entry type subtype obtaining module 501, configured to obtain a subtype of the entry type, and obtain a preset parameter corresponding to the subtype of the entry type from pre-stored parameter information;
a URL subtype generating module 502 for generating a URL subtype of the entry type according to a fifth preset rule.
Specifically, the sub-type of the entry type is represented by lmsid, and the preset parameters corresponding to the sub-type of the entry type are as follows: when lmuf is 0, the content of this field is meaningless; when 1, 2, lmsid represents the subtype under this entry type, which album if album, and which activity if activity. Wherein the fifth preset rule is: lmsid = preset parameters for a subtype of the entry type. If the subtype of the entry type selected by the user is '0', the URL of the subtype of the entry type generated according to the fifth preset rule is sub-type: lmsid =0. The generated URL is as follows:
http://ip:port/index.phplmuf=0&lmsid=0&lmsl=hd-100&lmcid=xxxxxx。
further, the apparatus further includes a recommendation bit identifier obtaining module 601, configured to obtain a recommendation bit identifier;
and a URL subformula generation module 602 of the recommendation bit identifier, configured to generate a URL subformula of the recommendation bit identifier according to a sixth preset rule.
Specifically, the recommendation bit identification is represented by lmp, and the recommendation bit identification is automatically allocated by the system. The sixth preset rule is as follows: lmp = the recommendation bit identifier, and a URL of the recommendation bit identifier generated according to a sixth preset rule is represented by: lmp =0. The generated URL is as follows:
http://ip:port/index.phplmuf=0&lmsid=0&lmsl=hd-100&lmcid=xxxxxx&lmp=0。
specific applications of the generated URL system described herein are shown in fig. 3-5. According to the technical scheme, the URL is automatically generated according to certain conditions and formats, the reliable entry URL required by operators can be quickly obtained and met, and the workload of developers and production personnel can be reduced. And the conditions for generating URL subformulae can be increased according to specific requirements, so that the generated URL is convenient for query statistics and is beneficial to the next step of product operation analysis and planning.
Corresponding to the embodiment of the system for generating the URL, the application also provides an embodiment of a method for generating the URL. Referring to fig. 6, a flowchart of a method for generating a URL provided in an embodiment of the present application is shown, where the method includes:
s100: acquiring a platform type, and acquiring preset parameters corresponding to the platform type from prestored parameter information; generating a URL subformula of the platform type according to a first preset rule;
s200: acquiring an entry type, and acquiring a preset parameter corresponding to the entry type from prestored parameter information; generating a URL subformula of the entry type according to a second preset rule;
s300: acquiring a recommended bit type, and acquiring a preset parameter corresponding to the recommended bit type from prestored parameter information; generating a URL subformula of the recommended bit type according to a third preset rule;
s400: and generating a URL according to a fourth preset rule, wherein the URL at least comprises a URL subformula of an application program entry, a URL subformula of the platform type, a URL subformula of the entry type and a URL subformula of the recommended bit type, and the URL subformula of the application program entry is obtained from prestored parameter information.
Further, the method also comprises S500: acquiring a subtype of the entry type, and acquiring a preset parameter corresponding to the subtype of the entry type from pre-stored parameter information; and generating a URL sub-type of the entry type according to a fifth preset rule.
Further, the method also comprises the step of S600: acquiring a recommendation bit identifier; and generating a URL subformula of the recommendation bit identifier according to a sixth preset rule.
Further, before generating the URL according to the fourth preset rule, the method further includes: the URL subformula of the application entry is obtained.
Further, the first preset rule is as follows: lmsl = preset parameters of the platform type; the second preset rule is as follows: lmsl = preset parameters of the platform type; lmuf = preset parameters of the entry type; the third preset rule is as follows: lmcid = preset parameter of the recommended bit type; the fourth rule generates the URL for each URL sub-combination.
When the product operation group uses the system for generating the URL, the platform type, the entrance type, the recommendation bit type and the like are configured, and the URL and the statistical data are generated after the configuration is completed. The configuration order may be: platform type > entry type > recommendation bit type. For example, enter the generate URL system, click a button, enter the generate application portal URL configuration interface. The configuration interface can select a platform type, a desktop type, an entrance type, a recommendation bit type and the like; all conditions cannot be null. And after the selection or filling is completed, clicking a URL generation button to generate a corresponding entry URL for use.
In the system for generating the URL, the system further includes an inquiry entry for performing inquiry statistics on the generated URL, which is beneficial to an operator to quickly obtain a URL report that the user enters the application, and is convenient for performing next-step product operation analysis and planning.
Specifically, as shown in fig. 7, the method further includes: a URL storage module 801 configured to store a URL; a screening module 802, configured to screen out, in the URL storage module, URLs that conform to URL subformulae corresponding to the platform type, the entry type, and/or the recommendation bit type. The specific application of the query URL described in the present application is shown in fig. 8.
When the URL report is inquired, a certain key is clicked, and a configuration interface for inquiring the URL is entered. The configuration interface can select a platform type, an entrance type, a recommendation type and a time period, respectively generate URL sub-types according to preset rules, and screen out URLs conforming to the URL sub-types from a URL storage module.
When the user is in the inquiry, if a certain condition is empty or a specific identifier, all the sub-conditions under the condition are defaulted. And after the selection is finished, clicking a query button, querying the URL meeting the conditions, and generating a report for downloading.
The present application has been described in detail with reference to specific embodiments and illustrative examples, but the description is not intended to limit the application. Those skilled in the art will appreciate that various equivalent substitutions, modifications or improvements may be made to the presently disclosed embodiments and implementations thereof without departing from the spirit and scope of the present disclosure, and these fall within the scope of the present disclosure. The protection scope of this application is subject to the appended claims.