CN115334161B - Access request processing method and device, storage medium and electronic equipment - Google Patents

Access request processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115334161B
CN115334161B CN202210877451.8A CN202210877451A CN115334161B CN 115334161 B CN115334161 B CN 115334161B CN 202210877451 A CN202210877451 A CN 202210877451A CN 115334161 B CN115334161 B CN 115334161B
Authority
CN
China
Prior art keywords
access request
midway
rendering
environment configuration
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210877451.8A
Other languages
Chinese (zh)
Other versions
CN115334161A (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.)
Yancheng Tianyanchawei Technology Co ltd
Original Assignee
Yancheng Jindi 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 Yancheng Jindi Technology Co Ltd filed Critical Yancheng Jindi Technology Co Ltd
Priority to CN202210877451.8A priority Critical patent/CN115334161B/en
Publication of CN115334161A publication Critical patent/CN115334161A/en
Application granted granted Critical
Publication of CN115334161B publication Critical patent/CN115334161B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The invention provides an access request processing method and device, a storage medium and electronic equipment. The method comprises the following steps: responding to an access request initiated by a user, judging whether the access request accords with a preset router rule or not by Midway framework service in a client, and generating Midway environment configuration variables based on the access request; if the router rule is met, sending an access request to a server; if the access request and the Midway environment configuration variable do not accord with the preset router rule, the access request and the Midway environment configuration variable are sent to a Next. The access request processing method and device, the storage medium and the electronic equipment combine the Midway framework service with the Next. Js framework service, and transfer the information such as the environment configuration variable and the access request of the Midway framework service to the Next. Js framework service, so that the Next. Js framework service in the client can also obtain the information such as the environment configuration variable and the access request of the server.

Description

