Method, device and equipment for upgrading medical client and storage medium

By using a canary upgrade method, the upgrade configuration file and target requirement number are obtained, and the target identification information of the stored procedure is determined, thus solving the problem of business interruption during the upgrade of medical software systems and achieving a stable upgrade process.

CN115640029BActive Publication Date: 2025-11-18WINNING HEALTH TECHNOLOGY GROUP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211319368.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2025-11-18
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

In existing technologies, medical software system upgrades are prone to update errors, leading to disruptions in normal operations.

Method used

The gray-scale upgrade method is adopted. By obtaining the upgrade configuration file and the target upgrade requirement number, the target identification information of the stored procedure to be upgraded is determined, the corresponding upgrade script is called to perform the upgrade, and the original stored procedure is rolled back when the upgrade fails.

Benefits of technology

This approach avoids disrupting the normal business operations of other clients during the upgrade process, reduces the damage to the system caused by upgrade failures, and ensures the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115640029B_ABST
    Figure CN115640029B_ABST
Patent Text Reader

Abstract

The application provides an upgrading method and device of a medical client, equipment and a storage medium, and relates to the technical field of data processing. The method comprises the following steps: acquiring an upgrading configuration file from a database corresponding to the hospital information system, wherein the upgrading configuration file comprises grayscale upgrading indication information and a target upgrading requirement number; if the grayscale upgrading indication information indicates that grayscale upgrading is started, determining target identification information of a storage process to be upgraded according to original identification information of the storage process to be upgraded and the target upgrading requirement number; calling the target identification information to acquire an upgrading script corresponding to the storage process to be upgraded from the database; and running the upgrading script to upgrade the storage process to be upgraded of the client. Compared with the prior art, the method avoids the problem that once an update error occurs, the normal work of the medical system is directly affected, and normal business is interrupted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and more specifically, to a method, apparatus, device, and storage medium for upgrading a medical client. Background Technology

[0002] With the continuous development of medical informatization, medical services are becoming increasingly complex, and policy requirements are being updated more and more frequently. Therefore, Hospital Information Systems (HIS) will face frequent upgrade needs.

[0003] In existing medical software, most traditional HIS systems are built on a client-server (CS) architecture. In the CS architecture, the stored procedure (SP) method is the most convenient and stable way to realize data calculation, storage, query and update, and therefore it is widely used.

[0004] However, since the hospital system operates 24 hours a day, any update error caused by this method will directly affect the normal operation of the medical system and cause a disruption to normal business. Summary of the Invention

[0005] The purpose of this application is to address the shortcomings of the prior art by providing a method, apparatus, device, and storage medium for upgrading a medical client, so as to solve the problem that if an update error occurs in the prior art, it will directly affect the normal operation of the medical system and cause the interruption of normal business.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0007] In a first aspect, one embodiment of this application provides a method for upgrading a medical client, applicable to any client device deployed with a hospital information system, the method comprising:

[0008] The upgrade configuration file of the hospital information system is obtained from the database. The upgrade configuration file includes: gray-scale upgrade instruction information and target upgrade requirement number.

[0009] If the grayscale upgrade indication information indicates that grayscale upgrade is enabled, then the target identification information of the storage process to be upgraded is determined according to the original identification information of the storage process to be upgraded and the target upgrade request number;

[0010] The target identifier information is invoked to retrieve the upgrade script corresponding to the stored procedure to be upgraded from the database.

[0011] Run the upgrade script to upgrade the stored procedure to be upgraded on the client.

[0012] Optionally, the upgrade configuration file may further include: client information to be upgraded;

[0013] If the gray-scale upgrade indication information indicates that a gray-scale upgrade is enabled, then based on the name of the original stored procedure corresponding to the client and the target upgrade request number, the information of the target stored procedure corresponding to the upgrade script is determined, including:

[0014] If the gray-scale upgrade indication information indicates that gray-scale upgrade is enabled, then determine whether the client's information has been pre-registered in the client information to be upgraded;

[0015] If so, the information of the target stored procedure corresponding to the upgrade script is determined based on the name of the original stored procedure corresponding to the client and the target upgrade request number.

[0016] Secondly, another embodiment of this application provides a method for upgrading a medical client, applied to the operation and maintenance equipment corresponding to a hospital information system, the method comprising:

[0017] Read the upgrade configuration file of the hospital information system, which includes: gray-scale upgrade instruction information and target upgrade requirement number;

[0018] Obtain the original identifier information of the stored procedure to be upgraded from the upgrade script corresponding to the stored procedure to be upgraded;

[0019] Based on the target upgrade request number and the original identification information, the target identification information of the stored procedure to be upgraded is generated;

[0020] Based on the target identification information, the original identification information in the upgrade script corresponding to the stored procedure to be upgraded is replaced with the target identification information;

