Page generation method and apparatus

By obtaining access requests, identifying the access object, and loading module resources to generate the access page, the problem of slow development speed caused by the lack of project association between access objects is solved, thus improving the development efficiency of access pages.

CN113238753BActive Publication Date: 2025-10-21BEIJING JINGDONG TUOXIAN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110608527.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-01
Publication Date
2025-10-21
Estimated Expiration
2041-06-01

AI Technical Summary

Technical Problem

The development speed of access pages for different access objects is slow because the lack of project association between access objects leads to high code coupling and many conflicts.

Method used

By obtaining access requests from terminal devices, the access object is determined, and the corresponding module resources are loaded to generate the target access page. The loading of module resources is carried out using cascading style sheets and virtual execution environments, which reduces coupling and improves development speed.

Benefits of technology

This enabled the separate development of different module functions, reduced the build speed of access pages, and avoided iteration blockage caused by code conflicts and version dependencies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113238753B_ABST
    Figure CN113238753B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a page generation method and device, the method comprising: obtaining an input address of an access request sent by a terminal device; determining at least one access object of the access request according to the input address of the access request; loading module resources corresponding to the at least one access object to generate a target access page, wherein the access request contains user inquiry information for a target hospital, and the target access interface is used to display an inquiry result corresponding to the inquiry information. In this way, the access object is determined based on the access request, and the module resources corresponding to the access object are loaded to implement different module functions, so that different module functions can be developed independently, and the development speed of the access page is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a page generation method and device. Background Art

[0002] With the widespread use of information technology, hospitals and other access points often have user interfaces for browsing and accessing. Different access points often have different modules configured to implement different functions. For example, a hospital's interface might include a registration module, a prescription module, and a medical record module.

[0003] In the related art, the backend management systems of different access objects can set up their own front-end projects separately. However, since the projects of different access objects are not related, the projects of different access objects need to be developed and deployed separately.

[0004] In order to improve reusability, the backend management systems of some access objects can also share a front-end project. However, when there are too many access object projects, the code coupling between the projects is high, conflicts are frequent, and the development speed of the access page is slow. Summary of the Invention

[0005] The embodiments of the present application provide a page generation method and device to solve the technical problem in the prior art that the access page development speed is slow when there are too many items of access objects.

[0006] In a first aspect, an embodiment of the present application provides a page generation method, the method comprising:

[0007] Obtaining the input address of the access request sent by the terminal device;

[0008] determining at least one access object of the access request according to an input address of the access request;

[0009] Loading module resources corresponding to the at least one access object to generate a target access page;

[0010] The access request includes the user's inquiry information for the target hospital, and the target access interface is used to display the inquiry results corresponding to the inquiry information.

[0011] In an optional implementation, the input address of the access request includes page jump information; and determining at least one access object of the access request based on the input address of the access request includes:

[0012] At least one access object of the access request is determined according to the page jump information.

[0013] In an optional implementation, before loading the module resource corresponding to the at least one access object and generating the target access page, the method further includes:

[0014] Obtaining a resource address of the at least one access object;

[0015] According to the resource address of the at least one access object, a module resource corresponding to the at least one access object is acquired.

[0016] In an optional implementation, the access request further includes first indication information, where the first indication information is used to indicate a loading environment for module resources of the at least one access object.

[0017] In an optional implementation, the loading environment of the module resource includes a first loading environment and a second loading environment, the first loading environment is a loader, and the second loading environment is a virtual execution environment.

[0018] In an optional implementation, if the first indication information indicates the first loading environment, loading the module resource corresponding to the at least one access object and generating the target access page includes:

[0019] In the loader, the module resource corresponding to the at least one access object is inserted into the target access page in the form of a tag.

[0020] In an optional implementation, the module resource corresponding to the at least one access object is a cascading style sheet resource.

[0021] In an optional implementation, if the first indication information indicates the second loading environment, loading the module resources corresponding to the at least one access object and generating the target access page includes:

[0022] Initializing the virtual execution environment;

[0023] The module resource corresponding to the at least one access object is loaded in the virtual execution environment.

