Server and preheating method based on JVM system

By processing the real-time request data of the JVM system to generate preheating data, the service node is preheated, which solves the problem of cold start delay of the JVM system, improves the startup efficiency and stability, and achieves the effective establishment of hotspot cache.

CN118819720APending Publication Date: 2024-10-22JUHAOKAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311373319.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-23
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

The JVM system has a large response delay during cold start, which affects system stability. It is difficult for existing technology to effectively solve the delay problems caused by the class loading mechanism, connection pool initialization and hotspot cache creation.

Method used

By processing the real-time request data of the running service node, generate preheating data, preheat the starting service node to ensure that the preheating is completed before accessing the user request, shorten the cold start time, and switch to the service after the preheating is completed. state.

Benefits of technology

It improves the startup efficiency of the JVM system, ensures system stability, triggers the establishment of hotspot caches to the greatest extent, and reduces the impact time of the cold start process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819720A_ABST
    Figure CN118819720A_ABST
Patent Text Reader

Abstract

The invention relates to a server and a preheating method based on a JVM system, and relates to the technical field of application processing, and the method comprises the steps: responding to a service node preheating request, obtaining a service identifier corresponding to a starting service node, and obtaining preheating data in a preset time period according to the service identifier; wherein the real-time request data of the operation service node belonging to the same service as the starting service node is processed to obtain preheating data, the starting service node is preheated based on the preheating data according to a preset preheating rule, and after preheating is finished, the starting service node is controlled to be switched into a service state. According to the server and the preheating method based on the JVM system provided by the embodiment of the invention, the technical problem that the response delay of cold start based on the JVM system is relatively large is solved, the real-time request data for operating the service node is processed as the preheating data to preheat the service, and the service is provided for the outside only after the service node is started after preheating is completed, so that the service quality is improved. The stability of the JVM system is ensured, and the starting efficiency of the JVM system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of application processing technology, and in particular to a server and a preheating method based on a JVM (Java Virtual Machine) system. Background Art

[0002] Usually, Java applications cannot be used immediately after startup. They need to be initialized by the virtual machine before they can be used, and they need to be preheated to achieve optimal performance. That is, the application of the JVM system has a cold start problem.

[0003] In the related art, based on the JVM system cold start process, class loading mechanism, connection pool initialization, creation of hot spot cache according to user request and other mechanisms will cause large response delay of JVM system and even affect the stability of JVM system. Summary of the invention

[0004] The exemplary implementation of the present application provides a server and a preheating method based on the JVM system. Based on the technical problem of the large cold start response delay of the JVM system, the service is preheated by processing the real-time request data of the running service node as preheating data, and the service node is started after the preheating is completed to provide services to the outside world, thereby ensuring the stability of the JVM system while improving the startup efficiency of the JVM system.

[0005] In a first aspect, the present application provides a server, including:

[0006] Controller;

[0007] The controller is configured to:

[0008] In response to the service node preheating request, obtain a service identifier corresponding to the start service node;

[0009] Acquire preheating data within a preset time period according to the service identifier; wherein the preheating data is obtained by processing real-time request data of a running service node belonging to the same service as the starting service node;

[0010] Preheating the startup service node based on the preheating data according to a preset preheating rule;

[0011] After the preheating is completed, the startup service node is controlled to switch to a service state.

[0012] In some embodiments of the present application, the controller is further configured to:

[0013] Determine the target interface of the running service node according to the configuration rules;

[0014] Sampling the request information of the target interface in real time to obtain data to be processed;

[0015] The data to be processed is processed according to a preset processing rule to obtain the preheating data, and the preheating data is associated with the service identifier and stored.

[0016] In some embodiments of the present application, the controller executes the processing of the to-be-processed data according to a preset processing rule to obtain the preheating data, and is configured as follows:

[0017] Deleting the first type of data in the data to be processed, and replacing the second type of data in the data to be processed, to obtain candidate data;

[0018] Deduplication processing is performed on the candidate data to obtain target data;

[0019] Classifying the target data according to parameter categories of request parameters in the target data to obtain multiple groups of data;

[0020] Determine weight information of each group of data according to the number of requests for each group of data and the interface type of the target interface;

[0021] The preheating data is generated according to the multiple groups of data and the weight information of each group of data.

[0022] In some embodiments of the present application, the controller is further configured to:

[0023] The preheating data is updated at a preset time interval.

[0024] In some embodiments of the present application, the controller performs the preheating of the startup service node based on the preheating data according to the preset preheating rule, and is configured as follows:

[0025] Determine the number of requests and the request frequency of each interface of the startup service node based on the preheating rule;

[0026] The preheating data is controlled to preheat each interface according to the number of requests and the request frequency of each interface.

[0027] In some embodiments of the present application, the controller is further configured to:

[0028] Obtaining weight information of each group of data in the preheated data;

[0029] The number of requests and the frequency of requests of each interface are adjusted according to the weight information of each group of data.

[0030] In some embodiments of the present application, the controller is further configured to:

[0031] Obtaining the interface weight of each interface;

[0032] The number of requests and the request frequency of each interface are adjusted according to the interface weight.

[0033] In a second aspect, the present application provides a preheating method based on a JVM system, comprising:

[0034] In response to the service node preheating request, obtain a service identifier corresponding to the start service node;

[0035] Acquire preheating data within a preset time period according to the service identifier; wherein the preheating data is obtained by processing real-time request data of a running service node belonging to the same service as the starting service node;

[0036] Preheating the startup service node based on the preheating data according to a preset preheating rule;

[0037] After the preheating is completed, the startup service node is controlled to switch to a service state.

[0038] Compared with the prior art, the technical solution provided by the embodiments of the present application has the following advantages:

[0039] In response to a service node preheating request, a service identifier corresponding to the start service node is obtained, and preheating data within a preset time period is obtained according to the service identifier; wherein, preheating data is obtained by processing the real-time request data of the running service node belonging to the same service as the start service node, and the start service node is preheated based on the preheating data according to the preset preheating rules, and after the preheating is completed, the start service node is controlled to switch to a service state. The server and the preheating method based on the JVM system provided in the embodiment of the present application solve the technical problem of a relatively large cold start response delay based on the JVM system, and the service is preheated by processing the real-time request data of the running service node as preheating data, and the start service node provides services to the outside only after the preheating is completed, thereby ensuring the stability of the JVM system while improving the startup efficiency of the JVM system. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the implementation methods in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technology descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.

[0041] Figure 1 An operation scenario between a display device and a control device according to some embodiments is shown;

[0042] Figure 2 shows a hardware configuration block diagram of a control device according to some embodiments;

[0043] Figure 3 shows a hardware configuration block diagram of a display device according to some embodiments;

[0044] Figure 4 shows a software configuration diagram in a display device according to some embodiments;

[0045] Figure 5 A flowchart of a JVM system-based preheating method according to some embodiments is shown;

[0046] Figure 6 A schematic diagram of information flow of a preheating method based on a JVM system according to some embodiments is shown;

[0047] Figure 7 A flowchart of another JVM system-based preheating method according to some embodiments is shown;

[0048] Figure 8 A schematic diagram of information flow showing another preheating method based on a JVM system according to some embodiments;

[0049] Fig. 9 A flowchart of another JVM system-based preheating method according to some embodiments is shown;

[0050] Fig.10 A flowchart of another JVM system-based preheating method according to some embodiments is shown;

[0051] Fig.11 A flowchart of another JVM system-based preheating method according to some embodiments is shown;

[0052] Fig.12 A flowchart of another JVM system-based preheating method according to some embodiments is shown;

[0053] Fig.13 A scenario example diagram of a preheating method based on a JVM system according to some embodiments is shown;

[0054] Fig.14 A diagram showing an example scenario of another JVM system-based preheating method according to some embodiments. DETAILED DESCRIPTION

[0055] In order to make the purpose and implementation method of the present application clearer, the exemplary implementation method of the present application will be clearly and completely described below in conjunction with the drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only part of the embodiments of the present application, rather than all the embodiments.

[0056] It should be noted that the brief description of terms in this application is only for the convenience of understanding the embodiments described below, and is not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and common meanings.

[0057] The terms "first", "second", "third", etc. in the specification and claims of this application and the above drawings are used to distinguish similar or similar objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances.

[0058] The terms "including" and "having" and any variations thereof as used in this application are intended to cover but not exclude inclusion, for example, a product or device comprising a series of components is not necessarily limited to all the components explicitly listed, but may include other components not explicitly listed or inherent to such products or devices.

[0059] The term "gesture" used in this application refers to a user's behavior of expressing an intended idea, action, purpose, or result through a change in hand shape or hand movement.

[0060] Usually, the operating life cycle of a JVM system application includes: starting the JVM, executing various virtual machine initialization actions, and then calling the main function of the Java program to enter the application initialization. At this time, the Java code begins to run through the interpreted execution mode. As the Java code runs, garbage collection is also performed, and real-time compilation begins when hot functions appear. After the application initialization is completed, the application's business code begins to execute. At this time, the application enters the warm-up phase of execution, and a large amount of class loading and real-time compilation will occur during the warm-up phase. After the application warm-up is completed, the application enters the stabilization phase, and finally the application is closed.

[0061] In the above-mentioned JVM system cold start process, class loading mechanism, connection pool initialization, creation of hot spot cache according to user request and other mechanisms may cause large response delay of JVM system and even affect the technical problems of JVM system stability.

[0062] In the related technology, for example, by setting a load balancing layer, the service node of the current access user request is preheated according to the preset time window. However, if the current access user request is a long link request, the load balancing layer will be unable to control it, and setting the load balancing layer will increase additional costs. In addition, using the current access user request for preheating will affect the current access user request. For example, preheating is performed through fixed data to reduce the impact on the access user request, but the hotspot cache data and preheating coverage are not ideal.

[0063] In response to the above problems, the present application proposes a server and a preheating method based on the JVM system. By processing the real-time request data of the running service node that belongs to the same service as the starting service node as the preheating data to preheat the starting service node, the preheating work can be completed before the user request is received, shortening the problems caused by the cold start, and using the real-time request data of the running service node to process as the preheating data for preheating, triggering the establishment of the hotspot cache to the greatest extent, and the starting service node will provide services to the outside world only after the preheating is completed, thereby ensuring the stability of the JVM system while improving the startup efficiency of the JVM system.

[0064] As an example scenario, various services may be requested from one or more applications on a display device, so that a server may receive the user request, process the user request, provide relevant data, and display it on the display device.

[0065] Figure 1 FIG. 1 is a schematic diagram of an operation scenario between a display device and a control device according to an embodiment. Figure 1 As shown, the user can operate the display device 200 through the smart device 300 or the control apparatus 100 .

[0066] In some embodiments, the control device 100 may be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication or Bluetooth protocol communication, and other short-range communication methods, and the display device 200 is controlled wirelessly or wired. The user may input user commands through buttons on the remote controller, voice input, control panel input, etc. to control the display device 200. For example, the user inputs corresponding control commands through the volume plus and minus keys, channel control keys, numeric keys, etc. on the remote controller to realize the function of controlling the display device 200.

[0067] In some embodiments, a smart device 300 (such as a mobile terminal, a tablet computer, a computer, a laptop computer, etc.) may also be used to control the display device 200. For example, the display device 200 is controlled using an application running on the smart device.

