Synchronous management method and device for medicine information

Through the configuration center, the drug information synchronization between the middle and front-end drug databases of the drug databases is solved, and the synchronization method in the existing technology is poor flexibility and high maintenance costs are achieved, dynamic configurable drug information synchronization is achieved, and the system flexibility and maintainability are improved.

CN119719214APending Publication Date: 2025-03-28BEIJING JINGDONG TUOXIAN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311249621.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-26
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The method of synchronizing drug information between the middle and front-end drug databases of the traditional Chinese medicine database is poor in flexibility, and when the field changes, the code needs to be modified, resulting in low information synchronization efficiency and high system maintenance costs.

Method used

Through the configuration center, the source drug library field and the target drug library field are configured to dynamically assign values ​​to the target drug library field and dynamically synchronize drug information.

Benefits of technology

It improves the flexibility and maintainability of the system, reduces the system maintenance cost, and synchronizes through the configuration center without modifying the business code, realizing dynamic configurable drug information synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119719214A_ABST
    Figure CN119719214A_ABST
Patent Text Reader

Abstract

The invention discloses a drug information synchronous management method and device, and relates to the technical field of computers. A specific embodiment of the method comprises the following steps: in response to a monitored drug change message of a source drug library, obtaining configuration data from a configuration center, so as to obtain synchronous field configuration according to the configuration data; the synchronous field configuration comprises a synchronous field, and a source drug library field and a target drug library field corresponding to the synchronous field; the medicine change message comprises a medicine identifier; determining a field value of a source drug library field corresponding to the drug identifier; and assigning a target drug library field corresponding to the drug identifier according to the field value so as to update the target drug library. According to the embodiment, the source drug library field and the target drug library field can be associated and configured in the configuration center, dynamic assignment of the target drug library field and dynamic synchronization of drug information are realized, the flexibility is high, the reliability and maintainability of the system are improved, and the maintenance cost of the system is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a synchronous management method and device for drug information. Background Art

[0002] Drug information is the basic business data in drug e-commerce transactions. Enterprises generally manage drug information data by establishing a drug library middle platform. The front-end business system builds front-end drug business data based on the drug information in the drug library middle platform. When the drug information in the drug library middle platform changes, the front-end business system needs to synchronously change the corresponding drug information to ensure the synchronization of drug information.

[0003] In the related art, the drug information in the drug library is synchronized to the corresponding fields in the front-end drug database through fixed coding. However, this synchronization method has poor flexibility, and when the fields in the drug library or the front-end drug database change, the front-end business system needs to modify the code, the information synchronization efficiency is low, and the system maintenance cost is high. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a method and device for synchronous management of drug information, which can associate and configure the source drug library field with the target drug library field in the configuration center, dynamically assign values ​​to the target drug library fields, dynamically synchronize drug information, have strong flexibility, improve system reliability and maintainability, and reduce system maintenance costs.

[0005] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for synchronous management of drug information is provided, comprising:

[0006] In response to monitoring a drug change message of a source drug library, configuration data is acquired from a configuration center to obtain a synchronization field configuration according to the configuration data; the synchronization field configuration includes a synchronization field, a source drug library field corresponding to the synchronization field, and a target drug library field; the drug change message includes a drug identifier;

[0007] Determine the field value of the source drug library field corresponding to the drug identifier;

[0008] The target drug library field corresponding to the drug identifier is assigned a value according to the field value to update the target drug library.

[0009] Optionally, before obtaining configuration data from the configuration center, the following steps are also included:

[0010] Configure multiple synchronization fields, obtain the source drug library field and the target drug library field corresponding to each of the synchronization fields, and construct a corresponding relationship between the source drug library field and the target drug library field.

[0011] Optionally, the corresponding relationship includes an association relationship between a source drug library field of a single-valued attribute and a target drug library field of a single-valued attribute, and / or a mapping relationship between multiple attribute values ​​of a source drug library field of a multi-valued attribute and multiple attribute values ​​of a target drug library field of a multi-valued attribute.

[0012] Optionally, the source drug library field is configured as a single field object, and determining the field value of the source drug library field corresponding to the drug identifier includes:

[0013] The single field object is used for reflection to obtain the field value of the source drug library field corresponding to the drug identifier.