Access request processing method and device, storage medium and electronic equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for processing an access request, a storage medium, and an electronic device.
Background
At present, the front end of the client adopts the Egg+ Ejs +JQuery technical stack for development, and the whole website is iterated continuously, so that the technology stack is old and difficult to debug and maintain, the front end development efficiency is not improved in continuous iteration, the newly added partner technical stack is new in cognition, the technology stack is psychologically resistant to the giant stone application, and the development efficiency of customers is lower and lower in the long run. How to combine the front end framework and the back end framework and make the configuration of the front end framework to the back end framework and the request for information necessary.
Disclosure of Invention
In view of the above, the present invention provides an access request processing method and apparatus, and a storage medium and an electronic device to at least partially solve the above-mentioned problems.
According to a first aspect of the present invention, there is provided an access request processing method, the method comprising:
responding to an access request initiated by a user, judging whether the access request accords with a preset router rule or not by Midway framework service in a client, and generating Midway environment configuration variables based on the access request;
if the access request meets the preset router rule, sending the access request to a server;
and if the access request and the Midway environment configuration variable do not accord with the preset router rule, sending the access request and the Midway environment configuration variable to a Next.
Optionally, the method further comprises:
the server analyzes the access request, acquires access request data according to an analysis result, and sends the access request data to the client.
Optionally, the method further comprises:
and the Next.js frame service generates a redirection access request according to the access request and the Midway environment configuration variable, and acquires a blank template, rendering data and a first screen page from the server based on the redirection access request to complete page isomorphic rendering.
Optionally, based on the redirection access request, obtaining a blank template, rendering data and a first screen page from the server to complete isomorphic rendering, including:
the server generates a blank template after receiving the redirection access request;
after receiving the blank template, the next.js framework service generates a rendering response request;
after the server receives the rendering response request, analyzing the redirection access request, acquiring rendering data according to a second analysis result, and rendering a first screen page;
and after receiving the rendering data and the first screen page, the next.js frame service loads the first screen page, and renders each level of jump pages according to the rendering data so as to complete isomorphic rendering of the pages.
Optionally, the method further comprises:
the Next.js framework service presets a router, receives the access request, the Midway environment configuration variable, the blank template, rendering data and a first screen page through the preset router, and/or sends a redirection azimuth request and a rendering response request.
Optionally, if the access request is a hypertext markup language request, the Midway framework service in the client determines whether the access request meets a preset router rule, including:
the Midway framework service in the client analyzes the hypertext markup language request to obtain a corresponding router name;
judging whether the router name exists in a router list of the preset router rule or not; if yes, judging that the preset router rule is met; if not, judging that the preset router rule is not met.
Optionally, before the responding to the access request initiated by the user, the Midway framework service in the client determines whether the access request meets the preset router rule, and generates the Midway environment configuration variable based on the access request, the method further includes:
and starting Midway framework service and Next.
According to a second aspect of the present invention, there is provided an access request processing apparatus comprising:
the Midway framework service module is used for responding to an access request initiated by a user, judging whether the access request accords with a preset router rule or not, and generating a Midway environment configuration variable based on the access request; if the access request meets the preset router rule, sending the access request to a server; if the access request and the Midway environment configuration variable do not accord with the preset router rule, the access request and the Midway environment configuration variable are sent to a Next.js frame service in the client;
the server side is used for analyzing the access request, acquiring access request data according to an analysis result and sending the access request data to the client side;
and the Next.js frame service module is used for generating a redirection access request according to the access request and the Midway environment configuration variable, and acquiring a blank template, rendering data and a first screen page from the server side based on the redirection access request to complete page isomorphic rendering.
According to a third aspect of the present invention there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements an embodiment of any of the methods described above.
According to a fourth aspect of the present invention there is provided an electronic device comprising a memory for storing a computer executable program thereon and a processor for running the computer executable program to implement an embodiment of any of the methods described above.
According to the access request processing method and device, the storage medium and the electronic equipment, whether the access request accords with the preset router rule is judged through Midway framework service in the client, midway environment configuration variables are generated based on the access request, and finally the access request and the Midway environment configuration variables are sent to Next.js framework service in the client to complete page isomorphic rendering. The access request processing method and device, the storage medium and the electronic equipment combine the Midway framework service with the Next. Js framework service, and transfer the information such as the environment configuration variable and the access request of the Midway framework service to the Next. Js framework service, so that the Next. Js framework service in the client can also obtain the information such as the environment configuration variable and the access request of the server, and the Midway framework service and the Next. Js framework service can be flexibly selected and adopted to process the access request according to the actual requirements of users.
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing embodiments of the present invention in more detail with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, and not constitute a limitation to the invention. In the drawings, like reference numerals generally refer to like parts or steps.
FIG. 1 is a flow chart of an access request processing method 100 according to an exemplary embodiment of the present invention;
FIG. 2 is a flowchart of a method 200 for obtaining a blank template, rendering data, and a first screen page to the server to complete isomorphic rendering based on the redirection access request according to an exemplary embodiment of the invention;
FIG. 3 is a flowchart of a method 300 for determining whether the access request meets a preset router rule by Midway framework service in the client if the access request is a hypertext markup language request according to an exemplary embodiment of the present invention;
fig. 4 is a schematic structural diagram of an access request processing apparatus 400 according to an exemplary embodiment of the present invention;
fig. 5 is a structure of an electronic device according to an exemplary embodiment of the present invention.
Detailed Description
Hereinafter, exemplary embodiments according to the present invention will be described in detail with reference to the accompanying drawings. It should be apparent that the described embodiments are only some embodiments of the present invention and not all embodiments of the present invention, and it should be understood that the present invention is not limited by the example embodiments described herein.
It should be noted that: the relative arrangement of the components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless it is specifically stated otherwise.
It will be appreciated by those of skill in the art that the terms "first," "second," etc. in embodiments of the present invention are used merely to distinguish between different steps, devices or modules, etc., and do not represent any particular technical meaning nor necessarily logical order between them.
It should also be understood that in embodiments of the present invention, "plurality" may refer to two or more, and "at least one" may refer to one, two or more.
It should also be appreciated that any component, data, or structure referred to in an embodiment of the invention may be generally understood as one or more without explicit limitation or the contrary in the context.
In addition, the term "and/or" in the present invention is merely an association relationship describing the association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist together, and B exists alone. In the present invention, the character "/" generally indicates that the front and rear related objects are an or relationship.
It should also be understood that the description of the embodiments of the present invention emphasizes the differences between the embodiments, and that the same or similar features may be referred to each other, and for brevity, will not be described in detail.
Meanwhile, it should be understood that the sizes of the respective parts shown in the drawings are not drawn in actual scale for convenience of description.
The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to one of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods, and apparatus should be considered part of the specification.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further discussion thereof is necessary in subsequent figures.
Embodiments of the invention are operational with numerous other general purpose or special purpose computing system environments or configurations with electronic devices, such as terminal devices, computer systems, servers, etc. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with the terminal device, computer system, server, or other electronic device include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, mainframe computer systems, and distributed cloud computing technology environments that include any of the foregoing, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc., that perform particular tasks or implement particular abstract data types. The computer system/server may be implemented in a distributed cloud computing environment in which tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computing system storage media including memory storage devices.
Exemplary method
Fig. 1 is a flowchart of an access request processing method 100 according to an exemplary embodiment of the present invention. The embodiment can be applied to an electronic device, as shown in fig. 1, and the method includes the following steps:
step 101, responding to an access request initiated by a user, judging whether the access request accords with a preset router rule or not by Midway framework service in a client, and generating Midway environment configuration variables based on the access request;
optionally, before step 101, the method further includes: and starting Midway framework service and Next.
Specifically, before judging whether the access request accords with a preset routing rule and generating a Midway environment configuration variable based on the access request, firstly starting Midway framework service and next.
More specifically, the Midway framework service can be started by adopting an official starting mode, the Midway framework service instantiates a global application (application) after starting, the application can run all the time when the Midway framework service is not closed, the client is continuously provided with service, the current life cycle (i.e. the current state) of the application is determined by monitoring the life cycle function in the application, such as onReady (after the application is started), onStop (when the application is closed and stops running), onConfigLoad (after the configuration file is loaded), and the Next.js framework service is started after the configuration file is loaded; the next.js framework service provides custom services, and servers of the custom next.js framework service allow 100% startup of the servers in a programmatic manner to achieve complete customization using custom server schemas.
After a user inputs a URL address in a browser of a client, for example, www.AAABBB.com/company/22822 address (i.e., an access request), the user first goes through a Midway framework service, and the Midway framework service determines whether a router (/ company/22822) in the access request meets a preset router rule (i.e., is in a router list of a predefined Midway framework service), and generates a Midway environment configuration variable based on the www.AAABBB.com/company/22822 address.
Wherein the environment configuration variables include: dev is developed locally, tested, prefire and/or on-line. Different environments may have different domain name requirements, such as: the test environment www.test63.AAABBB.com is www.AAABBB.com on line, and if the user jumps to the company detail page, the user needs to jump to the tested domain name in the test environment, and the domain name on the line is jumped to by the online environment, which is a variable already defined in the configuration file of the Midway server.
Step 102, if the preset router rule is met, sending the access request to a server.
Specifically, if the router (/ company/22822) exists in the router list of the predefined Midway framework service, the whole request (including the information of the request header, the request body, etc.) of the router is sent to the server.
And step 103, if the access request and the Midway environment configuration variable do not accord with the preset router rule, sending the access request and the Midway environment configuration variable to a Next.
Specifically, if the router (/ company/22822) does not exist in the router list of the predefined Midway framework service, the entire request (including the information of the request header, the request body, etc.) of the router and the Midway environment configuration variable are transferred to the next.
Optionally, the method of the embodiment of the present invention further includes: the server analyzes the access request, acquires access request data according to an analysis result, and sends the access request data to the client.
Specifically, when the user clicks the page submitting order button, a request www.AAABBB.com/api/getusenfo for obtaining user information is initiated, after the server receives the whole request (including information such as a request header and a request body) of the router and the Midway environment configuration variable service, the whole request (including information such as a request header and a request body) of the router is parsed, and is transferred to a controller layer of Midway framework service to process the request, and then the processed data is returned to the initiated request and returned to the client.
Optionally, the method of the embodiment of the present invention further includes: and the Next.js frame service generates a redirection access request according to the access request and the Midway environment configuration variable, and acquires a blank template, rendering data and a first screen page from the server based on the redirection access request to complete page isomorphic rendering.
Specifically, after receiving the access request and the Midway environment configuration variable, the next.js framework service generates a redirection access request according to a preset router (company file under the pages directory), and acquires a blank template, rendering data and a first screen page from a server based on the redirection access request to complete page isomorphic rendering.
And in order to acquire blank templates, rendering data and a first screen page from the server, isomorphic rendering is completed. Fig. 2 is a flowchart of a method 200 for obtaining a blank template, rendering data, and a first screen page to the server to complete isomorphic rendering based on the redirection access request according to an exemplary embodiment of the invention. As shown in fig. 2, the obtaining, based on the redirection access request, a blank template, rendering data, and a first screen page from the server to complete isomorphic rendering includes:
step 201, after receiving the redirection access request, the server generates a blank template;
step 202, after receiving the blank template, the next. Js framework service generates a rendering response request;
step 203, after receiving the rendering response request, the server analyzes the redirection access request, obtains rendering data according to a second analysis result, and renders a first screen page;
and 204, after receiving the rendering data and the first screen page, the next. Js frame service loads the first screen page, and renders each level of jump pages according to the rendering data so as to complete page isomorphism rendering.
Specifically, after receiving the redirection access request, the server generates a blank template and sends the blank template to the next. Js frame service, after receiving the blank template of the server, the next. Js frame service generates a rendering response request and sends the rendering response request to the server, after receiving the rendering response request, the server analyzes the redirection access request to obtain a second analysis result, obtains rendering data according to the second analysis result, renders a first screen page, sends the rendering data and the rendering first screen page to the next. Js frame service, and after receiving the rendering data and the first screen page, loads the first screen page, and renders each level of jump pages according to the rendering data, so as to complete isomorphic rendering of the pages. After receiving the request information and the environment configuration variables, the next service finds a rendering page entry according to a preset router (company file under a pages directory), renders the rendering page entry, and transmits the rendering page entry to a browser, and at the moment, a user can browse the rendered whole content through the browser page.
Optionally, the method of the embodiment of the present invention further includes:
the Next.js framework service presets a router, receives the access request, the Midway environment configuration variable, the blank template, rendering data and a first screen page through the preset router, and/or sends a redirection azimuth request and a rendering response request.
To determine whether the access request meets the preset router rules. Fig. 3 is a flowchart of a method 300 for determining whether the access request meets a preset router rule by a Midway framework service in the client if the access request is a hypertext markup language request according to an exemplary embodiment of the invention. As shown in fig. 3, if the access request is a hypertext markup language request, the Midway framework service in the client determines whether the access request meets a preset router rule, including:
step 301, if the access request is a hypertext markup language request, the Midway framework service in the client determines whether the access request meets a preset router rule, including:
step 302, the Midway framework service in the client analyzes the hypertext markup language request to obtain a corresponding router name;
step 303, judging whether the router name exists in the router list of the preset router rule; if yes, judging that the preset router rule is met; if not, judging that the preset router rule is not met.
Specifically, if the access request is an HTML request after URL is input, firstly, a Midway framework service is started, and a Midway middleware is defined, and the middleware function is as follows: judging whether the current route is a pre-defined router list or not, and packaging environment configuration variables; the Midway framework service in the client analyzes the HTML request to obtain a router name corresponding to the HTML request; the Midway framework service judges whether the HTML request is in a predefined Midway route list, and if so, judges that the HTML request accords with a preset router rule; if the router rule does not exist, judging that the router rule does not accord with the preset router rule.
Wherein, middleware function: judging whether the current route is a pre-defined router list, packaging environment configuration variables, then starting the Nextjs service to realize a service hook, such as hook, and mounting the context of the Midway service on the hook, so that a channel is formed, and the environment configuration variables of the middleware are transmitted to the Nextjs service through the channel.
According to the access request processing method provided by the invention, whether the access request accords with the preset router rule is judged through Midway framework service in the client, the Midway environment configuration variable is generated based on the access request, and finally the access request and the Midway environment configuration variable are sent to next.js framework service in the client to complete page isomorphism rendering. The access request processing method combines the Midway framework service with the Next.js framework service, and transmits the information such as the environment configuration variable and the access request of the Midway framework service to the Next.js framework service, so that the Next.js framework service in the client can also obtain the information such as the environment configuration variable and the access request of the server, and the Midway framework service and the Next.js framework service can be flexibly selected to process the access request according to the actual requirements of users.
Exemplary apparatus
Fig. 4 is a schematic structural diagram of an access request processing apparatus 400 according to an exemplary embodiment of the present invention. As shown in fig. 4, the apparatus of this embodiment includes:
the Midway framework service module 410 is configured to respond to an access request initiated by a user, determine whether the access request meets a preset router rule, and generate a Midway environment configuration variable based on the access request; if the access request meets the preset router rule, sending the access request to a server; if the access request and the Midway environment configuration variable do not accord with the preset router rule, the access request and the Midway environment configuration variable are sent to a Next.js frame service in the client;
wherein the Midway framework service module 410 may include:
the parsing hypertext markup language request sub-module is used for parsing the hypertext markup language request to obtain a corresponding router name;
a determining router rule sub-module, configured to determine whether the router name exists in a router list of the preset router rule; if yes, judging that the preset router rule is met; if not, judging that the preset router rule is not met.
The Midway framework service module 410 may further include:
and the starting framework service submodule is used for starting Midway framework service and next.
The server 420 is configured to parse the access request, obtain access request data according to a parsing result, and send the access request data to the client;
the next. Js framework service module 430 is configured to generate a redirection access request according to the access request and the Midway environment configuration variable, and obtain a blank template, rendering data and a first screen page from the server based on the redirection access request to complete page isomorphic rendering.
The next. Js framework service module 430 may include:
the blank template generation sub-module is used for generating a blank template after the server receives the redirection access request;
the sub-module for generating a rendering response request is used for generating the rendering response request after the next. Js frame service receives the blank template;
the rendering head screen page sub-module is used for analyzing the redirection access request after the server receives the rendering response request, acquiring rendering data according to a second analysis result and rendering the head screen page;
and finishing page isomorphism rendering, namely loading the first screen page after the next. Js frame service receives the rendering data and the first screen page, and rendering each level of jump pages according to the rendering data to finish page isomorphism rendering.
The next. Js framework service module 430 may further include:
and the receiving parameter sub-module is used for the next.js framework service to preset a router, receiving the access request, the Midway environment configuration variable, the blank template, the rendering data and the first screen page through the preset router, and/or sending a redirection azimuth request and a rendering response request.
The access request processing apparatus 400 according to the embodiment of the present invention corresponds to the access request processing method 100 according to another embodiment of the present invention, and the other description may refer to the description of the access request processing method 100 according to another embodiment of the present invention, which is not repeated here.
The access request processing device provided by the invention judges whether the access request accords with the preset router rule through Midway framework service in the client, generates Midway environment configuration variables based on the access request, and finally sends the access request and the Midway environment configuration variables to Next.js framework service in the client to complete page isomorphic rendering. The access request processing device combines the Midway framework service with the Next.js framework service, and transmits the information such as the environment configuration variable and the access request of the Midway framework service to the Next.js framework service, so that the Next.js framework service in the client can also obtain the information such as the environment configuration variable and the access request of the server, and the Midway framework service and the Next.js framework service can be flexibly selected to process the access request according to the actual requirements of users.
Exemplary electronic device
Fig. 5 is a structure of an electronic device according to an exemplary embodiment of the present invention. The electronic device may be either or both of the first device and the second device, or a stand-alone device independent thereof, which may communicate with the first device and the second device to receive the acquired input signals therefrom. As shown in fig. 5, the electronic device 50 includes one or more processors 51 and memory 52.
The processor 51 may be a Central Processing Unit (CPU) or other form of processing unit having data processing and/or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
Memory 52 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, random Access Memory (RAM) and/or cache memory (cache), and the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, and the like. One or more computer program instructions may be stored on the computer readable storage medium that may be executed by the processor 51 to implement the access request processing methods and/or other desired functions of the software programs of the various embodiments of the present disclosure described above. In one example, the electronic device may further include: an input device 53 and an output device 54, which are interconnected by a bus system and/or other forms of connection mechanisms (not shown).
In addition, the input device 53 may also include, for example, a keyboard, a mouse, and the like. The output device 54 can output various information to the outside. The output device 54 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, etc.
Of course, only some of the components of the electronic device relevant to the present disclosure are shown in fig. 5 for simplicity, components such as buses, input/output interfaces, etc. being omitted. In addition, the electronic device may include any other suitable components depending on the particular application.
Exemplary computer program product and computer readable storage Medium
In addition to the methods and apparatus described above, embodiments of the present disclosure may also be a computer program product comprising computer program instructions which, when executed by a processor, cause the processor to perform the steps in an access request processing method according to various embodiments of the present disclosure described in the "exemplary methods" section of this specification.
The computer program product may write program code for performing the operations of embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium, having stored thereon computer program instructions, which when executed by a processor, cause the processor to perform the steps in an access request processing method according to various embodiments of the present disclosure described in the above "exemplary method" section of the present disclosure.
The computer readable storage medium may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The basic principles of the present disclosure have been described above in connection with specific embodiments, however, it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are merely examples and not limiting, and these advantages, benefits, effects, etc. are not to be considered as necessarily possessed by the various embodiments of the present disclosure. Furthermore, the specific details disclosed herein are for purposes of illustration and understanding only, and are not intended to be limiting, since the disclosure is not necessarily limited to practice with the specific details described.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different manner from other embodiments, so that the same or similar parts between the embodiments are mutually referred to. For system embodiments, the description is relatively simple as it essentially corresponds to method embodiments, and reference should be made to the description of method embodiments for relevant points.
The block diagrams of the devices, apparatuses, devices, systems referred to in this disclosure are merely illustrative examples and are not intended to require or imply that the connections, arrangements, configurations must be made in the manner shown in the block diagrams. As will be appreciated by one of skill in the art, the devices, apparatuses, devices, systems may be connected, arranged, configured in any manner. Words such as "including," "comprising," "having," and the like are words of openness and mean "including but not limited to," and are used interchangeably therewith. The terms "or" and "as used herein refer to and are used interchangeably with the term" and/or "unless the context clearly indicates otherwise. The term "such as" as used herein refers to, and is used interchangeably with, the phrase "such as, but not limited to.
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, firmware. The above-described sequence of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the sequence specifically described above unless specifically stated otherwise. Furthermore, in some embodiments, the present disclosure may also be implemented as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the apparatus, devices and methods of the present disclosure, components or steps may be disassembled and/or assembled. Such decomposition and/or recombination should be considered equivalent to the present disclosure. The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the disclosure to the form disclosed herein. Although a number of example aspects and embodiments have been discussed above, a person of ordinary skill in the art will recognize certain variations, modifications, alterations, additions, and subcombinations thereof.

