Front-end gray release method, device, equipment and medium

The latest grayscale information is obtained and stored through the heartbeat request mechanism, combined with local cache and back-end logical judgment, the problem of poor performance of the front-end grayscale release solution is solved, and flexible and high-performance grayscale release is achieved.

CN120492754APending Publication Date: 2025-08-15CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510659415.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The front-end grayscale release solutions in the prior art in finance and medical fields are difficult to achieve flexible and high-performance control, resulting in a degradation of system performance.

Method used

The latest grayscale information is obtained regularly through the heartbeat request mechanism and stored in the local cache, and the grayscale logic judgment is made in response to the page access request, and when the conditions are met, the corresponding page is loaded according to the resource type returned by the backend.

Benefits of technology

It realizes flexible control of the grayscale release range, reduces back-end service requests, and improves system performance and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120492754A_ABST
    Figure CN120492754A_ABST
Patent Text Reader

Abstract

The invention relates to the field of artificial intelligence, can be applied to business system platforms of financial science and technology, medical health and the like, and discloses a front-end gray release method, device, equipment and medium, and the method comprises the steps: obtaining the login information of a user, and starting a heartbeat request; periodically acquiring latest gray information from a rear end based on the heartbeat request, and storing the latest gray information to a local cache; in response to the page access request, according to the latest gray information in the local cache, determining whether the page currently requested to be accessed meets the gray release logic or not; if yes, sending a resource loading request to the rear end, and receiving a loaded resource type returned by the rear end after performing service logic judgment based on the resource loading request; and loading a corresponding gray page or generating a page at the front end according to the loading resource type. The latest gray level information is synchronized to the local cache through a heartbeat mechanism, and the back-end service request is only performed for the page meeting the gray level release logic, so that the service performance of the system is not influenced while the gray level release page is flexibly controlled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a front-end grayscale publishing method, device, equipment and medium. Background Art

[0002] For large-scale web projects, grayscale release is almost a must-have capability to ensure the stability and controllable iteration of the system. For the entire system, based on the currently popular front-end and back-end separation architecture, it can be divided into front-end grayscale and back-end grayscale. Back-end grayscale mainly involves interface and asynchronous task processing. There are many mature solutions in the industry, but there is no standard and flexible grayscale solution for front-end grayscale. Generally speaking, front-end grayscale can be further divided into a simple grayscale environment deployment and drainage solution and a server-side logic confirmation and drainage solution. Among them, grayscale environment deployment is a grayscale solution that can be implemented only by relying on deployment. It has the advantages of simplicity and efficiency. However, in the financial field, medical and health fields, grayscale release usually requires precise control, and the grayscale environment deployment and drainage solution does not support some grayscale. In this case, a server-side logic confirmation and drainage solution must be selected.

[0003] For example, in the field of healthcare, the medical information system (HIS) is the core system of the hospital, involving multiple links such as registration, medical treatment, examination, and charging. System updates need to be carried out cautiously to avoid affecting normal medical services. For example, when the front-end is grayed out, it may be necessary to first conduct drainage release for the pages of some departments or pages of a certain function, and then gradually promote new functions without affecting the normal business of other departments to reduce risks.

[0004] In the financial sector, the insurance claims system is the core system for insurance companies to handle customer claims applications. To improve claims efficiency and customer satisfaction, companies may need to optimize the claims process, but they need to do so cautiously and gradually to ensure system stability and data accuracy. For example, a grayscale release can be conducted for a specific branch (such as a branch in a certain city) or a specific type of claims case (such as auto insurance claims).

[0005] However, although the server-side logic confirmation and diversion solution can accurately control the grayscale pages according to business logic and support the grayscale of some pages, it requires an additional backend service request each time the page is opened, resulting in poor performance of the server-side logic confirmation and diversion solution, making it difficult to achieve flexible and high-performance front-end grayscale release at the same time. Summary of the Invention

[0006] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide a front-end grayscale release method, device, equipment and medium that can be applied to the medical field, financial technology or other related fields. Its main purpose is to ensure that the service performance of the system is not affected while flexibly controlling the grayscale release page, and to achieve partially controllable and high-performance front-end grayscale release.

[0007] The technical solutions of the present invention are as follows:

[0008] A first aspect of the present invention provides a front-end phased release method, comprising:

[0009] When the user logs in to the system, obtain the user's login information and start the heartbeat request;

[0010] Based on the heartbeat request, the latest grayscale information is regularly obtained from the backend and stored in the local cache;

[0011] In response to a page access request, confirming whether the page currently requested for access satisfies the grayscale publishing logic based on the latest grayscale information in the local cache;

[0012] If the grayscale release logic is met, a resource loading request is sent to the backend, and the backend receives the loaded resource type returned after performing business logic judgment based on the resource loading request. The resource loading request contains the business information currently requested to be accessed and the login information.

[0013] The corresponding grayscale page or generated page is loaded on the front end according to the type of the loaded resource.

[0014] A second aspect of the present invention provides a front-end phased release device, comprising:

[0015] The heartbeat activation module is used to obtain the user's login information and activate the heartbeat request after the user logs into the system;

[0016] A cache module is used to periodically obtain the latest grayscale information from the backend based on the heartbeat request and store it in a local cache;

