Information processing method, device, system and computer readable storage medium
By executing uninstall instructions and loading update scripts on the server, the problem of code updates taking effect without restarting the server is solved, ensuring the stability of online services.
Patent Information
- Application Number
- CN201910948654.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-30
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2039-09-30
AI Technical Summary
After the code on the server is updated, the server needs to be restarted for the updated code to take effect, causing the stability of online services to be affected.
By executing an uninstall instruction to uninstall the old function script in the running environment when a control signal is received, and when receiving an access request, obtaining and loading the updated function script from the storage unit to the running environment in response to the access request.
After the code is updated, the update can take effect without restarting the server, ensuring timely response to access requests and improving the stability of online services.
Smart Images

Figure CN112579192B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and more specifically, to an information processing method and an information processing device, system, and computer-readable storage medium. Background Art
[0002] When the server executes the function code for the first time in response to the access request for accessing the specific business function, the server reads the function code from the hard disk and loads the function code into the operating environment. After the server completes the first execution of the function code, the server reads the function code directly from the operating environment each time it executes the function code, without having to read it from the hard disk again.
[0003] In the process of implementing the concept of the present disclosure, the inventors found that there are at least the following problems in the related art: when the developer updates the function code, it is necessary to restart the server or reload the configuration command to make the latest function code effective. Whether restarting the server or reloading the configuration command, it will cause the access request of the online user to fail to respond, affecting the stability of the online service. Summary of the invention
[0004] In view of this, the present disclosure provides an information processing method, an information processing device, a system, and a computer-readable storage medium.
[0005] One aspect of the present disclosure provides an information processing method, comprising: in response to receiving a control signal and a function script in the storage unit for implementing a specific business function has been updated from a first function script to a second function script, executing an uninstall instruction to uninstall the first function script in the running environment; and in response to receiving an access request to access the specific business function, running a first response script to respond to the access request; wherein, running the first response script to respond to the access request comprises: in a case where the first function script is uninstalled, the first response script obtains the second function script from the storage unit, loads the second function script into the running environment, and runs the second function script to respond to the access request.
[0006] According to an embodiment of the present disclosure, an uninstall instruction is encapsulated in a first custom module, and the control signal includes an access signal for accessing a specific http interface; the execution of the uninstall instruction includes: in response to receiving the access signal, determining that a second response script responds to the access signal, wherein the second response script includes a loading instruction for loading the first custom module and a calling instruction for calling the uninstall instruction; and running the second response script, where the second response script loads the first custom module into the operating environment and executes the uninstall instruction.
[0007] According to an embodiment of the present disclosure, a function script for implementing a specific business function is encapsulated in a second custom module; the method further includes: updating the function script in the second custom module from the first function script to a second function script.
[0008] According to an embodiment of the present disclosure, the first response script is encapsulated in a third custom module, and the running of the first response script to respond to the access request also includes: in response to receiving the access request to access the specific business function, determining that the third custom module responds to the access request; and running the first response script in the third custom module to load the second custom module through the first response script and call the second function script in the second custom module when the first function script in the running environment is uninstalled.
[0009] According to an embodiment of the present disclosure, the server includes an Nginx server, and the operating environment includes a virtual machine.
[0010] According to an embodiment of the present disclosure, the method further includes: in a case where a function script used to implement a specific business function in the storage unit has not been updated, in response to receiving a control signal, sending a prompt message to the terminal device to prompt the user that the function script has not been updated.
[0011] Another aspect of the present disclosure provides an information processing device, which is applied to a server, wherein the server includes an operating environment and a storage unit, and the device includes: an uninstall module, which is used to execute an uninstall instruction in response to receiving a control signal and a function script in the storage unit for implementing a specific business function has been updated from a first function script to a second function script so as to uninstall the first function script in the operating environment; a response module, which is used to run a first response script in response to an access request for accessing the specific business function in response to the access request; wherein the running of the first response script in response to the access request includes: when the first function script is uninstalled, the first response script obtains the second function script from the storage unit, loads the second function script into the operating environment, and runs the second function script in response to the access request.
[0012] According to an embodiment of the present disclosure, an uninstall instruction is encapsulated in a first custom module, and the control signal includes an access signal for accessing a specific http interface; the uninstall module includes: a determination submodule, for determining, in response to receiving the access signal, that a second response script responds to the access signal, wherein the second response script includes a loading instruction for loading the first custom module and a calling instruction for calling the uninstall instruction; and a running submodule, for running the second response script, where the second response script loads the first custom module into the running environment and executes the uninstall instruction.
[0013] Another aspect of the present disclosure provides an information processing system, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute any one of the above methods.
[0014] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.
[0015] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions, and the instructions are used to implement the method described above when executed.
[0016] According to the embodiments of the present disclosure, the problem that after the code on the server is updated, the server needs to be restarted to make the updated code effective can be at least partially solved, and thus the technical effect that after the code on the server is updated, the updated code can be made effective without restarting the server can be achieved, thereby ensuring timely response to access requests and ensuring the stability of online services. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0018] Figure 1 An exemplary system architecture to which the information processing method according to an embodiment of the present disclosure can be applied is schematically shown;
[0019] Figure 2 A flowchart schematically shows an information processing method according to an embodiment of the present disclosure;
[0020] Figure 3 A flowchart of a method for executing an uninstall instruction in this embodiment is schematically shown;
[0021] Figure 4A flowchart of running a first response script to respond to the access request according to an embodiment of the present disclosure is schematically shown;
[0022] Figure 5 A system architecture diagram suitable for implementing an information processing method according to another embodiment of the present disclosure is schematically shown;
[0023] Figure 6 A block diagram schematically shows an information processing device according to an embodiment of the present disclosure
[0024] Figure 7 A block diagram schematically illustrates an uninstall module according to an embodiment of the present disclosure; and
[0025] Figure 8 The block diagram of the information processing system according to the embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0026] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0027] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0028] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0029] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0030] An embodiment of the present disclosure provides an information processing method. The method is applied to a server, and the server includes a storage unit and an operating environment. The method includes that a function script for implementing a specific business function in the storage unit has been updated from a first function script to a second function script, and an uninstall instruction is executed in response to receiving a control signal so as to uninstall the first function script in the operating environment. Next, in the case of receiving an access request to access a specific business function, a first response script is run to respond to the access request. Among them, running the first response script includes, in the case where the first function script is uninstalled, the first response script obtains the second function script from the storage unit, loads the second function script into the operating environment, and runs the second function script to respond to the access request.
[0031] According to an embodiment of the present disclosure, the server used to implement the information processing method of the present disclosure may be, for example, an Nginx server or an application server that deploys a Web application. The Nginx server is a high-performance http reverse proxy server. Traditional Web applications usually use Nginx as a reverse proxy, that is, the user's access request first reaches the Nginx server, and the Nginx proxy forwards the user's access request to the server where the Web application is deployed at the back end, thereby achieving load balancing for the Web application. With the high-performance scripting language embedded in Nginx, the Nginx server can also be used as a Web server.
[0032] In the related art, the code source files and configuration files for implementing specific business functions are usually placed in the hard disk of the Ngnix server. The code source files and configuration files can be, for example, Lua scripts written in Lua language for implementing specific business functions.
[0033] When an access request is made to the Ngnix server, the Ngnix server parses the access request and accesses the configuration file, and determines the Lua script that responds to the access request based on the configuration information in the configuration file. The first executed Lua script is usually loaded into the memory of the LuaJIT VM (a Lua language just-in-time compiler virtual machine, which is a virtual environment for Lua language execution). After the first execution is completed, each subsequent execution of the Lua script will no longer read from the hard disk, but will directly read the Lua script loaded in the LuaJIT VM memory. Since each execution of the Lua script no longer reads from the hard disk, when the developer updates the code source file on the hard disk, the Nginx server needs to restart or reload the configuration file to make the updated code source file effective.
[0034] The above information processing method provided by the present disclosure can make the updated code source file take effect when the developer updates the code source file in the hard disk without restarting the Nginx server or reloading the configuration file. Figures 1 to 5 An information processing method according to an embodiment of the present disclosure is described.
[0035] Figure 1 The exemplary system architecture 100 to which the information processing method according to the embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0036] like Figure 1 As shown, the system architecture 100 according to this embodiment may include clients 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the clients 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0037] Users can use clients 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on clients 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0038] Clients 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0039] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the clients 101, 102, and 103. The background management server may analyze and process received data such as user requests, and feed back processing results (such as web pages, information, or data obtained or generated according to user requests) to the client.
[0040] It should be noted that the information processing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the information processing device provided in the embodiment of the present disclosure can generally be set in the server 105.
[0041] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to the implementation requirements.
[0042] Figure 2 The flowchart of the information processing method according to the embodiment of the present disclosure is schematically shown.
[0043] like Figure 2 As shown, the method includes operation S201 and operation S202.
[0044] The information processing method is applied to a server, and the server may include an operating environment and a storage unit.
[0045] In operation S201, in response to receiving a control signal and the function script for implementing a specific business function in the storage unit having been updated from a first function script to a second function script, an uninstall instruction is executed to uninstall the first function script in the running environment.
[0046] According to an embodiment of the present disclosure, the storage unit may be, for example, a hard disk of an Ngnix server. The operating environment may be, for example, a LuaJIT VM.
[0047] According to an embodiment of the present disclosure, for example, a developer may update a function script in a hard disk that implements a specific business function from a first function script to a second function script. The specific business function may be, for example, a transfer function, a payment function, and the like.
[0048] According to an embodiment of the present disclosure, the control signal may be sent by a developer to the Ngnix server through a terminal device, for example.
[0049] For example, after the developer updates the function script implementing the specific business function in the hard disk from the first function script to the second function script, a control signal is sent to the Ngnix server. In response to receiving the control signal, the Ngnix server executes the uninstall instruction to uninstall the first function script in the LuaJIT VM memory.
[0050] According to an embodiment of the present disclosure, the uninstall instruction may be, for example, setting a script related to a specific function to a null value through Lua syntax.
[0051] In operation S202, in response to receiving an access request for accessing a specific business function, a first response script is executed to respond to the access request. The executing the first response script to respond to the access request includes: when the first function script is uninstalled, the first response script obtains a second function script from a storage unit, loads the second function script into an execution environment, and executes the second function script to respond to the access request.
[0052] For example, Figure 1 In the scenario shown, a user may send a specific business function access request to the Ngnix server through a browser on the client 103. In response to receiving the access request, the Ngnix server runs a first response script to respond to the access request. Since the first function script no longer exists in the running environment, the first response script re-acquires a second function script that responds to the access request from the hard disk, loads the second function script into the LuaJIT VM memory, and runs the second function script to respond to the access request.
[0053] According to an embodiment of the present disclosure, the information processing method first uninstalls the first function script in the running environment through an uninstall instruction, and when an access request to access the specific business function is received, the second function script is reloaded and run, so that after the code in the server is updated, the updated code can take effect without restarting the server, thereby ensuring that the server can respond to the access request in a timely manner.
[0054] Figure 3 A flow chart of a method for executing an uninstall instruction in this embodiment is schematically shown.
[0055] like Figure 3 As shown, the example method for executing the uninstall instruction may include operation S211 and operation S221.
[0056] In operation S211 , in response to receiving the access signal, it is determined that a second response script responds to the access signal, wherein the second response script includes a load instruction for loading the first custom module and a call instruction for calling an unload instruction.
[0057] In operation S221, the second response script is executed, and the second response script loads the first custom module into the execution environment and executes the uninstallation instruction.
[0058] According to an embodiment of the present disclosure, Figure 3 In the method for executing the uninstall instruction shown, the uninstall instruction is encapsulated in a first custom module, and the control signal includes an access signal for accessing a specific http interface.
[0059] According to an embodiment of the present disclosure, a developer may encapsulate an uninstall instruction in a first custom module and modify a configuration file (nginx.conf) of the LuaJIT VM. Modifying the configuration file may be configuring a new location entry, for example, a / reload entry, which is used by developers. The / reload entry corresponds to the second response script.
[0060] For example, the developer may enter a request to access the http path / reload in the browser, and the request to access the / reload entry is an access signal. The Ngnix server receives the access signal and determines, according to the configuration file, that the second response script responds to the access signal.
[0061] According to an embodiment of the present disclosure, in operation S211, the second response script may include a loading instruction for loading the first custom module, which may be implemented, for example, by a require statement in Lua syntax. The second response script includes a calling instruction, which may be, for example, "Xb" in Lua syntax, where "X" represents a variable corresponding to the first custom module and "b" represents a method corresponding to the uninstallation instruction.
[0062] According to an embodiment of the present disclosure, the second response script is run in operation S221 , and the second response script loads the first custom module into the LuaJIT VM and executes the uninstall instruction in the first custom module.
[0063] According to an embodiment of the present disclosure, a function script for implementing a specific business function is encapsulated in a second custom module. In this embodiment, the information processing method Figure 2 The basis of the operation S201 and the operation S202 shown is to further include: updating the function script in the second custom module from the first function script to the second function script. This operation can be performed before the operation S201. For example, the first function script in the second custom module can be updated to the second function script according to the input operation of the developer.
[0064] Figure 4The flowchart of running the first response script to respond to the access request according to an embodiment of the present disclosure is schematically shown.
[0065] like Figure 4 As shown, the method includes operation S212 and operation S222. In the method, the first response script is encapsulated in the third custom module.
[0066] In operation S212 , in response to receiving an access request for accessing a specific business function, it is determined that a third custom module responds to the access request.
[0067] According to an embodiment of the present disclosure, for example, a configuration file may be accessed based on a received access request, and according to configuration information of the configuration file, it can be known that the access request is responded to through a third custom module.
[0068] In operation S222, the first response script in the third custom module is run, so that when the first function script in the running environment is uninstalled, the second custom module is loaded through the first response script, and the second function script in the second custom module is called.
[0069] According to an embodiment of the present disclosure, the first response script loads the second custom module into the LuaJIT VM memory, for example, by the first response script using a require statement in Lua syntax. After loading the second custom module into the LuaJIT VM memory, the second function script in the second custom module is called to respond to the access request.
[0070] According to an embodiment of the present disclosure, the uninstall instruction and the first response script may be encapsulated in the same custom module.
[0071] According to an embodiment of the present disclosure, the information processing method may also include sending a prompt message to the developer's terminal device in response to receiving a control signal when a function script used to implement a specific business function in a storage unit has not been updated, so as to prompt the developer that the function script has not been updated.
[0072] The following is another example to further illustrate the implementation of the information processing method according to the embodiment of the present disclosure.
[0073] According to an embodiment of the present disclosure, a developer may encapsulate a function script of an http interface for implementing a specific business function in a custom module. For example, a second function script may be encapsulated in a second custom module. Furthermore, a developer may write a first custom module, and write a first response script in the first custom module. The first response script may include a method for calling the second custom module, and the first custom module may also include an instruction for uninstalling the first function script.
[0074] Next, the developer can modify the Ngnix configuration file (ngnix.conf) and configure a new location entry. For example, it can be named / reload entry. The / reload entry corresponds to the second response script. The second response script includes code for loading the first custom module and code for calling the instruction of uninstalling the first function script in the first custom module.
[0075] Combine the following Figure 5 The system architecture shown illustrates the implementation of the information processing method in this embodiment.
[0076] Figure 5 A system architecture diagram suitable for implementing an information processing method according to another embodiment of the present disclosure is schematically shown.
[0077] like Figure 5 As shown, the system architecture includes multiple user browsers, the Internet, an Nginx server, and a developer browsing terminal.
[0078] After the developer can modify the function script in the Ngnix server hard disk, for example, after updating the first function script to the second function script, the developer can, for example, enter a request to access the / reload entry in the browser of the browsing terminal. The Ngnix server receives the request and triggers the Ngnix server to run the second response script. The second response script loads the first custom module into the LuaJIT VM memory and executes the uninstall method in the first custom module, and the uninstall method includes an instruction to uninstall the first function script in the LuaJIT VM memory.
[0079] When at least one of the plurality of user browsers sends an access request to the Nginx server via the Internet, the Nginx server receives the access request and determines through a configuration file that the first custom module processes the access request. The first custom module includes a first response script that executes a calling method for calling a second function script in a second custom module.
[0080] Figure 6 A block diagram of an information processing device 600 according to an embodiment of the present disclosure is schematically shown.
[0081] like Figure 6 As shown, the information processing device 600 may include an uninstall module 610 and a response module 620 .
[0082] Uninstall module 610, for example, can execute the above reference Figure 2The described operation S201 is used to execute an uninstall instruction to uninstall the first function script in the running environment in response to receiving a control signal and the function script for implementing a specific business function in the storage unit has been updated from a first function script to a second function script.
[0083] The response module 620 may, for example, execute the above reference Figure 2 The described operation S202 is used for, in response to receiving an access request for accessing a specific business function, running a first response script to respond to the access request.
[0084] Among them, running the first response script to respond to the access request includes: when the first function script is uninstalled, the first response script obtains the second function script from the storage unit, loads the second function script into the running environment, and runs the second function script to respond to the access request.
[0085] Figure 7 The block diagram of the uninstall module 610 according to an embodiment of the present disclosure is schematically shown.
[0086] like Figure 7 As shown, the uninstall module 610 may include a determination submodule 611 and an operation submodule 612 .
[0087] Determine submodule 611, for example, can execute the above reference Figure 3 The described operation S211 is used for, in response to receiving the access signal, determining that the second response script responds to the access signal, wherein the second response script includes a loading instruction for loading the first custom module and a calling instruction for calling the unloading instruction.
[0088] The running submodule 612 may, for example, execute the above reference Figure 3 The described operation S221 is used to run the second response script, and the second response script loads the first custom module into the running environment and executes the uninstall instruction.
[0089] According to an embodiment of the present disclosure, a function script for implementing a specific business function is encapsulated in a second custom module; the device 600 may also include: an update module, used to update the function script in the second custom module from the first function script to a second function script.
[0090] According to an embodiment of the present disclosure, the first response script is encapsulated in a third custom module, and running the first response script to respond to an access request also includes: in response to receiving an access request to access a specific business function, determining that the third custom module responds to the access request; and running the first response script in the third custom module to load the second custom module through the first response script and call the second function script in the second custom module when the first function script in the running environment is uninstalled.
[0091] According to an embodiment of the present disclosure, the server includes an Nginx server, and the operating environment includes a virtual machine.
[0092] According to an embodiment of the present disclosure, the apparatus 600 may further include a sending module for sending a prompt message to the terminal device in response to receiving a control signal, so as to prompt the user that the function script has not been updated.
[0093] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
[0094] For example, any multiple of the unloading module 610 and the response module 620 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the unloading module 610 and the response module 620 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the unloading module 610 and the response module 620 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be executed.
[0095] Figure 8 The block diagram of the information processing system according to the embodiment of the present disclosure is schematically shown. Figure 8The information processing system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0096] like Figure 8 As shown, the information processing system 800 according to the embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage part 808 to the random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.
[0097] In RAM 803, various programs and data required for the operation of system 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other through bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0098] According to an embodiment of the present disclosure, the system 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The system 800 may further include one or more of the following components connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.
[0099] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0100] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0101] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 802 and / or RAM 803 described above and / or one or more memories other than ROM 802 and RAM 803.
[0102] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0104] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. An information processing method, applied to a server, wherein the server includes an operating environment and a storage unit, and the method includes: In response to receiving a control signal and the function script for implementing a specific business function in the storage unit having been updated from a first function script to a second function script, executing an uninstall instruction to uninstall the first function script in the running environment, wherein the uninstall instruction is encapsulated in a first custom module, and the control signal includes an access signal for accessing a specific http interface; The executing uninstall instruction comprises: In response to receiving the access signal, determining that a second response script responds to the access signal, wherein the second response script includes a load instruction for loading the first custom module and a call instruction for calling the unload instruction; and Running the second response script, whereby the second response script loads the first custom module into the operating environment and executes the uninstall instruction; and In response to receiving an access request to access the specific business function, executing a first response script to respond to the access request; The step of running the first response script to respond to the access request includes: In the case where the first function script is uninstalled, the first response script obtains the second function script from the storage unit, loads the second function script into the execution environment, and executes the second function script to respond to the access request.
2. The method according to claim 1, wherein: The functional script for realizing the specific business function is encapsulated in the second custom module; The method further comprises: The function script in the second custom module is updated from the first function script to the second function script.
3. The method according to claim 2, wherein: The first response script is encapsulated in a third custom module. The running of the first response script to respond to the access request further comprises: In response to receiving an access request to access the specific business function, determining that the third custom module responds to the access request; and The first response script in the third custom module is run, so that when the first function script in the running environment is uninstalled, the second custom module is loaded through the first response script, and the second function script in the second custom module is called.
4. The method according to claim 1, wherein: The server includes an Nginx server, and the operating environment includes a virtual machine.
5. The method according to claim 1, further comprising: In the case where the function script for implementing the specific business function in the storage unit has not been updated, in response to receiving the control signal, a prompt message is sent to the terminal device to prompt the user that the function script has not been updated.
6. An information processing device, applied to a server, the server comprising an operating environment and a storage unit, the device comprising: an uninstallation module, configured to execute an uninstallation instruction to uninstall the first function script in the running environment in response to receiving a control signal and the function script for implementing the specific business function in the storage unit has been updated from the first function script to the second function script, wherein the uninstallation instruction is encapsulated in the first custom module, and the control signal includes an access signal for accessing a specific http interface; The uninstall module includes: a determination submodule, configured to determine, in response to receiving the access signal, that a second response script responds to the access signal, wherein the second response script includes a load instruction for loading the first custom module and a call instruction for calling the unload instruction; and A running submodule, used for running the second response script, whereby the second response script loads the first custom module into the running environment and executes the uninstall instruction; a response module, configured to, in response to receiving an access request for accessing the specific business function, execute a first response script to respond to the access request; The step of running the first response script to respond to the access request includes: In the case where the first function script is uninstalled, the first response script obtains the second function script from the storage unit, loads the second function script into the execution environment, and executes the second function script to respond to the access request.
7. An information processing system comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Shared library upgrading method and apparatus
CN107085514A
Application service updating method and apparatus
CN107147711A
Service processing method and device based on rule file and server
CN107948314A
Nginx server-based configuration method and device, computer equipment and storage medium
CN108829459A
Communication node, communication system, update method, and update program
JP2018093552A