Claims (9)

1. A method of processing an access request, the method comprising:
responding to an access request initiated by a user, judging whether the access request accords with a preset router rule or not by Midway framework service in a client, and generating Midway environment configuration variables based on the access request;
if the access request meets the preset router rule, sending the access request to a server;
if the access request and the Midway environment configuration variable do not accord with the preset router rule, the access request and the Midway environment configuration variable are sent to a Next.js frame service in the client; and the Next.js frame service generates a redirection access request according to the access request and the Midway environment configuration variable, and acquires a blank template, rendering data and a first screen page from the server based on the redirection access request to complete page isomorphic rendering.
2. The method according to claim 1, wherein the method further comprises:
the server analyzes the access request, acquires access request data according to an analysis result, and sends the access request data to the client.
3. The method of claim 1, wherein the obtaining the blank template, the rendering data, and the first screen page from the server to complete isomorphic rendering based on the redirected access request comprises:
the server generates a blank template after receiving the redirection access request;
after receiving the blank template, the next.js framework service generates a rendering response request;
after the server receives the rendering response request, analyzing the redirection access request, acquiring rendering data according to a second analysis result, and rendering a first screen page;
and after receiving the rendering data and the first screen page, the next.js frame service loads the first screen page, and renders each level of jump pages according to the rendering data so as to complete isomorphic rendering of the pages.
4. The method according to claim 1, wherein the method further comprises:
the Next.js framework service presets a router, receives the access request, the Midway environment configuration variable, the blank template, rendering data and a first screen page through the preset router, and/or sends a redirection azimuth request and a rendering response request.
5. The method of claim 1, wherein if the access request is a hypertext markup language request, the Midway framework service in the client determines whether the access request meets a preset router rule, comprising:
the Midway framework service in the client analyzes the hypertext markup language request to obtain a corresponding router name;
judging whether the router name exists in a router list of the preset router rule or not; if yes, judging that the preset router rule is met; if not, judging that the preset router rule is not met.
6. The method of claim 1, wherein the Midway framework service in the client, in response to the user initiated access request, determines whether the access request meets a preset router rule, and before generating a Midway environment configuration variable based on the access request, the method further comprises:
and starting Midway framework service and Next.
7. An access request processing apparatus, the apparatus comprising:
the Midway framework service module is used for responding to an access request initiated by a user, judging whether the access request accords with a preset router rule or not, and generating a Midway environment configuration variable based on the access request; if the access request meets the preset router rule, sending the access request to a server; if the access request and the Midway environment configuration variable do not accord with the preset router rule, the access request and the Midway environment configuration variable are sent to a Next.js frame service in a client;
the server side is used for analyzing the access request, acquiring access request data according to an analysis result and sending the access request data to the client side;
and the Next.js frame service module is used for generating a redirection access request according to the access request and the Midway environment configuration variable, and acquiring a blank template, rendering data and a first screen page from the server side based on the redirection access request to complete page isomorphic rendering.
8. A computer readable storage medium, characterized in that the storage medium stores a computer program for executing the method of any of the preceding claims 1-6.
9. An electronic device, the electronic device comprising:
a processor;
a memory for storing the processor-executable instructions;
the processor being configured to read the executable instructions from the memory and execute the instructions to implement the method of any of the preceding claims 1-6.
CN202210877451.8A 2022-07-25 2022-07-25 Access request processing method and device, storage medium and electronic equipment Active CN115334161B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210877451.8A CN115334161B (en) 2022-07-25 2022-07-25 Access request processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210877451.8A CN115334161B (en) 2022-07-25 2022-07-25 Access request processing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115334161A CN115334161A (en) 2022-11-11
CN115334161B true CN115334161B (en) 2023-06-27