[0017] A grayscale determination module is configured to respond to a page access request and determine whether the page currently requested for access satisfies the grayscale publishing logic based on the latest grayscale information in the local cache;

[0018] The resource request module is used to send a resource loading request to the backend if the grayscale release logic is met, and receive the loading resource type returned by the backend after performing business logic judgment based on the resource loading request. The resource loading request contains the business information currently requested and the login information;

[0019] The resource loading module is used to load the corresponding grayscale page or generate a page on the front end according to the type of the loaded resource.

[0020] A third aspect of the present invention provides a computer device comprising at least one processor; and

[0021] a memory communicatively connected to the at least one processor; wherein,

[0022] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned front-end grayscale release method.

[0023] A fourth aspect of the present invention provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the one or more processors can execute the above-mentioned front-end grayscale release method.

[0024] Beneficial effects: The present invention discloses a front-end grayscale publishing method, device, equipment and medium. Compared with the existing technology, the embodiment of the present invention adopts a front-end grayscale publishing method, device, equipment and medium, including: after the user logs in to the system, obtain the user's login information and start a heartbeat request; based on the heartbeat request, regularly obtain the latest grayscale information from the back end and store it in the local cache; in response to the page access request, confirm whether the page currently requested to access meets the grayscale publishing logic based on the latest grayscale information in the local cache; if it meets the grayscale publishing logic, send a resource loading request to the back end, and receive the loading resource type returned by the back end after performing business logic judgment based on the resource loading request, the resource loading request contains the business information currently requested to access and the login information; load the corresponding grayscale page or generate a page on the front end according to the loading resource type. The latest grayscale information is synchronized to the local cache through the heartbeat mechanism of the front and back ends, so that the grayscale publishing range can be flexibly adjusted during grayscale publishing, and back-end service requests are only made for requests that meet the grayscale publishing logic, while ensuring accurate control of grayscale pages, it also effectively improves the overall performance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the solutions in the present invention, a brief introduction is given below to the drawings required for use in describing the embodiments of the present invention. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0026] Figure 1 A schematic diagram of an application environment for the front-end phased release method provided by an embodiment of the present invention;

[0027] Figure 2A flow chart of the front-end phased release method provided by an embodiment of the present invention;

[0028] Figure 3 A flowchart of step S202 in the front-end phased release method provided in an embodiment of the present invention;

[0029] Figure 4 A flowchart of step S203 in the front-end phased release method provided in an embodiment of the present invention;

[0030] Figure 5 A flowchart of step S204 in the front-end phased release method provided in an embodiment of the present invention;

[0031] Figure 6 A schematic diagram of the functional modules of a front-end phased release device provided by an embodiment of the present invention;

[0032] Figure 7 A schematic diagram of the hardware structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0033] To make the objectives, technical solutions, and effects of the present invention more clear and distinct, the present invention is further described in detail below. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the present invention and are not intended to limit the present invention. The embodiments of the present invention are described below with reference to the accompanying drawings.

[0034] The front-end grayscale publishing method provided by the embodiment of the present invention can be applied to Figure 1 In an application environment, the system includes a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0035] The user may use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 via the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as knowledge reading applications, web browser applications, search applications, instant messaging tools, email clients, and / or social platform software (for example only).

[0036] The first terminal device 101 , the second terminal device 102 , and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0037] The server 105 may be a server that provides various services, such as a backend server that provides support for the content browsed by the user using the first terminal device 101, the second terminal device 102, and the third terminal device 103 (for example only). The backend server may analyze and process the received user requests and other data, and feed back the processing results (such as web pages, information, or data obtained or generated according to the user request) to the terminal device. The server 105 may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server 105 may also be a server for a distributed system, or a server combined with a blockchain.

[0038] It should be noted that the front-end phased release method provided in the embodiments of the present application can generally be executed by the first terminal device 101, the second terminal device 102, or the third terminal device 103. Accordingly, the front-end phased release apparatus provided in the embodiments of the present invention can also be provided in the first terminal device 101, the second terminal device 102, or the third terminal device 103. Alternatively, the front-end phased release method provided in the embodiments of the present invention can generally be executed by the server 105. Accordingly, the front-end phased release apparatus provided in the embodiments of the present invention can generally be provided in the server 105.

[0039] It should be understood that the numbers of the above terminal devices, networks and servers are merely illustrative and any number of terminal devices, networks and servers may be provided as required.

[0040] like Figure 2 As shown, the front-end phased release method provided by the embodiment of the present invention specifically includes the following steps:

[0041] S201. After a user logs into the system, the user's login information is obtained and a heartbeat request is started.

[0042] In this embodiment, the user logs in to the system through a username, password or other authentication method (such as fingerprint, facial recognition). After the user logs in successfully, the user's unique identifier (such as user ID, role, authority, etc.) is obtained. These login information can provide a data basis for subsequent accurate grayscale logic judgment, so that in addition to accessing the page, personalized judgment can be made in combination with the user's identity, role or authority, etc., to achieve more accurate grayscale release range control. In addition, after the user successfully logs in to the system after verifying his identity, a heartbeat request is automatically turned on. The heartbeat request is a control signal that the client sends to the server regularly to maintain a connection or detect the user's active status. Its core purpose is to maintain the validity of the communication link and trigger a connection reset or user status update when there is no response after the timeout. In this embodiment, the heartbeat request is automatically turned on after logging in to the system to maintain the communication link with the back end. The heartbeat mechanism of the front and back ends enables timely acquisition of the latest grayscale configuration information to ensure real-time update of the grayscale strategy.