[0014] Optionally, the source drug library field is configured as a nested object, and determining the field value of the source drug library field corresponding to the drug identifier includes:

[0015] Splitting the nested object according to a first splitting rule to obtain multiple split arrays;

[0016] Identify the object for each split array;

[0017] The object is used for reflection to obtain the field value of the source drug library field corresponding to the drug identifier.

[0018] Optionally, the source drug library field is configured as a composite object, and determining the field value of the source drug library field corresponding to the drug identifier includes:

[0019] Splitting the composite object according to the second splitting rule to obtain a plurality of nested objects;

[0020] Split each nested object according to the first splitting rule to obtain multiple split arrays corresponding to each nested object;

[0021] Determine an object of each split array in a plurality of split arrays corresponding to each nested object, and use the object for reflection to determine a field value of each nested object;

[0022] According to the field value of each nested object in the multiple nested objects, the field value of the source drug library field corresponding to the drug identifier is obtained.

[0023] Optionally, assigning a value to a target drug library field corresponding to the drug identifier according to the field value includes:

[0024] Determine whether the source drug library field in the synchronization field configuration has multiple attribute values;

[0025] If not, directly assign the field value to the target drug library field corresponding to the drug identifier through reflection;

[0026] If so, the field value is converted according to the mapping relationship between the multiple attribute values ​​of the source database field and the multiple attribute values ​​of the target drug field, and the converted field value is assigned to the target drug library field corresponding to the drug identifier through reflection.

[0027] According to another aspect of an embodiment of the present invention, there is provided a device for synchronous management of drug information, comprising:

[0028] The acquisition module, in response to monitoring a drug change message of a source drug library, acquires configuration data corresponding to the drug identifier from a configuration center to obtain a synchronization field configuration according to the configuration data; the synchronization field configuration includes a synchronization field, a source drug library field corresponding to the synchronization field, and a target drug library field; the drug change message includes the drug identifier;

[0029] A determination module, which determines a field value of a source drug library field corresponding to the drug identifier;

[0030] The synchronization module assigns a value to a target drug library field corresponding to the drug identifier according to the field value to update the target drug library.

[0031] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including:

[0032] one or more processors;

[0033] a storage device for storing one or more programs,

[0034] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for synchronous management of drug information provided by the present invention.

[0035] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for synchronous management of drug information provided by the present invention is implemented.

[0036] One embodiment of the above invention has the following advantages or beneficial effects: the synchronous management method of drug information of the embodiment of the present invention obtains configuration data from the configuration center to obtain the synchronization field configuration after monitoring the drug change message of the source drug library. Determine the field value of the source drug library field corresponding to the drug identifier, and then assign the target drug library field according to the field value to achieve the synchronization of drug information in the source drug library and the target drug library. The method saves the correspondence between the source drug library field and the target drug library field through the configuration center, determines the field value of the source drug library field according to the reflection technology, and dynamically assigns the target drug library field to achieve the synchronization of dynamically configurable drug information; the drug information of the source drug library and the target drug library is synchronized through the configuration center without modifying the business code, and the configuration of the synchronization field and the mapping relationship can be dynamically adjusted according to business needs, which is flexible and scalable. At the same time, it improves the reliability and maintainability of the system and reduces the maintenance cost of the system.

[0037] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with specific implementation examples. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0039] Figure 1 is a schematic diagram of the main process of a synchronous management method of drug information according to an embodiment of the present invention;

[0040] Figure 2 It is a flowchart of a method for determining a field value of a source drug library field corresponding to a drug identifier according to an embodiment of the present invention;

[0041] Figure 3 is a schematic diagram of the main process of another method for synchronous management of drug information according to an embodiment of the present invention;

[0042] Figure 4 It is a flowchart of a method for determining a field value of a source drug library field corresponding to a drug identifier according to an embodiment of the present invention;

[0043] Figure 5 is a schematic diagram of the main process of another method for synchronous management of drug information according to an embodiment of the present invention;

[0044] Figure 6 is a schematic diagram of main modules of a device for synchronous management of drug information according to an embodiment of the present invention;

