CN115334161A - 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
CN115334161A
CN115334161A CN202210877451.8A CN202210877451A CN115334161A CN 115334161 A CN115334161 A CN 115334161A CN 202210877451 A CN202210877451 A CN 202210877451A CN 115334161 A CN115334161 A CN 115334161A
Authority
CN
China
Prior art keywords
access request
midway
request
rendering
router
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210877451.8A
Other languages
Chinese (zh)
Other versions
CN115334161B (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, a Midway framework service in a client judges whether the access request accords with a preset router rule, and generates a Midway environment configuration variable based on the access request; if the rule accords with the preset router rule, an access request is sent to a server; and if the access request does not accord with the preset router rule, sending the access request and the Midway environment configuration variable to the Next. According to the access request processing method and device, the storage medium and the electronic device, the Midway frame service and the Next.

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 an access request processing method and apparatus, a storage medium, and an electronic device.
Background
At present, a technical stack of Egg + Ejs + JQuery is adopted at the front end of a client for development, the whole website is continuously iterated, so that the website becomes a giant rock application, the technical stack is old and difficult to debug and maintain, the efficiency of the front end development is not improved in the continuous iteration, the newly added partner technical stack is relatively new in cognition, the giant rock application is psychologically resisted, and the client development efficiency is lower and lower in the past. How to combine the front-end framework and the back-end framework and make the configuration that the front-end framework takes to the back-end framework and request information become a necessity.
Disclosure of Invention
In view of the above, the present invention provides an access request processing method and apparatus, a storage medium, and an electronic device to at least partially solve the above 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, a Midway framework service in a client judges whether the access request accords with a preset router rule, and generates a Midway environment configuration variable based on the access request;
if the access request accords with the preset router rule, the access request is sent to a server;
and if the access request does 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:
and 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 framework 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 side to complete page isomorphic rendering based on the redirection access request.
Optionally, the obtaining, based on the redirection access request, a blank template, rendering data, and a home screen page from the server to complete isomorphic rendering includes:
after the server side receives the redirection access request, a blank template is generated;
generating a rendering response request after the next.js framework service receives the blank template;
after receiving the rendering response request, the server analyzes the redirection access request, acquires rendering data according to a second analysis result, and renders a first screen page;
js frame service receives the rendering data and the first screen page, loads the first screen page, and renders all levels of jump pages according to the rendering data to complete page isomorphic rendering.
Optionally, the method further comprises:
js frame service presets a router, and receives the access request, the Midway environment configuration variable, the blank template, rendering data and the home screen page through the preset router, and/or sends a redirection direction request and a rendering response request.
Optionally, if the access request is a hypertext markup language request, the determining, by the Midway framework service in the client, whether the access request meets a preset router rule includes:
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 conforms to a preset router rule, and generates a 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, 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 preset router rule is met, the access request is sent to a server; if the access request does not accord with the preset router rule, the access request and the Midway environment configuration variable are sent to Next.js framework service in the client;
the server 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;
a js frame service module, 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 to complete page isomorphic rendering based on the redirection access request.
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 thereon a computer-executable program and a processor for executing the computer-executable program to implement any of the above-described method embodiments.
According to the access request processing method and device, the storage medium and the electronic device, whether the access request meets the preset router rule or not is judged through the Midway frame service in the client side, 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 the Next. The access request processing method and device, the storage medium and the electronic device combine the Midway frame service with the Next.js frame service, and transmit the information such as the environment configuration variables and the access requests of the Midway frame service to the Next.js frame service, so that the Next.js frame service in the client can also obtain the information such as the environment configuration variables and the access requests of the server, and the Midway frame service and the Next.js frame service can be flexibly selected to be adopted to process the access requests according to the actual requirements of users.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in more detail embodiments of the present invention with reference to the attached drawings. The accompanying drawings 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 principles of the invention and not to limit the invention. In the drawings, like reference numbers generally indicate like parts or steps.
Fig. 1 is a flowchart illustrating an access request processing method 100 according to an exemplary embodiment of the present invention;
fig. 2 is a flowchart of the method 200 for obtaining a blank template, rendering data, and a top page from the server to complete isomorphic rendering based on the redirection access request according to an exemplary embodiment of the present invention;
fig. 3 is a flowchart of a method 300 for determining whether the access request conforms to 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 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, example embodiments according to the present invention will be described in detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely a subset of embodiments of the invention and not all embodiments of the invention, with the understanding that the invention is not limited to the example embodiments described herein.
It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
It will be understood by those of skill in the art that the terms "first," "second," and the like in the embodiments of the present invention are used merely to distinguish one element, step, device, module, or the like from another element, and do not denote any particular technical or logical order therebetween.
It should also be understood that in embodiments of the present invention, "a plurality" may refer to two or more than two, and "at least one" may refer to one, two or more than two.
It is also to be understood that any reference to any component, data, or structure in the embodiments of the invention may be generally understood as one or more, unless explicitly defined otherwise or stated to the contrary hereinafter.
In addition, the term "and/or" in the present invention is only one kind of association relationship describing the associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In the present invention, the character "/" generally indicates that the preceding and following related objects are in 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 the same or similar parts may be referred to each other, and are not repeated herein for brevity.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be discussed further in subsequent figures.
Embodiments of the invention are operational with numerous other general purpose or special purpose computing system environments or configurations, and with numerous other 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 electronic devices, such as terminal devices, computer systems, servers, and the like, 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, networked personal computers, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above, 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 practiced in distributed cloud computing environments where 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 computer system storage media including memory storage devices.
Exemplary method
Fig. 1 is a flowchart illustrating 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, the method includes the following steps:
step 101, responding to an access request initiated by a user, a Midway framework service in a client judges whether the access request accords with a preset router rule, and generates a Midway environment configuration variable based on the access request;
optionally, before step 101, the method further includes: and starting the Midway frame service and the Next.
Specifically, before determining whether the access request conforms to a preset routing rule and generating a Midway environment configuration variable based on the access request, a Midway framework service and a next.
More specifically, the Midway framework service can be started by adopting a starting mode provided by an official, the Midway framework service instantiates a global application (application) after the Midway framework service is started, the application runs all the time when the Midway framework service is not closed, the service is continuously provided for a client, the current life cycle (namely the current state) of the application is determined by monitoring a life cycle function in the application, such as onReady (after the application is started), onsop (when the application is closed and stops running), onConfigLoad (after the configuration file is loaded), and the next. Js framework services provide custom services, and servers that are custom-built allow servers to be started 100% programmatically, so that full customization is achieved using a custom server schema.
After a user inputs a URL address in a browser of a client, for example, a www.aaabbb.com/company/22822 address (i.e., an access request), the client first goes through a Midway framework service, which determines whether a router (/ company/22822) in the access request conforms to a preset router rule (i.e., is in a predefined router list of the 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 developed locally, tested, pre-developed, and/or online. Different environments may have different domain name requirements, for example: test environment www.test63.Aaabbb.com, online www.aaabbb.com, if jump to the company detail page, the domain name to be tested needs to jump in the test environment, and the domain name to jump to the online environment is a variable, which is already defined in the configuration file of the Midway server.
And 102, if the rule accords with the preset router rule, 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 information such as a request header and a request body) of the router is sent to the server.
And 103, if the access request does 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 whole request (including information such as a request header and a request body) 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: and 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 a user clicks a page order submitting button, a request www.aaabbb.com/api/getUserinfo for user information acquisition is initiated, and 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 the request header and the request body) of the router is analyzed and transmitted to a controller layer processing request of the Midway framework service, 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 framework 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 side to complete page isomorphic rendering based on the redirection access request.
After receiving the access request and the Midway environment configuration variable, the next.
And isomorphic rendering is completed in order to obtain a blank template, rendering data and a first screen page from the server. Fig. 2 is a flowchart of the method 200 for obtaining a blank template, rendering data, and a top page from the server to complete isomorphic rendering based on the redirected access request according to an exemplary embodiment of the present invention. As shown in fig. 2, the obtaining, based on the redirection access request, a blank template, rendering data, and a home 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.
Step 203, after receiving the rendering response request, the server analyzes the redirection access request, acquires rendering data according to a second analysis result, and renders a first screen page;
and step 204, after receiving the rendering data and the first screen page, the next.
Specifically, after receiving the redirection access request, the server generates a blank template and sends the blank template to a next. Js service finds a rendering page entry according to a preset router (a company file under the pages directory) after receiving the request information and the environment configuration variable, and transmits the rendering page entry to the browser after rendering, 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:
js frame service sets a router in advance, receives the access request, the Midway environment configuration variable, the blank template, rendering data and the home screen page through the set router in advance, and/or sends a redirection orientation request and a rendering response request.
To determine whether the access request complies with preset router rules. Fig. 3 is a flowchart of a method 300 for determining whether the access request conforms to 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 present invention. As shown in fig. 3, if the access request is a hypertext markup language request, the determining, by the Midway framework service in the client, whether the access request meets a preset router rule includes:
step 301, if the access request is a hypertext markup language request, determining, by a Midway framework service in the client, whether the access request meets a preset router rule, including:
step 302, a Midway framework service in the client analyzes the hypertext markup language request to obtain a corresponding router name;
step 303, determining 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 router does not conform to the preset router rule.
Specifically, if the access request is an HTML request after URL input, the Midway framework service is started first, a Midway middleware is defined, and the middleware function is as follows: judging whether the current route is a predefined router list or not, and packaging environment configuration variables; the Midway frame 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 routing list, and if the HTML request is in the predefined Midway routing list, the HTML request is judged to accord with a preset router rule; if not, the router is judged not to accord with the preset router rule.
Wherein, middleware function: judging whether the current route is a predefined router list or not, packaging the environment configuration variables, starting Nextjs service, realizing a service hook, such as hook, mounting the context of the Midway service to the hook, forming a channel, and transmitting the environment configuration variables of the middleware to the Nextjs service through the channel.
The access request processing method provided by the invention judges whether the access request accords with the preset router rule or not through the Midway framework service in the client, generates the Midway environment configuration variable based on the access request, and finally sends the access request and the Midway environment configuration variable to the Next. The access request processing method provided by the invention combines the Midway frame service with the Next.js frame service, and transmits the information such as the environment configuration variables and the access requests of the Midway frame service to the Next.js frame service, so that the Next.js frame service in the client can also obtain the information such as the environment configuration variables and the access requests of the server, and the Midway frame service and the Next.js frame service can be flexibly selected to process the access requests according to the actual requirements of users.
Exemplary devices
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 the present embodiment includes:
a Midway framework service module 410, 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 preset router rule is met, the access request is sent to a server; if the access request does not accord with the preset router rule, the access request and the Midway environment configuration variable are sent to Next.js framework service in the client;
the Midway framework service module 410 may include:
the module for analyzing the hypertext markup language request is used for analyzing the hypertext markup language request to obtain a corresponding router name;
a router rule judging submodule for 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 router does not conform to the preset router rule.
The Midway framework service module 410 may further include:
and the frame service starting submodule is used for starting Midway frame service and Next.
The server 420 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;
a js frame service module 430, 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 top-screen page from the server to complete page isomorphic rendering based on the redirection access request.
Js framework service module 430 may include:
a blank template generation submodule, configured to generate a blank template after the server receives the redirection access request;
a rendering response request generation submodule, configured to generate a rendering response request after the next.
The rendering first 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 a first screen page;
and completing page isomorphic rendering, wherein the page isomorphic rendering is used for loading the first screen page after the next.
Js framework service module 430 may further include:
a parameter receiving submodule, configured to serve a preset router for the next.js framework, and receive, through the preset router, the access request, the Midway environment configuration variable, the blank template, rendering data, and a home screen page, and/or send a redirection direction 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 other descriptions can refer to the description of the access request processing method 100 according to another embodiment of the present invention, and are not described herein again.
The access request processing device provided by the invention judges whether the access request accords with the preset router rule or not through the Midway framework service in the client, generates the Midway environment configuration variable based on the access request, and finally sends the access request and the Midway environment configuration variable to the Next. The access request processing device provided by the invention combines the Midway frame service with the Next.js frame service, and transmits the information such as the environment configuration variables and the access requests of the Midway frame service to the Next.js frame service, so that the Next.js frame service in the client can also obtain the information such as the environment configuration variables and the access requests of the server, and the Midway frame service and the Next.js frame service can be flexibly selected to process the access requests 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 separate from them, which stand-alone device 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 a memory 52.
The processor 51 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
The 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), cache memory (cache), and/or the like. The non-volatile memory may include, for example, read Only Memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium and executed by the processor 51 to implement the access request processing method of the software program of the various embodiments of the present disclosure described above and/or other desired functions. 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 form of connection mechanism (not shown).
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 devices 54 may include, for example, a display, speakers, a printer, and a communication network and its connected remote output devices, among others.
Of course, for simplicity, only some of the components of the electronic device relevant to the present disclosure are shown in fig. 5, omitting components such as buses, input/output interfaces, and the like. 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 above-described methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the access request processing method according to various embodiments of the present disclosure described in the "exemplary methods" section of this specification, above.
The computer program product may write program code for carrying out operations for 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 and 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 that, when executed by a processor, cause the processor to perform steps in an access request processing method according to various embodiments of the present disclosure described in the "exemplary methods" section above in this specification.
The computer readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but 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 include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc 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, but it should be noted that advantages, effects, and the like, mentioned in the present disclosure are only examples and not limitations, and should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure will be described in detail with reference to specific details.
In the present specification, the embodiments are described in a progressive manner, and each embodiment focuses on differences from other embodiments, and the same or similar parts in each embodiment are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, 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, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied 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 devices, apparatuses, and methods of the present disclosure, each component or step can be decomposed and/or recombined. These decompositions and/or recombinations are to be considered equivalents of 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 embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.