[0021] The upgrade configuration file is sent to multiple clients under the hospital information system. The upgrade configuration file is used to enable any of the multiple clients to determine the target identification information of the stored procedure to be upgraded based on the target upgrade requirement number, the original identification information of the stored procedure to be upgraded, and the target upgrade requirement number when the gray-scale indication information indicates that gray-scale upgrade is enabled; and to call the target identification information to upgrade the stored procedure to be upgraded on the client.

[0022] Optionally, before generating the target identifier information of the stored procedure to be upgraded based on the target upgrade request number and the original identifier information, the method further includes:

[0023] Determine if the database contains identifier information in a preset format;

[0024] If it exists, determine whether the upgrade request number in the preset format identifier information is less than the target upgrade request number;

[0025] The step of generating target identifier information for the stored procedure to be upgraded based on the target upgrade request number and the original identifier information includes:

[0026] If the original upgrade request number is less than the target upgrade request number, then the target identifier information of the stored procedure to be upgraded is generated based on the target upgrade request number and the original identifier information.

[0027] Optionally, before obtaining the original identifier information corresponding to the stored procedure to be upgraded in the upgrade script, the method further includes:

[0028] Based on the target upgrade requirement number, a list of stored procedures corresponding to the target upgrade requirement number is obtained from the database. The list of stored procedures includes: an upgrade script for at least one of the stored procedures to be upgraded, and the original identification information of each of the stored procedures to be upgraded in each upgrade script.

[0029] Optionally, the method further includes:

[0030] If an upgrade failure message is received from the target client among the multiple clients, the parameter information in the upgrade configuration file is modified to obtain the modified target upgrade configuration file;

[0031] The target upgrade configuration file is sent to the target client, which enables the target client to roll back the stored procedure to be upgraded to the original stored procedure before the upgrade.

[0032] Optionally, generating the target identifier information of the stored procedure to be upgraded based on the target upgrade request number and the original identifier information includes:

[0033] The target upgrade request number and the original identification information are merged to obtain the target identification information of the stored procedure to be upgraded.

[0034] Thirdly, another embodiment of this application provides an upgrade device for a medical client, the device comprising: an acquisition module, a determination module, a calling module, and a running module, wherein:

[0035] The acquisition module is used to acquire an upgrade configuration file from the database corresponding to the hospital information system. The upgrade configuration file includes: gray-scale upgrade instruction information and target upgrade requirement number.

[0036] The determining module is used to determine the target identification information of the storage process to be upgraded based on the original identification information of the storage process to be upgraded and the target upgrade request number if the gray-scale upgrade indication information indicates that gray-scale upgrade is enabled.

[0037] The calling module invokes the target identification information to retrieve the upgrade script corresponding to the stored procedure to be upgraded from the database.

[0038] The running module is used to run the upgrade script to upgrade the stored procedure to be upgraded on the client.

[0039] Optionally, the upgrade configuration file further includes: client information to be upgraded; the determining module is specifically used to determine whether the client information is pre-registered in the client information to be upgraded if the gray-scale upgrade indication information indicates that gray-scale upgrade is enabled; if so, determine the target stored procedure information corresponding to the upgrade script based on the name of the original stored procedure corresponding to the client and the target upgrade requirement number.

[0040] Fourthly, another embodiment of this application provides an upgrade device for a medical client, applied to the operation and maintenance equipment corresponding to a hospital information system. The device includes: a reading module, an acquisition module, a generation module, a replacement module, and a sending module, wherein:

[0041] The reading module is used to read the upgrade configuration file of the hospital information system. The upgrade configuration file includes: gray-scale upgrade instruction information and target upgrade requirement number.

[0042] The acquisition module is used to acquire the original identification information of the stored procedure to be upgraded in the upgrade script corresponding to the stored procedure to be upgraded;

[0043] The generation module is used to generate target identification information for the stored procedure to be upgraded based on the target upgrade requirement number and the original identification information.

[0044] The replacement module is used to replace the original identifier information in the upgrade script corresponding to the stored procedure to be upgraded with the target identifier information according to the target identifier information;

[0045] The sending module is used to send the upgrade configuration file to multiple clients under the hospital information system. The upgrade configuration file is used to enable any of the multiple clients to determine the target identification information of the stored procedure to be upgraded based on the target upgrade requirement number, the original identification information of the stored procedure to be upgraded, and the target upgrade requirement number when the gray-scale indication information indicates that gray-scale upgrade is enabled; and to call the target identification information to upgrade the stored procedure to be upgraded on the client.

[0046] Optionally, the device further includes: a determining module and a judging module, wherein:

[0047] The determining module is used to determine whether there is identification information in a preset format in the database;

[0048] The judgment module is used to determine, if present, whether the upgrade requirement number in the preset format identifier information is less than the target upgrade requirement number;

[0049] The generation module is specifically used to generate target identification information for the stored procedure to be upgraded based on the target upgrade requirement number and the original identification information if the original upgrade requirement number is less than the target upgrade requirement number.

[0050] Optionally, the acquisition module is specifically used to acquire a list of stored procedures corresponding to the target upgrade requirement number from the database according to the target upgrade requirement number. The list of stored procedures includes: an upgrade script for at least one of the stored procedures to be upgraded, and the original identification information of each of the stored procedures to be upgraded corresponding to each of the upgrade scripts.