[0045] Figure 7 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0046] Figure 8 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0048] Figure 1 FIG. 1 is a schematic diagram of the main process of a method for synchronous management of drug information according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0049] Step S101: in response to monitoring a drug change message of a source drug library, obtaining configuration data from a configuration center to obtain a synchronization field configuration according to the configuration data; the synchronization field configuration includes a synchronization field, a source drug library field corresponding to the synchronization field, and a target drug library field; the drug change message includes a drug identifier;

[0050] Step S102: determining the field value of the source drug library field corresponding to the drug identifier;

[0051] Step S103: assigning a value to the target drug library field corresponding to the drug identifier according to the field value to update the target drug library.

[0052] In an embodiment of the present invention, the synchronization management method of drug information can be used for synchronization of drug information between the drug library middle platform and the front-end business system in drug e-commerce transaction business, and can more flexibly realize dynamic synchronization of drug information. The synchronization management method of drug information can be executed by the front-end business system.

[0053] In an embodiment of the present invention, after monitoring the drug change message of the source drug library, a request for obtaining configuration data is sent to the configuration center to obtain the configuration data from the configuration center, wherein the configuration data can be in json (a lightweight data exchange format) string format. Then, the corresponding synchronization field configuration is obtained according to the configuration data, that is, the json string is converted to obtain the configuration object in java, that is, the class object, and the synchronization field configuration is generated. The configuration data stores the synchronization field, the source drug library field corresponding to the synchronization field, the target drug library field corresponding to the synchronization field, and the corresponding relationship between the source drug library field and the target drug library field in the json string format, wherein the source drug library field is the field of the drug in the source drug library, and the target drug library field is the field of the drug in the target drug library. The configuration data is converted to generate the synchronization field configuration, and the synchronization field configuration configures the synchronization field, the source drug library field corresponding to the synchronization field, the target drug library field corresponding to the synchronization field, and the corresponding relationship between the source drug library field and the target drug library field in the java object.

[0054] In an embodiment of the present invention, before obtaining configuration data from the configuration center, it also includes: configuring multiple synchronization fields, obtaining the source drug library field and the target drug library field corresponding to each synchronization field, and constructing a corresponding relationship between the source drug library field and the target drug library field.

[0055] In an embodiment of the present invention, the synchronization field is a field that needs to be synchronized between the source drug library and the target drug library. The synchronization field can be customized according to business needs. Generally, the synchronization field may include generic name, packaging specifications, approval number, generating company, whether medical insurance is provided, etc. The source drug library field and the target drug library field are associated through the synchronization field. After configuring multiple synchronization fields, the source drug library field and the target drug library field corresponding to each synchronization field are obtained, and the corresponding relationship between the source drug library field and the target drug library field corresponding to the synchronization field is constructed to obtain the configuration data. For example, the synchronization field is a common name, the source drug library field corresponding to the synchronization field is commonName, and the target drug library field corresponding to the synchronization field is genericName, and a corresponding relationship between the two is constructed.

[0056] In the embodiment of the present invention, the synchronization fields in the configuration data can be adjusted according to business needs. When the synchronization fields need to be adjusted, the json string of the configuration data can be modified without modifying the business code. The addition, deletion, and modification of synchronization fields can all be achieved by modifying the json string in the configuration data, which improves the configuration of the system and the flexibility of the system, so that the system can be adjusted and optimized more efficiently and conveniently to meet the ever-changing needs and business scenarios.

[0057] In an embodiment of the present invention, the corresponding relationship includes an association relationship between a source drug library field of a single-valued attribute and a target drug library field of a single-valued attribute, and / or a mapping relationship between multiple attribute values ​​of a source drug library field of a multi-valued attribute and multiple attribute values ​​of a target drug library field of a multi-valued attribute. That is, the source drug library field or the target drug library field can be a single-valued attribute or a multi-valued attribute, the attribute value corresponding to the field of a single-valued attribute is one, the attribute value of the field of a multi-valued attribute is multiple, the attribute value of the field can be the number of optional field values ​​of the field, the field of a single-valued attribute has no mapping relationship, the field of a multi-valued attribute has a mapping relationship, that is, the field of a single-valued attribute has no other optional field values, the source drug field of a single-valued attribute and the target drug field of a single-valued attribute are associated, and the field of a multi-valued attribute can map multiple optional field values, and there is a mapping relationship between multiple attribute values ​​of the source drug field of a multi-valued attribute and multiple attribute values ​​of the target drug field of a multi-valued attribute. The field value of a field of a multi-valued attribute is one of multiple attribute values. For example, in the synchronization field, the generic name, packaging specification, approval number, and manufacturer are single-valued attribute fields with no mapping relationship; whether it is medical insurance is a multi-valued attribute field with a mapping relationship. The multi-valued attributes in the source drug library include: yes and no, and the multi-valued attributes in the target drug library include: medical insurance drugs and non-medical insurance drugs. Among them, the mapping relationship is: yes corresponds to medical insurance drugs, and no corresponds to non-medical insurance drugs. In the synchronization field configuration, the mapping relationship is also stored in a collection, and each element in the collection is a set of mapping relationships.