[0024] In an optional implementation, the module resource corresponding to the at least one access object is a scripting language resource.

[0025] In an optional implementation manner, after generating the target access page, the method further includes:

[0026] receiving an update indication of the state data of the first module resource sent by the terminal device;

[0027] Updating the state data of the first module resource in the state pool, and synchronizing the updated state data of the first module resource to the observer pool;

[0028] The observer pool is controlled to send the status data of the first module resource to the loader and module resources subscribed to the observer pool.

[0029] In an optional implementation, the state pool is used to update the state data of the loader and the module resources, and the observer pool is used to synchronize the state data between the loader and the module resources.

[0030] In a second aspect, an embodiment of the present application provides a page generation device, the device comprising:

[0031] An acquisition module, used to obtain the input address of the access request sent by the terminal device;

[0032] a processing module configured to determine at least one access object of the access request according to an input address of the access request; load module resources corresponding to the at least one access object, and generate a target access page;

[0033] The access request includes the user's inquiry information for the target hospital, and the target access interface is used to display the inquiry results corresponding to the inquiry information.

[0034] In an optional implementation, the input address of the access request includes page jump information; and the processing module is specifically configured to determine at least one access object of the access request according to the page jump information.

[0035] In an optional implementation, the acquisition module is further configured to acquire a resource address of the at least one access object; and acquire module resources corresponding to the at least one access object according to the resource address of the at least one access object.

[0036] In an optional implementation, the access request further includes first indication information, where the first indication information is used to indicate a loading environment for module resources of the at least one access object.

[0037] In an optional implementation, the loading environment of the module resource includes a first loading environment and a second loading environment, the first loading environment is a loader, and the second loading environment is a virtual execution environment.

[0038] In an optional implementation, if the first indication information indicates the first loading environment, the processing module is specifically configured to insert the module resource corresponding to the at least one access object into the target access page in the form of a tag in the loader.

[0039] In an optional implementation, the module resource corresponding to the at least one access object is a cascading style sheet resource.

[0040] In an optional implementation, if the first indication information indicates the second loading environment, the processing module is specifically configured to initialize the virtual execution environment; and load module resources corresponding to the at least one access object in the virtual execution environment.

[0041] In an optional implementation, the module resource corresponding to the at least one access object is a scripting language resource.

[0042] In an optional embodiment, the processing module is also used to receive an update indication of the status data of the first module resource sent by the terminal device; update the status data of the first module resource in the status pool, and synchronize the updated status data of the first module resource to the observer pool; control the observer pool to send the status data of the first module resource to the loader and module resources subscribed to the observer pool.

[0043] In an optional implementation, the state pool is used to update the state data of the loader and the module resources, and the observer pool is used to synchronize the state data between the loader and the module resources.

[0044] In a third aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the method described in any one of the first aspects.

[0045] In a fourth aspect, the present application further provides an electronic device, comprising:

[0046] processor; and

[0047] a memory for storing a computer program for the processor;

[0048] The processor is configured to implement any possible method in the first aspect by executing the computer program.

[0049] In a fifth aspect, the present invention further provides a non-transitory computer-readable storage medium storing computer instructions, on which a computer program is stored, and when the computer program is executed by a processor, any possible method in the first aspect is implemented.

[0050] The page generation method and apparatus provided in embodiments of the present application first obtain the input address of an access request sent by a terminal device. Subsequently, based on the input address of the access request, at least one access object of the access request is determined. Finally, the module resources corresponding to the at least one access object are loaded to generate the target access page. In this manner, the access object is determined based on the access request, and the module resources corresponding to the access object are loaded to implement different module functions. This allows different module functions to be developed independently, speeding up module function development. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0052] Figure 1 A schematic diagram of an application scenario of a page generation method provided in an embodiment of the present application;

[0053] Figure 2 A flowchart of a page generation method provided in an embodiment of the present application;

[0054] Figure 3 A schematic diagram of the principle of a page generation method provided in an embodiment of the present application;

[0055] Figure 4 A schematic diagram of data interaction between module resources provided in an embodiment of the present application;