[0043] In the healthcare sector, for example, a hospital is introducing a new electronic medical record (EMR) system. This system includes multiple functional modules, such as patient information management, diagnostic records, and medical order management. To ensure system stability and user experience, it is hoped that a phased release will be implemented for a limited number of departments or pages with a specific function. Therefore, after a user (medical staff) logs into the hospital's EMR system, the system obtains their login information (such as medical staff ID, department, and permission level). The system then initiates a heartbeat request to periodically obtain phased information from the backend, such as whether the new medical record entry module is enabled in all departments or whether the new patient information management module is enabled in a specific department.

[0044] In the financial sector, for example, in insurance claims systems, insurance companies may wish to conduct a phased test of a new claims process, impacting only a specific organization, department, or batch of cases. When a user (claims adjuster) logs into the insurance claims system, the system obtains their login information (such as employee ID, department, and case type). The system initiates heartbeat requests and periodically obtains phased information from the backend, such as whether a new claims process module has been enabled.

[0045] In one embodiment, before step S201, the method further includes:

[0046] Pre-deploy grayscale resources to a production environment resource pool, and distinguish between grayscale resources and production resources in the production environment resource pool.

[0047] In this embodiment, grayscale resources are front-end resources used for grayscale testing, including HTML pages, CSS style files, JavaScript scripts, etc. These grayscale resources are used to test new functions, new designs or new processes, etc. The production environment resource pool refers to the resource storage environment where the system actually runs, which includes all the resources of the production environment. The production environment resource pool is the source of resources that users access under normal circumstances. When performing flexible front-end grayscale releases, the grayscale resources are pre-deployed to the production environment resource pool. In the resource pool, it is clearly marked which resources are grayscale resources and which are production resources through methods such as file paths, version numbers, and tags, so as to distinguish between grayscale resources and production resources, isolate grayscale resources from production resources, and avoid the impact of grayscale testing on the production environment.

[0048] S202: Based on the heartbeat request, the latest grayscale information is periodically obtained from the backend and stored in a local cache.

[0049] In this embodiment, regular communication is performed with the back-end through heartbeat requests, so that the latest grayscale information is regularly obtained from the back-end and stored in the local cache, wherein the grayscale information includes the grayscale master switch status, the grayscale module switch status, the grayscale page list, etc. The grayscale configuration can be flexibly adjusted based on different grayscale publishing requirements to update the grayscale information. Each updated grayscale information can be sent to the client through the next heartbeat request, so that the client can regularly update the grayscale information cached locally and always obtain the latest grayscale information. The latest grayscale information is obtained and stored in the local cache through the heartbeat request mechanism of the front-end and back-end, avoiding querying the back-end for each page request, reducing the pressure on the back-end, and improving the page loading speed. In addition, the update of the grayscale information is achieved through the heartbeat mechanism, without the need for the user to manually refresh the page, which also improves the user experience.

[0050] In the medical and health field, after medical staff log in to the system, the system obtains grayscale information from the backend through heartbeat requests, such as "whether the new medical record entry module is enabled", "whether the new medical record entry module is only open to the internal medicine department", and other information, and stores it in the local cache.

[0051] In the financial field, after the claims adjuster logs into the system, the system obtains grayscale information from the backend through heartbeat requests, such as "whether the new claims process module is enabled", "whether the new claims process module is only open to major disease claims cases", and other information, and stores it in the local cache.

[0052] S203 : In response to the page access request, confirm whether the page currently requested to be accessed satisfies the grayscale publishing logic according to the latest grayscale information in the local cache.

[0053] In this embodiment, when a user clicks or navigates to a certain page in the system, a corresponding page range request is triggered to request access to the corresponding page. At this time, a grayscale logic judgment is performed on the page currently requested to access based on the latest grayscale information in the local cache, that is, whether the page currently requested to access needs to load the grayscale version is judged based on the grayscale information. For example, it is determined whether the current page is in the grayscale page list, or whether the current user belongs to the grayscale user group, etc. Through the grayscale information in the local cache, the system can accurately determine which pages need to load the grayscale version and which pages remain in the production version, thereby achieving precise grayscale control. There is no need to add a backend service request every time a page (whether it is a production page or a grayscale page) is opened, that is, avoiding grayscale judgment on all pages, and only processing pages that require grayscale, reducing unnecessary backend requests, and thus improving performance.

[0054] In the medical and health field, when medical staff click on the "Medical Record Entry" page, the system determines whether the department to which the current medical staff belongs is within the grayscale range based on the latest grayscale information in the local cache. If it is an internal medicine department and the grayscale switch is turned on, the grayscale release logic is met; if it is a surgical department, the grayscale release logic is not met.

[0055] In the financial field, when a claims adjuster handles a claim case, the system determines whether the current case type is within the grayscale range based on the grayscale information in the local cache. If it is a major disease claim case and the grayscale switch is turned on, the grayscale release logic is met; if it is another type of case, the grayscale release logic is not met.