[0058] In an embodiment of the present invention, in the synchronization field configuration, the source drug library field or the target drug library field corresponding to the synchronization field can be a single field object, a nested object, and a composite object. The single field object can directly obtain the corresponding field value by reflecting the single field, while the nested object and the composite object need to be split and then reflected to obtain the corresponding field value. For example, if the synchronization field is common name, the corresponding source drug library field is commonName, and the corresponding target drug library field is genericName, both of which are single-field objects; if the synchronization field is "whether it is covered by medical insurance", the corresponding source drug field and target drug library field are both nested objects, and the corresponding configuration object of the source drug library field is "drugExtends.healthInsuranceDirectoryDesc", which means that the "whether it is covered by medical insurance" field uses the healthInsuranceDirectoryDesc book sequence under the drugExtends of the source drug library drug object to obtain the field value of the "whether it is covered by medical insurance" field in the source drug library, where drugExtends is the extended information object of the drug object in the source drug library; the corresponding configuration object of the target drug library field is "yaoExtends.isInsuranceDrug", which means that the field value of the source drug library field is assigned to the isInsuranceDrug attribute under the extended object yaoExtends of the drug object in the target drug library, where yaoExtends is the extended information object of the drug object in the target drug library. Through this configuration, the data in the source drug library can be synchronized to the target drug library.

[0059] For example, in the synchronization field configuration, the synchronization field is "business scope", the corresponding source drug library field is drugTypeDesc+businessScopeDesc, and the corresponding target drug library field is "scopeName". It can be seen that the source drug library field is configured as a composite object. The field value of the source drug field is obtained by concatenating the prescription type (drugTypeDesc) and the business scope (businessScopeDesc), and then assigning the field value to the target source drug field scopeName. Both the source drug library field and the target drug library field are multi-valued attribute fields, and the mapping relationship between the multiple attribute values ​​of the two is configured. For example, when the attribute value of the business scope of the source drug library field is "prescription drugs-chemical pharmaceuticals", the attribute value of the business scope of the corresponding target drug library is "drugs-prescription drugs-chemical pharmaceuticals".

[0060] In an embodiment of the present invention, after receiving a drug change message from a source drug library, a drug identification can be obtained from the drug change message. The source drug library can be a database corresponding to the drug library middle station. After the drug information of the source drug library is changed, the drug change message is sent to the message queue. The front-end business system monitors the drug change message in the message queue, consumes the drug change message, and obtains the drug identification from the drug change message. The drug identification can be used to determine the drug whose drug information has been changed.

[0061] In an embodiment of the present invention, drug information corresponding to the drug identification can be obtained from the source drug library based on the drug identification, the drug information including various fields and the field value of each field, and then based on the drug information corresponding to the drug identification and the synchronization field configuration, the field value of the source drug library field corresponding to the drug identification can be determined.

[0062] In an embodiment of the present invention, since there may be asynchronous fields in each field in the drug information, before determining the field value of the source drug library field corresponding to the drug identifier, the various fields in the drug information corresponding to the drug identifier are matched with the source drug library field in the synchronization field configuration to delete the asynchronous fields in the drug information and update the drug information corresponding to the drug identifier to facilitate efficient acquisition of the field value of the source drug library field. The updated drug information includes the source drug library field corresponding to the synchronization field and the corresponding field value.

[0063] In an embodiment of the present invention, the source drug library field is configured as a single field object, and determining the field value of the source drug library field corresponding to the drug identifier includes: using the single field object for reflection to obtain the field value of the source drug library field corresponding to the drug identifier from the source database. That is, if the source drug library field is a single field object, for example, the source drug library field configuration object is commonName, the field value of the source drug library field can be directly obtained from the drug information using Java reflection technology.