[0051] Optionally, the generation module is specifically used to modify the parameter information in the upgrade configuration file to obtain a modified target upgrade configuration file if it receives upgrade failure information sent by the target client among the plurality of clients.

[0052] The sending module is specifically used to send the target upgrade configuration file to the target client, and the target upgrade configuration file is used to enable the target client to roll back the stored procedure to be upgraded to the original stored procedure before the upgrade.

[0053] Optionally, the generation module is specifically used to merge the target upgrade request number and the original identification information to obtain the target identification information of the storage process to be upgraded.

[0054] Fifthly, another embodiment of this application provides a client device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the client device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of any of the methods described in the first aspect above.

[0055] In a sixth aspect, another embodiment of this application provides an operation and maintenance device, including: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the operation and maintenance device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of any of the methods described in the second aspect above.

[0056] In a seventh aspect, another embodiment of this application provides a storage medium storing a computer program, which, when executed by a processor, performs the steps of any of the methods described in the first aspect above.

[0057] The beneficial effects of this application are as follows: By adopting the medical client upgrade method provided in this application, during the routine upgrade of the hospital information system, a canary upgrade method can be used to upgrade only one or a few clients deployed with the hospital information system at a time. After the database upgrade is completed, the client corresponding to the canary upgrade determines the target upgrade requirement number according to the upgrade configuration file in the database, and determines the target identification information of the stored procedure to be upgraded according to the original identification information of the stored procedure to be upgraded and the target upgrade requirement number. Then, based on the target identification information, the upgrade script of the stored procedure to be upgraded corresponding to the target identification information is called from the database, and the upgrade of the stored procedure to be upgraded on the client is realized by running the upgrade script. This canary upgrade method ensures partial upgrades. Even if there is an anomaly in this upgrade, it will not affect the normal use of other clients, avoiding the problem of normal business interruption caused by upgrades. Attached Figure Description

[0058] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0059] Figure 1 A flowchart illustrating a method for upgrading a medical client according to an embodiment of this application;

[0060] Figure 2 A flowchart illustrating a method for upgrading a medical client according to another embodiment of this application;

[0061] Figure 3 A flowchart illustrating a method for upgrading a medical client according to another embodiment of this application;

[0062] Figure 4 A flowchart illustrating a method for upgrading a medical client according to another embodiment of this application;

[0063] Figure 5 A schematic diagram of the structure of an upgrade device for a medical client provided in an embodiment of this application;

[0064] Figure 6 A schematic diagram of the structure of an upgrade device for a medical client provided in another embodiment of this application;

[0065] Figure 7 A schematic diagram of the structure of an upgrade device for a medical client provided in another embodiment of this application;

[0066] Figure 8 This is a schematic diagram of the structure of an upgrade device for a medical client provided in one embodiment of this application. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.

[0068] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0069] Furthermore, the flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed in order or performed simultaneously. Moreover, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0070] To facilitate understanding of the embodiments of this application, some terms involved in this application are explained below:

[0071] A stored procedure (SP) is a set of SQL statements designed to perform a specific function in a large database system. It is stored in the database, compiled once, and remains valid indefinitely. Users execute it by specifying the stored procedure's name and providing parameters (if the stored procedure has parameters). Stored procedures are an important object in a database. When dealing with extremely large amounts of data, using stored procedures can achieve significant efficiency improvements.

[0072] Hospital Information System (HIS): This refers to an information system that uses modern means such as computer hardware and software technology and network communication technology to comprehensively manage the flow of people, materials, and finances of a hospital and its departments. It collects, stores, processes, extracts, transmits, and summarizes data generated at each stage of medical activities, and processes it into various types of information, thereby providing comprehensive automated management and various services for the overall operation of the hospital.

[0073] The following explanation, using several specific application examples, illustrates a method for upgrading a medical client provided in this application. Figure 1 This application provides a flowchart illustrating a method for upgrading a medical client according to an embodiment of the present application. This method is applicable to any client device deployed with a hospital information system, such as... Figure 1 As shown, the method includes:

[0074] S101: Retrieve the upgrade configuration file from the corresponding database of the hospital information system.

[0075] The upgrade configuration file includes: gray-scale upgrade instruction information and target upgrade request number.

[0076] In the embodiments of this application, the database may store scripts corresponding to multiple stored procedures. Some of the script identification information of the stored procedures may include an upgrade request number. The upgrade request numbers included in the script identification information of each stored procedure may be different. For example, the current database may include scripts corresponding to four stored procedures. The script identification information of each script is as follows: SP1-request number 1, SP2-request number 1, SP1-request number 2, and SP2-request number 2. It can be seen that the current database stores scripts corresponding to SP1 and SP2 respectively, and each stored procedure corresponds to two scripts. However, the scripts of the same stored procedure can be distinguished based on the request number.

