CN113704664A - Method and device for generating routing address for accessing page - Google Patents

Method and device for generating routing address for accessing page Download PDF

Info

Publication number
CN113704664A
CN113704664A CN202110987677.9A CN202110987677A CN113704664A CN 113704664 A CN113704664 A CN 113704664A CN 202110987677 A CN202110987677 A CN 202110987677A CN 113704664 A CN113704664 A CN 113704664A
Authority
CN
China
Prior art keywords
parameter
routing address
real
time value
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110987677.9A
Other languages
Chinese (zh)
Inventor
郭继友
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Fangjianghu Technology Co Ltd
Original Assignee
Beijing Fangjianghu 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 Fangjianghu Technology Co Ltd filed Critical Beijing Fangjianghu Technology Co Ltd
Priority to CN202110987677.9A priority Critical patent/CN113704664A/en
Publication of CN113704664A publication Critical patent/CN113704664A/en
Pending legal-status Critical Current

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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

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)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention provides a method and a device for generating a routing address for accessing a page, and belongs to the technical field of computers. The method comprises the following steps: acquiring a preset routing address template under the condition that the access to the page is triggered, wherein the routing address is obtained after a parameter real-time value is filled in the preset routing address template; analyzing the acquired preset routing address template to obtain a parameter identifier of the parameter real-time value to be acquired; calling a parameter real-time value acquisition function corresponding to the obtained parameter identifier to acquire a parameter real-time value; and filling the acquired real-time values of the parameters into the acquired preset routing address template so as to generate the routing address. Therefore, the timeliness of generating the routing address is improved.

Description