Family

ID=83920382

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210877451.8A Active CN115334161B (en) 2022-07-25 2022-07-25 Access request processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115334161B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005114525A2 (en) * 2004-05-21 2005-12-01 Dizpersion Group, L.L.C. Method and system for providing network based target advertising and encapsulation
JP2008250806A (en) * 2007-03-30 2008-10-16 Fujitsu Ltd Network apparatus, access control method, and access control program
EP2458780A1 (en) * 2010-11-26 2012-05-30 British Telecommunications Public Limited Company Cyclic data delivery using a multicast scheme
WO2015100994A1 (en) * 2013-12-31 2015-07-09 华为技术有限公司 Page processing method, apparatus and system
CN111475764A (en) * 2020-06-29 2020-07-31 平安国际智慧城市科技股份有限公司 Search engine optimization method, device, terminal and storage medium
CN113010827A (en) * 2021-03-16 2021-06-22 北京百度网讯科技有限公司 Page rendering method and device, electronic equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090287701A1 (en) * 2008-05-14 2009-11-19 Orbitz Worldwide, L.L.C. System and Method for Receiving and Displaying User Inputted Travel-Related Messages
US9811673B2 (en) * 2011-01-11 2017-11-07 International Business Machines Corporation Content object encapsulating content items for accessing content and access authorization information

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005114525A2 (en) * 2004-05-21 2005-12-01 Dizpersion Group, L.L.C. Method and system for providing network based target advertising and encapsulation
JP2008250806A (en) * 2007-03-30 2008-10-16 Fujitsu Ltd Network apparatus, access control method, and access control program
EP2458780A1 (en) * 2010-11-26 2012-05-30 British Telecommunications Public Limited Company Cyclic data delivery using a multicast scheme
WO2015100994A1 (en) * 2013-12-31 2015-07-09 华为技术有限公司 Page processing method, apparatus and system
CN111475764A (en) * 2020-06-29 2020-07-31 平安国际智慧城市科技股份有限公司 Search engine optimization method, device, terminal and storage medium
CN113010827A (en) * 2021-03-16 2021-06-22 北京百度网讯科技有限公司 Page rendering method and device, electronic equipment and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
next.js 多级路由_如何使用Next.js API路由;cuk0051;https://blog.csdn.net/cuk0051/article/details/108343180;全文 *
基于Open API的旅游在线订票系统的设计与实现;周琳;中国优秀硕士论文电子期刊网;全文 *
松耦合数据中心体系架构研究综述;赵博彦;侯锐;张乾龙;包云岗;张立新;孟丹;;高技术通讯(第01期);全文 *