[0056] S204. If the grayscale release logic is met, a resource loading request is sent to the backend, and the backend receives the loaded resource type returned after performing business logic judgment based on the resource loading request. The resource loading request includes the business information currently requested to be accessed and the login information.

[0057] In this embodiment, if the client locally confirms based on the cache that the page currently requested meets the grayscale publishing logic, that is, the client determines that a certain page will execute the grayscale logic, then before the page is initialized, the client sends a resource loading request to the backend to obtain the resources of the current page (such as HTML, CSS, JavaScript files, etc.), and requests the backend to perform business logic judgment based on the business information (such as user role, case type, page ID, etc.) and login information in the resource loading request, such as judging whether the current user is a grayscale user, judging whether the current case is a grayscale case, etc., thereby returning the corresponding record resource type to the client, that is, instructing the client to load grayscale resources or production resources. After the client locally determines that the page needs to execute the grayscale publishing logic, by initiating a service request to the backend, the backend can dynamically determine the corresponding loading resource type according to the real-time business logic, that is, the loading of grayscale resources is controlled by the backend. If the backend request is abnormal, it directly enters the front-end bottoming logic and continues to load the production page, avoiding the client directly accessing the grayscale resources and enhancing the flexibility and security of the system.

[0058] In the healthcare sector, if a client determines based on its local cache that a medical professional's department is within the grayscale range, when it requests access to the case entry page, it sends a resource loading request to the backend. This request includes the user's department information, page identifier, and other information. The backend then uses this information to determine whether to load a new medical record entry module. If the current department is internal medicine, a grayscale resource type is returned, and the new medical record entry module is loaded. If the current department is surgery, a production resource type is returned, and the old medical record entry module is loaded.

[0059] In the healthcare sector, if the client determines based on its local cache that the case type handled by the claims adjuster falls within the grayscale range, it sends a resource loading request to the backend, including the case type and page identifier. Based on this information, the backend determines whether to load a new claims process module. If the case is a major illness claim, the grayscale resource type is returned and the new claims process module is loaded. If it is another case type, the production resource type is returned and the old claims process module is loaded.

[0060] S205: Load a corresponding grayscale page or generate a page on the front end according to the type of loaded resource.

[0061] In this embodiment, the client loads the page on the front end based on the received loading resource type. That is, the client loads the corresponding page resource according to the instructions returned by the back end. If the back end returns a grayscale resource type, the grayscale page is loaded; if the back end returns a production resource type, the production page is loaded. This ensures that only pages that have undergone local grayscale release logic confirmation require service requests from the back end. Users are unaware of the grayscale logic when accessing the page, and the page loading process is consistent with normal access, improving grayscale page access performance and user experience.

[0062] In the above embodiment, the present invention discloses a front-end grayscale publishing method, which obtains the user's login information and starts a heartbeat request after the user logs into the system; based on the heartbeat request, the latest grayscale information is periodically obtained from the back-end and stored in the local cache; in response to the page access request, whether the page currently requested to access satisfies the grayscale publishing logic is confirmed based on the latest grayscale information in the local cache; if the grayscale publishing logic is satisfied, a resource loading request is sent to the back-end, and the back-end receives the type of loaded resource returned after performing a business logic judgment based on the resource loading request, wherein the resource loading request includes the business information currently requested to access and the login information; the corresponding grayscale page is loaded or a page is generated at the front-end according to the loaded resource type. The latest grayscale information is synchronized to the local cache through the heartbeat mechanism of the front-end and back-end, so that the grayscale publishing range can be flexibly adjusted during grayscale publishing, and back-end service requests are only made for requests that meet the grayscale publishing logic, which ensures accurate control of grayscale pages while also effectively improving the overall performance of the system.

[0063] In one embodiment, Figure 3 As shown, step S202 includes:

[0064] S301. Regularly send a heartbeat request to the backend at a preset heartbeat interval. The heartbeat request carries the version identifier of the grayscale information in the current local cache, so that the backend queries whether there is an update to the grayscale configuration based on the version identifier.

[0065] S302: Receive the latest grayscale information returned by the backend when the grayscale configuration is updated, store the latest grayscale information in a local cache, and update the corresponding version identifier.

[0066] In this embodiment, when obtaining grayscale information through the heartbeat mechanism of the front-end and back-end, the client and the back-end agree to send heartbeat requests regularly according to the preset heartbeat interval. For example, it can be set to send once every 30 seconds or every minute. The heartbeat request is a lightweight request sent by the client to the back-end to obtain the latest grayscale information. The heartbeat request carries the version identifier of the grayscale information in the current local cache, such as the version number or timestamp of the grayscale information, so that the back-end can determine whether the grayscale configuration has been updated based on the version identifier in the received heartbeat request. When the back-end detects that the grayscale configuration has been updated, it will return the latest grayscale information, including the grayscale master switch status, the grayscale module switch status, the grayscale page list, etc. The client stores the latest grayscale information received in the local cache for use in subsequent page accesses, and updates the version identifier of the grayscale information in the local cache to match the latest version returned by the back-end. By sending heartbeat requests regularly, the client can obtain the latest grayscale configuration information in a timely manner, ensuring real-time updates of the grayscale strategy. By giving a version identifier for judgment, the backend only needs to check whether the version identifier has changed. There is no need to return complete grayscale information every time when there is no update, reducing the amount of data transmission.