[0056] Figure 5 A flowchart of another page generation method provided in an embodiment of the present application;

[0057] Figure 6 A flowchart of another page generation method provided in an embodiment of the present application;

[0058] Figure 7 A schematic structural diagram of a surface generation device provided in an embodiment of the present application;

[0059] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0060] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0061] In the related art, backend management systems for different access objects can have their own frontend projects. However, since the projects for different access objects are unrelated, these projects need to be developed and deployed separately. To improve reusability, backend management systems for several access objects can also share a single frontend project. However, when there are too many projects for an access object, the code coupling between the projects is high, conflicts are frequent, and the development of access pages is slow.

[0062] To solve the above problems, an embodiment of the present application provides a page generation method and device, which determines the access object based on the access request, and then loads the module resources corresponding to the access object to generate an access page to implement different module functions, so that different module functions can be developed separately, thereby improving the development speed of the access page.

[0063] The following describes the application scenarios of the page generation method involved in this application.

[0064] Figure 1 Schematic diagram of an application scenario of a page generation method provided in an embodiment of the present application. Figure 1 As shown, the page generation system includes a terminal device 101 and a server 102, which can communicate via a network. When a user needs to access a certain access object, the terminal device 101 can send an access request to the server 102. The server 102 determines the user's target access object based on the input address of the access request, and loads the module resources corresponding to the target access object to generate the target access page.

[0065] It should be understood that the access object involved in the embodiment of the present application can be a background management system of an organization, or a functional module of a background management system, and the embodiment of the present application does not limit this.

[0066] Among them, the terminal device 101 can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in a smart home, etc. In the embodiment of the present application, the device for realizing the function of the terminal can be a terminal, or a device that can support the terminal to realize the function, such as a chip system, which can be installed in the terminal. In the embodiment of the present application, the chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0067] The server 102 may be, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of computers or network servers. Cloud computing is a type of distributed computing, a super virtual computer composed of a group of loosely coupled computers.

[0068] It should be understood that the technical solution provided by this application Figure 1 The application scenario shown can be applied to the backend management systems of multiple hospitals or multiple schools, but is not limited to this. The embodiments of this application do not impose any restrictions on this.

[0069] It can be understood that the above-mentioned page generation method can be implemented by the page generation device provided in the embodiment of the present application. The page generation device can be part or all of a certain device, such as a server or a chip of a server.

[0070] The following uses a server integrated with or installed with relevant execution code as an example to describe the technical solutions of the embodiments of the present application in detail with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0071] Figure 2 A schematic diagram of a page generation method provided in an embodiment of the present application. Figure 3 This is a schematic diagram of the principle of a page generation method provided in an embodiment of the present application. This embodiment involves the process of how a server generates a target access page based on an access request. Figure 2 and Figure 3 As shown, the method includes:

[0072] S201: Acquire the input address of the access request sent by the terminal device.

[0073] In this application, when a user needs to access a certain access object, he or she may send an access request to the server through a terminal device. After receiving the access request, the server may extract the user's input address from the access request.

[0074] It should be understood that the input address involved in the embodiment of the present application can be the address of the target access object input by the user. The embodiment of the present application does not limit how the server obtains the input address from the access request, and a common address acquisition method can be used.

[0075] Among them, the access object involved in the embodiment of the present application can be the background management system of a certain organization, or it can be a functional module of a certain background management system, and the embodiment of the present application does not impose any restrictions on this.

[0076] S202: Determine at least one access object of the access request according to the input address of the access request.

[0077] In this step, after the server obtains the input address of the access request sent by the terminal device, it can determine at least one access object of the access request according to the access address.

[0078] Among them, the user can access one access object of a backend management system, or can access multiple access objects of the same backend management system at the same time. For example, if a user accesses the backend management system of a hospital, he can access only the registration items of the backend management system, or can access the registration items and prescription items of the backend management system at the same time.