Method and device for generating routing address for accessing page
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a routing address for accessing a page.
Background
In the multi-service cooperation, dynamically acquired information and parameters exist in the page routes which jump to each other, and non-technical personnel such as page operation cannot define the dynamic route which jumps from one page to another page. Technicians add dynamic parameters and parameter values to the code for the independent paths but the technicians do not know the independent paths, but non-technicians know the independent paths but do not know the dynamic parameters and parameter values, so the method for generating the routing addresses by directly defining the routing addresses in the code is not high in universality and maintainability; in addition, frequently modifying the codes of the paths and issuing the codes because of the change of the service jump paths, and the timeliness of generating the routing addresses is poor.
Disclosure of Invention
It is an object of embodiments of the present invention to provide a method and apparatus for generating a routing address for accessing a page that solves, or at least partially solves, the above mentioned problems.
In order to achieve the above object, an aspect of the embodiments of the present invention provides a method for generating a routing address for accessing a page, the method including: acquiring a preset routing address template under the condition that the access to the page is triggered, wherein the routing address is obtained after a parameter real-time value is filled in the preset routing address template; analyzing the acquired preset routing address template to obtain a parameter identifier of the parameter real-time value to be acquired; calling a parameter real-time value acquisition function corresponding to the obtained parameter identifier to acquire a parameter real-time value; and filling the acquired real-time values of the parameters into the acquired preset routing address template so as to generate the routing address.
Optionally, the filling the obtained real-time parameter value into the obtained preset routing address template to generate the routing address includes: and replacing the parameter identifier corresponding to the parameter identifier needing to acquire the parameter real-time value in the acquired preset routing address template by the acquired parameter real-time value to generate the routing address.
Optionally, the analyzing the obtained preset routing address template to obtain the parameter identifier for which the parameter real-time value needs to be obtained includes: acquiring a parameter identifier preset form in the acquired preset routing address template; and processing the acquired parameter identifier preset form, and removing the parameter identifier preset structure to obtain the parameter identifier.
Optionally, the obtaining of the preset form of the parameter identifier corresponding to the parameter identifier in the obtained preset routing address template includes: and acquiring the preset form of the parameter identifier by using a regular expression.
Optionally, the triggering access to one of the pages includes: access to a said page is triggered by the interaction of the component for initiating access to a said page.
Optionally, the obtaining the preset routing address template includes: and acquiring the preset routing address template from the data of the component.
Optionally, the preset routing address template is determined based on: detecting whether an input cursor is located at a real-time value position of a link address to be configured, wherein the real-time value position of the parameter real-time value needs to be filled; displaying a list of parameter descriptions in the event that the input cursor is detected to be at the real-time value location; and under the condition that one parameter description in the displayed parameter list is selected, adding a parameter identifier preset form corresponding to the selected parameter description at the input cursor.
Optionally, the detecting whether the input cursor is located at a real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, includes: and detecting whether the input cursor is located in a parameter preset structure needing to fill in the parameter real-time value.
Optionally, determining the preset routing address template further includes: before detecting whether the input cursor is located at the real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, judging whether to start detecting whether the input cursor is located at the real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, by judging whether at least one of the following occurs: and the input box of the link address to be configured acquires a focus, the input cursor moves and the value in the input box changes.
Accordingly, another aspect of the embodiments of the present invention further provides an apparatus for generating a routing address for accessing a page, where the apparatus includes: the preset routing address template acquisition module is used for acquiring a preset routing address template under the condition that the access to the page is triggered, wherein the routing address is obtained after the parameter real-time value is filled in the preset routing address template; the analysis module is used for analyzing the acquired preset routing address template to obtain a parameter identifier of the parameter real-time value required to be acquired; the calling module is used for calling a parameter real-time value acquisition function corresponding to the obtained parameter identifier so as to acquire a parameter real-time value; and the routing address generation module is used for filling the acquired real-time values of the parameters into the acquired preset routing address template so as to generate the routing address.
Optionally, the filling the acquired real-time parameter value in the acquired preset routing address template by the routing address generation module to generate the routing address includes: and replacing the parameter identifier corresponding to the parameter identifier needing to acquire the parameter real-time value in the acquired preset routing address template by the acquired parameter real-time value to generate the routing address.
Optionally, the analyzing module analyzes the acquired preset routing address template to obtain the parameter identifier of the parameter real-time value to be acquired includes: acquiring a parameter identifier preset form in the acquired preset routing address template; and processing the acquired parameter identifier preset form, and removing the parameter identifier preset structure to obtain the parameter identifier.
Optionally, the obtaining of the preset form of the parameter identifier corresponding to the parameter identifier in the obtained preset routing address template includes: and acquiring the preset form of the parameter identifier by using a regular expression.
Optionally, the triggering access to one of the pages includes: access to a said page is triggered by the interaction of the component for initiating access to a said page.
Optionally, the obtaining, by the preset routing address template obtaining module, a preset routing address template includes: and acquiring the preset routing address template from the data of the component.
Optionally, the preset routing address template is determined based on: detecting whether an input cursor is located at a real-time value position of a link address to be configured, wherein the real-time value position of the parameter real-time value needs to be filled; displaying a list of parameter descriptions in the event that the input cursor is detected to be at the real-time value location; and under the condition that one parameter description in the displayed parameter list is selected, adding a parameter identifier preset form corresponding to the selected parameter description at the input cursor.
Optionally, the detecting whether the input cursor is located at a real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, includes: and detecting whether the input cursor is located in a parameter preset structure needing to fill in the parameter real-time value.
Optionally, determining the preset routing address template further includes: before detecting whether the input cursor is located at the real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, judging whether to start detecting whether the input cursor is located at the real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, by judging whether at least one of the following occurs: and the input box of the link address to be configured acquires a focus, the input cursor moves and the value in the input box changes.
In addition, another aspect of the embodiments of the present invention also provides a machine-readable storage medium, which stores instructions for causing a machine to execute the above-mentioned method.
In addition, another aspect of the embodiments of the present invention also provides a computer program product, which includes a computer program/instructions, and the computer program/instructions, when executed by a processor, implement the method described above.
According to the technical scheme, the parameter real-time value is obtained, and the routing address is obtained by filling the obtained parameter real-time value into the preset routing address template, so that the parameter real-time value is obtained in real time, a non-technical person can define the dynamic routing only by obtaining the preset routing address template, and the problem that the non-technical person cannot define the dynamic routing for jumping from one page to another page is solved. In addition, as long as the preset routing address template is obtained, a non-technical person can obtain the dynamic routing, so that the universality and maintainability of the method for generating the routing address are improved. In addition, as long as the preset routing address template is obtained, and the real-time value of the parameter is obtained in real time, the routing address for accessing the page can be obtained, the routing address can be obtained based on the change of the service jump path, technical personnel do not need to frequently modify the codes of the path and issue the codes, and the timeliness of generating the routing address is improved.
Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the embodiments of the invention without limiting the embodiments of the invention. In the drawings:
FIG. 1 is a flow chart of a method for generating a routing address for accessing a page according to an embodiment of the present invention;
FIG. 2 is a schematic view of an interface of a display assembly provided in accordance with another embodiment of the present invention;
fig. 3 is a schematic view of a visualization interface for configuring a preset routing address template according to another embodiment of the present invention;
FIG. 4 is a logic diagram illustrating a preset routing address template according to another embodiment of the present invention;
FIG. 5 is a logical diagram of generating a routing address according to another embodiment of the present invention; and
fig. 6 is a block diagram of an apparatus for generating a routing address for accessing a page according to another embodiment of the present invention.
Description of the reference numerals
1 preset routing address template obtaining module 2 analysis module
3 calling module and 4 routing address generating module
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating embodiments of the invention, are given by way of illustration and explanation only, not limitation.
One aspect of embodiments of the present invention provides a method of generating a routing address for accessing a page.
Fig. 1 is a method for generating a routing address for accessing a page according to an embodiment of the present invention. As shown in fig. 1, the method includes the following.
In step S10, in the case that an access to a page is triggered, a preset routing address template is obtained, wherein the routing address is obtained after the parameter real-time value is filled in the preset routing address template. Optionally, in the embodiment of the present invention, a component for starting to access a certain page may be interacted with to trigger to access the certain page. As shown in fig. 2, with an "view immediately" button component, when clicked, triggers access to a page. Preferably, in a case where the access to a certain page is triggered by interacting with a component for starting the access to a certain page, the preset routing address template may be stored in data of the interacted component, and the preset routing address template may be extracted from the data of the interacted component to obtain the preset routing address template. In addition, the routing address for accessing the page can be obtained by filling the parameter real-time value in the preset routing address template. For example, the preset routing address template may include the following: the routing address protocol, the port number and the path, the parameter number, the parameter name, the parameter identifier and the like, and the routing address can be obtained only by filling a parameter real-time value in a preset routing address template. In addition, the real-time value of the parameter is a dynamic value of a parameter included in the routing address, for example, a routing address,https://marketing.ke.com/activity/h5city=120000&agent_id= 1000000026680688wherein, the routing address includes two parameters, city and agent _ id, and in the routing address, the real-time value of city is 120000, and the real-time value of agent _ id is 1000000026680688.
In step S11, the acquired preset routing address template is parsed to obtain the parameter identifier for which the real-time value of the parameter needs to be acquired. Wherein the content of the first and second substances,the obtained parameter identifier may be one or more, and is not limited to this. In addition, a parameter identifier is an identification of a parameter set in the preset routing address template. For example, a predetermined routing template ishttps://marketing.ke.com/activity/h5city={{CITY_CODE}}&agent_id={{AGENT_ ID}}The preset routing address template comprises two parameters, namely a CITY parameter identifier and an AGENT _ ID, wherein the CITY parameter identifier is a CITY _ CODE, and the AGENT _ ID parameter identifier is an AGENT _ ID. The preset routing address template comprises parameter identifiers of parameters, and the parameter identifiers of the parameter real-time values to be acquired are obtained by analyzing the preset routing address template. For example, the parameter identifier for acquiring the parameter real-time value can be obtained in the acquired preset routing address template through the following steps. The preset form of the parameter identifier is obtained from the obtained preset routing address template, where the preset form of the parameter identifier may be set according to specific situations, for example, the preset form of the parameter identifier is composed of the parameter identifier and a preset structure of the parameter identifier, for example, the preset structure of the parameter identifier may be "or { }, # #, and the like, which is not limited. Takes a preset routing template ashttps://marketing.ke.com/activity/h5city={{CITY_CODE}}&agent_id= {{AGENT_ID}}For example, the preset form of the parameter identifier is a parameter identifier plus { }, and the preset form of the parameter identifier includes { { CITY _ CODE } }, { { AGENT _ ID } }. If the routing address may include one or more parameters, the preset routing address template may include one or more preset forms of parameter identifiers, and different preset forms of parameter identifiers include the same elements but different presentation forms, and the presentation forms of the preset forms of parameter identifiers are related to the parameter identifiers. For example, using a predetermined routing template ashttps://marketing.ke.com/activity/h5city={{CITY_CODE}}&agent_id ={{AGENT_ID}}For example, two preset forms of parameter identifiers, { { CITY _ CODE } }, { { AGENT _ ID } }, each preset form of parameter identifier is a parameter identifier plus { }, and thus, the elements included in the preset forms of parameter identifiers are the same; however, the parameter identifiers differ for different parametersThe preset form of the parameter identifier includes the parameter identifier, and thus, the display forms of different preset forms of the parameter identifier are different. That is, the preset form of the parameter identifier corresponding to different parameters is different. Optionally, in the embodiment of the present invention, the parameter identifier preset form may be obtained by using a regular expression. And after the parameter identifier preset form is obtained, processing the obtained parameter identifier preset form, and removing the parameter identifier preset structure to obtain the parameter identifier. In the embodiment of the present invention, the parameter identifier preset form may be composed of a parameter identifier and a parameter identifier preset structure, and after the parameter identifier preset form is obtained, the obtained parameter identifier preset form is processed, and the parameter identifier is obtained by removing the parameter identifier preset structure. For example, the preset form of the parameter identifier is { { CITY _ CODE } } or { { AGENT _ ID } }, which is formed by adding { } to the parameter identifier CITY _ CODE or AGENT _ ID, respectively, and the parameter identifier can be obtained by removing { } } from the preset form of the parameter identifier.
In step S12, a parameter real-time value acquisition function corresponding to the obtained parameter identifier is called to acquire a parameter real-time value. For example, the parameter real-time value is fetched from where it is stored by calling a parameter real-time value obtaining function. For example, the parameter identifiers include a CITY _ CODE, an age _ ID, and a FORM _ INPUT _ NAME, and the parameter real-time value obtaining functions respectively corresponding to the three parameter identifiers are GET _ CITY _ CODE, GET _ age _ ID, and GET _ FORM _ INPUT _ NAME. When GET _ CITY _ CODE is called, a parameter real-time value corresponding to CITY _ CODE may be read from a cityCode attribute of the global variable; when GET _ AGENT _ ID is called, a parameter real-time value corresponding to AGENT _ ID may be obtained from a URL of a current page, where, in a case where a trigger access page is triggered by interacting with a component, what is described herein may also be a page where the component is located; when GET _ FORM _ INPUT _ NAME is called, a parameter real-time value corresponding to FORM _ INPUT _ NAME is read from the FORM. Before calling the parameter real-time value acquisition function, the parameter real-time value corresponding to the CITY _ CODE, the parameter real-time value corresponding to the AGENT _ ID and the parameter real-time value corresponding to the FORM _ INPUT _ NAME are determined, and when the parameter real-time value acquisition function is called, the determined parameter real-time values are read, namely the parameter real-time values can be acquired. For example, for the parameter real-time value corresponding to the CITY _ CODE and the parameter real-time value corresponding to the age _ ID, before the routing address of the current page is skipped, the business party acquires the current CITY information and the broker information, and adds the current CITY information and the broker information as parameters to the routing address, that is, after the CITY information (for example, "CITY-beijing" or "CITY-tianjin") is put on the CITY CODE attribute of the global variable and the broker information (for example, "broker-tsu" or "broker-tsui") is put in the URL of the current page. The method comprises the steps that a preset routing address template is configured in one assembly of a current page, and when a user clicks the assembly, the user jumps to a page to be visited. For the parameter real-time value corresponding to FORM _ INPUT _ NAME, after the user INPUTs the user NAME to confirm by other components of the current page, the other components store the information INPUT by the user into the NAME field in the global variable, that is, the user NAME is stored into the FORM. And the other components are the components which are not configured with the preset routing address template in the current page.
In step S13, the acquired real-time values of the parameters are filled in the acquired preset routing address template to generate a routing address. For example, the routing address may be generated by replacing, with the acquired parameter real-time value, a parameter identifier preset form in the acquired preset routing address template for the parameter identifier for which the parameter real-time value needs to be acquired.
According to the technical scheme, the parameter real-time value is obtained, and the routing address is obtained by filling the obtained parameter real-time value into the preset routing address template, so that the parameter real-time value is obtained in real time, a non-technical person can define the dynamic routing only by obtaining the preset routing address template, and the problem that the non-technical person cannot define the dynamic routing for jumping from one page to another page is solved. In addition, as long as the preset routing address template is obtained, a non-technical person can obtain the dynamic routing, so that the universality and maintainability of the method for generating the routing address are improved. In addition, as long as the preset routing address template is obtained, and the real-time value of the parameter is obtained in real time, the routing address for accessing the page can be obtained, the routing address can be obtained based on the change of the service jump path, technical personnel do not need to frequently modify the codes of the path and issue the codes, and the timeliness of generating the routing address is improved.
Alternatively, in the embodiment of the present invention, the preset routing address template may be determined based on the following. Whether the input cursor is located at the position of the real-time value of the link address to be configured, wherein the real-time value of the parameter needs to be filled in, is detected. For example, it may be detected whether the input cursor is located at a real-time value position of the link address to be configured where the parameter real-time value needs to be filled in, after detecting whether the input cursor is located in the parameter preset structure. Wherein it can be detected whether the input cursor is located at a real-time value position by regular matching. In addition, the parameter presetting structure can be set according to specific situations. For example, may be "? A parameter name or a "& parameter name". As shown in fig. 3, two parameter preset structures are included in the link address to be configured, one of which is "? The other is "& agent _ id ═". In the case where it is detected that the input cursor is located at the position of the real-time value, a parameter description list is displayed. The parameter description list may be set in advance, and the parameter description list is displayed each time the input cursor is detected to be located at the position of the real-time value. In addition, in the parameter description list, only the parameter descriptions corresponding to different parameters may be included, and parameter names may also be included. As shown in fig. 3, the area 1 displays a parameter description list in which parameter names "city", "agentid", and "name" are included in addition to the parameter descriptions "locate city", "broker ID", and "user input information". Wherein, the parameter description is set for a certain parameter; the parameter name is the name of the parameter and is present in the link address. And under the condition that one parameter description in the displayed parameter list is selected, adding a parameter identifier preset form corresponding to the selected parameter description at the input cursor. For example, in the embodiment of the present invention, a correspondence between a parameter description and a preset form of a parameter identifier may be directly set; after a certain parameter description is selected, a preset form of a parameter identifier corresponding to the selected parameter description described in the corresponding relationship is appended to the input cursor. In addition, it may also be set that what the composition of the parameter identifier preset form includes, as described above, includes the parameter identifier and the parameter identifier preset structure, and what the parameter identifier preset structure is and the corresponding relationship between the parameter description and the parameter identifier is set; under the condition that a certain parameter description is selected, in the corresponding relation between the parameter description and the parameter identifier, a parameter identifier corresponding to the selected parameter description is determined, the determined parameter identifier is added with a parameter identifier preset structure to obtain a parameter identifier preset form, and the obtained parameter identifier preset form is added to an input cursor.
Optionally, in this embodiment of the present invention, determining the preset routing address template further includes: before detecting whether the input cursor is located at the real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, judging whether to start detecting whether the input cursor is located at the real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, by judging whether at least one of the following occurs: and acquiring the input cursor, the input cursor moving and the value change in the input box by the input box of the link address to be configured. The input frame of the link address to be configured acquires the focus, namely the input cursor is positioned in the input frame of the link address to be configured, and the input frame acquires the input cursor; the value in the input box changes, i.e. the link address to be configured is not written to completion and is being written.
Fig. 4 is a logic diagram of configuring a default routing address template according to another embodiment of the present invention.
In this embodiment, the example of configuring the preset routing address template by the operator is taken as an example for explanation. For example, the jump link of a certain button in the page that the operator wants to configure is like:https://marketing.ke.com/activity/ h5city=100000&agent_id=1000000026680675. Premise, operation knownThe corresponding meanings of these parameters are: the parameter value 100000 corresponding to the city is a city code obtained for page positioning; the parameter value 1000000026680675 for agent _ id is the identity id of the logging broker.
1) Before configuring the preset routing address template, initializing the system and creating all built-in parameter lists which can be used optionally. The built-in parameter list corresponding to each parameter may include three parts, a parameter description, a parameter identifier, and a parameter real-time value obtaining function. For example, as shown in fig. 3, the parameter description list includes three parameter descriptions, namely, a location city, a broker ID, and user input information, which correspond to the parameters city, agentid, and name, respectively. The built-in parameter list of the parameter city comprises: a. description of parameters: positioning a city; b. parameter identifier: CITY _ CODE; c. parameter real-time value acquisition function: GET _ CITY _ CODE. When a user accesses a page, the system automatically acquires the CITY CODE of the CITY where the user is located, stores the CITY CODE on the CITY CODE attribute of the global variable, and reads the CITY CODE from the CITY CODE attribute of the global variable and returns the CITY CODE when GET _ CITY _ CODE is called, wherein the CITY CODE is the real-time value of the parameter CITY. The built-in parameter list of the parameter agentid includes: a. description of parameters: a broker ID; b. parameter identifier, AGENT _ ID; c. parameter real-time value acquisition function: GET _ estimate _ ID. When the GET _ AGENT _ ID is executed, an agentd parameter value is obtained from a URL of a current page (for example, a page where a component for starting access to a certain page is located), and returned, where the agentd parameter value is a parameter real-time value of the parameter agentd. The built-in parameter list of the parameter name comprises: a. description of parameters: inputting information by a user; b. parameter identifier: FORM _ INPUT _ NAME; c. parameter real-time value acquisition function: GET _ FORM _ INPUT _ NAME. When a user accesses a page and fills NAME information in a FORM component of the page, the information is stored in a FORM. 2) And the operator inputs the link address to be configured in the system. For example, the link address ishttps://marketing.ke.com/activity/h5city=&agengid ═ is. 3) And the system detects whether the following items appear: an input box inputting a link address to be configured acquires a focus (that is, the input box acquires an input cursor), the input cursor moves, and a value of the input box changes. When the system detects the above items, it will automatically detect whether the cursor of the input box is located at the real-time value position of the link address where the real-time value of the parameter needs to be filled, i.e. detect whether the input cursor is located at "? Or&After the parameter name? city is or&agengid ═ is. 4) And when 3) the process detects that the input cursor is located at the position of the real-time value, a configurable dynamic parameter list selection box is popped up, namely, a parameter description list is displayed, and as shown in fig. 3, an operator can click one parameter description. 5) When the operator clicks the parameter description, the system adds a preset form of parameter identifier to the position of the input cursor, for example, the structure { { parameter identifier } }. For example, selecting a location CITY, append { { CITY _ CODE } } at the input cursor. 6) The parameter identifier is appended at the input cursor, and the template of the link address to be configured is updated. For example, is an input cursor detected? After the CITY is equal, adding { { CITY _ CODE } } at the input cursor, and updating the template of the link address to be configuredhttps:// marketing.ke.com/activity/h5city={{CITY_CODE}}&agengid ═ is. And repeatedly executing the steps 3) to 5) or the steps 4) to 5), completing the configuration of the input link address to obtain the preset routing address template. E.g. input link addresshttps://marketing.ke.com/activity/h5city=&agengidThe corresponding preset routing address template ishttps://marketing.ke.com/activity/h5city={{CITY_CODE}}&agengid { { AGENT _ ID } }. And finally, storing the obtained preset routing address template in the data of a component by the system. In addition, the data of different components may include the same preset routing address template, or may include different preset routing address templates; multiple components may be included on a page displaying components. In addition, the component can be any form of component such as a button or resource bit.
Fig. 5 is a logic diagram for generating a routing address according to another embodiment of the present invention. When a user accesses a page, the dynamic routing address generation process is as follows.
1) And when the user accesses the activity page, the page jump is triggered by interaction such as clicking on components such as a button or a resource bit. 2) And before the page is jumped, the route generator acquires a final jump route address according to a preset route address template configured by operation and backfill of a parameter real-time value. The specific process is as follows: 3) and 4), the route generator firstly acquires a preset route address template corresponding to the clicked button or resource bit, and the format is as follows: https:// marking. ke.com/activity/h5CITY { { CITY _ CODE }&agent _ ID { { AGE NT _ ID } }. 5) After the route generator acquires the preset route template, the acquired preset route address template is analyzed, and a structure configuration such as { { CITY _ CODE } is found according to the regular expression, wherein { { and } } is an internally agreed structure, and CITY _ CODE is a parameter identifier for acquiring real-time parameter information from the page. 6) And 7) after the parameter identifiers CITY _ CODE and AGENT _ ID are analyzed, the route generator calls a built-in parameter real-time value to obtain the parameter real-time values of the CITY _ CODE and the AGENT _ ID from the global variable obtaining functions GET _ CITY _ CODE and GET _ AGENT _ ID. 8) And assembling a final routing address by the routing generator, and replacing the acquired parameter real-time value with { { CITY _ CODE } } and { { AGENT _ ID } } to generate the final routing address. 9) And after the route generator assembles the final route address, returning the final route address and starting page jump. For example, using a predetermined routing address template ashttps:// marketing.ke.com/activity/h5city={{CITY_CODE}}&agent_id={{AGENT_ID}}For example, when a certain broker (broker ID 1000000026680688) in tianjin (city code 120000) accesses the page, and the broker clicks on the button shown in fig. 2, the page starts to dynamically generate a jump route, and finally jumps to the page:https:// marketing.ke.com/activity/h5city=120000&agent_id=1000000026680688
in summary, the technical solution provided by the embodiment of the present invention mainly includes two parts: one part is a configuration that is operated in the system to update the routing template through visual configuration; and the second part is that when the user accesses the page, the user interacts with components such as a page button and the like to trigger route generation, and a route template is backfilled according to real-time information to generate a final route address. By the technical scheme provided by the embodiment of the invention, when an operator configures a certain jump route in a page, dynamic data which can be provided by the page can be visually selected, and a final route template is generated; when the user accesses the jump route in the page, the page carries out dynamic mapping according to the route template and the page real-time data to generate a final route address, and jumps to the corresponding page.
Accordingly, another aspect of the embodiments of the present invention provides an apparatus for generating a routing address for accessing a page.
Fig. 6 is a block diagram of an apparatus for generating a routing address for accessing a page according to another embodiment of the present invention. As shown in fig. 6, the apparatus includes a preset routing address template obtaining module 1, an analyzing module 2, a calling module 3, and a routing address generating module 4. The preset routing address template obtaining module 1 is configured to obtain a preset routing address template when access to a page is triggered, where a parameter real-time value is filled in the preset routing address template to obtain a routing address; the analysis module 2 is used for analyzing the acquired preset routing address template to obtain a parameter identifier of a parameter real-time value required to be acquired; the calling module 3 is used for calling a parameter real-time value acquisition function corresponding to the obtained parameter identifier to acquire a parameter real-time value; the routing address generating module 4 is configured to fill the acquired real-time parameter value in the acquired preset routing address template to generate a routing address.
Optionally, in this embodiment of the present invention, the filling, by the routing address generating module, the obtained real-time parameter value in the obtained preset routing address template to generate the routing address includes: and replacing the corresponding parameter identifier preset form of the parameter identifier needing to acquire the parameter real-time value in the acquired preset routing address template by the acquired parameter real-time value so as to generate the routing address.
Optionally, in this embodiment of the present invention, the analyzing module analyzes the obtained preset routing address template to obtain a parameter identifier for which a parameter real-time value needs to be obtained includes: acquiring a parameter identifier preset form in the acquired preset routing address template; and processing the acquired parameter identifier preset form, and removing the parameter identifier preset structure to obtain the parameter identifier.
Optionally, in this embodiment of the present invention, obtaining a preset form of the parameter identifier corresponding to the parameter identifier in the obtained preset routing address template includes: and acquiring a parameter identifier preset form by using the regular expression.
Optionally, in this embodiment of the present invention, triggering access to one of the pages includes: access to a page is triggered by the interaction of a component for initiating access to a page.
Optionally, in this embodiment of the present invention, the obtaining, by the preset routing address template obtaining module, the preset routing address template includes: and acquiring a preset routing address template from the data of the component.
Optionally, in this embodiment of the present invention, the preset routing address template is determined based on the following: detecting whether an input cursor is located at a real-time value position of a link address to be configured, wherein the real-time value position of the parameter real-time value needs to be filled; displaying a parameter description list in a case where it is detected that the input cursor is located at a real-time value position; and under the condition that one parameter description in the displayed parameter list is selected, adding a parameter identifier preset form corresponding to the selected parameter description at the input cursor.
Optionally, in an embodiment of the present invention, detecting whether the input cursor is located at a real-time value position of the link address to be configured, where the parameter real-time value needs to be filled in, includes: and detecting whether the input cursor is located in a parameter preset structure needing to fill in a parameter real-time value.
Optionally, in this embodiment of the present invention, determining the preset routing address template further includes: before detecting whether the input cursor is located at the real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, judging whether to start detecting whether the input cursor is located at the real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, by judging whether at least one of the following occurs: and acquiring the focus, the movement of an input cursor and the change of the value in the input box by the input box of the link address to be configured.
The specific working principle and the benefits of the apparatus for generating a routing address for accessing a page provided in the embodiment of the present invention are similar to those of the method for generating a routing address for accessing a page provided in the embodiment of the present invention, and will not be described herein again.
The device for generating the routing address for accessing the page comprises a processor and a memory, wherein the preset routing address template acquisition module, the analysis module, the calling module, the routing address generation module and the like are all stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can set one or more than one kernel, and the timeliness of generating the routing address is improved by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a machine storage medium on which a program is stored, which when executed by a processor implements the method described in the above embodiments.
An embodiment of the present invention provides a processor, where the processor is configured to execute a program, where the program executes the method described in the foregoing embodiment.
The embodiment of the invention provides electronic equipment, which comprises a processor, a memory and a program which is stored on the memory and can be operated on the processor, wherein the processor executes the program and realizes the following steps: under the condition that access to a page is triggered, acquiring a preset routing address template, wherein a routing address is obtained after a parameter real-time value is filled in the preset routing address template; analyzing the acquired preset routing address template to obtain a parameter identifier of a parameter real-time value to be acquired; calling a parameter real-time value acquisition function corresponding to the obtained parameter identifier to acquire a parameter real-time value; filling the acquired real-time values of the parameters into the acquired preset routing address template to generate a routing address; filling the acquired real-time values of the parameters into the acquired preset routing address template to generate a routing address comprises: replacing the parameter identifier preset form of the parameter identifier needing to obtain the parameter real-time value in the obtained preset routing address template by the obtained parameter real-time value so as to generate a routing address; analyzing the acquired preset routing address template to obtain a parameter identifier for acquiring a parameter real-time value includes: acquiring a parameter identifier preset form in the acquired preset routing address template; processing the acquired parameter identifier preset form, and removing the parameter identifier preset structure to obtain a parameter identifier; the preset form of the parameter identifier corresponding to the acquired preset routing address template for acquiring the parameter identifier comprises the following steps: acquiring a parameter identifier preset form by using a regular expression; triggering access to a page includes: triggering access to a page by the component for initiating access to a page being interacted with; the step of obtaining the preset routing address template comprises the following steps: acquiring a preset routing address template from the data of the component; the preset routing address template is determined based on: detecting whether an input cursor is located at a real-time value position of a link address to be configured, wherein the real-time value position of the parameter real-time value needs to be filled; in the case where it is detected that the input cursor is located at the position of the real-time value, displaying a parameter description list; and under the condition that one parameter description in the displayed parameter list is selected, adding a parameter identifier preset form corresponding to the selected parameter description at the input cursor; detecting whether the input cursor is located at a real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, comprises: detecting whether the input cursor is located in a parameter preset structure needing to fill in a parameter real-time value; determining the preset routing address template further comprises: before detecting whether the input cursor is located at the real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, judging whether to start detecting whether the input cursor is located at the real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, by judging whether at least one of the following occurs: and acquiring the focus, the movement of an input cursor and the change of the value in the input box by the input box of the link address to be configured. The electronic device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application also provides a computer program product comprising computer programs/instructions which, when executed by a processor, implement the method described in the above embodiments.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method of generating a routing address for accessing a page, the method comprising:
acquiring a preset routing address template under the condition that the access to the page is triggered, wherein the routing address is obtained after a parameter real-time value is filled in the preset routing address template;
analyzing the acquired preset routing address template to obtain a parameter identifier of the parameter real-time value to be acquired;
calling a parameter real-time value acquisition function corresponding to the obtained parameter identifier to acquire a parameter real-time value; and
and filling the acquired real-time values of the parameters into the acquired preset routing address template to generate the routing address.
2. The method of claim 1, wherein the filling the obtained real-time parameter value into the obtained preset routing address template to generate the routing address comprises:
and replacing the parameter identifier corresponding to the parameter identifier needing to acquire the parameter real-time value in the acquired preset routing address template by the acquired parameter real-time value to generate the routing address.
3. The method according to claim 1, wherein the parsing the obtained preset routing address template to obtain the parameter identifier for which the parameter real-time value needs to be obtained comprises:
acquiring a parameter identifier preset form in the acquired preset routing address template; and
and processing the acquired parameter identifier preset form, and removing the parameter identifier preset structure to obtain the parameter identifier.
4. The method of claim 3, wherein obtaining the parameter identifier in the preset form corresponding to the parameter identifier in the obtained preset routing address template comprises:
and acquiring the preset form of the parameter identifier by using a regular expression.
5. The method according to any of claims 1-4, wherein the preset routing address template is determined based on:
detecting whether an input cursor is located at a real-time value position of a link address to be configured, wherein the real-time value position of the parameter real-time value needs to be filled;
displaying a list of parameter descriptions in the event that the input cursor is detected to be at the real-time value location; and
and under the condition that one parameter description in the displayed parameter list is selected, adding a parameter identifier preset form corresponding to the selected parameter description at the input cursor.
6. The method of claim 5, wherein detecting whether the input cursor is located at a real-time value position of the link address to be configured where a parameter real-time value needs to be filled comprises:
and detecting whether the input cursor is located in a parameter preset structure needing to fill in the parameter real-time value.
7. The method of claim 5, wherein determining the preset routing address template further comprises:
before detecting whether the input cursor is located at the real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, judging whether to start detecting whether the input cursor is located at the real-time value position of the link address to be configured, where the parameter real-time value needs to be filled, by judging whether at least one of the following occurs: and the input box of the link address to be configured acquires a focus, the input cursor moves and the value in the input box changes.
8. An apparatus for generating a routing address for accessing a page, the apparatus comprising:
the preset routing address template acquisition module is used for acquiring a preset routing address template under the condition that the access to the page is triggered, wherein the routing address is obtained after the parameter real-time value is filled in the preset routing address template;
the analysis module is used for analyzing the acquired preset routing address template to obtain a parameter identifier of the parameter real-time value required to be acquired;
the calling module is used for calling a parameter real-time value acquisition function corresponding to the obtained parameter identifier so as to acquire a parameter real-time value; and
and the routing address generation module is used for filling the acquired real-time values of the parameters into the acquired preset routing address template so as to generate the routing address.
9. A machine-readable storage medium having stored thereon instructions for causing a machine to perform the method of any one of claims 1-7.
10. A computer program product comprising computer programs/instructions, characterized in that the computer programs/instructions, when executed by a processor, implement the method of any of claims 1-7.
CN202110987677.9A 2021-08-26 2021-08-26 Method and device for generating routing address for accessing page Pending CN113704664A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110987677.9A CN113704664A (en) 2021-08-26 2021-08-26 Method and device for generating routing address for accessing page

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110987677.9A CN113704664A (en) 2021-08-26 2021-08-26 Method and device for generating routing address for accessing page