[0067] In one embodiment, the method further comprises:

[0068] The update frequency of the grayscale configuration in the historical time period is counted, and the corresponding heartbeat interval is determined according to the update frequency and the current system load.

[0069] In this embodiment, the interval time for sending heartbeat requests between the front-end and back-end is dynamically adjusted to better meet the needs of actual grayscale release. By recording the number of times the grayscale configuration is updated within a certain time range. For example, count how many times the grayscale configuration has been updated in the past 24 hours, and monitor the current system load in real time, including indicators such as the server's CPU usage, memory usage, and network bandwidth. According to the update frequency of the grayscale configuration and the system load, the interval time of the heartbeat request is dynamically adjusted. If the grayscale configuration is updated frequently, for example, greater than the preset frequency value and the system load is low, the heartbeat interval time can be shortened to obtain updates faster; if the update is infrequent, for example, less than the preset frequency value or the system load is high, the heartbeat interval time can be extended to reduce system pressure. This allows the heartbeat interval time to be adaptively and dynamically adjusted according to the update frequency of the grayscale configuration and the system load, so that the system can maintain optimal performance under different circumstances.

[0070] In one embodiment, the grayscale information includes a grayscale master switch, a grayscale module switch, and a grayscale page list. Figure 4 As shown, step S203 includes:

[0071] S401, receiving a page access request and parsing the page access request to determine the page currently requested to be accessed;

[0072] S402: Determine whether the current grayscale master switch is on based on the latest grayscale information in the local cache. If on, obtain the business module to which the page currently requested for access belongs.

[0073] S403. Determine whether the business module to which the page currently requested has access has grayscale enabled based on the grayscale module switch in the latest grayscale information. If so, match the page currently requested with the grayscale page list in the latest grayscale information.

[0074] S404: If the page matches successfully, confirm that the page currently requested meets the grayscale release logic; otherwise, it does not meet the grayscale release logic.

[0075] In this embodiment, the user clicks a link, submits a form, or triggers a page access request in other ways in the system to request access to a specific page. The request is parsed to extract key information, such as the requested URL, request parameters, etc., to determine the specific page the user wishes to access. When performing grayscale logic judgment on the page currently requested by the user, the judgment is made in the logical order of the grayscale master switch, the grayscale module switch, and the grayscale page list, where the grayscale master switch is used to control whether the entire grayscale function is enabled. If the grayscale master switch is turned off, all grayscale logic will not be executed. Therefore, first confirm whether the current grayscale master switch is turned on based on the latest grayscale information. If it is turned on, continue to obtain the business module to which the page currently requested to access belongs, that is, the functional modules divided in the system, such as the "user management" module, the "order processing" module, etc. Each page belongs to a certain business module. The switch flag for each business module in the grayscale information is used to control whether the module participates in the grayscale test, that is, the grayscale module switch allows each module to be individually enabled or disabled, providing fine-grained control capabilities. Therefore, according to the grayscale module switch in the grayscale information, it is confirmed whether the business module to which the page currently requested to access belongs has enabled grayscale. If the business module to which the current page belongs has enabled grayscale, it is determined whether the current page is in the grayscale page list. The grayscale page list lists all page paths or identifiers participating in the grayscale test in the grayscale information. If the judgment is passed and the page matches successfully, it means that the page meets the grayscale release logic and the grayscale resources will be loaded subsequently; if the page is not in the grayscale page list, it means that the grayscale release logic is not met and the production resources will be loaded subsequently to request the production page normally.

[0076] In one embodiment, Figure 5 As shown, step S205 includes:

[0077] S501: If the phased release logic is met, perform a business demand analysis on the page access request and obtain corresponding business information;

[0078] S502: Generate a corresponding resource loading request according to the business information and the login information, and send the resource loading request to the backend;

[0079] S503. Receive the grayscale resource or production resource returned by the backend based on the resource loading request, wherein the grayscale resource is returned when the business information and the login information meet the preset grayscale business logic, otherwise the production resource is returned.

[0080] In this embodiment, after confirmation by the grayscale release logic, if the current page needs to execute the grayscale logic, the page access request is further analyzed for business needs, and detailed information related to the business is extracted, such as the user's role, authority, the type of business currently being processed, the case number, etc. In the claims system in the financial field, the user (claims adjuster) requests access to the "Claim Application" page. After the system confirms that the page meets the grayscale release logic, it further analyzes the request and extracts business information, such as user role: claims adjuster; current case type: major disease claim; case number: 123456. Combined with the obtained business information (such as user role, case type, case number, etc.) and the user's login information (such as user ID, authority level, etc.), a resource loading request is generated and sent to the backend, that is, a resource loading request is dynamically generated based on the business information and the user's login information to ensure that the request can reflect the current business needs. The backend makes business logic judgments based on the business information and login information in the resource loading request according to preset rules. That is, the backend determines whether to load grayscale resources based on preset rules. These rules may include conditions such as user role, case type, and case number. For example, it will only load grayscale pages if the current user is a grayscale user, or only load grayscale pages if the current case is a grayscale case. The backend makes business logic judgments. If the preset grayscale business logic is met, it returns grayscale resources; otherwise, it returns production resources. The frontend receives the resources returned by the backend and loads the corresponding page based on the returned resource type. This allows the backend to dynamically decide whether to load grayscale resources based on business logic, ensuring the precise execution of grayscale functions to support complex business scenarios.