[0079] The embodiments of the present application do not limit how the server determines the at least one access object of the access request. In some embodiments, the server can directly parse the at least one access object from the input address of the access request. In other embodiments, the input address of the access request includes page jump information, and the server can determine the at least one access object of the access request based on the page jump information.

[0080] Exemplarily, the page jump information may include indication information such as hash value (hash), forward (forward), back (back), visit (go), refresh (replace State), etc. By monitoring the above indication information, the server can determine at least one access object of the access request.

[0081] S203: Load module resources corresponding to at least one access object and generate a target access page.

[0082] The access request includes the user's inquiry information for the target hospital, and the target access interface is used to display the inquiry results corresponding to the inquiry information.

[0083] In this step, after the server determines at least one access object of the access request, it may load the module resources corresponding to the at least one access object to generate a target access page.

[0084] It should be understood that the module resources involved in the embodiments of this application can be split into corresponding module resources by the project code management tool (GitLab) by splitting the functional modules of the backend management system into a distributed version control system (Git) library on a project basis. In this way, each module resource is constructed separately, thereby reducing coupling and conflicts, improving the efficiency of multi-person collaboration, and increasing the speed of generating access pages.

[0085] In addition, the scripting language (JavaScript, js) of the above module resources can be output as umd (a js specification), so that it is compatible with various browsers.

[0086] It should be understood that the embodiments of the present application do not limit how to determine the module resources corresponding to at least one access object. In some embodiments, before loading the module resources corresponding to at least one access object, the server may first obtain the resource address of the at least one access object, and then obtain the module resources corresponding to the at least one access object based on the resource address of the at least one access object.

[0087] The embodiments of the present application do not limit how to obtain the resource address of the at least one access object. In some embodiments, the server may obtain the resource address of the at least one access object by parsing. For example, the server may use the importEntry method in the import-html-entry library to parse the corresponding resource and obtain the resource address of the at least one access object.

[0088] It should be noted that in the embodiment of the present application, for different loading environments, the server can select different resource addresses and thereby obtain different module resources.

[0089] The following describes different ways of loading module resources based on different instruction information.

[0090] In some embodiments, the access request further includes first indication information, the first indication information being used to indicate a loading environment for at least one module resource of the access object. The loading environment for the module resource includes a first loading environment and a second loading environment, where the first loading environment is a loader and the second loading environment is a virtual execution environment (also known as a sandbox environment).

[0091] Accordingly, if the first indication information indicates the first loading environment, the server may select the parsed style resource address in Hypertext Markup Language (HTML). Subsequently, the server may obtain a Cascading Style Sheets (CSS) string resource based on the style resource address. Finally, the server may insert the CSS string resource corresponding to the at least one access object into the target access page in the form of a tag in the loader.

[0092] Accordingly, if the first indication information indicates the second loading environment, the server may select the js resource address in the parsed HTML. Subsequently, the server obtains the js resource based on the js resource address. Subsequently, the server initializes the virtual execution environment and loads the module resource corresponding to at least one access object in the virtual execution environment.

[0093] It should be noted that the embodiments of the present application do not restrict how the server initializes the virtual execution environment and loads the resource module in the virtual execution environment. For example, the server can package the js resource corresponding to at least one access object into an immediately executed function, and then change the window environment of the immediately executed function through parameters, thereby turning it into a virtual execution environment. During the initialization process, the server can copy the window to generate a mirror proxy and generate a corresponding new Map() object for the resource module. When modifying the window data, the modification of the new Map() object can be intercepted to prevent global pollution of the window.

[0094] In some embodiments, after the server generates the target access page, the server receives an update indication for the state data of the first module resource from the terminal device. Subsequently, the server updates the state data of the first module resource in the state pool and synchronizes the updated state data of the first module resource to the observer pool. Finally, the observer pool is controlled to send the state data of the first module resource to the loader and module resources subscribed to the observer pool.

[0095] Among them, the state pool is used to update the state data of the loader and module resources, and the observer pool is used to synchronize the state data between the loader and module resources.