[0064] In an embodiment of the present invention, the source drug library field is configured as a nested object, and determining the field value of the source drug library field corresponding to the drug identifier includes:

[0065] Split the nested object according to the first splitting rule to obtain multiple split arrays;

[0066] Identify the object for each split array;

[0067] Use the object for reflection to obtain the field value of the source drug library field corresponding to the drug identifier.

[0068] In an embodiment of the present invention, when the source drug library field is configured as a nested object, the nested object can be split, and the corresponding field value can be obtained by using Java reflection technology. Among them, the nested object generally contains the "." symbol, and the first splitting rule can be to split the nested object according to the symbol. If there are n such symbols, there are n+1 nested levels, and each level is a parent-child relationship. The one in front of the symbol is the parent object, and the one behind is the child object. For example, the nested object "drugExtends.healthInsuranceDirectoryDesc", drugExtends is the parent object, and healthInsuranceDirectoryDesc is the child object. Split the nested object into multiple split arrays according to the symbol, and the above-mentioned parent object and child object are all split arrays, and then loop each split array to obtain the object of each split array, that is, the object to be reflected. In the loop body, you can loop from the outer layer to the inner layer to determine whether it is the first loop. If so, use the outer object for reflection to obtain the field value of the outer object, that is, use drugExtends for reflection to obtain the field value of drugExtends; if not, split the parent object corresponding to the array for reflection to obtain the field value of the child object, that is, the field value of drugExtends obtained based on reflection, use reflection technology to reflect healthInsuranceDirectoryDesc, and obtain the field value of healthInsuranceDirectoryDesc, that is, obtain the field value of the nested object; the loop is executed until the field value of the source drug library field corresponding to the drug identifier is obtained.

[0069] Figure 2 The present invention is a flowchart of a method for determining the field value of a source drug library field corresponding to a drug identifier when a source drug library field is configured as a nested object in an embodiment of the present invention. The specific process includes: splitting the nested object, splitting the nested object into multiple split arrays according to the "." symbol; then looping each split array; judging whether it is the first loop; if so, determining that the outer layer object is an object for reflection, if not, determining that the upper layer object is an object for reflection; using the object for java reflection to obtain the field value of the object; judging whether the loop is completed, if so, jumping out of the loop and outputting the field value of the source drug library field, if not, continuing to execute the loop.

[0070] According to an embodiment of the present invention, the source drug library field is configured as a composite object, such as Figure 3 As shown, the field value of the source drug library field corresponding to the drug identifier is determined, including:

[0071] Step S301: split the composite object according to the second splitting rule to obtain multiple nested objects;

[0072] Step S302: split each nested object according to the first splitting rule to obtain multiple split arrays corresponding to each nested object;

[0073] Step S303: determining the object of each split array in the multiple split arrays corresponding to each nested object, and using the object for reflection to determine the field value of each nested object;

[0074] Step S304: According to the field value of each nested object in the plurality of nested objects, the field value of the source drug library field corresponding to the drug identifier is obtained.

[0075] In an embodiment of the present invention, when the source drug library field is configured as a composite object, the composite object may contain nested objects. The composite object may be split first, and then the nested object may be split, and the field value of the source drug library field may be obtained using java reflection technology. Generally, the composite object contains a "+" symbol, which is used to connect each nested object, indicating that the field value of the composite object needs to be obtained by splicing the field values ​​of multiple nested objects. The second splitting rule may be to split the composite object according to the "+" symbol, obtain multiple nested objects after splitting, and then loop through each nested object, execute the nested object splitting process, obtain the field value corresponding to each nested object based on java reflection, and determine whether the loop is completed. If so, output the field value corresponding to the composite object. If not, continue to execute the loop. For example, the composite object "drugTypeDesc+businessScopeDesc" is split into nested objects "drugTypeDesc" and "businessScopeDesc". For each nested object, the nested object splitting process is executed to obtain the field value of each nested object respectively. After splicing, the value of the composite object is obtained. For example, if the field value of "drugTypeDesc" is "prescription drugs" and the field value of "businessScopeDesc" is "chemical pharmaceuticals", then the field value of the composite object is "prescription drugs-chemical pharmaceuticals".