Publications (1)

Publication Number Publication Date
CN113704664A true CN113704664A (en) 2021-11-26

Family

ID=78655159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110987677.9A Pending CN113704664A (en) 2021-08-26 2021-08-26 Method and device for generating routing address for accessing page

Country Status (1)

Country Link
CN (1) CN113704664A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114153729A (en) * 2021-11-30 2022-03-08 北京达佳互联信息技术有限公司 Webpage testing method and device, electronic equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111782330A (en) * 2020-07-07 2020-10-16 赞同科技股份有限公司 Web application-based page data acquisition method, device and equipment
CN111797334A (en) * 2020-06-19 2020-10-20 北京达佳互联信息技术有限公司 Website access method and device, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111797334A (en) * 2020-06-19 2020-10-20 北京达佳互联信息技术有限公司 Website access method and device, electronic equipment and storage medium
CN111782330A (en) * 2020-07-07 2020-10-16 赞同科技股份有限公司 Web application-based page data acquisition method, device and equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114153729A (en) * 2021-11-30 2022-03-08 北京达佳互联信息技术有限公司 Webpage testing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
JP6629848B2 (en) Page processing for mobile applications
CN109582303B (en) General component calling method, device, computer equipment and storage medium
US10684828B2 (en) Method and apparatus for user interface modification
CN111596965B (en) Project engineering initialization method, device, computer equipment and storage medium
US20120137227A1 (en) Multi-environment widget assembly, generation, and operation
CN107766344B (en) Template rendering method and device and browser
CN111475161B (en) Method, device and equipment for accessing component
US20150317405A1 (en) Web Page Variation
CN115098098A (en) Page generation method, page display method and device
CN109814863A (en) A kind of processing method, device, computer equipment and computer storage medium for requesting returned data
CN111736740A (en) Picture hot area generation method, device and equipment and storage medium
CN112395027A (en) Widget interface generation method and device, storage medium and electronic equipment
CN113703785A (en) Component-based platform deployment method, device, equipment and storage medium
CN110941428A (en) Website creation method and device
CN111538500A (en) Method and system for visually modifying menu
EP2924565A1 (en) Web-application-launch application programming interface
CN113704664A (en) Method and device for generating routing address for accessing page
CN114461960B (en) Page generation method, page display method and page display device
CN112579066A (en) Chart display method and device, storage medium and equipment
CN112100126B (en) Excel file-based picture storage and content display method and device
CN115186214A (en) Page configuration method and device, computer equipment and computer readable storage medium
CN115687310A (en) Data cleaning method and device
CN114254232A (en) Cloud product page generation method and device, computer equipment and storage medium
CN112579221A (en) Modal popup display method and device
CN117193723A (en) Front-end route file generation method and device, storage medium and electronic equipment

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