[0096] For example, Figure 4 This is a schematic diagram of data interaction between module resources provided in an embodiment of the present application. Figure 4As shown, loaders or resource modules can synchronize state data to the state pool using a publish-subscribe model. When the state data of a resource module's subscription dependency changes, the corresponding callback function can be used to synchronize the state data to the state pool. Subsequently, when the observer pool determines that the state data of the loader or resource module's dependency has changed, it can perform a publish operation to synchronize the changed state data to the loaders and module resources subscribed to the observer pool.

[0097] In the present application, since each functional module is split into module resources, the development speed is increased, the coupling degree is reduced, and the reusability of the reused code is improved. At the same time, each module resource can use a different technology stack. When a certain module resource is incrementally updated, it does not affect other module resources, and each module resource can also be developed and deployed separately. Therefore, the page generation method provided in the embodiment of the present application reduces the problem of slow access page construction speed caused by too many projects, and avoids the iteration blocking caused by code conflicts and version dependence.

[0098] The page generation method provided in an embodiment of the present application first obtains the input address of an access request sent by a terminal device. Subsequently, based on the input address of the access request, at least one access object of the access request is determined. Finally, the module resources corresponding to the at least one access object are loaded to generate the target access page. In this manner, the access object is determined based on the access request, and the module resources corresponding to the access object are loaded to implement different module functions. This allows different module functions to be developed independently, speeding up module function development.

[0099] Based on the above embodiment, the following describes how to perform data interaction between resource modules. Figure 5 A flow chart of another page generation method provided in an embodiment of the present application is shown as follows: Figure 5 As shown, the method includes:

[0100] S301: Acquire the input address of the access request sent by the terminal device.

[0101] S302: Determine at least one access object of the access request according to the input address of the access request.

[0102] S303: Load module resources corresponding to at least one access object and generate a target access page.

[0103] The access request includes the user's inquiry information for the target hospital, and the target access interface is used to display the inquiry results corresponding to the inquiry information.

[0104] S304: Receive an update indication of the status data of the first module resource sent by the terminal device.

[0105] S305: Update the status data of the first module resource in the status pool, and synchronize the updated status data of the first module resource to the observer pool.

[0106] S306: Control the observer pool to send the status data of the first module resource to the loader and module resources that subscribe to the observer pool.

[0107] Among them, the state pool is used to update the state data of the loader and module resources, and the observer pool is used to synchronize the state data between the loader and module resources.

[0108] The technical terms, technical effects, technical features, and optional implementation methods of S301-S306 can be referred to Figure 2 The S201-S203 shown are understood, and the repeated content will not be repeated here.

[0109] Based on the above embodiment, the following describes how the server loads the module resources corresponding to the access object. Figure 6 A flow chart of another page generation method provided in an embodiment of the present application is shown as follows: Figure 6 As shown, the method includes:

[0110] S401, obtaining the input address of the access request sent by the terminal device;

[0111] S402: Determine at least one access object of the access request according to the input address of the access request;

[0112] S403: Determine whether the first indication information indicates a first loading environment.

[0113] If yes, execute S404; if no, execute S405.

[0114] S404: In the loader, insert module resources corresponding to at least one access object into the target access page in the form of a tag.

[0115] S405: Initialize the virtual execution environment.

[0116] S406: Load at least one module resource corresponding to the access object in the virtual execution environment.

[0117] The technical terms, technical effects, technical features, and optional implementation methods of S401-S406 can be referred to Figure 2 The S201-S203 shown are understood, and the repeated content will not be repeated here.

[0118] The page generation method provided in an embodiment of the present application first obtains the input address of an access request sent by a terminal device. Subsequently, based on the input address of the access request, at least one access object of the access request is determined. Finally, the module resources corresponding to the at least one access object are loaded to generate the target access page. In this manner, the access object is determined based on the access request, and the module resources corresponding to the access object are loaded to implement different module functions. This allows different module functions to be developed independently, speeding up module function development.

[0119] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk, etc. Various media that can store program codes.

[0120] Figure 7 This is a schematic diagram of the structure of a page generation device provided in an embodiment of the present application. The page generation device can be implemented by software, hardware, or a combination of both, and can be, for example, a server or a server chip in the above embodiment to execute the page generation method in the above embodiment. Figure 7 As shown, the page generating device 500 includes:

[0121] The acquisition module 501 is configured to acquire an input address of an access request sent by a terminal device.

[0122] The processing module 502 is configured to determine at least one access object of the access request according to the input address of the access request; load module resources corresponding to the at least one access object, and generate a target access page.

[0123] The access request includes the user's inquiry information for the target hospital, and the target access interface is used to display the inquiry results corresponding to the inquiry information.

[0124] In an optional implementation, the input address of the access request includes page jump information; the processing module 502 is specifically configured to determine at least one access object of the access request according to the page jump information.

[0125] In an optional implementation, the acquisition module 501 is further configured to acquire a resource address of at least one access object; and acquire module resources corresponding to the at least one access object according to the resource address of the at least one access object.

[0126] In an optional implementation, the access request further includes first indication information, where the first indication information is used to indicate a loading environment of a module resource of at least one access object.

[0127] In an optional implementation, the loading environment of the module resource includes a first loading environment and a second loading environment, the first loading environment is a loader, and the second loading environment is a virtual execution environment.

[0128] In an optional implementation, if the first indication information indicates the first loading environment, the processing module 502 is specifically configured to insert a module resource corresponding to at least one access object into the target access page in the form of a tag in the loader.

[0129] In an optional implementation, the module resource corresponding to at least one access object is a cascading style sheet resource.

[0130] In an optional implementation, if the first indication information indicates the second loading environment, the processing module 502 is specifically configured to initialize the virtual execution environment and load at least one module resource corresponding to the access object in the virtual execution environment.

[0131] In an optional implementation, the module resource corresponding to at least one access object is a scripting language resource.

[0132] In an optional embodiment, the processing module 502 is also used to receive an update indication of the status data of the first module resource sent by the terminal device; update the status data of the first module resource in the status pool, and synchronize the updated status data of the first module resource to the observer pool; control the observer pool to send the status data of the first module resource to the loader and module resources subscribed to the observer pool.

[0133] In an optional implementation, the state pool is used to update the state data of the loader and the module resources, and the observer pool is used to synchronize the state data between the loader and the module resources.

[0134] Need to explain, Figure 7 The page generation device provided in the illustrated embodiment can be used to execute the method provided in any of the above embodiments. The specific implementation methods and technical effects are similar and will not be described in detail here.

[0135] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device may include: at least one processor 601 and a memory 602 . Figure 8 An electronic device is shown using a processor as an example.

[0136] The memory 602 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer operation instructions.

[0137] The memory 602 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0138] The processor 601 is configured to execute computer-executable instructions stored in the memory 602 to implement the above-mentioned page generation method;

[0139] The processor 601 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0140] Alternatively, in a specific implementation, if the communication interface, memory 602, and processor 601 are implemented independently, they may be interconnected via a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. Buses can be categorized as address buses, data buses, control buses, etc., but this does not necessarily mean that there is only one bus or only one type of bus.

[0141] Optionally, in a specific implementation, if the communication interface, memory 602 and processor 601 are integrated on a chip, the communication interface, memory 602 and processor 601 can complete communication through an internal interface.

[0142] The present application also provides a chip comprising a processor and an interface. The interface is used to input and output data or instructions processed by the processor. The processor is used to execute the method provided in the above method embodiment. The chip can be used in a page generation device.

[0143] The present application also provides a computer-readable storage medium, which may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program code. Specifically, the computer-readable storage medium stores program information, and the program information is used in the above-mentioned page generation method.

[0144] An embodiment of the present application also provides a program, which, when executed by a processor, is used to execute the page generation method provided in the above method embodiment.

[0145] An embodiment of the present application also provides a program product, such as a computer-readable storage medium, which stores instructions. When the program product is run on a computer, it enables the computer to execute the page generation method provided by the above method embodiment.