Claims (10)

1. An access request processing method, the method comprising:
responding to an access request initiated by a user, a Midway framework service in a client judges whether the access request accords with a preset router rule, and generates a Midway environment configuration variable based on the access request;
if the preset router rule is met, the access request is sent to a server;
and if the access request does not accord with the preset router rule, sending the access request and the Midway environment configuration variable to a Next.
2. The method of claim 1, further comprising:
and 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, further comprising:
and the next.js framework 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 side to complete page isomorphic rendering based on the redirection access request.
4. The method of claim 3, wherein the obtaining a blank template, rendering data, and a home screen page from the server based on the redirected access request to complete isomorphic rendering comprises:
after the server side receives the redirection access request, a blank template is generated;
the next. Js framework service generates a rendering response request after receiving the blank template;
after receiving the rendering response request, the server analyzes the redirection access request, acquires rendering data according to a second analysis result, and renders a first screen page;
and after receiving the rendering data and the first screen page, the next.
5. The method of claim 3, further comprising:
js frame service presets a router, and receives the access request, the Midway environment configuration variable, the blank template, rendering data and the home screen page through the preset router, and/or sends a redirection direction request and a rendering response request.
6. The method of claim 1, wherein if the access request is a hypertext markup language request, the Midway framework service in the client determining whether the access request complies with a preset router rule comprises:
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.
7. The method of claim 1, wherein before the Midway framework service in the client determines whether the access request conforms to a preset router rule in response to the access request initiated by the user and generates Midway environment configuration variables based on the access request, the method further comprises:
and starting the Midway frame service and the Next.
8. An access request processing apparatus, characterized in that the apparatus comprises:
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 accords with the preset router rule, the access request is sent to a server; if the access request does not accord with the preset router rule, the access request and the Midway environment configuration variable are sent to Next.js framework service in the client;
the server 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;
and the 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 to complete page isomorphic rendering based on the redirection access request.
9. A computer-readable storage medium, characterized in that the storage medium stores a computer program for performing the method of any of the preceding claims 1-7.
10. An electronic device, characterized in that the electronic device comprises:
a processor;
a memory for storing the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method of any one of claims 1-7.
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 true CN115334161A (en) 2022-11-11
CN115334161B 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 (8)