[0077] S102: If the gray-scale upgrade instruction information indicates that gray-scale upgrade is enabled, then the target identification information of the storage procedure to be upgraded is determined according to the original identification information of the storage procedure to be upgraded and the target upgrade requirement number.

[0078] If the gray-scale upgrade indicator is enabled, it means that the current upgrade mode is gray-scale upgrade mode, and the upgrade will only be performed on a portion of the clients. If the gray-scale upgrade indicator is disabled, it means that the current upgrade mode is normal upgrade mode, and the upgrade will be performed on all clients.

[0079] In one embodiment of this application, after obtaining the target upgrade request number, the client can uniquely determine the target identifier information of the stored procedure to be upgraded based on the original identifier information of the stored procedure to be upgraded and the target upgrade request number.

[0080] In one embodiment of this application, the target identification information of the stored procedure to be upgraded is the name information of the stored procedure to be upgraded. The method for determining the target identification information of the stored procedure to be upgraded can be, for example, merging the original identification information of the stored procedure to be upgraded and the target upgrade requirement number, and using the merged result as the target identification information of the stored procedure to be upgraded.

[0081] Taking the current database as an example, which may contain scripts corresponding to 4 stored procedures, with script identification information for each script as SP1-requirement number 1, SP2-requirement number 1, SP1-requirement number 2, and SP2-requirement number 2 respectively, if the original identification information of the stored procedure to be upgraded is SP1 and the target upgrade requirement number is requirement number 1, then the target identification information of the stored procedure to be upgraded can be uniquely determined in the database as SP1-requirement number 1.

[0082] S103: Call the target identification information and retrieve the upgrade script corresponding to the stored procedure to be upgraded from the database.

[0083] In the embodiments of this application, after uniquely determining the target identification information, the script corresponding to the target identification information can be matched in the database as the upgrade script, that is, the script corresponding to SP1-requirement number 1 is determined to be the upgrade script.

[0084] S104: Run the upgrade script to upgrade the stored procedure to be upgraded on the client.

[0085] In one embodiment of this application, if a failure occurs during the execution of the upgrade script, the updated target upgrade configuration file sent by the maintenance equipment is obtained. The target upgrade configuration file is obtained by modifying the parameter information in the upgrade configuration file. When the client receives the target upgrade configuration file, it can roll back the stored procedure to be upgraded to the original stored procedure before the upgrade, so that even if the upgrade fails or a failure occurs, it will not affect the normal use of the client.

[0086] The upgrade method for medical clients provided in this application allows for a phased upgrade approach during routine upgrades of hospital information systems. This involves upgrading only one or a few clients deployed with the hospital information system at a time. After the database upgrade is complete, the client corresponding to the phased upgrade determines the target upgrade request number based on the upgrade configuration file in the database. It then determines the target identifier information of the stored procedure to be upgraded based on its original identifier information and the target upgrade request number. Finally, it retrieves the upgrade script for the corresponding stored procedure from the database and executes the upgrade script to upgrade the client's stored procedure. This phased upgrade method ensures partial upgrades; even if an anomaly occurs during the upgrade, it will not affect the normal use of other clients, avoiding business interruptions caused by upgrades.

[0087] Optionally, based on the above embodiments, this application embodiment can also provide a method for upgrading a medical client. The implementation process of determining the information of the target stored procedure in the above method is illustrated below with reference to the accompanying drawings. Figure 2 This is a flowchart illustrating a method for upgrading a medical client according to another embodiment of this application. The upgrade configuration file further includes: client information to be upgraded; such as... Figure 2 As shown, S102 may include:

[0088] S111: If the gray-scale upgrade instruction indicates that gray-scale upgrade is enabled, then determine whether the client's information has been pre-registered in the client information to be upgraded.

[0089] In embodiments of this application, the client information to be upgraded may be, for example, the physical address (Media Access Control Address, MAC) corresponding to at least one client to be upgraded in a gray-scale manner.

[0090] One possible method is for the client to obtain the client information to be upgraded, and then compare the current client's MAC address with all the MAC addresses in the client information to be upgraded. If the current client's MAC address is included in all the MAC addresses in the client information to be upgraded, then the current client's information is pre-registered in the client information to be upgraded; otherwise, the current client's information is not pre-registered in the client information to be upgraded.

[0091] If so, then the current client is determined to be the client that needs to be upgraded in a phased manner, and S112 is executed.

[0092] S112: Determine the information of the target stored procedure corresponding to the upgrade script based on the name of the original stored procedure corresponding to the client and the target upgrade request number.

[0093] If the current client's information is not pre-registered in the client information to be upgraded, it means that the current client does not need to be upgraded in a canary manner. In this case, the original stored procedure corresponding to the current client will continue to be called.

[0094] In the embodiments of this application, for example, after all the clients to be upgraded in the current upgrade configuration file have been upgraded successfully and are running stably, the number of clients in the upgrade configuration file can be gradually increased until all client devices with the hospital information system deployed have been upgraded, thereby achieving a stable upgrade of all client devices with the hospital information system deployed.