[0068] In some embodiments, the display device 200 can also be controlled in a manner other than the control device 100 and the smart device 300. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the display device 200, or the user's voice command control can be received through a voice control device set outside the display device 200.

[0069] In some embodiments, the display device 200 also communicates data with the server 400. The display device 200 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks. The server 400 may provide various content and interactions to the display device 200. The server 400 may be one cluster or multiple clusters, and may include one or more types of servers.

[0070] Figure 2 Schematically shows a block diagram of a configuration of the control device 100 according to an exemplary embodiment. Figure 2 As shown, the control device 100 includes a controller 110, a communication interface 130, a user input / output interface 140, a memory, and a power supply. The control device 100 can receive input operation instructions from the user, and convert the operation instructions into instructions that the display device 200 can recognize and respond to, playing the role of an interactive intermediary between the user and the display device 200.

[0071] Figure 3 A hardware configuration block diagram of a display device 200 according to an exemplary embodiment is shown.

[0072] In some embodiments, the display apparatus 200 includes at least one of a tuner 210, a communicator 220, a detector 230, an external device interface 240, a controller 250, a display 260, an audio output interface 270, a memory, a power supply, and a user interface.

[0073] In some embodiments, the controller includes a processor, a video processor, an audio processor, a graphics processor, a RAM, a ROM, and a first interface to an nth interface for input / output.

[0074] In some embodiments, the display 260 includes a display screen component for presenting images, and a driving component for driving focus control, a component for receiving an image signal output from a controller, and a component for displaying video content, image content, and a menu control interface and a user control UI interface.

[0075] In some embodiments, the display 260 may be a liquid crystal display, an OLED display, and a projection display, and may also be a projection device and a projection screen.

[0076] In some embodiments, the communicator 220 is a component for communicating with an external device or server according to various communication protocol types. For example, the communicator may include at least one of a Wifi module, a Bluetooth module, a wired Ethernet module, and other network communication protocol chips or near field communication protocol chips, and an infrared receiver. The display device 200 can establish transmission and reception of control signals and data signals with the external control device 100 or the server 400 through the communicator 220.

[0077] In some embodiments, the user interface may be used to receive a control signal from the control device 100 (eg, an infrared remote controller, etc.).

[0078] In some embodiments, the detector 230 is used to collect signals of the external environment or external interaction. For example, the detector 230 includes a light receiver, a sensor for collecting the intensity of ambient light; or, the detector 230 includes an image collector, such as a camera, which can be used to collect external environment scenes, user attributes or user interaction gestures; or, the detector 230 includes a sound collector, such as a microphone, etc., for receiving external sounds.

[0079] In some embodiments, the external device interface 240 may include, but is not limited to, any one or more of the following: a high-definition multimedia interface (HDMI), an analog or digital high-definition component input interface (component), a composite video input interface (CVBS), a USB input interface (USB), an RGB port, etc. It may also be a composite input / output interface formed by the above multiple interfaces.

[0080] In some embodiments, the tuner-demodulator 210 receives broadcast television signals via wired or wireless reception, and demodulates audio and video signals, such as EPG data signals, from a plurality of wireless or wired broadcast television signals.

[0081] In some embodiments, the controller 250 and the tuner-demodulator 210 may be located in different separate devices, that is, the tuner-demodulator 210 may also be located in an external device of the main device where the controller 250 is located, such as an external set-top box.

[0082] In some embodiments, the controller 250 controls the operation of the display device and responds to user operations through various software control programs stored in the memory. The controller 250 controls the overall operation of the display device 200. For example, in response to receiving a user command for selecting a UI object to be displayed on the display 260, the controller 250 can perform operations related to the object selected by the user command.

[0083] In some embodiments, the object may be any one of the selectable objects, such as a hyperlink, an icon or other operable controls. Operations related to the selected object include: displaying a page, document, image, etc. connected to the hyperlink, or executing a program corresponding to the icon.

[0084] In some embodiments, the controller includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), a RAM Random Access Memory (RAM), a ROM (Read-Only Memory, ROM), a first interface to an nth interface for input / output, a communication bus (Bus), etc.

[0085] CPU processor. Used to execute operating system and application instructions stored in the memory, and to execute various applications, data and content according to various interactive instructions received from external input, so as to finally display and play various audio and video content. CPU processor may include multiple processors. For example, it includes a main processor and one or more sub-processors.

[0086] In some embodiments, the graphics processor is used to generate various graphic objects, such as icons, operation menus, and user input command display graphics. The graphics processor includes an operator, which performs operations by receiving various interactive instructions input by the user and displays various objects according to display attributes; and a renderer, which renders various objects obtained based on the operator, and the rendered objects are used to be displayed on the display.

[0087] In some embodiments, the video processor is used to receive an external video signal and perform video processing such as decompression, decoding, scaling, noise reduction, frame rate conversion, resolution conversion, and image synthesis according to the standard codec protocol of the input signal to obtain a signal that can be directly displayed or played on the display device 200.

[0088] In some embodiments, the video processor includes a demultiplexing module, a video decoding module, an image synthesis module, a frame rate conversion module, a display formatting module, etc. Among them, the demultiplexing module is used to demultiplex the input audio and video data stream. The video decoding module is used to process the demultiplexed video signal, including decoding and scaling processing. The image synthesis module, such as an image synthesizer, is used to superimpose and mix the GUI signal generated by the graphics generator according to the user input or itself with the video image after scaling processing to generate an image signal for display. The frame rate conversion module is used to convert the input video frame rate. The display formatting module is used to receive the video output signal after frame rate conversion and change the signal to conform to the display format signal, such as outputting RGB data signal.