* 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
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
EP2458780A1 (en) * 2010-11-26 2012-05-30 British Telecommunications Public Limited Company Cyclic data delivery using a multicast scheme
US20120180111A1 (en) * 2011-01-11 2012-07-12 International Business Machines Corporation Content object encapsulating content items for accessing content and access authorization information
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

Patent Citations (8)

* 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
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
EP2458780A1 (en) * 2010-11-26 2012-05-30 British Telecommunications Public Limited Company Cyclic data delivery using a multicast scheme
US20120180111A1 (en) * 2011-01-11 2012-07-12 International Business Machines Corporation Content object encapsulating content items for accessing content and access authorization information
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
CUK0051: "next.js 多级路由_如何使用Next.js API路由", HTTPS://BLOG.CSDN.NET/CUK0051/ARTICLE/DETAILS/108343180 *
周琳: "基于Open API的旅游在线订票系统的设计与实现", 中国优秀硕士论文电子期刊网 *
赵博彦;侯锐;张乾龙;包云岗;张立新;孟丹;: "松耦合数据中心体系架构研究综述", 高技术通讯, no. 01 *

Also Published As

Publication number Publication date
CN115334161B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
US8527504B1 (en) Data network content filtering using categorized filtering parameters
US8745341B2 (en) Web server cache pre-fetching
US7543234B2 (en) Stacking portlets in portal pages
US20040003033A1 (en) Method and system for generating a web service interface
US20040006653A1 (en) Method and system for wrapping existing web-based applications producing web services
CN109871499A (en) Page loading method and client
US9143378B2 (en) Rendering components within different browser environments
CN107797911A (en) Method and apparatus for testing HTTP interface
CN108416021B (en) Browser webpage content processing method and device, electronic equipment and readable medium
US8127304B2 (en) Mapping and communicating data from a user interface to an application program
CN111143532B (en) Dialogue unit access method, device, equipment and storage medium
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
CN113806008A (en) Cluster access method and device, electronic equipment and readable storage medium
US8793326B2 (en) System, method and computer program product for reconstructing data received by a computer in a manner that is independent of the computer
US8010595B2 (en) Execution of server-side dynamic pages
CN115297029B (en) Method, device, equipment and medium for testing resolution performance of industrial internet identification
CN115334161A (en) Access request processing method and device, storage medium and electronic equipment
JPWO2013098925A1 (en) Information processing apparatus, information processing system, information processing method, and program
CN111338928A (en) Chrome-based browser testing method and device
CN112104641B (en) Login form conversion method and device, storage medium and electronic equipment
CN115659405B (en) Interaction method and device of digital object, electronic equipment and storage medium
CN112417347B (en) Web page availability monitoring method and device, medium and electronic equipment
CN115033228A (en) Method and device for associating functional components of visual page

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

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.

TR01 Transfer of patent right