[0081] In one embodiment, the method further comprises:

[0082] Monitor the grayscale status, and when a grayscale anomaly is detected, collect the corresponding anomaly information and send it to the backend, so that the backend can update the latest grayscale information according to the anomaly information.

[0083] In this embodiment, during the front-end grayscale release process, the grayscale status is monitored, that is, the operating status of the grayscale function is monitored in real time, including the loading status of the grayscale page, user behavior, system performance, etc. The monitoring indicators may include page loading time, error rate, user feedback, system logs, etc. The grayscale status monitoring enables timely detection of problems that occur during the grayscale release process. When a grayscale anomaly is detected, that is, an unexpected situation that occurs during the grayscale test, such as page loading failure, performance degradation, user feedback problems, etc., relevant anomaly information is automatically collected, including error logs, user operation records, system status, etc. The collected anomaly information is sent to the back-end. Specifically, the anomaly information can be sent to the back-end using HTTP requests, message queues, etc., so that after receiving the anomaly information, the back-end can perform anomaly parsing and analysis, and update the grayscale information based on the analysis results, such as turning off the grayscale switch, adjusting the grayscale range, etc., so as to update the latest grayscale information. The updated grayscale information will take effect within two heartbeats at the latest, so that the back-end can dynamically adjust the grayscale strategy based on the anomaly information to ensure stable operation of the system.

[0084] It should be noted that there is not necessarily a certain order between the above steps. A person skilled in the art can understand, based on the description of the embodiments of the present invention, that in different embodiments, the above steps may have different execution orders, that is, they may be executed in parallel, or may be executed interchangeably, etc.

[0085] Further references Figure 6 , as a response to the above Figure 2 The present invention provides an embodiment of a front-end grayscale publishing device, which is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0086] like Figure 6 As shown, the front-end phased publishing device 60 described in this embodiment includes:

[0087] The heartbeat activation module 601 is used to obtain the user's login information and activate the heartbeat request after the user logs into the system;

[0088] A cache module 602 is configured to periodically obtain the latest grayscale information from the backend based on the heartbeat request and store it in a local cache;

[0089] A grayscale determination module 603 is configured to respond to a page access request and determine whether the page currently requested for access satisfies the grayscale publishing logic based on the latest grayscale information in the local cache;

[0090] Resource request module 604 is used to send a resource loading request to the backend if the grayscale release logic is met, and receive the loaded resource type returned by the backend after performing business logic judgment based on the resource loading request. The resource loading request includes the business information currently requested and the login information.

[0091] The resource loading module 605 is used to load the corresponding grayscale page or generate a page on the front end according to the type of the loaded resource.

[0092] The module referred to in the present invention refers to a series of computer program instruction segments that can perform specific functions. It is more suitable for describing the front-end grayscale release execution process than a program. For the specific implementation of each module, please refer to the corresponding method embodiment above, which will not be repeated here.

[0093] In one embodiment, the cache module 602 includes:

[0094] A heartbeat sending unit is configured to periodically send a heartbeat request to the backend at a preset heartbeat interval. The heartbeat request carries a version identifier of the grayscale information in the current local cache, so that the backend queries whether there is an update to the grayscale configuration based on the version identifier.

[0095] The receiving cache unit is used to receive the latest grayscale information returned by the backend when the grayscale configuration is updated, store the latest grayscale information in the local cache and update the corresponding version identifier.

[0096] In one embodiment, the apparatus 60 further includes:

[0097] The interval update module is used to count the update frequency of the grayscale configuration in a historical time period and determine the corresponding heartbeat interval time according to the update frequency and the current system load.

[0098] In one embodiment, the grayscale information includes a grayscale master switch, a grayscale module switch, and a grayscale page list. The grayscale determination module 603 includes:

[0099] A request parsing unit, configured to receive a page access request and parse the page access request to determine the page currently requested to be accessed;

[0100] The main station confirmation unit is used to confirm whether the current grayscale master switch is turned on based on the latest grayscale information in the local cache, and if it is turned on, obtain the business module to which the page currently requested for access belongs;

[0101] The module page confirmation unit is used to confirm whether the business module to which the page currently requested for access belongs has grayscale enabled based on the grayscale module switch in the latest grayscale information. If it is enabled, the module page currently requested for access is matched with the grayscale page list in the latest grayscale information.

[0102] The result output unit is used to confirm that the page currently requested to access meets the grayscale release logic if the page matching is successful, otherwise it does not meet the grayscale release logic.

[0103] In one embodiment, the resource request module 604 includes:

[0104] A business analysis unit is used to analyze the business needs of the page access request and obtain corresponding business information if the phased release logic is met;

[0105] A request generating unit, configured to generate a corresponding resource loading request according to the business information and the login information, and send the resource loading request to a backend;

[0106] A resource receiving unit is used to receive the grayscale resources or production resources returned by the backend based on the resource loading request, wherein the grayscale resources are returned when the business information and the login information meet the preset grayscale business logic, otherwise the production resources are returned.

[0107] In one embodiment, the apparatus 60 further includes:

[0108] The exception handling module is used to monitor the grayscale status. When a grayscale exception is detected, the corresponding exception information is collected and sent to the backend, so that the backend can update the latest grayscale information according to the exception information.

[0109] In one embodiment, the apparatus 60 further includes:

[0110] The resource deployment module is used to pre-deploy grayscale resources to the production environment resource pool and distinguish between the grayscale resources and production resources in the production environment resource pool.

[0111] In the above embodiment, the present invention discloses a front-end grayscale publishing device, which obtains the user's login information and starts a heartbeat request after the user logs into the system; based on the heartbeat request, the latest grayscale information is periodically obtained from the back-end and stored in the local cache; in response to the page access request, it is confirmed whether the page currently requested to access meets the grayscale publishing logic based on the latest grayscale information in the local cache; if the grayscale publishing logic is met, a resource loading request is sent to the back-end, and the back-end receives the type of loaded resource returned after the business logic judgment based on the resource loading request, the resource loading request includes the business information currently requested to access and the login information; the corresponding grayscale page is loaded or a page is generated on the front-end according to the loaded resource type. The latest grayscale information is synchronized to the local cache through the heartbeat mechanism of the front and back ends, so that the grayscale publishing range can be flexibly adjusted during grayscale publishing, and the back-end service request is only made for requests that meet the grayscale publishing logic, while ensuring accurate control of the grayscale page, it also effectively improves the overall performance of the system.

[0112] Another embodiment of the present invention provides a computer device, such as Figure 7 As shown, the computer device 70 includes:

[0113] One or more processors 701 and memory 702, Figure 7 In the description, a processor 701 is used as an example. The processor 701 and the memory 702 can be connected via a bus or other means. Figure 7 The bus connection is taken as an example.

[0114] The processor 701 is used to complete various control logics of the computer device 70. It can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RISC Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components or any combination of these components. In addition, the processor 701 can also be any traditional processor, microprocessor or state machine. The processor 701 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP and / or any other such configuration.

[0115] Memory 702, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs, and modules, such as program instructions corresponding to the front-end phased release method in the embodiments of the present invention. Processor 701 executes the non-volatile software programs, instructions, and modules stored in memory 702 to execute various functional applications and data processing of computer device 70, thereby implementing the front-end phased release method in the above method embodiments.

[0116] The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the computer device 70, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 702 may optionally include a memory remotely located relative to the processor 701, and these remote memories may be connected to the computer device 70 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. One or more units are stored in the memory 702, and when executed by one or more processors 701, the steps of the front-end grayscale release method in any of the above-mentioned method embodiments are executed.

[0117] In the above embodiment, the present invention discloses a computer device, which obtains the user's login information and starts a heartbeat request after the user logs into the system; based on the heartbeat request, the latest grayscale information is periodically obtained from the back end and stored in the local cache; in response to the page access request, it is confirmed whether the page currently requested to access meets the grayscale release logic based on the latest grayscale information in the local cache; if the grayscale release logic is met, a resource loading request is sent to the back end, and the back end receives the type of loaded resource returned after the business logic judgment based on the resource loading request, the resource loading request includes the business information currently requested to access and the login information; the corresponding grayscale page is loaded or a page is generated on the front end according to the loaded resource type. The latest grayscale information is synchronized to the local cache through the heartbeat mechanism of the front and back ends, so that the grayscale release range can be flexibly adjusted during grayscale release, and the back end service request is only made for requests that meet the grayscale release logic, while ensuring accurate control of the grayscale page, it also effectively improves the overall performance of the system.

[0118] An embodiment of the present invention provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the steps of the front-end grayscale release method in any of the above method embodiments are executed.

[0119] In the above embodiment, the present invention discloses a non-volatile computer-readable storage medium, which obtains the user's login information and starts a heartbeat request after the user logs into the system; based on the heartbeat request, the latest grayscale information is periodically obtained from the back end and stored in the local cache; in response to the page access request, it is confirmed whether the page currently requested to access meets the grayscale release logic based on the latest grayscale information in the local cache; if the grayscale release logic is met, a resource loading request is sent to the back end, and the back end receives the loading resource type returned after the business logic judgment based on the resource loading request, the resource loading request includes the business information currently requested to access and the login information; the corresponding grayscale page is loaded or a page is generated on the front end according to the loading resource type. The latest grayscale information is synchronized to the local cache through the heartbeat mechanism of the front and back ends, so that the grayscale release range can be flexibly adjusted during grayscale release, and the back end service request is only made for requests that meet the grayscale release logic, while ensuring accurate control of the grayscale page, it also effectively improves the overall performance of the system.

[0120] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0121] The present invention can be used in a wide variety of general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and the like. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments in which tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.

[0122] In summary, the present invention discloses a front-end grayscale publishing method, device, equipment and medium, the method includes: when the user logs in to the system, obtaining the user's login information and starting a heartbeat request; based on the heartbeat request, regularly obtaining the latest grayscale information from the back end and storing it in the local cache; in response to the page access request, confirming whether the page currently requested to access meets the grayscale publishing logic based on the latest grayscale information in the local cache; if it meets the grayscale publishing logic, sending a resource loading request to the back end, and receiving the loading resource type returned by the back end after performing a business logic judgment based on the resource loading request, the resource loading request includes the business information currently requested to access and the login information; loading the corresponding grayscale page or generating a page on the front end according to the loading resource type. The latest grayscale information is synchronized to the local cache through the heartbeat mechanism of the front and back ends, so that the grayscale publishing range can be flexibly adjusted during grayscale publishing, and back-end service requests are only made for requests that meet the grayscale publishing logic, while ensuring accurate control of grayscale pages, it also effectively improves the overall performance of the system.