[0089] In some embodiments, the audio processor is used to receive an external audio signal, and perform decompression and decoding, as well as noise reduction, digital-to-analog conversion, and amplification processing according to a standard codec protocol of the input signal to obtain a sound signal that can be played in a speaker.

[0090] In some embodiments, the user may input a user command in a graphical user interface (GUI) displayed on the display 260, and the user input interface receives the user input command through the graphical user interface (GUI). Alternatively, the user may input a user command by inputting a specific sound or gesture, and the user input interface receives the user input command by recognizing the sound or gesture through a sensor. In some embodiments, the "user interface" is an application or operating system.

[0091] A medium interface for interaction and information exchange with users, which realizes the conversion between the internal form of information and the form acceptable to users. The commonly used form of user interface is the Graphical User Interface (GUI), which refers to a user interface related to computer operation displayed in a graphical way. It can be an icon, window, control or other interface element displayed on the display screen of an electronic device, where the control can include icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets and other visual interface elements.

[0092] In some embodiments, the system of the display device may include a kernel, a command parser (shell), a file system, and an application. The kernel, shell, and file system together constitute the basic operating system structure, which allows users to manage files, run programs, and use the system. After power-on, the kernel starts, activates the kernel space, abstracts hardware, initializes hardware parameters, etc., runs and maintains virtual memory, schedulers, signals, and inter-process communication (IPC). After the kernel starts, the shell and user applications are loaded. After startup, the application is compiled into machine code to form a process.

[0093] See also Figure 4 In some embodiments, the system is divided into four layers, from top to bottom, namely, the application layer (Applications) layer (referred to as "application layer"), the application framework layer (Application Framework) layer (referred to as "framework layer"), the Android runtime (Android runtime) and system library layer (referred to as "system runtime library layer"), and the kernel layer.

[0094] In some embodiments, at least one application is running in the application layer, and these applications can be window programs, system settings programs, clock programs, etc. provided by the operating system, or applications developed by third-party developers. In specific implementations, the application packages in the application layer are not limited to the above examples.

[0095] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications. The application framework layer includes some predefined functions. The application framework layer is equivalent to a processing center that determines the actions that applications in the application layer take. Through the API interface, applications can access system resources and obtain system services during execution.

[0096] like Figure 4As shown, in the embodiment of the present application, the application framework layer includes managers, content providers, etc., wherein the manager includes at least one of the following modules: an activity manager (ActivityManager) is used to interact with all activities running in the system; a location manager (Location Manager) is used to provide system services or applications with access to system location services; a package manager (Package Manager) is used to retrieve various information related to the application package currently installed on the device; a notification manager (NotificationManager) is used to control the display and clearing of notification messages; a window manager (Window Manager) is used to manage icons, windows, toolbars, wallpapers, and desktop components on the user interface.

[0097] In some embodiments, the activity manager is used to manage the life cycle of each application and the common navigation back function, such as controlling the exit, opening, and back of the application. The window manager is used to manage all window programs, such as obtaining the display screen size, determining whether there is a status bar, locking the screen, capturing the screen, and controlling the display window changes (for example, reducing the display window, shaking the display, distorting the display, etc.).

[0098] In some embodiments, the system runtime layer provides support for the upper layer, namely the framework layer. When the framework layer is used, the Android operating system will run the C / C++ library contained in the system runtime layer to implement the functions to be implemented by the framework layer.

[0099] In some embodiments, the kernel layer is a layer between hardware and software. Figure 4 As shown, the kernel layer includes at least one of the following drivers: audio driver, display driver, Bluetooth driver, camera driver, WIFI driver, USB driver, HDMI driver, sensor driver (such as fingerprint sensor, temperature sensor, pressure sensor, etc.), and power driver, etc.

[0100] In some embodiments, Figure 4 Taking the "Karaoke" application of the application layer in as an example, it can include recharge services, song ordering services, etc. The embodiments of the present application are aimed at high-concurrency scenarios in which the same service requires multiple service nodes to support the service, as well as application scenarios in which new service nodes need to be started in service upgrades and service updates. How to preheat the new service nodes, and the new service nodes provide services to the outside world only after the preheating is completed, so as to ensure the stability of the JVM system while improving the startup efficiency of the JVM system.

[0101] The following is a detailed description of the preheating process based on the JVM system in this embodiment.

[0102] Figure 5 A flowchart of a JVM system preheating method according to some embodiments is shown. A server provided in an embodiment of the present application includes a controller, which is configured to execute Figure 5 The JVM system-based preheating method comprises:

[0103] Step 501: In response to a service node preheating request, a service identifier corresponding to a startup service node is obtained.

[0104] In the embodiment of the present application, an application may include one or more services, and a service may be uniquely identified by a service identifier. In a high-concurrency scenario, the same service requires multiple service nodes (which may be understood as requiring multiple servers or service clusters) to support, for example, service node 1, service node 2, and service node 3 all support the same service A. Among them, a service node may be a server or a service cluster;

[0105] In an embodiment of the present application, during the process of upgrading and updating the service, one or more service nodes need to be restarted, and the service nodes need to be preheated during the process of restarting the service nodes. For example, during the upgrade of service A, service node 1 serves as the startup service node after restarting.

[0106] In an embodiment of the present application, a service node preheating request is triggered after the service node is started, and the service node management server can analyze the service node preheating request to obtain a service identifier corresponding to the started service node.

[0107] Step 502, obtaining preheating data within a preset time period according to the service identifier; wherein the preheating data is obtained by processing the real-time request data of the running service node belonging to the same service as the starting service node.

[0108] In the embodiment of the present application, the preset time period can be selected and set according to the application scenario, such as one hour, one day, etc.

