Engine server update methods, devices, electronic equipment, and storage media
By setting up first and second knowledge dictionaries in the engine server and scanning and updating them within a set period, the problem of conflicting medical orders caused by clinicians ignoring medical record information is solved. This enables efficient updating and accurate querying of knowledge entities, improving user experience and medical safety.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2022-11-29
- Publication Date
- 2026-06-30
AI Technical Summary
When reviewing patient medical records, clinicians may overlook certain diseases, symptoms, or medications, leading to conflicts in medical orders. These conflicts require quick correction based on a wealth of existing knowledge to avoid errors.
Set up first and second knowledge dictionaries in the engine server, and scan and update them within a set period. After the period is reached, switch positions and update again. Use mutex locks to ensure access stability and use inverted indexes to quickly query conflicting knowledge pairs.
It improves the timeliness and accuracy of knowledge entity updates, reduces query errors, and enhances user experience and the safety of medical procedures.
Smart Images

Figure CN115827654B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence, specifically to technologies such as intelligent search and AI healthcare, and in particular to a method, apparatus, electronic device, and storage medium for updating an engine server. Background Technology
[0002] When reviewing patient medical records, clinicians may overlook certain diseases, symptoms, or medications, leading to conflicting prescriptions. It is crucial to quickly revise physician decisions based on extensive existing knowledge to avoid errors. Summary of the Invention
[0003] This disclosure provides a method, apparatus, electronic device, and storage medium for updating an engine server.
[0004] According to a first aspect of this disclosure, an engine server update method is provided, comprising: scanning for update requests of knowledge entities of the engine server within a set period, wherein the engine server includes a first knowledge dictionary stored in the backend and a second knowledge dictionary stored in the frontend, both the first and second knowledge dictionaries including knowledge entities for detecting the engine; updating the first knowledge dictionary based on update requests within the set period, and switching the updated first and second knowledge dictionaries in position after the set period expires; and updating the second knowledge dictionary switched to the backend based on update requests within the set period.
[0005] According to a second aspect of this disclosure, an engine server update apparatus is provided, comprising: a scanning module for scanning update requests for knowledge entities of the engine server within a set period, wherein the engine server includes a first knowledge dictionary stored in the backend and a second knowledge dictionary stored in the frontend, both the first and second knowledge dictionaries including knowledge entities for detecting the engine; a switching module for updating the first knowledge dictionary based on update requests within the set period, and switching the updated first and second knowledge dictionaries in position after the set period has elapsed; and an update module for updating the second knowledge dictionary switched to the backend based on update requests within the set period.
[0006] According to a third aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the engine server update method described in one aspect of the above embodiment.
[0007] According to a fourth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein computer programs / instructions are stored thereon for causing the computer to execute the engine server update method described in one aspect of the above-described embodiment.
[0008] According to a fifth aspect of this disclosure, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the engine server update method described in one aspect of the above-described embodiments.
[0009] Therefore, by setting up a first knowledge dictionary and a second knowledge dictionary in the engine server and periodically checking and updating them, the real-time update of knowledge entities can be improved. At the same time, the accuracy of reading knowledge entities can be increased, thus improving the user experience.
[0010] Beneficial effects: By periodically scanning and updating the engine server, which is equipped with the first and second knowledge dictionaries, the timeliness and accuracy of knowledge entity updates can be improved, ensuring the accuracy of queries on the engine server and enhancing the user experience.
[0011] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0012] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0013] Figure 1 A flowchart illustrating an engine server update method provided in an embodiment of this disclosure;
[0014] Figure 2 A flowchart illustrating another engine server update method provided in this embodiment of the disclosure;
[0015] Figure 3 A flowchart illustrating another engine server update method provided in this embodiment of the disclosure;
[0016] Figure 4 A flowchart illustrating another engine server update method provided in this embodiment of the disclosure;
[0017] Figure 5 A flowchart illustrating another engine server update method provided in this embodiment of the disclosure;
[0018] Figure 6A schematic diagram of the structure of an engine server update device provided in an embodiment of this disclosure;
[0019] Figure 7 This is a block diagram of an electronic device for an engine server update method according to an embodiment of the present disclosure. Detailed Implementation
[0020] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0021] The following description, with reference to the accompanying drawings, outlines an engine server update method, apparatus, and electronic device according to embodiments of the present disclosure.
[0022] Artificial intelligence (AI) is the study of enabling computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, and planning). It involves both hardware and software technologies. AI hardware technologies generally include computer vision, speech recognition, natural language processing, and related technologies such as deep learning, big data processing, and knowledge graphs.
[0023] Intelligent search is a new generation of search engine that combines artificial intelligence technology. In addition to providing traditional functions such as fast retrieval and relevance ranking, it can also provide functions such as user role registration, automatic identification of user interests, semantic understanding of content, intelligent information filtering and push.
[0024] AI in healthcare relies on the internet, utilizing infrastructure development and data collection to apply artificial intelligence technology and big data services to the healthcare industry. This improves diagnostic efficiency and service quality, better addressing issues such as healthcare resource shortages and an aging population. According to authoritative definitions, it can be simplified as "AI + Healthcare," a phenomenon where AI technology empowers applications in healthcare-related fields. Specifically, AI is particularly suitable for medical imaging diagnosis, chronic disease management and lifestyle guidance, disease screening and pathological research, drug development, and helps bridge the gap between genotype and phenotype in precision medicine.
[0025] Figure 1 This is a flowchart illustrating an engine server update method provided in an embodiment of the present disclosure.
[0026] like Figure 1As shown, the update method for this engine server may include:
[0027] S101, within a set period, scan the knowledge entity update requests of the engine server. The engine server includes a first knowledge dictionary stored in the backend and a second knowledge dictionary stored in the frontend. Both the first and second knowledge dictionaries include the knowledge entities of the detection engine.
[0028] In this embodiment, the engine server is a cloud server. Update requests can be sent to the engine server via terminal devices, and the engine server performs update operations based on these requests. Terminal devices include, but are not limited to, mobile phones, computers, and smart voice interaction devices. The engine server has a knowledge entity management platform. The terminal device can connect to the engine server and manage and update knowledge entities within the knowledge entity management platform by generating update requests.
[0029] Since the knowledge entities in the engine server are in a scenario where they are frequently read but only occasionally accessed, they need to be updated in a timely manner to ensure the accuracy and timeliness of the reading.
[0030] In this embodiment, a first knowledge dictionary and a second knowledge dictionary can be set in the engine server. When accessing the server, only the knowledge dictionary located at the front end is accessed. During updates, it is necessary to ensure that the knowledge entities at the front end are updated first, and then the knowledge entities at the back end are updated. It should be noted that the knowledge entities in the first knowledge dictionary and the knowledge entities in the second dictionary are the same knowledge entities.
[0031] The knowledge entities in this embodiment are pre-defined and can be a collection of knowledge points in a specific domain. Taking the medical field as an example, this knowledge entity can be a database of medical knowledge built around a disease. This database can cover multiple areas of medicine, such as medical diagnostic tests, medications, food, and disease symptoms. Through these knowledge entities, it is possible to accurately determine whether there are conflicts or risks related to the patient's subsequent treatment, such as the medical procedures required or the use of reusable medications.
[0032] Update requests can contain a variety of content, such as adding new knowledge points, changing old knowledge points, or deleting incorrect knowledge points; there are no restrictions on this.
[0033] It should be noted that the setting period in this embodiment is pre-set and can be changed according to actual design needs; no limitation is made here. For example, the setting period can be 0.1 seconds.
[0034] S102, the first knowledge dictionary is updated based on the update request within a set period, and the positions of the updated first knowledge dictionary and the second knowledge dictionary are switched after the set period is reached.
[0035] It should be noted that within a set period, there may be or may not be an update request for the first knowledge dictionary.
[0036] If there are no update requests for the first knowledge dictionary, there is no need to switch the positions of the first and second knowledge dictionaries. Continue checking for update requests in the next set period.
[0037] If an update request is detected, after updating the first knowledge dictionary, the updated first knowledge dictionary and the second knowledge dictionary are swapped. After the swap, the first knowledge dictionary is located at the front end, and the second knowledge dictionary is located at the back end. At this time, the knowledge entities in the second knowledge dictionary are still the unupdated content.
[0038] S103, update the second knowledge dictionary switched to the backend based on update requests within a set period.
[0039] After switching the updated first and second knowledge dictionaries, the system will switch to the second knowledge dictionary on the backend for updating, based on the update request. This completes the update, at which point the knowledge entities in both the first and second knowledge dictionaries will contain the updated content.
[0040] In this embodiment, the engine server first scans for update requests of knowledge entities within a set period. The engine server includes a first knowledge dictionary stored in the backend and a second knowledge dictionary stored in the frontend. Both the first and second knowledge dictionaries include the knowledge entities to be detected. Then, the first knowledge dictionary is updated based on update requests within the set period. After the set period expires, the updated first and second knowledge dictionaries are switched positions. Finally, the second knowledge dictionary, now in the backend, is updated based on update requests within the set period. Therefore, by periodically scanning and updating the engine server containing the first and second knowledge dictionaries, the timeliness and accuracy of knowledge entity updates can be improved, ensuring the accuracy of queries on the engine server and enhancing the user experience.
[0041] In this embodiment of the disclosure, the update requests for knowledge entities on the engine server are scanned within a set period. This can be achieved by scanning requests sent by web browsers and / or clients through corresponding update threads. This allows for more efficient acquisition of update requests, while simultaneously improving the efficiency of users acquiring and updating knowledge entities.
[0042] In the above embodiments, when accessing the engine server, the content in the knowledge dictionary is read, and it can also be done through... Figure 2 To further explain, the method includes:
[0043] S201, Obtain the access request sent by the client through the corresponding access thread, wherein the access request is used to request access to the second knowledge dictionary located in the front end.
[0044] In this embodiment, the client is installed on the terminal device, and the client can be an application, application software, etc. Users can access the second knowledge dictionary located at the front end through the client. It should be noted that the client may need to authenticate when connecting to the engine server; users can enter verification information or account password on the client to access it.
[0045] S202, acquire the mutex lock of the access thread corresponding to the client.
[0046] It should be noted that there can be multiple access threads. To ensure that other users cannot interfere while a thread is accessing the server, in this embodiment, each access thread is equipped with a mutex lock. The mutex lock is used to ensure the integrity of shared data operations. This ensures that only one client can access the thread at a time, thereby guaranteeing the independence of users when accessing the engine server and preventing multiple users from accessing the same thread, which could affect normal user operations.
[0047] S203, based on a mutex lock, locks the access request to restrict the client from accessing the same second knowledge dictionary throughout the entire access process.
[0048] It should be noted that, to ensure the stability of user access, access requests need to be locked using a mutex lock. This locking restricts the client from accessing the same second knowledge dictionary throughout the entire access process, preventing access failures caused by the first and second knowledge dictionaries being swapped due to updates or by accessing the wrong second knowledge dictionary. This improves the stability of user access and provides a foundation for subsequent updates of knowledge entities using mutex locks.
[0049] In this embodiment, the access request sent by the client through the corresponding access thread is first obtained. This access request requests access to the second knowledge dictionary located at the front end. Then, the mutex lock of the client's corresponding access thread is acquired. Finally, based on the mutex lock, the access request is locked to restrict the client from accessing the same second knowledge dictionary throughout the entire access process. By setting a mutex lock in the thread, it can be ensured that only one user accesses the dictionary at a time through the access thread, guaranteeing the independence of user access and improving the user experience.
[0050] In the above embodiments, the second knowledge dictionary, which has been switched to the backend, is updated based on update requests within a set period. This can also be achieved through... Figure 3 To further explain, the method includes:
[0051] S301, acquire the mutex lock for each accessing thread.
[0052] It should be noted that mutexes can include various types, and no restrictions are made here. The specific type can be determined according to the actual design requirements.
[0053] For example, a mutex lock can be a dynamic lock, meaning that when a user accesses the engine server through an access thread, a mutex lock is generated simultaneously, and the access request is locked; alternatively, a mutex lock can also be a static lock.
[0054] S302 releases the mutex lock for each accessing thread.
[0055] In practice, when updating the second knowledge dictionary, the first and second knowledge dictionaries need to be swapped. However, the mutex lock still holds the access request, allowing access only to the outdated second knowledge dictionary, which risks users obtaining incorrect knowledge points. Therefore, it is necessary to release the mutex lock for each accessing thread and regenerate a mutex lock to lock the current front-end knowledge dictionary. This ensures that users can always access the latest updated knowledge dictionary.
[0056] S303: After the mutex is released, the second knowledge dictionary switched to the backend is updated based on the update requests within the set period.
[0057] After the mutex is released, it can be assumed that users will no longer access the second knowledge dictionary after the switch. The second knowledge dictionary switched to the backend can be updated by setting update requests within a set period.
[0058] In this embodiment, a mutex lock is first acquired for each access thread, then the mutex lock for each access thread is released, and finally, after the mutex lock is released, the second knowledge dictionary switched to the backend is updated based on update requests within a set period. By locking access requests with mutex locks, it can be ensured that users always access the most recently updated data, improving the accuracy of data retrieval for users.
[0059] In this embodiment, before scanning for update requests of knowledge entities on the engine server within a set period, it is necessary to load a first knowledge dictionary and a second knowledge dictionary from the knowledge database and record the timestamp of the loading as a reference timestamp. Then, the update timestamp of the knowledge entity carried in the update request is obtained. If the update timestamp is later than the reference timestamp, the first knowledge dictionary stored in the backend is updated based on the update thread. Thus, by comparing the update timestamp and the reference timestamp, it is determined whether the current first knowledge dictionary is the latest knowledge dictionary, ensuring the accuracy of the knowledge entities.
[0060] When the update timestamp is earlier than the reference timestamp, the update is considered complete, and the update request is discarded. This judgment helps avoid duplicate updates and improves update efficiency.
[0061] It should be noted that after each update to the primary knowledge dictionary stored in the backend, the timestamp of each update is designated as a reference timestamp. Therefore, by designating each update timestamp as a reference timestamp, a new reference timestamp is provided for subsequent updates, thus laying the foundation for future update operations.
[0062] In the above embodiments, the update request includes the medical order item to be updated and at least one dimension of conflict features corresponding to the medical order item. The process of updating the first knowledge dictionary or the second knowledge dictionary can also be achieved through... Figure 4 To further explain, the method includes:
[0063] S401, when the update request is an add request, determine whether there is a medical order item to be updated in the knowledge dictionary.
[0064] In this embodiment of the disclosure, after receiving an add request, the content in the knowledge dictionary can be matched using the content of the add request. It should be noted that the update request may contain various types of data, such as the item to be updated, the data to be updated, patient information, etc. There are no limitations here, and the specific limitations can be made according to the actual design needs.
[0065] In this embodiment, matching can be performed using natural language processing algorithms. By processing the added request and the medical order items in the knowledge dictionary using natural language processing algorithms, the matching degree between the added request and the medical order item to be updated is calculated to determine whether an item exists. If the matching degree is greater than a matching degree threshold, it is considered that an item exists; if the matching degree is less than or equal to the matching degree threshold, it is considered that no item exists. It should be noted that this matching degree threshold is pre-set and can be changed according to actual design needs.
[0066] S402, If the knowledge dictionary does not contain any medical order items to be updated, add the relationship between the medical order items to be updated and the conflict features to the knowledge dictionary to generate new conflict knowledge pairs.
[0067] In this embodiment of the disclosure, if the knowledge dictionary does not contain any medical orders to be updated, the addition request needs to be judged by the corresponding professional medical personnel to determine whether the current addition request is correct, and the relationship between the medical orders to be updated and the conflict features is determined in order to generate new conflict knowledge pairs.
[0068] It's important to clarify that conflicting knowledge refers to conflicting matters between different types of medical orders during the medical process. In reality, patients may have multiple illnesses simultaneously, and different illnesses may require different medications or treatments. This can lead to situations where different treatments cannot be administered concurrently or different medications cannot be taken at the same time. For example, consider erythromycin and vitamin C. Because vitamin C is acidic, and erythromycin's effectiveness is reduced in an acidic environment, they cannot be taken together, otherwise, their therapeutic effect may be diminished.
[0069] S403, if the medical order item to be updated is a historical medical order item, update the conflict characteristics to the association relationship corresponding to the medical order item, so as to update the conflict knowledge pair corresponding to the historical medical order item.
[0070] In this embodiment of the disclosure, if the medical order item to be updated is a historical medical order item, it is necessary to determine whether the content to be updated exists in the corresponding historical medical order item. If the content to be updated already exists in the corresponding historical medical order item, no update is required. If the content to be updated does not exist in the corresponding historical medical order item, the conflict feature is updated to the association relationship corresponding to the medical order item to update the conflict knowledge pair corresponding to the historical medical order item.
[0071] In this embodiment, when the update request is an add request, it is first determined whether there is a medical order item to be updated in the knowledge dictionary. If there is no such item, a relationship between the medical order item and the conflict feature is added to the knowledge dictionary to generate a new conflict knowledge pair. If the medical order item to be updated is a historical medical order item, the conflict feature is updated to the association relationship corresponding to the medical order item to update the conflict knowledge pair corresponding to the historical medical order item. Thus, by matching the content in the update request with the medical order item in the knowledge dictionary, the knowledge dictionary is updated, improving the efficiency and accuracy of the update and avoiding duplicate or missed updates.
[0072] Users can also check medical order conflict information through... Figure 5 To further explain, the method includes:
[0073] S501 receives a query request sent by the client. The query request includes the medical record information of the object to be queried. The medical record information includes the target medical order items and patient characteristics.
[0074] It should be noted that since the person being queried may have multiple diseases, there may be multiple target medical orders.
[0075] Patient characteristics can include a variety of information, without any limitations here, and can be set according to the actual design needs. For example, it can include the patient's age, gender, height, weight, etc.
[0076] S502 performs natural language processing on medical record information to obtain structured information from the medical record information.
[0077] In this embodiment of the disclosure, after obtaining the case information, natural language processing can be performed on the medical record information to process the case information into structured information with a uniform format and size, so as to facilitate subsequent processing.
[0078] It should be noted that before performing natural language processing on the medical record information, obvious errors in the medical record information can be filtered out and corrected, thereby improving the accuracy of the final generated structured information.
[0079] S503, based on structured information, performs an inverted index on the knowledge dictionary currently located at the front end to determine whether there are conflicting knowledge pairs in the medical record information.
[0080] It's important to note that an inverted index, also commonly known as a reverse index, inverted archive, or reverse archive, is an indexing method used to store a mapping of the location of a word within a document or set of documents in a full-text search. It is the most commonly used data structure in document retrieval systems.
[0081] Inverted indexes can be used to quickly retrieve conflicting knowledge pairs from a knowledge dictionary containing structured information, thereby improving query efficiency.
[0082] S504 If there are conflicting knowledge pairs in the medical record information, send a conflict reminder message to the client based on the conflicting knowledge pairs.
[0083] It should be noted that if conflicting knowledge pairs exist in the medical records, the patient may be at risk of medical malpractice during treatment. Therefore, a conflict alert should be sent to the client based on the conflicting knowledge pairs. This alert can be sent to the patient or user via telephone, SMS, or client-side notification on the terminal device; no specific restrictions are imposed here.
[0084] In this embodiment, a query request is first received from the client. The query request includes the medical record information of the object to be queried. The medical record information includes the target medical order items and patient characteristics. Then, natural language processing is performed on the medical record information to obtain its structured information. Based on this structured information, an inverted index is created on the knowledge dictionary currently located at the front end to determine if there are conflicting knowledge pairs in the medical record information. If conflicting knowledge pairs exist, a conflict alert is sent to the client based on the conflicting knowledge pairs. Therefore, by creating an inverted index for the query request and the knowledge dictionary, and alerting the user based on the index results, it is possible to quickly determine whether a patient is at risk of medical malpractice during treatment. The alerts can reduce the probability of medical malpractice and improve the user experience.
[0085] Corresponding to the engine server update methods provided in the above embodiments, an embodiment of this disclosure also provides an engine server update apparatus. Since the engine server update apparatus provided in this disclosure corresponds to the engine server update methods provided in the above embodiments, the implementation methods of the above engine server update methods are also applicable to the engine server update apparatus provided in this disclosure, and will not be described in detail in the following embodiments.
[0086] Figure 6 This is a schematic diagram of the structure of an engine server update device provided in an embodiment of the present disclosure. The device includes: a scanning module 610, a switching module 620, an update module 630, and a query module 640.
[0087] The scanning module 610 is used to scan the update requests of knowledge entities of the engine server within a set period. The engine server includes a first knowledge dictionary stored in the backend and a second knowledge dictionary stored in the frontend. Both the first and second knowledge dictionaries include knowledge entities of the detection engine.
[0088] The switching module 620 is used to update the first knowledge dictionary based on the update request within a set period, and to switch the positions of the updated first knowledge dictionary and the second knowledge dictionary after the set period is reached.
[0089] Update module 630 is used to update the second knowledge dictionary, which has been switched to the backend, based on update requests within a set period.
[0090] The query module 640 is used to receive query requests sent by the client. The query request includes the medical record information of the object to be queried. The medical record information includes the target medical order items and patient characteristics. Natural language processing is performed on the medical record information to obtain the structured information of the medical record information. Based on the structured information, an inverted index is performed on the knowledge dictionary currently located on the front end to determine whether there are conflicting knowledge pairs in the medical record information. If there are conflicting knowledge pairs in the medical record information, a conflict reminder message is sent to the client according to the conflicting knowledge pairs.
[0091] In one embodiment of this disclosure, the switching module 620 is further configured to: obtain an access request sent by the client through the corresponding access thread, wherein the access request is used to request access to the second knowledge dictionary located at the front end; obtain the mutex lock of the access thread corresponding to the client; and lock the access request based on the mutex lock to restrict the client from always accessing the same second knowledge dictionary throughout the entire access process.
[0092] In one embodiment of this disclosure, the switching module 620 is further configured to: acquire a mutex lock for each access thread; release the mutex lock for each access thread; and after the mutex lock is released, update the second knowledge dictionary switched to the backend based on the update requests within a set period.
[0093] In one embodiment of this disclosure, the scanning module 610 is further configured to: load a first knowledge dictionary and a second knowledge dictionary from a knowledge database, and record the timestamp at the time of loading as a reference timestamp; update the first knowledge dictionary based on an update request within a set period, including: obtaining the update timestamp of the knowledge entity carried in the update request; and updating the first knowledge dictionary stored in the backend based on the update thread when the update timestamp is later than the reference timestamp.
[0094] In one embodiment of this disclosure, the scanning module 610 is further configured to: discard the update operation requested by the update request when the update timestamp is earlier than the reference timestamp.
[0095] In one embodiment of this disclosure, the scanning module 610 is further configured to: determine the update timestamp of each update as a reference timestamp after each update of the first knowledge dictionary stored in the backend.
[0096] In one embodiment of this disclosure, the scanning module 610 is further configured to: scan requests sent by web browsers and / or clients through corresponding update threads to obtain update requests.
[0097] In one embodiment of this disclosure, the update request includes the medical order item to be updated and at least one dimension of conflict features corresponding to the medical order item to be updated. The process of updating the first knowledge dictionary or the second knowledge dictionary includes: when the update request is an add request, determining whether the medical order item to be updated exists in the knowledge dictionary; if the medical order item to be updated does not exist in the knowledge dictionary, adding the relationship between the medical order item to be updated and the conflict features to the knowledge dictionary to generate a new conflict knowledge pair; if the medical order item to be updated is a historical medical order item, updating the conflict features to the association relationship corresponding to the medical order item to update the conflict knowledge pair corresponding to the historical medical order item.
[0098] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0099] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0100] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0101] like Figure 7 As shown, device 700 includes a computing unit 701, which can perform various appropriate actions and processes based on computer programs / instructions stored in read-only memory (ROM) 702 or loaded from storage unit 706 into random access memory (RAM) 703. RAM 703 may also store various programs and data required for the operation of device 700. The computing unit 701, ROM 702, and RAM 703 are interconnected via bus 704. Input / output (I / O) interface 705 is also connected to bus 704.
[0102] Multiple components in device 700 are connected to I / O interface 705, including: input units 706 such as keyboard, mouse, etc.; output units 707 such as various types of displays, speakers, etc.; storage units 708 such as disks, optical disks, etc.; and communication units 709 such as network cards, modems, wireless transceivers, etc. Communication unit 709 allows device 700 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0103] The computing unit 701 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 701 performs the various methods and processes described above, such as the engine server update method. For example, in some embodiments, the engine server update method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 706. In some embodiments, part or all of the computer program / instructions can be loaded and / or installed on device 700 via ROM 702 and / or communication unit 709. When the computer program / instructions are loaded into RAM 703 and executed by the computing unit 701, one or more steps of the engine server update method described above can be performed. Alternatively, in other embodiments, the computing unit 701 can be configured to perform the engine server update method by any other suitable means (e.g., by means of firmware).
[0104] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: implementations in one or more computer programs / instructions that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.
[0105] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0106] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0107] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0108] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
[0109] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. The client-server relationship is created by computer programs / instructions running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0110] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in the disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this document does not impose any restrictions.
[0111] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for updating an engine server, wherein, The method includes: The update requests for knowledge entities of the engine server are scanned within a set period. The engine server includes a first knowledge dictionary stored in the backend and a second knowledge dictionary stored in the frontend. Both the first knowledge dictionary and the second knowledge dictionary include the knowledge entities of the engine server. The first knowledge dictionary is updated based on the update request within the set period, and the updated first knowledge dictionary and the second knowledge dictionary are switched after the set period is reached. The second knowledge dictionary switched to the backend is updated based on the update request within the set period. After the update is completed, the knowledge entities in the first knowledge dictionary and the second knowledge dictionary are all updated content. The process of scanning for update requests of knowledge entities on the engine server within a set period also includes: Load the first knowledge dictionary and the second knowledge dictionary from the knowledge database, and record the timestamp of loading as a reference timestamp; The step of updating the first knowledge dictionary based on the update request within the set period includes: Obtain the update timestamp of the knowledge entity carried in the update request; When the update timestamp is later than the reference timestamp, the first knowledge dictionary stored in the backend is updated based on the update thread; The update request includes the medical order item to be updated and at least one dimension of conflict features corresponding to the medical order item to be updated. The process of updating the first knowledge dictionary or the second knowledge dictionary includes: When the update request is an add request, determine whether the medical order item to be updated exists in the knowledge dictionary; If the knowledge dictionary does not contain the medical order item to be updated, the relationship between the medical order item to be updated and the conflict feature is added to the knowledge dictionary to generate a new conflict knowledge pair; If the medical order item to be updated is a historical medical order item, the conflict feature is updated in the association relationship corresponding to the medical order item to update the conflict knowledge pair corresponding to the historical medical order item.
2. The method according to claim 1, wherein, The method further includes: Obtain the access request sent by the client through the corresponding access thread, wherein the access request is used to request access to the second knowledge dictionary located in the front end; Acquire the mutex lock for the access thread corresponding to the client; Based on the mutex lock, the access request is locked to restrict the client from accessing the same second knowledge dictionary throughout the entire access process.
3. The method according to claim 2, wherein, The step of updating the second knowledge dictionary switched to the backend based on the update requests within the set period also includes: Acquire the mutex lock for each of the accessing threads; Release the mutex lock for each of the accessing threads; After the mutex is released, the second knowledge dictionary switched to the backend is updated based on the update request within the set period.
4. The method according to claim 1, wherein, The method further includes: If the update timestamp is earlier than the reference timestamp, the update operation requested by the update request is discarded.
5. The method according to claim 1, wherein, The method further includes: Each time the first knowledge dictionary stored in the backend is updated, the update timestamp is determined as the reference timestamp.
6. The method according to claim 1, wherein, The scanning of knowledge entity update requests on the engine server within a set period includes: The update requests are scanned by web browsers and / or clients through their respective update threads to obtain the update requests.
7. The method according to any one of claims 1-6, wherein, The method further includes: Receive a query request sent by the client, the query request including the medical record information of the object to be queried, the medical record information including the target medical order items and patient characteristics; Natural language processing is performed on the medical record information to obtain its structured information. Based on the structured information, an inverted index is performed on the knowledge dictionary currently located at the front end to determine whether there are conflicting knowledge pairs in the medical record information; If there are conflicting knowledge pairs in the medical record information, a conflict reminder message is sent to the client based on the conflicting knowledge pairs.
8. An update device for an engine server, comprising: The scanning module is used to scan for update requests of knowledge entities of the engine server within a set period. The engine server includes a first knowledge dictionary stored in the backend and a second knowledge dictionary stored in the frontend. Both the first knowledge dictionary and the second knowledge dictionary include the knowledge entities of the engine server. The switching module is used to update the first knowledge dictionary based on the update request within the set period, and to switch the positions of the updated first knowledge dictionary and the second knowledge dictionary after the set period is reached. The update module is used to update the second knowledge dictionary switched to the backend based on the update request within the set period, wherein after the update is completed, the knowledge entities in the first knowledge dictionary and the second knowledge dictionary are all updated content; The scanning module is further configured to: Load the first knowledge dictionary and the second knowledge dictionary from the knowledge database, and record the timestamp of loading as a reference timestamp; The step of updating the first knowledge dictionary based on the update request within the set period includes: Obtain the update timestamp of the knowledge entity carried in the update request; When the update timestamp is later than the reference timestamp, the first knowledge dictionary stored in the backend is updated based on the update thread; The update request includes the medical order item to be updated and conflict features of at least one dimension corresponding to the medical order item to be updated. The process of updating the first knowledge dictionary or the second knowledge dictionary includes: When the update request is an add request, determine whether the medical order item to be updated exists in the knowledge dictionary; If the knowledge dictionary does not contain the medical order item to be updated, the relationship between the medical order item to be updated and the conflict feature is added to the knowledge dictionary to generate a new conflict knowledge pair; If the medical order item to be updated is a historical medical order item, the conflict feature is updated in the association relationship corresponding to the medical order item to update the conflict knowledge pair corresponding to the historical medical order item.
9. The apparatus according to claim 8, wherein, The switching module is also used for: Obtain the access request sent by the client through the corresponding access thread, wherein the access request is used to request access to the second knowledge dictionary located in the front end; Acquire the mutex lock for the access thread corresponding to the client; Based on the mutex lock, the access request is locked to restrict the client from accessing the same second knowledge dictionary throughout the entire access process.
10. The apparatus according to claim 9, wherein, The switching module is also used for: Acquire the mutex lock for each of the accessing threads; Release the mutex lock for each of the accessing threads; After the mutex is released, the second knowledge dictionary switched to the backend is updated based on the update request within the set period.
11. The apparatus according to claim 8, wherein, The scanning module is also used for: If the update timestamp is earlier than the reference timestamp, the update operation requested by the update request is discarded.
12. The apparatus according to claim 8, wherein, The scanning module is also used for: Each time the first knowledge dictionary stored in the backend is updated, the update timestamp is determined as the reference timestamp.
13. The apparatus according to claim 8, wherein, The scanning module is also used for: The update requests are scanned by web browsers and / or clients through their respective update threads to obtain the update requests.
14. The apparatus according to any one of claims 8-13, wherein, The device further includes a query module, the query module being used for: Receive a query request sent by the client, the query request including the medical record information of the object to be queried, the medical record information including the target medical order items and patient characteristics; Natural language processing is performed on the medical record information to obtain its structured information. Based on the structured information, an inverted index is performed on the knowledge dictionary currently located at the front end to determine whether there are conflicting knowledge pairs in the medical record information; If there are conflicting knowledge pairs in the medical record information, a conflict reminder message is sent to the client based on the conflicting knowledge pairs.
15. An electronic device comprising: At least one processor, and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the engine server update method according to any one of claims 1-7.
16. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the engine server update method according to any one of claims 1-7.
17. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the method for updating the engine server according to any one of claims 1-7.