[0095] In one embodiment of this application, to reduce storage pressure in the database, after a successful gray-scale upgrade, the script corresponding to the gray-scale upgrade in the database can be deleted, and the official script corresponding to the gray-scale upgrade can be deployed. For example, if the stored procedure to be upgraded is SP1, and the requirement number is requirement number 1, and the script identifier information of each script included in the current database is SP1-requirement number 1, SP2, and SP1 respectively, then after the script corresponding to SP1-requirement number 1 runs successfully, the script corresponding to SP1-requirement number 1 can be deleted, and the official script corresponding to SP1 can be redeployed in the database. The redeployed official script of SP1 will overwrite the original script data corresponding to SP1 in the database; that is, under normal circumstances, the database will only include the gray-scale upgrade scripts corresponding to each stored procedure and the official scripts corresponding to each stored procedure. To reduce storage pressure in the database, after the gray-scale upgrade scripts corresponding to each stored procedure have been successfully upgraded and run stably, the official scripts corresponding to the gray-scale upgrade scripts can be deployed and run, and the gray-scale upgrade scripts can be deleted.

[0096] The upgrade method for the medical client provided in this application regenerates the corresponding gray-scale upgrade script before the gray-scale upgrade, eliminating the need to focus on gray-scale upgrades during product design, development, and testing. Normal development of the stored procedure is sufficient, making the upgrade method simple and feasible, and reducing development costs. Furthermore, this application uses both parameter control and file configuration to control whether to initiate gray-scale upgrades, preventing accidental activation of the new program due to accidental opening of the switch or copying of configuration files. The method provided in this application is simple to deploy, requires minimal technical expertise from operators, and is highly executable. Additionally, if an upgrade fails during the gray-scale upgrade process, only parameter modifications or configuration file changes are needed to revert to the script program corresponding to the stored procedure before the upgrade, resulting in a fast rollback.

[0097] The following explanation, using several specific application examples, illustrates a method for upgrading a medical client provided in this application. Figure 3This application provides a flowchart illustrating a method for upgrading a medical client according to an embodiment of the present application. This method is applicable to any maintenance device deployed with a hospital information system, such as... Figure 3 As shown, the method includes:

[0098] S201: Read the upgrade configuration file of the hospital information system.

[0099] The upgrade configuration file includes: gray-scale upgrade instruction information and target upgrade request number.

[0100] The upgrade configuration file is pre-configured by the operations and maintenance personnel. The upgrade configuration file includes relevant information for this upgrade. The gray-scale upgrade indicator is used to indicate whether the gray-scale upgrade process is enabled for this upgrade. If enabled, only some clients with the hospital information system deployed will be upgraded. If not enabled, all clients with the hospital information system deployed will be upgraded. The target upgrade requirement number is the requirement number for this upgrade.

[0101] In the embodiments of this application, if the current gray-scale upgrade indication information is enabled, it is also necessary to set the identification information of the client corresponding to the target upgrade requirement number in the upgrade configuration file, such as the client's MAC address information.

[0102] S202: Obtain the original identifier information of the stored procedure to be upgraded from the upgrade script corresponding to the stored procedure to be upgraded.

[0103] In this process, the maintenance personnel prepare an upgrade script with the upgrade stored procedure in advance. The upgrade script of the stored procedure to be upgraded includes the identification information corresponding to the stored procedure to be upgraded. At this time, the identification information is the original identification information of the stored procedure to be upgraded.

[0104] In one embodiment of this application, before obtaining the original identification information corresponding to the stored procedure to be upgraded, for example, a list of stored procedures corresponding to the target upgrade requirement number can be obtained from the database based on the target upgrade requirement number. The list of stored procedures includes: an upgrade script for at least one stored procedure to be upgraded, and the original identification information of each stored procedure to be upgraded corresponding to each upgrade script; that is, one upgrade may correspond to the need to upgrade multiple stored procedures to be upgraded, and in this case, it is necessary to obtain the original identification information of each stored procedure to be upgraded separately.

[0105] S203: Generate the target identifier information of the stored procedure to be upgraded based on the target upgrade requirement number and the original identifier information.

[0106] In the embodiments of this application, the target identification information can be generated in a way that, for example, merges the target upgrade request number and the original identification information to obtain the target identification information of the stored procedure to be upgraded.

[0107] In the embodiments of this application, if an upgrade corresponds to the upgrade of multiple storage procedures to be upgraded, then it is necessary to generate target identification information for each storage procedure to be upgraded based on the upgrade request number and the original identification information of each storage procedure to be upgraded.

[0108] S204: Based on the target identifier information, replace the original identifier information in the upgrade script corresponding to the stored procedure to be upgraded with the target identifier information.

[0109] In the embodiments of this application, if an upgrade corresponds to the upgrade of multiple stored procedures to be upgraded, the original identification information in the upgrade script corresponding to each stored procedure to be upgraded is replaced with the target identification information corresponding to each stored procedure to be upgraded.