[0109] In the embodiments of the present application, there are many ways to obtain preheating data within a preset time period according to a service identifier. In some embodiments, a search is performed in a database based on the service identifier to obtain preheating data that matches the service identifier and is within a preset time period; in other embodiments, a corresponding data set within a preset time period is obtained, and preheating data that matches the service identifier is obtained from the data set. The above two methods are only examples of obtaining preheating data within a preset time period according to a service identifier, and the embodiments of the present disclosure do not limit the specific implementation method of obtaining preheating data within a preset time period according to a service identifier.

[0110] In an embodiment of the present application, the real-time request data of the running service node belonging to the same service as the startup service node is processed to obtain preheating data. Continuing with the example that service node 1, service node 2 and service node 3 all support the same service A, service node 1 is the startup service node, and service node 2 and service node 3 are the running service nodes, that is, service node 2 and service node 3 can access user requests in real time, and real-time request data can be obtained in the process of real-time access to user requests. The real-time request data can be processed as preheating data, thereby ensuring that the startup service node is preheated using real traffic, which can trigger the establishment of a hotspot cache to the greatest extent and reduce the impact time of the cold start process of the startup service node.

[0111] In an embodiment of the present application, there are many ways to process the real-time request data of the running service node that belongs to the same service as the starting service node to obtain preheating data, such as collecting data in real time from the interface of the running service node, and cleaning, deduplicating the data, etc., and then using it as preheating data; for example, collecting data in real time from the interface of the running service node, filtering the data, and screening the data according to the number of data requests, interface weight, etc., and then using it as preheating data.

[0112] Step 503: preheat the startup service node according to the preset preheating rule based on the preheating data.

[0113] In the embodiment of the present application, the preheating rules can be selected and set according to the application scenario needs, such as the number of requests and request frequency for each interface of the startup service node.

[0114] In an embodiment of the present application, there are many ways to preheat the startup service node based on preheating data according to preset preheating rules. In some embodiments, the number of requests and request frequency of each interface of the startup service node are determined based on the preheating rules, and the preheating data is controlled to preheat each interface according to the number of requests and request frequency of each interface; in other embodiments, the number of requests and request frequency of each interface of the startup service node are determined based on the preheating rules, the number of requests and request frequency of each interface are adjusted according to the weight information of the preheating data, and each interface is preheated according to the adjusted number of requests and request frequency of each interface.

[0115] The above two methods are merely examples of preheating the startup service node based on preheating data according to preset preheating rules. The embodiments of the present disclosure do not specifically limit the implementation method of preheating the startup service node based on preheating data according to preset preheating rules.

[0116] Step 504: After the preheating is completed, control the startup service node to switch to the service state.

[0117] In the embodiment of the present application, after the preheating is completed, controlling the startup service node to switch to the service state can be understood as the startup service node can receive user requests to provide related services. Therefore, the startup service node only provides services to the outside world after the preheating is completed, thereby ensuring the stability of the JVM system while improving the startup efficiency of the JVM system.

[0118] In the above example, in response to a service node preheating request, a service identifier corresponding to the startup service node is obtained, and preheating data within a preset time period is obtained according to the service identifier; wherein, the preheating data is obtained by processing the real-time request data of the running service node that belongs to the same service as the startup service node, and the startup service node is preheated based on the preheating data according to the preset preheating rules. After the preheating is completed, the startup service node is controlled to switch to a service state by processing the real-time request data of the running service node as preheating data to preheat the service, and the startup service node provides services to the outside only after the preheating is completed, thereby ensuring the stability of the JVM system while improving the startup efficiency of the JVM system.

[0119] Reference Figure 6 As shown, Figure 6 For the realization of Figure 5 The schematic diagram of the structure of the server of the preheating method based on the JVM system is shown. Figure 5 The server of the JVM system-based preheating method shown may include: a response acquisition module 601, an acquisition module 602, a preheating module 603, and a control module 604. The response acquisition module 601 is used to respond to the service node preheating request and acquire the service identifier corresponding to the startup service node; the acquisition module 602 is used to acquire the preheating data within a preset time period according to the service identifier; the preheating data is obtained by processing the real-time request data of the running service node belonging to the same service as the startup service node; the preheating module 603 is used to preheat the startup service node based on the preheating data according to the preset preheating rules; the control module 604 is used to control the startup service node to switch to the service state after the preheating is completed.

[0120] Based on the description of the above embodiments, it is understandable that the data of the running service node needs to be collected and processed as preheating data storage, so that the preheating data can be directly obtained according to the service identifier in the future, thereby improving the preheating efficiency and enhancing the user experience. Figure 7 Describe in detail.

[0121] Figure 7 FIG. 1 is a flow chart showing another JVM system-based preheating method according to some embodiments. Based on the above embodiment, this embodiment further optimizes the JVM system-based preheating method. Figure 7 As shown, the method includes:

[0122] Step 701: Determine the target interface of the running service node according to the configuration rule.

[0123] In an embodiment of the present application, a service node corresponds to multiple interfaces, each interface can receive user requests, thereby obtaining request data; configuration rules can be selected and set according to the needs of the application scenario, such as using data security, data type, etc. as configuration rules.

[0124] In the embodiment of the present application, different configuration rules determine different target interfaces of the running service node. For example, if the configuration rule is data security, the interface after removing the user data related interface in the service node is used as the target interface. For example, if the configuration rule is data type, the interface related to the data type "XX" in the service node is used as the target interface.

[0125] Step 702: Sample the request information of the target interface in real time to obtain data to be processed.

[0126] In an embodiment of the present application, there are many ways to perform real-time sampling of the request information of the target interface to obtain the data to be processed. As an example, the relevant information of the current request method is obtained by logging through the overall interceptor as the data to be processed; as another example, data is collected asynchronously through a log collection tool to obtain the data to be processed.