[0076] Figure 4 The present invention is a flowchart of a method for determining the field value of a source drug library field corresponding to a drug identifier when a source drug library field is configured as a composite object in an embodiment of the present invention. The composite object contains nested objects. The specific process includes: splitting the composite object into multiple nested objects according to the "+" symbol; then looping through each nested object, executing the nested object splitting process for each nested object, and obtaining the field value of each nested object; judging whether the loop is completed, if so, jumping out of the loop, splicing the field values ​​of each nested object, and obtaining the field value of the composite object; if not, continuing to execute the loop.

[0077] In the embodiment of the present invention, after determining the field value of the source drug library field corresponding to the drug identifier based on the Java reflection technology, the Java reflection technology is used to assign a value to the target drug library field according to the field value. Figure 5 As shown, the target drug library field corresponding to the drug identifier is assigned a value according to the field value, including:

[0078] Step S501: determine whether the source drug library field in the synchronization field configuration has multiple attribute values; if not, execute step S502; if yes, execute step S503;

[0079] Step S502: directly assigning the field value to the target drug library field corresponding to the drug identifier through reflection;

[0080] Step S503: According to the mapping relationship between multiple attribute values ​​of the source database field and multiple attribute values ​​of the target drug field, the field value is converted, and the converted field value is assigned to the target drug library field corresponding to the drug identifier through reflection.

[0081] In an embodiment of the present invention, the source drug library field and the target drug library field can be single-valued attribute fields without a mapping relationship, or can be multi-valued attribute fields with a mapping relationship. If it is a single-valued attribute field, the field value can be directly assigned to the target drug field through reflection, that is, the field value is used to replace the field value of the target drug field of the drug identifier in the target drug library; the update of the target drug library is realized; if it is a multi-valued attribute field, there is a mapping relationship between the multiple attribute values ​​of the source drug library field and the multiple attribute values ​​of the target drug field. According to the mapping relationship, the field value is converted, and then the converted field value is assigned to the target drug library field. For example, in the synchronization field configuration, the synchronization field is "business scope", the corresponding source drug library field is "drugTypeDesc+businessScopeDesc", and the corresponding target drug library field is "scopeName". The source drug library field and the target drug library field are multi-valued attribute fields, and there is a mapping relationship between the multiple attribute values ​​of the two. The mapping relationship of the multiple attribute values ​​includes: the source drug library field attribute value "prescription drugs-chemical pharmaceuticals" and the target drug library field attribute value "drugs-prescription drugs-chemical pharmaceuticals"; the source drug library field attribute value "prescription drugs-Chinese patent medicines" and the target drug library field attribute value "drugs-prescription drugs-Chinese patent medicines", etc. If it is determined that the field value of the source drug library field "drugTypeDesc+businessScopeDesc" is "prescription drugs-chemical pharmaceuticals", the field value is converted, and the corresponding target drug library field is "scopeName". According to the mapping relationship, the target drug library field "scopeName" is assigned a value of "drugs-prescription drugs-chemical pharmaceuticals".

[0082] The synchronous management method of drug information of the embodiment of the present invention obtains configuration data from the configuration center to obtain the synchronization field configuration after monitoring the drug change message of the source drug library. Determine the field value of the source drug library field corresponding to the drug identifier, and then assign a value to the target drug library field according to the field value to achieve synchronization of drug information in the source drug library and the target drug library. The method saves the correspondence between the source drug library field and the target drug library field through the configuration center, determines the field value of the source drug library field according to the reflection technology, and dynamically assigns a value to the target drug library field to achieve synchronization of dynamically configurable drug information; the drug information of the source drug library and the target drug library is synchronized through the configuration center without modifying the business code, and the configuration of the synchronization field and the mapping relationship can be dynamically adjusted according to business needs. It is highly flexible and scalable. At the same time, it improves the reliability and maintainability of the system and reduces the maintenance cost of the system.

[0083] Another aspect of the embodiment of the present invention is as follows Figure 6 As shown, a synchronous management device 600 for drug information is provided, comprising:

[0084] The acquisition module 601, in response to monitoring the drug change message of the source drug library, acquires the configuration data corresponding to the drug identification from the configuration center, so as to obtain the synchronization field configuration according to the configuration data; the synchronization field configuration includes the synchronization field, the source drug library field corresponding to the synchronization field, and the target drug library field; the drug change message includes the drug identification;