[0110] In some possible implementations, the method of reading the upgrade script is illustrated using C#. Since the content of the upgrade script may generally be large, the stream method can be used. The original identification information in the upgrade script is replaced with the target identification information using the ReadLine() method, and then written into the new upgrade script using the WriteLine(s) method.

[0111] In some possible embodiments, nested stored procedures may exist during the process of replacing the original identifier information. In this case, it is necessary to determine whether the nested stored procedure to be upgraded is in the upgrade list. If it is in the stored procedure list, the original identifier information of the stored procedure to be upgraded in the storage list will be replaced with the target identifier information.

[0112] In the embodiments of this application, after the replacement is completed, the time when the original identifier information of the stored procedure to be upgraded is updated needs to be written into the log table.

[0113] S205: Send upgrade configuration files to multiple clients in the hospital information system.

[0114] The upgrade configuration file is used to enable any client among multiple clients to determine the target identifier information of the stored procedure to be upgraded based on the target upgrade request number and the original identifier information and target upgrade request number of the stored procedure to be upgraded, when the gray-scale indicator information indicates that gray-scale upgrade is enabled; and to upgrade the client's stored procedure to be upgraded by calling the target identifier information.

[0115] The above method is Figure 1 The beneficial effects brought about by the corresponding method are as follows: (1) The method is executed by the equipment on the other side, i.e., the maintenance equipment. Figure 1 The corresponding methods bring the same beneficial effects, which will not be elaborated here.

[0116] Optionally, based on the above embodiments, this application embodiment may also provide a method for upgrading a medical client, and the implementation process of the above method will be illustrated below with reference to the accompanying drawings. Figure 3 A flowchart illustrating a method for upgrading a medical client, as provided in another embodiment of this application, is shown below. Figure 3 As shown, before S103, the method may further include:

[0117] S211: Determine whether the database contains identification information in a preset format.

[0118] Taking the example that the database only includes the scripts for gray-scale upgrades corresponding to each stored procedure and the official scripts corresponding to each stored procedure, the preset format in the embodiments of this application can be, for example, the form of identification information + stored procedure, or the form of stored procedure + identification information. The specific design method of the preset format can be flexibly adjusted according to the user's needs and is not limited to the above embodiments.

[0119] S212: Determine whether the upgrade requirement number in the preset format identification information is less than the target upgrade requirement number.

[0120] If the database contains identifiers in a pre-defined format, it indicates that a script for a canary upgrade corresponding to a stored procedure exists in the database. In this case, it's necessary to determine whether the canary upgrade scripts corresponding to each stored procedure in the database are the latest versions. This is done by checking if the upgrade request number in the pre-defined identifier is less than the target upgrade request number. If it is less, it means the script corresponding to the pre-defined identifier in the database is a previous canary upgrade script, not the latest version, and the script for this canary upgrade needs to be deployed in the database. If it is equal, it means the script for this canary upgrade already exists in the database, and there's no need to deploy it.

[0121] Correspondingly, S103 may include:

[0122] S213: If the original upgrade request number is less than the target upgrade request number, then the target identifier information of the stored procedure to be upgraded is generated based on the target upgrade request number and the original identifier information.

[0123] Optionally, based on the above embodiments, this application embodiment may also provide a method for upgrading a medical client, and the implementation process of the above method will be illustrated below with reference to the accompanying drawings. Figure 4 A flowchart illustrating a method for upgrading a medical client, as provided in another embodiment of this application, is shown below. Figure 4 As shown, the method may further include:

[0124] S221: If an upgrade failure message is received from the target client among multiple clients, modify the parameter information in the upgrade configuration file to obtain the modified target upgrade configuration file.

[0125] S222: Send the target upgrade configuration file to the target client. The target upgrade configuration file is used to enable the target client to roll back the stored procedure to be upgraded to the original stored procedure before the upgrade.

[0126] In the embodiments of this application, after the gray-scale upgrade is completed, when the program is run on the client corresponding to the gray-scale upgrade, the program corresponding to the upgraded stored procedure is used, while other clients still use the program corresponding to the stored procedure before the upgrade.

[0127] After the client corresponding to the gray-scale upgrade is successfully upgraded and running stably, the number of clients corresponding to the gray-scale upgrade can be gradually increased until all clients under the hospital information system are upgraded. After all clients are upgraded, the script corresponding to the gray-scale upgrade in the database can be deleted, and the official script corresponding to the gray-scale upgrade can be deployed, thereby reducing the storage pressure on the database.

[0128] The beneficial effects of the above methods and Figures 1-2 The beneficial effects of the provided methods are the same, and will not be repeated here.

[0129] The following description, in conjunction with the accompanying drawings, explains the upgrade device for the medical client provided in this application. This upgrade device can perform the above-described... Figures 1-2 The specific implementation and beneficial effects of upgrading any medical client are described above and will not be repeated below.

[0130] Figure 5 A schematic diagram of the structure of an upgrade device for a medical client provided in an embodiment of this application is shown below. Figure 5 As shown, the device includes: an acquisition module 301, a determination module 302, a calling module 303, and a running module 304, wherein:

[0131] The acquisition module 301 is used to obtain the upgrade configuration file from the corresponding database of the hospital information system. The upgrade configuration file includes: gray-scale upgrade instruction information and target upgrade requirement number.

[0132] The determination module 302 is used to determine the target identification information of the storage procedure to be upgraded based on the original identification information and the target upgrade requirement number of the storage procedure to be upgraded if the gray-scale upgrade indication information indicates that gray-scale upgrade is enabled.

[0133] Module 303 is invoked to retrieve the target identification information and obtain the upgrade script corresponding to the stored procedure to be upgraded from the database.

[0134] Run module 304 to run the upgrade script to upgrade the stored procedure to be upgraded on the client.

[0135] Optionally, the upgrade configuration file also includes: client information to be upgraded; and a determination module 302, specifically used to determine whether the client information is pre-registered in the client information to be upgraded if the gray-scale upgrade instruction information indicates that gray-scale upgrade is enabled; if so, to determine the information of the target stored procedure corresponding to the upgrade script based on the name of the original stored procedure corresponding to the client and the target upgrade requirement number.

[0136] The following description, in conjunction with the accompanying drawings, explains the upgrade device for the medical client provided in this application. This upgrade device can perform the above-described... Figures 3-4 The specific implementation and beneficial effects of upgrading any medical client are described above and will not be repeated below.

[0137] Figure 6 A schematic diagram of the structure of an upgrade device for a medical client provided in an embodiment of this application is shown below. Figure 6 As shown, the device is an operation and maintenance equipment applied to a hospital information system. The device includes: a reading module 401, an acquisition module 402, a generation module 403, a replacement module 404, and a sending module 405, wherein:

[0138] The reading module 401 is used to read the upgrade configuration file of the hospital information system. The upgrade configuration file includes: gray-scale upgrade instruction information and target upgrade requirement number.

[0139] The acquisition module 402 is used to acquire the original identification information of the stored procedure to be upgraded in the upgrade script corresponding to the stored procedure to be upgraded;

[0140] The generation module 403 is used to generate target identification information of the stored procedure to be upgraded based on the target upgrade requirement number and the original identification information.

[0141] Replacement module 404 is used to replace the original identifier information in the upgrade script corresponding to the stored procedure to be upgraded with the target identifier information based on the target identifier information;

[0142] The sending module 405 is used to send upgrade configuration files to multiple clients under the hospital information system. The upgrade configuration files enable any client among the multiple clients to determine the target identification information of the stored procedure to be upgraded based on the target upgrade requirement number and the original identification information and target upgrade requirement number of the stored procedure to be upgraded, when the gray-scale indication information indicates that gray-scale upgrade is enabled; and to upgrade the stored procedure to be upgraded on the client by calling the target identification information.

[0143] Optionally, based on the above embodiments, this application embodiment may also provide an upgrade device for a medical client, as described below with reference to the accompanying drawings. Figure 6 The implementation process of the given device is illustrated with examples. Figure 7 A schematic diagram of the structure of an upgrade device for a medical client provided in another embodiment of this application is shown below. Figure 7 As shown, the device further includes: a determining module 406 and a judging module 407, wherein:

[0144] The determination module 406 is used to determine whether there is a preset format of identification information in the database;

[0145] The judgment module 407 is used to determine, if it exists, whether the upgrade requirement number in the preset format identification information is less than the target upgrade requirement number;

[0146] The generation module 403 is specifically used to generate target identification information for the stored procedure to be upgraded based on the target upgrade requirement number and the original identification information if the original upgrade requirement number is less than the target upgrade requirement number.

[0147] Optionally, the acquisition module 402 is specifically used to obtain a list of stored procedures corresponding to the target upgrade requirement number from the database based on the target upgrade requirement number. The list of stored procedures includes: an upgrade script for at least one stored procedure to be upgraded, and the original identification information of each stored procedure to be upgraded in each upgrade script.

[0148] Optionally, the generation module 403 is specifically used to modify the parameter information in the upgrade configuration file to obtain the modified target upgrade configuration file if an upgrade failure information is received from the target client among multiple clients.

[0149] The sending module 405 is specifically used to send the target upgrade configuration file to the target client. The target upgrade configuration file is used to enable the target client to roll back the stored procedure to be upgraded to the original stored procedure before the upgrade.

[0150] Optionally, the generation module 403 is specifically used to merge the target upgrade requirement number and the original identification information to obtain the target identification information of the stored procedure to be upgraded.

[0151] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.

[0152] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).

[0153] Figure 8 This is a schematic diagram of the structure of an upgrade device for a medical client provided in an embodiment of this application. The upgrade device for the medical client can be integrated into a terminal device or a chip of a terminal device; wherein, the upgrade device can be a client device or an operation and maintenance device.

[0154] like Figure 8 As shown, the upgrade device for the medical client includes: processor 501, bus 502 and storage medium 503.

[0155] The processor 501 is used to store programs, and the processor 501 calls the programs stored in the storage medium 503.