[0127] In the application embodiment, the data to be processed may include a service identifier, which is used to distinguish which service each interface belongs to, the interface path, the request method and the request parameters, etc.

[0128] Step 703: Process the data to be processed according to a preset processing rule to obtain preheating data, and associate and store the preheating data with the service identifier.

[0129] In the embodiment of the present application, the processing rules can be selected and set in advance according to application needs.

[0130] In an embodiment of the present application, the data to be processed is processed according to preset processing rules, and there are many ways to obtain preheating data. In some embodiments, the data to be processed is cleaned and then the data format is standardized as preheating data; in other embodiments, the first type of data in the data to be processed is deleted, and the second type of data in the data to be processed is replaced to obtain candidate data, the candidate data is deduplicated to obtain target data, the target data is classified according to the parameter category of the request parameter in the target data to obtain multiple groups of data, the weight information of each group of data is determined according to the number of requests for each group of data and the interface type of the target interface, and the preheating data is generated based on the multiple groups of data and the weight information of each group of data.

[0131] The above two methods are merely examples of processing the data to be processed according to preset processing rules to obtain preheating data. The embodiments of the present disclosure do not specifically limit the implementation method of processing the data to be processed according to preset processing rules to obtain preheating data.

[0132] Furthermore, the preheating data and the service identifier are associated and stored.

[0133] In the above example, by following the configuration rules, the target interface of the running service node is determined, the request information of the target interface is sampled in real time to obtain the data to be processed, the data to be processed is processed according to the preset processing rules to obtain the preheating data, and the preheating data and the service identifier are associated and stored, so that the real-time request data of the running service node can be obtained and pre-stored as preheating data, thereby ensuring the preheating effect while improving the preset efficiency.

[0134] Reference Figure 8 As shown, Figure 8 For the realization of Figure 7 The schematic diagram of the structure of the server of the preheating method based on the JVM system is shown. Figure 7 The server of the JVM system-based preheating method shown may include: a determination module 801, a sampling module 802, and a processing and storage module 803. The determination module 801 is used to determine the target interface of the running service node according to the configuration rules; the sampling module 802 is used to sample the request information of the target interface in real time to obtain the data to be processed; the processing and storage module 803 is used to process the data to be processed according to the preset processing rules to obtain the preheating data, and associate the preheating data with the service identifier and store them.

[0135] Based on the description of the foregoing embodiments, it can be understood that the data to be processed is processed according to the preset processing rules to obtain the preheating data. It can be understood that different processing rules result in different accuracies of the preheating data, and thus different final preheating effects. Fig. 9 Describe in detail.

[0136] Fig. 9 FIG. 2 shows a flowchart of another JVM system-based preheating method according to some embodiments. Based on the above embodiment, this embodiment further optimizes the above JVM system-based preheating method. Fig. 9 As shown, the method includes:

[0137] Step 901: Delete the first type of data in the data to be processed, and replace the second type of data in the data to be processed to obtain candidate data.

[0138] Step 902: De-duplicate the candidate data to obtain target data.

[0139] In the embodiment of the present application, the first type of data refers to the terminal identification data without the terminal model parameters; the second type of data refers to user private data such as user identification.

[0140] In the embodiment of the present disclosure, performing deduplication processing on the candidate data to obtain the target data can be understood as storing multiple identical data in the candidate data and retaining only one.

[0141] Step 903: classify the target data according to the parameter categories of the request parameters in the target data to obtain multiple groups of data.

[0142] Step 904: Determine weight information for each group of data according to the number of requests for each group of data and the interface type of the target interface.

[0143] Step 905: Generate preheating data based on multiple groups of data and weight information of each group of data.

[0144] In the embodiment of the present application, the request parameters include a request path, a message header parameter, etc. According to different parameter categories of the request parameters, the target data can be classified to obtain multiple groups of data.

[0145] In an embodiment of the present application, after obtaining multiple groups of data, the multiple groups of data can be analyzed to determine the number of requests for each group of data, and the weight information of each group of data can be determined based on the interface type of the target interface sampled above; wherein, different interface types have different levels of interface complexity, and generally, the higher the complexity of the interface type, the higher the weight corresponding to the data obtained by the interface.

[0146] Furthermore, after determining the weight information of each group of data, multiple groups of data are used as warm-up data and the weight information of each group of data is identified.

[0147] In the above example, the first type of data in the data to be processed is deleted, and the second type of data in the data to be processed is replaced to obtain candidate data, the candidate data is deduplicated to obtain target data, the target data is classified according to the parameter category of the request parameter in the target data to obtain multiple groups of data, the weight information of each group of data is determined according to the number of requests for each group of data and the interface type of the target interface, and preheating data is generated based on the multiple groups of data and the weight information of each group of data, so that preheating data that better meets the requirements can be obtained, thereby improving the subsequent preheating effect, that is, triggering the establishment of the hotspot cache to the greatest extent and shortening the cold start time.

[0148] In some embodiments of the present application, the preheating data is updated at a preset time interval, wherein the preset time interval is set as required.

[0149] Therefore, by updating the preheating data at a certain frequency, only the most recent data is retained as hot data, further ensuring the preheating effect.

[0150] Based on the description of the foregoing embodiments, it can be understood that different preheating rules can be set to preheat the startup service node based on the preheating data, so as to meet the preheating requirements of different scenarios. Fig.10 Describe in detail.

[0151] Fig.10 FIG. 2 shows a flowchart of another JVM system-based preheating method according to some embodiments. Based on the above embodiment, this embodiment further optimizes the JVM system-based preheating method. Fig.10 As shown, the method includes:

[0152] Step 1001: Determine the number of requests and the request frequency of each interface of the startup service node based on the preheating rule.

[0153] Step 1002: Control preheating data to preheat each interface according to the number of requests and request frequency of each interface.