[0085] Determination module 602, determining the field value of the source drug library field corresponding to the drug identifier;

[0086] The synchronization module 603 assigns a value to the target drug library field corresponding to the drug identifier according to the field value to update the target drug library.

[0087] In an embodiment of the present invention, the acquisition module 601 is also used to: before acquiring configuration data from the configuration center, configure multiple synchronization fields, acquire the source drug library field and the target drug library field corresponding to each synchronization field, and construct a corresponding relationship between the source drug library field and the target drug library field.

[0088] In an embodiment of the present invention, the corresponding relationship includes the association relationship between the source drug library field of the single-valued attribute and the target drug library field of the single-valued attribute, and / or the mapping relationship between multiple attribute values ​​of the source drug library field of the multi-valued attribute and multiple attribute values ​​of the target drug library field of the multi-valued attribute.

[0089] In the embodiment of the present invention, the source drug library field is configured as a single field object, and the determination module 602 is further used to: use the single field object for reflection to obtain the field value of the source drug library field corresponding to the drug identifier.

[0090] In an embodiment of the present invention, the source drug library field is configured as a nested object, and the determination module 602 is further used to: split the nested object according to the first splitting rule to obtain multiple split arrays; determine the object of each split array; and use the object for reflection to obtain the field value of the source drug library field corresponding to the drug identifier.

[0091] In the embodiment of the present invention, the source drug library field is configured as a composite object, and the determination module 602 is further used to:

[0092] Splitting the composite object according to the second splitting rule to obtain multiple nested objects;

[0093] Split each nested object according to the first splitting rule to obtain multiple split arrays corresponding to each nested object;

[0094] Determine the object of each split array in the multiple split arrays corresponding to each nested object, and determine the field value of each nested object by using the object for reflection;

[0095] According to the field value of each nested object in the multiple nested objects, the field value of the source drug library field corresponding to the drug identifier is obtained.

[0096] In the embodiment of the present invention, the synchronization module 603 is further used to:

[0097] Determine whether the source drug library field in the synchronization field configuration has multiple attribute values;

[0098] If not, directly assign the field value to the target drug library field corresponding to the drug identifier through reflection;

[0099] If so, the field value is converted according to the mapping relationship between the multiple attribute values ​​of the source database field and the multiple attribute values ​​of the target drug field, and the converted field value is assigned to the target drug library field corresponding to the drug identifier through reflection.

[0100] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method for synchronous management of drug information according to an embodiment of the present invention.

[0101] According to another aspect of the embodiments of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for synchronous management of drug information according to the embodiments of the present invention is implemented.

[0102] Figure 7An exemplary system architecture 700 is shown to which the method for synchronous management of drug information or the device for synchronous management of drug information according to the embodiment of the present invention can be applied.

[0103] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0104] Users can use terminal devices 701, 702, and 703 to interact with server 705 through network 704 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 701, 702, and 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0105] The terminal devices 701 , 702 , and 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0106] The server 705 may be a server that provides various services, such as a backend management server (only for example) that supports shopping websites browsed by users using the terminal devices 701, 702, and 703. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only for example) to the terminal device.

[0107] It should be noted that the synchronous management method of drug information provided in the embodiment of the present invention is generally executed by the server 705 , and accordingly, the synchronous management device of drug information is generally set in the server 705 .

[0108] It should be understood that Figure 7 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0109] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present invention. Figure 8 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0110] like Figure 8As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0111] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.

[0112] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.

[0113] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0114] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0115] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor, for example, may be described as: a processor including an acquisition module, a determination module and a synchronization module. The names of these modules do not, in certain cases, constitute limitations on the modules themselves, for example, the acquisition module may also be described as "a module that, in response to monitoring a drug change message from a source drug library, acquires configuration data corresponding to the drug identifier from a configuration center".

[0116] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: in response to monitoring a drug change message from a source drug library, obtaining configuration data from a configuration center to obtain a synchronization field configuration according to the configuration data; the synchronization field configuration includes a synchronization field, a source drug library field corresponding to the synchronization field, and a target drug library field; the drug change message includes a drug identifier; determining the field value of the source drug library field corresponding to the drug identifier; assigning a value to the target drug library field corresponding to the drug identifier according to the field value to update the target drug library.