[0123] Of course, those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware (such as a processor, controller, etc.) through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes in the above-described method embodiments. The storage medium can be a memory, a magnetic disk, a floppy disk, a flash memory, an optical storage device, etc.

[0124] It should be noted that if any software tools or components not developed by our company appear in the examples of this application, they are for illustration purposes only and do not represent actual use. It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications shall fall within the scope of protection of the appended claims.

Claims

1. A front-end grayscale release method, characterized in that: include: When the user logs in to the system, obtain the user's login information and start the heartbeat request; Based on the heartbeat request, the latest grayscale information is regularly obtained from the backend and stored in the local cache; In response to a page access request, confirming whether the page currently requested for access satisfies the grayscale publishing logic based on the latest grayscale information in the local cache; If the grayscale release logic is met, a resource loading request is sent to the backend, and the backend receives the loaded resource type returned after performing business logic judgment based on the resource loading request. The resource loading request contains the business information currently requested to be accessed and the login information. The corresponding grayscale page or generated page is loaded on the front end according to the type of the loaded resource.

2. The front-end phased release method according to claim 1, characterized in that: The step of periodically obtaining the latest grayscale information from the backend based on the heartbeat request and storing it in the local cache includes: Send heartbeat requests to the backend regularly at a preset heartbeat interval. The heartbeat request carries the version identifier of the grayscale information in the current local cache, so that the backend can query whether there is an update to the grayscale configuration based on the version identifier. The latest grayscale information returned by the backend when the grayscale configuration is updated is received, the latest grayscale information is stored in the local cache, and the corresponding version identifier is updated.

3. The front-end grayscale release method according to claim 2, characterized in that: Also includes: The update frequency of the grayscale configuration in the historical time period is counted, and the corresponding heartbeat interval is determined according to the update frequency and the current system load.

4. The front-end grayscale release method according to claim 1, characterized in that: The grayscale information includes a grayscale master switch, a grayscale module switch, and a grayscale page list. The response to the page access request is to confirm whether the page currently requested for access satisfies the grayscale publishing logic based on the latest grayscale information in the local cache, including: Receiving a page access request and parsing the page access request to determine the page currently requested to be accessed; Determine whether the current grayscale master switch is on based on the latest grayscale information in the local cache, and if on, obtain the business module to which the page currently requested for access belongs; Based on the grayscale module switch in the latest grayscale information, confirm whether the business module to which the page currently requested belongs has grayscale enabled. If it is enabled, match the page currently requested with the grayscale page list in the latest grayscale information; If the page matches successfully, it is confirmed that the page currently requested meets the grayscale release logic; otherwise, it does not meet the grayscale release logic.

5. The front-end phased release method according to claim 1, characterized in that: If the grayscale release logic is met, a resource loading request is sent to the backend, and the backend receives the loaded resource type returned after performing business logic judgment based on the resource loading request, including: If the phased release logic is met, perform business demand analysis on the page access request and obtain corresponding business information; Generate a corresponding resource loading request according to the business information and the login information, and send the resource loading request to the backend; Receive the grayscale resource or production resource returned by the backend based on the resource loading request, wherein when the business information and the login information meet the preset grayscale business logic, the grayscale resource is returned, otherwise the production resource is returned.

6. The front-end grayscale release method according to claim 1, characterized in that: Also includes: Monitor the grayscale status, and when a grayscale anomaly is detected, collect the corresponding anomaly information and send it to the backend, so that the backend can update the latest grayscale information according to the anomaly information.

7. The front-end phased release method according to any one of claims 1 to 6, characterized in that: After the user logs in to the system, before obtaining the user's login information and starting the heartbeat request, the method includes: Pre-deploy grayscale resources to a production environment resource pool, and distinguish between grayscale resources and production resources in the production environment resource pool.

8. A front-end grayscale release device, characterized in that: include: The heartbeat activation module is used to obtain the user's login information and activate the heartbeat request after the user logs into the system; A cache module is used to periodically obtain the latest grayscale information from the backend based on the heartbeat request and store it in a local cache; A grayscale determination module is configured to respond to a page access request and determine whether the page currently requested for access satisfies the grayscale publishing logic based on the latest grayscale information in the local cache; The resource request module is used to send a resource loading request to the backend if the grayscale release logic is met, and receive the loading resource type returned by the backend after performing business logic judgment based on the resource loading request. The resource loading request contains the business information currently requested and the login information; The resource loading module is used to load the corresponding grayscale page or generate a page on the front end according to the type of the loaded resource.

9. A computer device, characterized in that: comprising at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the front-end grayscale release method described in any one of claims 1-7.

10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to execute the front-end grayscale release method according to any one of claims 1 to 7.

Citation Information

Cited By

  • AB test gateway control method and system based on adaptive shunting, and storage medium

    CN120950362A

  • Adaptive shunting-based ab test gateway control method, system and storage medium

    CN120950362B