User login system, method and device for handheld hospital APP and medium
By building a certified microservice cluster separated by read and write, collecting and analyzing operating status in real time, and dynamically adjusting resource allocation, the response delay and stability of traditional systems under peak traffic are solved, and the intelligent elastic scaling of the palm hospital system is achieved.
Patent Information
- Application Number
- CN202510557565.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-07-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional single-structure handheld hospital system cannot effectively respond when the sudden peak traffic occurs, resulting in a surge in response delays in authentication services or unavailability, and it is difficult for the existing technology to achieve intelligent elastic scaling of authentication services.
Build a certified microservice cluster separated by read and write, collect the operating status in real time, determine the resource allocation balanced characteristics by responding to the timing fluctuations of delay indicators and transaction success rate, obtain the cluster carrying capacity and single instance processing capacity, and dynamically adjust resource allocation to achieve multi-level load expansion.
Under peak traffic, dynamically adjust resource allocation to ensure sufficient resources for key businesses, avoid resource waste and service downgrades, maintain system stability and reliability, and realize intelligent and elastic scaling of certified services.
Smart Images

Figure CN120336028A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of Internet of Things login verification. More specifically, this application relates to a user login system, method, device, and medium for a palm hospital APP. Background Art
[0002] With the popularization of the mobile Internet and the accelerating pace of people's lives, the traditional medical treatment mode can no longer meet the needs of patients. The palm hospital system has emerged as the times require, integrating functions such as hospital registration, payment, query, and appointment, enabling patients to complete the preparations before medical treatment through mobile phones anytime and anywhere, reducing the queuing waiting time, and improving the medical treatment efficiency. At the same time, the palm hospital system also supports services such as online consultation, health consultation, and report query, providing patients with comprehensive medical and health support.
[0003] In the medical informatization system, the sudden traffic during the peak medical treatment period is one of the main bottlenecks leading to system instability. Especially during the early morning registration period, a large number of patients concentrate on accessing the palm hospital system for operations such as appointment registration and payment. This pulsed traffic that breaks out within a short period of time poses great pressure on the authentication service. Due to the rigid resource allocation and limited expansion ability of the traditional monolithic architecture authentication module, it often cannot handle this sudden load, resulting in a sharp increase in service response latency or even complete unavailability. Therefore, how to achieve the intelligent elastic scaling of read and write resources in the authentication service of the palm hospital system has become a difficult problem faced by the industry. Summary of the Invention
[0004] This application provides a user login system, method, device, and medium for a palm hospital APP, which can achieve the intelligent elastic scaling of read and write resources in the authentication service of the palm hospital system.
[0005] In a first aspect, this application provides a method for allocating read and write resources for user login verification, which is used to allocate read and write resources during the verification of the user login system of the palm hospital APP. The method includes: Decouple the user authentication module in the palm hospital system from the monolithic architecture, construct an authentication microservice cluster with read-write separation, and then collect the running status of the authentication microservice cluster in different medical scenarios in real time; Extract the time series fluctuation characteristics of the response delay index in the read operation and the transaction success rate in the write operation from the running status, and determine the balance characteristics of the read and write resource allocation in the palm hospital system through the time series fluctuation characteristics of the response delay index and the transaction success rate; Obtain the cluster bearing capacity and single-instance processing capacity of the read and write operations in the authentication microservice cluster, and then determine the elastic threshold for multi-level load expansion caused by concurrent tasks in the palm hospital system through the cluster bearing capacity and the single-instance processing capacity; When the concurrency of user login requests in the mobile hospital system exceeds the elastic threshold for load expansion at each level, multi-level load expansion is performed on the read and write resources in the mobile hospital system based on the balanced characteristics of the read and write resource allocation.
[0006] In some embodiments, extracting the response delay metrics in read operations and the temporal fluctuation characteristics of the transaction success rate in write operations from the operating state specifically includes: Obtain multiple medical service types in read operations and multiple operation transaction types in write operations in the mobile hospital system; Statistically analyze the response delays of read operations in each medical service type in the operating state, and then determine the response delay metrics of the authentication microservice cluster in read operations based on all the response delays; Statistically analyze the fluctuation periods of the cycle success rates of write operations in each operation transaction type in the operating state; Determine the temporal fluctuation characteristics of the transaction success rate in write operations based on the fluctuation periods of all cycle success rates.
[0007] In some embodiments, determining the balanced characteristics of read and write resource allocation in the mobile hospital system through the response delay metrics and the temporal fluctuation characteristics of the transaction success rate specifically includes: Adjust the dynamic weights of read and write loads in the mobile hospital system based on the real-time requests of the hospital; Perform load balancing on the response delay metrics and the temporal fluctuation characteristics of the transaction success rate through each dynamic weight to obtain the balanced characteristics of read and write resource allocation in the mobile hospital system.
[0008] In some embodiments, determining the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system through the cluster bearing capacity and the single-instance processing capacity specifically includes: Determine multiple load expansion levels of the concurrency in the mobile hospital system based on the cluster bearing capacity; Determine the concurrency intervals for each load expansion level; Determine the request delays for each load expansion level according to the single-instance processing capacity; Determine the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system through all the concurrency intervals and all the request delays.
[0009] In some embodiments, performing multi-level load expansion on the read and write resources in the mobile hospital system based on the balanced characteristics of the read and write resource allocation specifically includes: Generate multi-level expansion strategies for read resources and multi-level expansion strategies for write resources through the balanced characteristics of the read and write resource allocation; Expand and fuse the read and write resources in the mobile hospital system according to the multi-level expansion strategy of read resources and the multi-level expansion strategy of write resources.
[0010] In some embodiments, the authentication microservice cluster is a Redis cluster.
[0011] In some embodiments, the operating state includes CPU utilization rate, memory occupancy rate, and request response time.
[0012] In a second aspect, the present application provides a mobile hospital system, including a resource allocation unit, and the resource allocation unit includes: A collection module, configured to decouple the user authentication module in the mobile hospital system from the monolithic architecture, construct an authentication microservice cluster with read-write separation, and then collect the operating state of the authentication microservice cluster in different medical scenarios in real time; A processing module, configured to extract the response delay index in the read operation of the authentication microservice cluster and the time-series fluctuation characteristics of the transaction success rate in the write operation from the operating state, and determine the balance characteristics of the read-write resource allocation in the mobile hospital system through the response delay index and the time-series fluctuation characteristics of the transaction success rate; The processing module is further configured to obtain the cluster bearing capacity and single-instance processing capacity of the read and write operations in the authentication microservice cluster, and then determine the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system through the cluster bearing capacity and the single-instance processing capacity; An execution module, configured to perform multi-level load expansion on the read and write resources in the mobile hospital system based on the balance characteristics of the read-write resource allocation when the concurrency of user login requests in the mobile hospital system exceeds the elastic threshold of each level of load expansion.
[0013] In a third aspect, the present application provides a computer device, including a memory and a processor, where the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the computer device executes the above-mentioned read-write resource allocation method for user login verification.
[0014] In a fourth aspect, the present application provides a computer-readable storage medium, in which instructions or codes are stored, and when the instructions or codes are run on a computer, the computer is caused to execute the above-mentioned read-write resource allocation method for user login verification.
[0015] The technical solutions provided by the disclosed embodiments of the present application have the following beneficial effects: In a user login system, method, device and medium for a handheld hospital APP provided by this application, the user authentication module in the handheld hospital system is decoupled from the monolithic architecture to construct a read-write separated authentication microservice cluster, and then the running states of the authentication microservice cluster in different medical scenarios are collected in real time; the response delay index in the read operation and the time series fluctuation characteristics of the transaction success rate in the write operation of the authentication microservice cluster are extracted from the running states, and the balance characteristics of the read-write resource allocation in the handheld hospital system are determined through the response delay index and the time series fluctuation characteristics of the transaction success rate; the cluster bearing capacity and single-instance processing capacity of the read-write operations in the authentication microservice cluster are obtained, and then the elastic threshold for multi-level load expansion caused by concurrent tasks in the handheld hospital system is determined through the cluster bearing capacity and the single-instance processing capacity; when the concurrency of user login requests in the handheld hospital system exceeds the elastic threshold of each level of load expansion, the read-write resources in the handheld hospital system are expanded by multi-level load based on the balance characteristics of the read-write resource allocation.
[0016] It can be seen that in this application, when the concurrency of user login requests in the handheld hospital system exceeds the elastic threshold of each level of load expansion, the read-write resources in the handheld hospital system are expanded by multi-level load based on the balance characteristics of the read-write resource allocation; firstly, by determining the balance characteristics, a resource allocation strategy adaptive to the medical business scenario can be obtained, thus significantly improving the system service quality. The resource demand patterns in different medical business scenarios can be identified, and based on this balance characteristic, the ratio of read-write resources can be dynamically adjusted to ensure that high-priority services always obtain sufficient resources. Therefore, without changing the total amount of resources, the processing efficiency of key medical services can be improved qualitatively, while avoiding non-key services from occupying excessive resources; secondly, by determining the elastic threshold, an accurate expansion trigger mechanism can be obtained, thus realizing the intelligent elastic scaling of resources. The handheld hospital system analyzes the bearing capacity and single-instance processing capacity of the authentication microservice cluster to establish a multi-level expansion threshold system. When the concurrent request volume exceeds the set elastic threshold, the handheld hospital system can increase resources step by step according to the pre-formulated multi-level expansion strategy, avoiding both resource waste caused by premature expansion and service degradation caused by late expansion, and keeping the handheld hospital system in the best running state all the time. Especially when dealing with the sudden traffic unique to the medical industry, this mechanism can ensure the stability and reliability of the authentication service; in summary, based on the above solutions, the intelligent elastic scaling of read-write resources in the authentication service of the handheld hospital system can be realized. Description of the Drawings
[0017] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0018] Figure 1 is an exemplary flowchart of a read-write resource allocation method for user login verification according to some embodiments of the present application; Figure 2 is a login flowchart of the mobile hospital APP according to some embodiments of the present application; Figure 3 is a schematic flowchart of implementing multi-level load expansion according to some embodiments of the present application; Figure 4 is a schematic structural diagram of a resource allocation unit according to some embodiments of the present application; Figure 5 is a schematic structural diagram of a computer device for implementing a read-write resource allocation method for user login verification according to some embodiments of the present application. Detailed implementation manners
[0019] To better understand the technical solutions of the present application, the following will describe the technical solutions of the present application in detail in combination with the drawings in the specification and specific implementation manners.
[0020] Refer to Figure 1 , this figure is an exemplary flowchart of a read-write resource allocation method for user login verification according to some embodiments of the present application. The read-write resource allocation method for user login verification mainly includes the following steps: In step 101, decouple the user authentication module in the mobile hospital system from the monolithic architecture, construct an authentication microservice cluster with read-write separation, and then collect the running status of the authentication microservice cluster in different medical scenarios in real time.
[0021] It should be noted that in this application, the running state represents a set of quantitative indicators of the real-time working conditions of the mobile hospital system. This running state reflects the service health and resource load conditions. The running state includes CPU utilization rate, memory occupancy rate, and request response time. The authentication microservice cluster is a Redis cluster. Specifically, when implemented, based on the SpringCloud Alibaba microservice framework, service registration and discovery are achieved through Nacos. The authentication module is split into independent microservices and a read-write separation architecture is adopted. The read service integrates multi-level caches (Caffeine → Redis) through Spring Cloud Gateway to optimize query performance. The write service ensures transaction consistency with the HIS system based on Seata. Furthermore, Prometheus is combined to collect infrastructure metrics, Spring Actuator is used to expose the application status, and real-time collection of business-level metrics (such as the emergency request response time) is achieved through custom AOP aspects. At the same time, the emergency service resources can be guaranteed through K8s priority scheduling, and a synchronous double-write + asynchronous compensation mechanism is adopted to ensure the reliability of medical insurance data. Finally, a set of authentication microservice clusters that meet the high-availability requirements of the medical industry are constructed. Prometheus in the authentication microservice cluster is used to collect the CPU utilization rate, memory occupancy rate, and request response time of the authentication microservice cluster in different medical scenarios in real time. Thus, the set of CPU utilization rate, memory occupancy rate, and request response time is used as the running state in the corresponding medical scenario, and the running state of the authentication microservice cluster in different medical scenarios can be obtained. Among them, the CPU utilization rate represents the percentage index of the usage degree of the processor resources; the memory occupancy rate represents the capacity ratio of the memory resource consumption of the mobile hospital system; the request response time represents the time length consumed by the system to process a single request.
[0022] In some embodiments, referring to Figure 2 As shown, this figure is the login flowchart of the mobile hospital APP shown in some embodiments of this application. The process starts from the start node. First, the user needs to enter the username and password. Then, the user clicks the login button, and the system will verify whether the input information is correct. If the verification passes (Yes), the user will enter the home page and the process ends. If the verification fails (No), the process returns to the step of entering the username and password, and the user needs to re-enter the information. The entire flowchart clearly shows each step and its logical relationship in the user login process.
[0023] In step 102, the time-series fluctuation characteristics of the response delay index in the read operation and the transaction success rate in the write operation of the authentication microservice cluster are extracted from the running state, and the balance characteristics of the read-write resource allocation in the mobile hospital system are determined through the time-series fluctuation characteristics of the response delay index and the transaction success rate.
[0024] In some embodiments, the extraction of the temporal fluctuation characteristics of the response delay index in the read operation and the temporal success rate fluctuation of the write operation from the running state of the authentication microservice cluster can be achieved through the following steps: Obtain multiple medical service types in the read operation and multiple operation transaction types in the write operation of the mobile hospital system; Statistically calculate the response delay of the read operation in each medical service type in the running state, and then determine the response delay index of the authentication microservice cluster in the read operation based on all the response delays; Statistically calculate the fluctuation period of the cycle success rate of the write operation in each operation transaction type in the running state; Determine the temporal fluctuation characteristics of the transaction success rate in the write operation based on the fluctuation periods of all the cycle success rates.
[0025] It should be noted that in this application, the temporal fluctuation characteristics represent the periodic law and abnormal fluctuation pattern of the mobile hospital system indicators changing over time; the medical service type represents the service classification system in different departments and scenarios of the hospital; the operation transaction type represents the transaction classification of different business functions in the write operation of the mobile hospital system; the response delay represents the time delay from the start to the completion of a single request; the response delay index represents the aggregated delay performance evaluation data; the cycle success rate represents the proportion of successfully executed transactions within a specific time window; and the success rate fluctuation period represents the repetitive law of the transaction success rate changing over time.
[0026] In specific implementation, first, obtaining multiple medical service types in the read operation and multiple operation transaction types in the write operation of the mobile hospital system can be achieved in the following way: that is, clearly dividing outpatient query, emergency medical record retrieval, medical insurance directory query, and inspection report acquisition according to the medical service process, and differentiating through the service identification field in the API request path or message header, multiple medical service types in the read operation can be obtained. Record operation types such as registration, payment, and cancellation of registration in the database transaction table, and mark scene tags, so as to obtain the operation transaction types corresponding to each operation type, and multiple operation transaction types in the write operation can be obtained. Secondly, in the running state, counting the response latency of the read operation in each medical service type, and then determining the response latency index of the authentication microservice cluster in the read operation through all the response latencies can be achieved in the following way: for each medical service type, obtain the type of latency quantile of the medical service type (i.e., P50 / P90 / P99), obtain all the request response times of the medical service type from the running state, and take the mean of the latency quantiles of each request response time as the response latency of the read operation in the medical service type. Through the above method, the response latency of the read operation in each medical service type can be obtained, and then the set of all response latencies is used as the response latency index of the authentication microservice cluster in the read operation. Among them, the calculation of latency quantiles usually calculates the P50 / P90 / P99 latency quantiles of each service type per minute, and a real-time calculation pipeline with a 5-second granularity is established separately for emergency requests. At the same time, a sliding window algorithm can be used to identify the rising trend of latency (for example: the P99 latency increases by more than 15% within 10 minutes). Then, in the running state, counting the fluctuation period of the cycle success rate of the write operation in each operation transaction type can be achieved in the following way: for each operation transaction type, divide the time window through the operation transaction type. For example, the cycle success rate in the operation transaction type is counted according to a 3-minute window for medical insurance settlement and a 5-minute window for ordinary registration. And only when the mobile hospital system returns a clear successful response is it counted as the number of successful times. Serializing all the cycle success rates in chronological order can obtain the success rate time series, and using the seasonal decomposition algorithm to analyze the cycle of the change law of the cycle success rate in the success rate time series as the fluctuation period of the cycle success rate of the operation transaction type. Through the above method, the fluctuation period of the cycle success rate in each operation transaction type can be obtained. Finally, determining the temporal fluctuation characteristics of the transaction success rate in the write operation through all the fluctuation periods of the cycle success rates can be achieved in the following way: taking the set of all the fluctuation periods of the cycle success rates as the temporal fluctuation characteristics of the transaction success rate in the write operation.
[0027] In some embodiments, determining the balance characteristics of read / write resource allocation in the mobile hospital system through the response latency index and the temporal fluctuation characteristics of the transaction success rate can be achieved by the following steps: Adjust the dynamic weights of the read and write loads in the mobile hospital system based on the real-time requests from the hospital; Perform load balancing on the temporal fluctuation characteristics of the response delay index and the transaction success rate through each dynamic weight, and obtain the balanced characteristics of the read and write resource allocation in the mobile hospital system.
[0028] It should be noted that in this application, the balanced characteristics represent the rationality and stability state of the resource allocation in the mobile hospital system, and these balanced characteristics reflect the load balancing effect of the mobile hospital system; specifically, when implementing, first, adjusting the dynamic weights of the read and write loads in the mobile hospital system based on the real-time requests from the hospital can be achieved in the following way, that is: obtain the initial weights of the read and write loads in the mobile hospital system from the console of the mobile hospital system, and use the gradient boosting tree algorithm to adjust the initial weights in combination with the real-time requests from the hospital. That is, when it is detected that the emergency requests surge, automatically increase the read resource weight by at least 30%, and reserve a dedicated resource pool of physical machines for key write operations such as medical insurance settlement. Thus, the adjusted initial weights are used as the dynamic weights of the read and write loads in the mobile hospital system, and these dynamic weights represent the proportionality coefficients of the read and write resource allocation; then, performing load balancing on the temporal fluctuation characteristics of the response delay index and the transaction success rate through each dynamic weight, and obtaining the balanced characteristics of the read and write resource allocation in the mobile hospital system can be achieved in the following way, that is: initialize a load balancing model based on the dynamic weights, use each dynamic weight as the weight value of the read and write loads in this load balancing model, use the response delay index and the proportion of emergency requests as the evaluation targets in this load balancing model, count the proportion of emergency requests in the mobile hospital system at the current moment as the interference factor in this load balancing model, and use this load balancing model to evaluate the balanced degree of the read and write resource allocation in the mobile hospital system. Thus, the evaluated balanced degree is used as the balanced characteristics of the read and write resource allocation in the mobile hospital system.
[0029] In step 103, obtain the cluster bearing capacity and single-instance processing capacity of the read and write operations in the authentication microservice cluster, and then determine the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system through the cluster bearing capacity and the single-instance processing capacity.
[0030] In some embodiments, the cluster carrying capacity and single-instance processing capacity of read and write operations in the authentication microservice cluster can be obtained in the following manner: simulate the peak traffic of outpatient registration queries, measure the throughput of the authentication microservice cluster in the scenario of medical insurance directory queries, and thus use the set of peak traffic and throughput as the cluster carrying capacity of read and write operations in the authentication microservice cluster; deploy write service instances in Docker containers, test the upper limit of the number of transactions per second for registration operations through the two-phase commit protocol, and use this upper limit of the number of transactions per second as the cluster carrying capacity and single-instance processing capacity of read and write operations in the authentication microservice cluster, and then the cluster carrying capacity and single-instance processing capacity of read and write operations can be obtained.
[0031] In some embodiments, determining the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system based on the cluster carrying capacity and the single-instance processing capacity can be achieved through the following steps: Determine multiple load expansion levels of the concurrent volume in the mobile hospital system based on the cluster carrying capacity; Determine the concurrent volume intervals for each load expansion level; Determine the request latency for each load expansion level according to the single-instance processing capacity; Determine the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system through all the concurrent volume intervals and all the request latencies.
[0032] It should be noted that in this application, the elastic threshold represents the critical performance index value for triggering elastic resource adjustment in the mobile hospital system; the load expansion level represents different stages and scale divisions of resource expansion in the mobile hospital system; the concurrent volume interval represents the range of concurrent request quantities that the mobile hospital system can handle under different load states; the request latency represents the time delay from initiating a request to obtaining a response.
[0033] In specific implementation, first, to determine multiple load expansion levels of the concurrency in the mobile hospital system based on the cluster's bearing capacity, the following method can be adopted: Based on the analysis of historical operation data, divide the maximum bearing capacity of the cluster into three expansion intervals (normal load, warning load, and emergency load) as the load expansion levels, and then the multiple load expansion levels of the concurrency in the mobile hospital system can be obtained. Among them, the expansion interval of the normal load is set to 30% - 60% of the maximum bearing capacity of the cluster, the expansion interval of the warning load is 60% - 85%, and the expansion interval of the emergency load is 85% - 100%. Second, to determine the concurrency intervals of each load expansion level, the following method can be adopted: For each load expansion level, take the product of the cluster's bearing capacity and the upper and lower limits of the load expansion level as the upper and lower limits of the concurrency interval in the load expansion level, and then the concurrency intervals of the load expansion levels can be obtained. Through the above method, the concurrency intervals of each load expansion level can be obtained. Then, to determine the request latency of each load expansion level according to the single-instance processing capacity, the following method can be adopted: For each load expansion level, combine the single-instance processing capacity index to establish a concurrency-response latency curve model, and use this concurrency-response latency curve model to evaluate the request latency of the load expansion level, and then take the result of the request latency evaluation as the request latency of the load expansion level. Through the above method, the request latency of each load expansion level can be obtained. Finally, to determine the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system through all the concurrency intervals and all the request latencies, the following method can be adopted: For each load expansion level, take the set of the request latency and the concurrency interval of the load expansion level as the elastic threshold of the load expansion level. Through the above method, the elastic threshold of each load expansion level can be obtained, and then the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system can be obtained.
[0034] In step 104, when the concurrency of user login requests in the mobile hospital system exceeds the elastic threshold of each level of load expansion, perform multi-level load expansion on the read and write resources in the mobile hospital system based on the balanced characteristics of the read and write resource allocation.
[0035] In some embodiments, to perform multi-level load expansion on the read and write resources in the mobile hospital system based on the balanced characteristics of the read and write resource allocation, refer to Figure 3 As described, this figure is a schematic flowchart of implementing multi-level load expansion in some embodiments of the present application. In this embodiment, multi-level load expansion can be implemented by the following steps: In step 1041, generate a multi-level expansion strategy for read resources and a multi-level expansion strategy for write resources through the balanced characteristics of the read and write resource allocation. In step 1042, the read and write resources in the mobile hospital system are adjusted for capacity expansion and integration according to the multi-level capacity expansion strategy for read resources and the multi-level capacity expansion strategy for write resources.
[0036] When specifically implemented, first, the multi-level capacity expansion strategy for read resources and the multi-level capacity expansion strategy for write resources can be generated through the balanced characteristics of the read and write resource allocation in the following way: for read resources, according to the balanced characteristics of the read and write resource allocation and combined with the service types of outpatient query and emergency access, a three-level capacity expansion strategy is divided. At the first level, cache nodes are added when the concurrency exceeds 50% of the cluster's bearing capacity. At the second level, edge computing nodes are enabled for preprocessing when it exceeds 70%. At the third level, the static page degradation mode is started when it exceeds 90%. For write resources, differential capacity expansion is implemented according to the balanced characteristics of the read and write resource allocation and combined with transaction types. Linear capacity expansion is used for ordinary registration transactions, an independent resource pool is established and a double capacity expansion coefficient is set for medical insurance settlement transactions, and a second-level priority capacity expansion mechanism is implemented for emergency registration transactions. Then, the adjustment of capacity expansion and integration of the read and write resources in the mobile hospital system according to the multi-level capacity expansion strategy for read resources and the multi-level capacity expansion strategy for write resources can be achieved in the following way: when the read resources are expanded to the second level, 30% of the write resource bandwidth is automatically reserved. When the medical insurance settlement expansion of the write resources is triggered, the cache strategy of the read resources is dynamically adjusted. At the same time, a fuse protection mechanism across resource pools is established to ensure that the capacity expansion of any resource type will not cause overload of another type of resource. Through the dynamic coupling adjustment of the read and write resources, this solution can improve the overall stability of the mobile hospital system during the peak medical treatment period and reduce the resource conflict rate.
[0037] In addition, on the other hand of the present application, in some embodiments, the present application provides a mobile hospital system, which includes a resource allocation unit. Refer to Figure 4 , which is a schematic structural diagram of the resource allocation unit shown in some embodiments of the present application. The resource allocation unit includes: a collection module 201, a processing module 202, and an execution module 203, which are described as follows: The collection module 201. In the present application, the collection module 201 is mainly used to decouple the user authentication module in the mobile hospital system from the monolithic architecture, construct an authentication microservice cluster with read-write separation, and then collect the running states of the authentication microservice cluster in different medical scenarios in real time. The processing module 202. In the present application, the processing module 202 is used to extract the response delay index in the read operation of the authentication microservice cluster and the temporal fluctuation characteristics of the transaction success rate in the write operation from the running states, and determine the balanced characteristics of the read and write resource allocation in the mobile hospital system through the response delay index and the temporal fluctuation characteristics of the transaction success rate. It should be noted that the processing module 202 is further configured to obtain the cluster bearing capacity and single-instance processing capacity of read and write operations in the authentication microservice cluster, and then determine the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system based on the cluster bearing capacity and the single-instance processing capacity; The execution module 203. In this application, the execution module 203 is mainly configured to perform multi-level load expansion on the read and write resources in the mobile hospital system based on the balanced characteristics of the read and write resource allocation when the number of concurrent user login requests in the mobile hospital system exceeds the elastic threshold for multi-level load expansion.
[0038] The above text has introduced in detail the examples of the user login system, method, device, and medium for the mobile hospital APP provided in the embodiments of the present application. It can be understood that, correspondingly, the device includes the corresponding hardware structure and / or software module for implementing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described function for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0039] In some embodiments, the present application further provides a computer device, which includes a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the computer device executes the above-mentioned read and write resource allocation method for user login verification.
[0040] In some embodiments, refer to Figure 5 , the dotted line in this figure indicates that this unit or module is optional. This figure is a schematic structural diagram of a computer device for implementing the read and write resource allocation method for user login verification provided in the embodiments of the present application. The read and write resource allocation method for user login verification described in the above embodiments can be implemented by Figure 5 the computer device shown, which includes at least one processor 301, a memory 302, and at least one communication unit 305. The computer device can be a terminal device, a server, or a chip.
[0041] The processor 301 can be a general-purpose processor or a special-purpose processor. For example, the processor 301 can be a central processing unit (CPU), and the CPU can be used to control a computer device, execute software programs, and process the data of software programs. The computer device can also include a communication unit 305 for implementing signal input (reception) and output (transmission).
[0042] For example, the computer device can be a chip, and the communication unit 305 can be the input and / or output circuit of the chip, or the communication unit 305 can be the communication interface of the chip. The chip can be a component of a terminal device, a network device, or other devices.
[0043] Also for example, the computer device can be a terminal device or a server, and the communication unit 305 can be the transceiver of the terminal device or the server, or the communication unit 305 can be the transceiver circuit of the terminal device or the server.
[0044] The computer device can include one or more memories 302 on which a program 304 is stored. The program 304 can be run by the processor 301 to generate instructions 303, enabling the processor 301 to execute the methods described in the above method embodiments according to the instructions 303. Optionally, data (such as a target audit model) can also be stored in the memory 302. Optionally, the processor 301 can also read the data stored in the memory 302. This data can be stored at the same storage address as the program 304, or it can be stored at a different storage address from the program 304.
[0045] The processor 301 and the memory 302 can be set separately or integrated together. For example, they can be integrated on a system on chip (SOC) of a terminal device.
[0046] It should be understood that the steps of the above method embodiments can be completed by the logic circuit in the form of hardware or the instructions in the form of software in the processor 301. The processor 301 can be a CPU, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices. For example, discrete gate, transistor logic devices, or discrete hardware components.
[0047] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0048] For example, in some embodiments, the present application further provides a computer-readable storage medium, in which instructions or code are stored. When the instructions or code run on a computer, the computer is caused to execute the above-described read-write resource allocation method for user login verification.
[0049] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they learn the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications that fall within the scope of the present application.
[0050] 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 equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A method for allocating read-write resources for user login verification, which is used for allocating read-write resources in the user login system verification of the mobile hospital APP, and is characterized in that The method includes the following steps: Decouple the user authentication module in the mobile hospital system from the monolithic architecture, build a read-write separated authentication microservice cluster, and then collect the running status of the authentication microservice cluster in different medical scenarios in real time; Extract the time series fluctuation characteristics of the response delay index in the read operation and the transaction success rate in the write operation from the running status, and determine the balance characteristics of the read-write resource allocation in the mobile hospital system through the time series fluctuation characteristics of the response delay index and the transaction success rate; Obtain the cluster bearing capacity and single-instance processing capacity of the read-write operations in the authentication microservice cluster, and then determine the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system through the cluster bearing capacity and the single-instance processing capacity; When the concurrency of user login requests in the mobile hospital system exceeds the elastic threshold for multi-level load expansion at each level, perform multi-level load expansion on the read-write resources in the mobile hospital system based on the balance characteristics of the read-write resource allocation.
2. The method according to claim 1, wherein Specifically, extracting the time series fluctuation characteristics of the response delay index in the read operation and the transaction success rate in the write operation from the running status includes: Obtain multiple medical service types in the read operation and multiple operation transaction types in the write operation in the mobile hospital system; Statistically calculate the response delay of the read operation in each medical service type in the running status, and then determine the response delay index of the authentication microservice cluster in the read operation through all the response delays; Statistically calculate the fluctuation period of the cycle success rate of the write operation in each operation transaction type in the running status; Determine the time series fluctuation characteristics of the transaction success rate in the write operation through all the fluctuation periods of the cycle success rates.
3. The method according to claim 1, characterized in that, Specifically, determining the balance characteristics of the read-write resource allocation in the mobile hospital system through the time series fluctuation characteristics of the response delay index and the transaction success rate includes: Adjust the dynamic weights of the read-write loads in the mobile hospital system based on the real-time requests of the hospital; Perform load balancing on the time series fluctuation characteristics of the response delay index and the transaction success rate through each dynamic weight to obtain the balance characteristics of the read-write resource allocation in the mobile hospital system.
4. The method according to claim 1, wherein Specifically, determining the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system through the cluster bearing capacity and the single-instance processing capacity includes: Determine multiple load expansion levels of the concurrency in the mobile hospital system based on the cluster bearing capacity; Determine the concurrency intervals for each load expansion level; Determine the request delay for each load expansion level according to the single-instance processing capacity; Determine the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system through all the concurrency intervals and all the request delays.
5. The method according to claim 1, characterized in that, Specifically, performing multi-level load expansion on the read-write resources in the mobile hospital system based on the balance characteristics of the read-write resource allocation includes: Generate a multi-level expansion strategy for the read resources and a multi-level expansion strategy for the write resources through the balance characteristics of the read-write resource allocation; Perform expansion fusion adjustment on the read-write resources in the mobile hospital system according to the multi-level expansion strategy for the read resources and the multi-level expansion strategy for the write resources.
6. The method according to claim 1, characterized in that, The authentication microservice cluster is a Redis cluster.
7. The method according to claim 1, characterized in that, The operating state includes CPU utilization rate, memory occupancy rate, and request response time.
8. A palm hospital system, the palm hospital system includes a resource allocation unit, characterized in that, The resource allocation unit includes: A collection module, which is used to decouple the user authentication module in the mobile hospital system from the monolithic architecture, construct a read-write separated authentication microservice cluster, and then collect the operating state of the authentication microservice cluster in different medical scenarios in real time; A processing module, which is used to extract the response delay index in the read operation and the temporal fluctuation characteristics of the transaction success rate in the write operation from the operating state, and determine the balance characteristics of the read-write resource allocation in the mobile hospital system through the response delay index and the temporal fluctuation characteristics of the transaction success rate; The processing module is further used to obtain the cluster bearing capacity and single-instance processing capacity of the read-write operations in the authentication microservice cluster, and then determine the elastic threshold for multi-level load expansion caused by concurrent tasks in the mobile hospital system through the cluster bearing capacity and the single-instance processing capacity; An execution module, which is used to perform multi-level load expansion on the read-write resources in the mobile hospital system based on the balance characteristics of the read-write resource allocation when the concurrency of user login requests in the mobile hospital system exceeds the elastic threshold for multi-level load expansion.
9. A computer device, characterized in that, The computer device includes a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the computer device executes the read-write resource allocation method for user login verification described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Instructions or code are stored in the computer-readable storage medium. When the instructions or code run on a computer, the computer is caused to execute the read-write resource allocation method for user login verification described in any one of claims 1 to 7.