[0117] According to the technical solution of the embodiment of the present invention, the synchronization management method of drug information, after listening to the drug change message of the source drug library, obtains the configuration data from the configuration center to obtain the synchronization field configuration. Determine the field value of the source drug library field corresponding to the drug identifier, and then assign the target drug library field according to the field value to achieve the synchronization of drug information in the source drug library and the target drug library. This method saves the correspondence between the source drug library field and the target drug library field through the configuration center, determines the field value of the source drug library field according to the reflection technology, and dynamically assigns the target drug library field to achieve the synchronization of dynamically configurable drug information; synchronizes the drug information of the source drug library and the target drug library through the configuration center, without modifying the business code, and can dynamically adjust the configuration of the synchronization field and the mapping relationship according to business needs, with strong flexibility and scalability. At the same time, it improves the reliability and maintainability of the system and reduces the maintenance cost of the system.

[0118] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A synchronous management method for drug information, characterized in that: include: In response to monitoring a drug change message from a source drug library, configuration data is acquired from a configuration center to obtain a synchronization field configuration according to the configuration data; the synchronization field configuration includes a synchronization field, a source drug library field corresponding to the synchronization field, and a target drug library field; the drug change message includes a drug identifier; Determine the field value of the source drug library field corresponding to the drug identifier; The target drug library field corresponding to the drug identifier is assigned a value according to the field value to update the target drug library.

2. The method according to claim 1, characterized in that Before obtaining configuration data from the configuration center, it also includes: Configure multiple synchronization fields, obtain the source drug library field and the target drug library field corresponding to each of the synchronization fields, and construct a corresponding relationship between the source drug library field and the target drug library field.

3. The method according to claim 2, characterized in that The corresponding relationship includes the association relationship between the source drug library field of the single-valued attribute and the target drug library field of the single-valued attribute, and / or the mapping relationship between multiple attribute values ​​of the source drug library field of the multi-valued attribute and multiple attribute values ​​of the target drug library field of the multi-valued attribute.

4. The method according to claim 1, characterized in that: The source drug library field is configured as a single field object, and the field value of the source drug library field corresponding to the drug identifier is determined, including: The single field object is used for reflection to obtain the field value of the source drug library field corresponding to the drug identifier.

5. The method according to claim 1, characterized in that The source drug library field is configured as a nested object, and the field value of the source drug library field corresponding to the drug identifier is determined, including: Splitting the nested object according to a first splitting rule to obtain multiple split arrays; Identify the object for each split array; The object is used for reflection to obtain the field value of the source drug library field corresponding to the drug identifier.

6. The method according to claim 1, characterized in that The source drug library field is configured as a composite object, and the field value of the source drug library field corresponding to the drug identifier is determined, including: Splitting the composite object according to the second splitting rule to obtain a plurality of nested objects; Split each nested object according to the first splitting rule to obtain multiple split arrays corresponding to each nested object; Determine an object of each split array in a plurality of split arrays corresponding to each nested object, and use the object for reflection to determine a field value of each nested object; According to the field value of each nested object in the multiple nested objects, the field value of the source drug library field corresponding to the drug identifier is obtained.

7. The method according to claim 1, characterized in that Assigning a value to a target drug library field corresponding to the drug identifier according to the field value, including: Determine whether the source drug library field in the synchronization field configuration has multiple attribute values; If not, directly assign the field value to the target drug library field corresponding to the drug identifier through reflection; If so, the field value is converted according to the mapping relationship between the multiple attribute values ​​of the source database field and the multiple attribute values ​​of the target drug field, and the converted field value is assigned to the target drug library field corresponding to the drug identifier through reflection.

8. A synchronous management device for drug information, characterized in that: include: The acquisition module, in response to monitoring a drug change message of a source drug library, acquires configuration data corresponding to the drug identifier from a configuration center to obtain a synchronization field configuration according to the configuration data; the synchronization field configuration includes a synchronization field, a source drug library field corresponding to the synchronization field, and a target drug library field; the drug change message includes the drug identifier; A determination module, which determines a field value of a source drug library field corresponding to the drug identifier; The synchronization module assigns a value to a target drug library field corresponding to the drug identifier according to the field value to update the target drug library.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.