[0154] The number of requests refers to how many times each interface needs to make requests in total; the request frequency refers to how many times each interface needs to make requests within a certain period of time.

[0155] In the embodiment of the present application, the preheating rules are selected and set as needed, such as the number of requests and the frequency of requests for each interface. Therefore, the number of requests and the frequency of requests for each interface of the startup service node can be determined according to the preheating rules. Thus, the preheating data is controlled to preheat each interface according to the number of requests and the frequency of requests for each interface.

[0156] In some embodiments of the present application, Fig.11 As shown, in Fig.10 On the basis of:

[0157] Step 1101: Obtain weight information of each group of data in the preheated data.

[0158] Step 1102: Adjust the number of requests and the request frequency of each interface according to the weight information of each group of data.

[0159] In an embodiment of the present application, the number of requests and the request frequency of each interface are adjusted according to the weight information of each group of data. It can be understood that the higher the weight of each group of data, the higher the number of requests and the request frequency of each interface can be adjusted, thereby further improving the preheating effect.

[0160] In some embodiments of the present application, Fig.12 As shown, in Fig.10 On the basis of:

[0161] Step 1201: Obtain the interface weight of each interface.

[0162] Step 1202: Adjust the number of requests and the request frequency of each interface according to the interface weight.

[0163] In an embodiment of the present application, the number of requests and the request frequency of each interface are adjusted according to the interface weight. It can be understood that the higher the interface weight, the higher the number of requests and the request frequency of each interface can be adjusted, thereby further improving the preheating effect.

[0164] In the above example, the number of requests and the frequency of requests for each interface of the startup service node are determined based on the preheating rule, and the preheating data is controlled to preheat each interface according to the number of requests and the frequency of requests for each interface, thereby ensuring the preheating effect and improving the user experience.

[0165] Based on the description of the foregoing embodiments, the present application targets high-concurrency scenarios in which a service requires support from multiple service nodes. When the service is upgraded, updated, or the like, one or more service nodes need to be restarted. During the cold start process, traffic is collected to preheat the startup service node. After the preheating is completed, the startup service node accesses real user traffic to provide external services.

[0166] Specifically, the real-time traffic of the running service node is sampled, cleaned, and other operations are performed to obtain preheated data storage, which is then used for preheating. Only after the preheating is completed is the ready state set to access user traffic. In other words, the preheated data is used to complete class loading, initialization of various connection pool resources (such as database connection pool, Redis (RemoteDictionary Server, remote dictionary service) connection pool, Http (Hypertext Transfer Protocol) request connection pool and other resources), and hot spot cache is loaded into memory as much as possible to avoid cache breakdown at startup.

[0167] As an example scenario, Fig.13As shown, the server acts as a service node cloud management platform 1300, which can receive the sampling data reported by the stable running service node 1301 through step 0 according to the sampling frequency and store it in the preheating sampling module; the service node 1302 is started to request preheating from the traffic replay module through step 1; the traffic replay module obtains the preheating data from the preheating sampling module through step 2; the traffic replay module preheats the fixed service at the specified frequency through step 3, and after the preheating is completed through step 4, notifies the start service node 1302 that the preheating has been completed at the specified frequency and number of times; the service node 1302 is started to return to the ready state to the service node cloud management platform 1300 through step 5, and can access the user traffic.

[0168] For example, the display device displays the operation orchestration homepage and secondary page data on the display interface. After the display device requests a service, the server will query the data details based on the orchestration data, filter based on capabilities, and finally send it to the display device for display.

[0169] It is understandable that in the process of server processing, in a high-concurrency scenario where multiple display devices request the same service and the request link is long, a delay in one processing step can easily cause the entire service to slow down; in addition, in order to speed up processing, the current hot data is cached in the memory. This process may use the same data multiple times, and cache misses can easily cause an avalanche. For example, subsystem A->subsystem B->subsystem C, assuming that subsystem B has a batch of newly started service nodes, the hot data has not been established at this time, and a large number of requests passing through C may cause an instantaneous surge in requests to the C system, causing service unavailability; or using static data preheating, it is difficult to trigger cache loading.

[0170] In the embodiment of the present application, it is proposed to perform preheating based on real-time traffic sampling, and perform real-time sampling of traffic (such as requesting resources including data such as pictures and videos) based on stably running service nodes. The sampling rules can be set as needed, such as sampling only user-irrelevant interfaces, so that dirty data will not be generated and data validity is guaranteed; the collection method can use logs combined with Fluentd (an open source general log collection and distribution system that can collect logs from multiple data sources, and distribute the logs to multiple storage and processing systems after filtering and processing); then clean the collected data (such as parameter standardization (such as device identification removes specific information and only retains model parameters), de-duplication, count the number of requests and determine data weights, etc.), and finally store the data.

[0171] like Fig.13As shown, the newly started service node, i.e. the start service node, requests the preheating service, and preheats the playback request according to the specified number of concurrent requests (such as 100 playback requests) and time through the preheating service. In other words, the preheating service can obtain the preheating data, request the start service node to preheat, and after the request is completed, the start service node is called back to complete the preheating. After receiving the preheating completion notification, the start service node sets the ready state, and the service node cloud management platform checks that the start service node is in the ready state and starts sending traffic to the start service node. In this way, hotspot methods can trigger the completion of class loading, the hottest interface triggers the completion of compilation, and the establishment of hotspot cache, which greatly reduces the delay fluctuation during the startup process.