Also Published As

Publication number Publication date
CN115334161A (en) 2022-11-11

Similar Documents

Publication Publication Date Title
US11144711B2 (en) Webpage rendering method, device, electronic apparatus and storage medium
US9456019B2 (en) Web page load time prediction and simulation
US8250585B2 (en) Extensible framework for managing UI state in a composite AJAX application
CN110457143B (en) Micro-service calling method and device
US8516111B2 (en) System for enabling rich network applications
AU2008332701A1 (en) Templating system and method for updating content in real time
US10031971B2 (en) System and methods for optimizing the response to a request for dynamic web content
CN108416021B (en) Browser webpage content processing method and device, electronic equipment and readable medium
US8250059B2 (en) Crawling browser-accessible applications
US9645983B1 (en) Modifying a document at a script processing server using a client device's state information
US20120117491A1 (en) Web interface for remote platform build
US20050257167A1 (en) Embedded Web dialog
AU2005220377A1 (en) Script generation
WO2015080903A1 (en) Systems and methods for executing aspects of a document
US8140575B2 (en) Apparatus, method, and program product for information processing
CN110795649A (en) Target page display method, device and system and electronic equipment
US20100169457A1 (en) Social user script service by service proxy
CN111600920B (en) JS-based data request proxy method, device, equipment and readable storage medium
WO2013054248A1 (en) Generating a predictive data structure
JP2009031960A (en) Technology for relaying communication between client device and server device
CN115334161B (en) Access request processing method and device, storage medium and electronic equipment
CN112947900B (en) Web application development method and device, server and development terminal
CN112491940A (en) Request forwarding method and device of proxy server, storage medium and electronic equipment
CN112000416B (en) Card view generation method, device and computer readable storage medium
CN113971251A (en) Webpage output method, system and computer readable storage medium

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230731

Address after: Room 404-405, 504, Building B-17-1, Big data Industrial Park, Kecheng Street, Yannan High tech Zone, Yancheng, Jiangsu Province, 224000

Patentee after: Yancheng Tianyanchawei Technology Co.,Ltd.

Address before: 224000 room 501-503, building b-17-1, Xuehai road big data Industrial Park, Kecheng street, Yannan high tech Zone, Yancheng City, Jiangsu Province

Patentee before: Yancheng Jindi Technology Co.,Ltd.