[0146] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions according to the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A page generation method, characterized in that: The method comprises: Obtaining the input address of the access request sent by the terminal device; Determining at least one access object of the access request based on an input address of the access request; wherein the access request further includes first indication information, the first indication information being used to indicate a loading environment of a module resource of the at least one access object; the loading environment of the module resource includes a first loading environment and a second loading environment, the first loading environment being a loader, and the second loading environment being a virtual execution environment; Loading the module resources corresponding to the at least one access object to generate a target access page; wherein the module resources are formed by splitting the functional modules of the backend management system into a distributed version control system library on a project-by-project basis using a project code management tool; each module resource uses a different technology stack, and incremental technology updates are performed on any module therein, so that each module resource is developed independently; The access request includes the user's inquiry information for the target hospital, and the target access interface is used to display the inquiry results corresponding to the inquiry information; If the first indication information indicates the second loading environment, then loading the module resources corresponding to the at least one access object and generating a target access page includes: Packing the script language resource corresponding to at least one access object into an immediately executed function, and changing the window environment of the immediately executed function through parameters to become a virtual execution environment; Initialize the virtual execution environment; during the initialization process, the server copies the window to generate a mirror proxy and generates a corresponding new Map() object for the resource module; when modifying the window data, intercept the modification of the new Map() object to prevent global pollution of the window; The module resource corresponding to the at least one access object is loaded in the virtual execution environment.

2. The method according to claim 1, characterized in that The input address of the access request includes page jump information; and determining at least one access object of the access request according to the input address of the access request includes: At least one access object of the access request is determined according to the page jump information.

3. The method according to claim 1, characterized in that Before loading the module resource corresponding to the at least one access object and generating the target access page, the method further includes: Obtaining a resource address of the at least one access object; According to the resource address of the at least one access object, a module resource corresponding to the at least one access object is acquired.

4. The method according to claim 1, wherein If the first indication information indicates the first loading environment, then loading the module resource corresponding to the at least one access object and generating a target access page includes: In the loader, the module resource corresponding to the at least one access object is inserted into the target access page in the form of a tag.

5. The method according to claim 4, characterized in that The module resource corresponding to the at least one access object is a cascading style sheet resource.

6. The method according to claim 1, characterized in that The module resource corresponding to the at least one access object is a scripting language resource.

7. The method according to claim 1, characterized in that After generating the target access page, the method further includes: receiving an update indication of the state data of the first module resource sent by the terminal device; Updating the state data of the first module resource in the state pool, and synchronizing the updated state data of the first module resource to the observer pool; The observer pool is controlled to send the status data of the first module resource to the loader and module resources subscribed to the observer pool.

8. The method according to claim 7, characterized in that The state pool is used to update the state data of the loader and the module resources, and the observer pool is used to synchronize the state data between the loader and the module resources.

9. A page generating device, characterized in that: include: An acquisition module, used to obtain the input address of the access request sent by the terminal device; a processing module, configured to determine, based on an input address of the access request, at least one access object of the access request; wherein the access request further includes first indication information, the first indication information being used to indicate a loading environment of a module resource of the at least one access object; the loading environment of the module resource including a first loading environment and a second loading environment, the first loading environment being a loader, and the second loading environment being a virtual execution environment; Loading the module resources corresponding to the at least one access object to generate a target access page; wherein the module resources are formed by splitting the functional modules of the backend management system into a distributed version control system library on a project-by-project basis using a project code management tool; each module resource uses a different technology stack, and incremental technology updates are performed on any module therein, so that each module resource is developed independently; The access request includes the user's inquiry information for the target hospital, and the target access interface is used to display the inquiry results corresponding to the inquiry information; The processing module is specifically used to package the script language resources corresponding to at least one access object into an immediately executed function, change the window environment of the immediately executed function through parameters to become a virtual execution environment; initialize the virtual execution environment; during the initialization process, the server copies the window to generate a mirror proxy and generates a corresponding new Map() object for the resource module; when the window data is modified, the modification of the new Map() object is intercepted to prevent global pollution of the window; and load the module resources corresponding to the at least one access object in the virtual execution environment.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

11. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 8.

12. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Webpage data loading method and device, computer equipment and storage medium

    CN112073405A