[0156] If the upgrade device is a client device, then processor 501 will execute the above. Figures 1-2 The corresponding method implementation is similar in both implementation and technical effect, and will not be described in detail here.

[0157] If the upgrade device is a maintenance device, then processor 501 will execute the above. Figures 3-4 The corresponding method implementation is similar in both implementation and technical effect, and will not be described in detail here.

[0158] Optionally, this application also provides a program product, such as a storage medium storing a computer program, including a program that executes the embodiments corresponding to the above-described methods when run by a processor.

[0159] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0160] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0161] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0162] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for upgrading a medical client, characterized in that, The method, applicable to any client device deployed with a hospital information system, includes: The system receives an upgrade configuration file sent by the maintenance equipment corresponding to the hospital information system. The upgrade configuration file includes: gray-scale upgrade instruction information and target upgrade requirement number. The upgrade configuration file is generated by the maintenance equipment reading the upgrade configuration file, obtaining the original identification information of the storage process to be upgraded in the upgrade script corresponding to the storage process to be upgraded, generating target identification information of the storage process to be upgraded based on the target upgrade requirement number and the original identification information, and replacing the original identification information in the upgrade script corresponding to the storage process to be upgraded with the target identification information before sending it to the client device. If the grayscale upgrade indication information indicates that grayscale upgrade is enabled, then the target identification information is determined based on the original identification information and the target upgrade request number; The target identifier information is invoked to retrieve the upgrade script corresponding to the stored procedure to be upgraded from the database. Run the upgrade script to upgrade the stored procedure to be upgraded on the client device.

2. The method as described in claim 1, characterized in that, The upgrade configuration file also includes: information about the client to be upgraded; If the grayscale upgrade indication information indicates that a grayscale upgrade is enabled, then the target identification information is determined based on the original identification information and the target upgrade request number, including: If the gray-scale upgrade indication information indicates that gray-scale upgrade is enabled, then determine whether the information of the client device has been pre-registered in the client information to be upgraded; If so, the target identification information is determined based on the original identification information and the target upgrade requirement number.

3. A method for upgrading a medical client, characterized in that, The method, applied to maintenance equipment corresponding to a hospital information system, includes: Read the upgrade configuration file of the hospital information system, which includes: gray-scale upgrade instruction information and target upgrade requirement number; Obtain the original identifier information of the stored procedure to be upgraded from the upgrade script corresponding to the stored procedure to be upgraded; Based on the target upgrade request number and the original identification information, the target identification information of the stored procedure to be upgraded is generated; Based on the target identification information, replace the original identification information in the upgrade script corresponding to the stored procedure to be upgraded with the target identification information; The upgrade configuration file is sent to multiple client devices under the hospital information system. The upgrade configuration file is used to enable any of the multiple client devices to determine the target identification information based on the original identification information and the target upgrade requirement number when the gray-scale upgrade instruction information indicates that gray-scale upgrade is enabled; and to call the target identification information to upgrade the stored procedure to be upgraded on the client device.

4. The method as described in claim 3, characterized in that, Before generating the target identifier information of the stored procedure to be upgraded based on the target upgrade request number and the original identifier information, the method further includes: Determine if the database contains identifier information in a preset format; If it exists, determine whether the original upgrade request number in the preset format identifier information is less than the target upgrade request number; The step of generating target identifier information for the stored procedure to be upgraded based on the target upgrade request number and the original identifier information includes: If the original upgrade request number is less than the target upgrade request number, then the target identifier information of the stored procedure to be upgraded is generated based on the target upgrade request number and the original identifier information.

5. The method as described in claim 3, characterized in that, Before obtaining the original identifier information corresponding to the stored procedure to be upgraded in the upgrade script, the method further includes: Based on the target upgrade requirement number, a list of stored procedures corresponding to the target upgrade requirement number is obtained from the database. The list of stored procedures includes: an upgrade script for at least one of the stored procedures to be upgraded, and the original identification information of each of the stored procedures to be upgraded in each upgrade script.

6. The method as described in claim 3, characterized in that, The method further includes: If an upgrade failure message is received from the target client device among the plurality of client devices, the parameter information in the upgrade configuration file is modified to obtain the modified target upgrade configuration file; The target upgrade configuration file is sent to the target client device, which enables the target client device to roll back the stored procedure to be upgraded to the original stored procedure before the upgrade.

7. The method as described in claim 3, characterized in that, The step of generating target identifier information for the stored procedure to be upgraded based on the target upgrade request number and the original identifier information includes: The target upgrade request number and the original identification information are merged to obtain the target identification information of the stored procedure to be upgraded.

8. A client device, characterized in that, The client device includes a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the client device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the method described in claim 1 or 2.

9. A maintenance equipment, characterized in that, The maintenance equipment includes a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the maintenance equipment is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the method described in any one of claims 3-7.

10. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the method described in any one of claims 1-7.

Citation Information

Patent Citations

  • Low-downtime and zero-downtime upgrades of database-centric applications

    US20080098046A1