[0172] As another example, Fig.14 As shown, the service node cloud management platform receives a normal request to the stable running service node corresponding to service A through step 1; the running service node periodically reports sampling data to the traffic collection service node through step 2; the newly started startup service node corresponding to service A starts the current service node through step 3; the startup service node requests preheating from the traffic preheating service node through step 4; the traffic preheating service node requests preheating data from the traffic collection service node through step 5; the traffic preheating service node preheats the startup service node through step 6; the startup service node sets the ready state through step 7; the startup service node notifies the service node cloud management platform of the ready state through step 8; the service node cloud management platform starts to access traffic through step 9.

[0173] Specifically, during the stable operation phase, data sampling is performed, that is, real-time sampling of traffic based on stable operation service nodes. More specifically, through the overall interceptor (filter), relevant information of the current request method is recorded in the log (for example, interfaces that need to be recorded according to rule configuration, such as user data-related interfaces that cannot be recorded). The collected data includes: service name, used to distinguish which service each interface belongs to, interface path (also known as interface link), request method such as GET, POST, etc., request message header (such as receiving parsing parameter format information, custom information), request parameters; data can also be collected asynchronously through log collection tools.

[0174] Specifically, sample data processing (if there are a lot of request data, for example, if there are 100,000 requests per second, it needs to be processed according to data characteristics), including: cleaning, parameter standardization, device identification to remove specific information and only retain model parameters, user identification is replaced with anonymous; deduplication and classification, for example, each request may have a lot of repeated data, count it, deduplicate it, do not need to store each, classify requests according to parameter information, such as service A, interface G, according to parameter classification, category-1 and category-2; calculate weight, for example, the larger the request volume, the more complex the interface, the more preheating this interface needs, the higher the weight, you can add weight information to the deduplicated data based on the number of requests per minute, and store the calculated data in the data storage module. In addition, you can only keep the data of the last few minutes to ensure hot data.

[0175] Specifically, in the newly started node stage: after the newly started service node, the preheating service is requested with the parameter service name; the preheating service obtains the sampling data, requests the started service node to preheat, and based on the service name, finds the most recent valid request hotspot data, and determines the number of requests and request frequency for each interface; after the preheating service request is completed, the started service node is called back to complete the preheating; after the newly started service node receives the preheating completion notification, it sets the ready state; the service node manages the cloud platform, checks that the node is in the ready state, and starts sending traffic to the started service node.

[0176] Therefore, real traffic is used for preheating to trigger the establishment of hotspot cache to the greatest extent and shorten the impact time of the cold start process. Only after preheating with the most recent real traffic is the ready state set and the cluster that provides services to the outside world is added to provide services.

[0177] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0178] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A server, characterized in that: include: Controller; The controller is configured to: In response to the service node preheating request, obtain a service identifier corresponding to the start service node; Acquire preheating data within a preset time period according to the service identifier; wherein the preheating data is obtained by processing real-time request data of a running service node belonging to the same service as the starting service node; Preheating the startup service node based on the preheating data according to a preset preheating rule; After the preheating is completed, the startup service node is controlled to switch to a service state.

2. The server according to claim 1, characterized in that: The controller is further configured to: Determine the target interface of the running service node according to the configuration rules; Sampling the request information of the target interface in real time to obtain data to be processed; The data to be processed is processed according to a preset processing rule to obtain the preheating data, and the preheating data is associated with the service identifier and stored.

3. The server according to claim 2, characterized in that: The controller executes the processing of the to-be-processed data according to the preset processing rules to obtain the preheating data, and is configured as follows: Deleting the first type of data in the data to be processed, and replacing the second type of data in the data to be processed, to obtain candidate data; Deduplication processing is performed on the candidate data to obtain target data; Classifying the target data according to parameter categories of request parameters in the target data to obtain multiple groups of data; Determine weight information of each group of data according to the number of requests for each group of data and the interface type of the target interface; The preheating data is generated according to the multiple groups of data and the weight information of each group of data.

4. The server according to claim 2, characterized in that: The controller is further configured to: The preheating data is updated at a preset time interval.

5. The server according to claim 1, characterized in that: The controller executes the preheating of the startup service node based on the preheating data according to the preset preheating rule, and is configured to: Determine the number of requests and the request frequency of each interface of the startup service node based on the preheating rule; The preheating data is controlled to preheat each interface according to the number of requests and the request frequency of each interface.

6. The server according to claim 5, characterized in that: The controller is further configured to: Obtaining weight information of each group of data in the preheated data; The number of requests and the frequency of requests of each interface are adjusted according to the weight information of each group of data.

7. The server according to claim 5, characterized in that: The controller is further configured to: Obtaining the interface weight of each interface; The number of requests and the request frequency of each interface are adjusted according to the interface weight.

8. A preheating method based on a JVM system, characterized in that: include: In response to the service node preheating request, obtain a service identifier corresponding to the start service node; Acquire preheating data within a preset time period according to the service identifier; wherein the preheating data is obtained by processing real-time request data of a running service node belonging to the same service as the starting service node; Preheating the startup service node based on the preheating data according to a preset preheating rule; After the preheating is completed, the startup service node is controlled to switch to a service state.

9. The JVM system-based preheating method according to claim 8, characterized in that: Included: Determine the target interface of the running service node according to the configuration rules; Sampling the request information of the target interface in real time to obtain data to be processed; The data to be processed is processed according to a preset processing rule to obtain the preheating data, and the preheating data is associated with the service identifier and stored.

10. The JVM system-based preheating method according to claim 9, characterized in that: The step of processing the data to be processed according to a preset processing rule to obtain the preheating data includes: Deleting the first type of data in the data to be processed, and replacing the second type of data in the data to be processed, to obtain candidate data; Deduplication processing is performed on the candidate data to obtain target data; Classifying the target data according to parameter categories of request parameters in the target data to obtain multiple groups of data; Determine weight information of each group of data according to the number of requests for each group of data and the interface type of the target interface; The preheating data is generated according to the multiple groups of data and the weight information of each group of data.