International business method and platform for acquiring data based on SDK asynchronous thread

Through the international business method of using SDK asynchronous threads to obtain data in medical systems, the international client SDK is used to load and cache data asynchronously, and dynamic matching and replacement of international content is achieved, solving the long international development cycle of existing medical systems. and poor scalability simplifies international access and maintenance and reduces cost and complexity.

CN114116045BActive Publication Date: 2024-12-20GUANGDONG HAUCI NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111306946.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-05
Publication Date
2024-12-20
Estimated Expiration
2041-11-05

AI Technical Summary

Technical Problem

The existing medical system has strong coupling in internationalization, resulting in a long international development cycle, high operation and development collaboration requirements, and poor scalability. Adding language requires a lot of adjustment of business logic, which increases costs and complexity.

Method used

Using an international business method and platform that obtains data based on SDK asynchronous threads, loads content asynchronously through the SDK on the international client, and maintains the cache pool internally, provides international data import and full/incremental query services, and the business system does not need to change logic. , Internationalized content is replaced dynamically through asynchronous thread matching to reduce coupling with the server.

Benefits of technology

It simplifies the internationalization of business system access, reduces development and operation costs, improves scalability, increases language, does not require code changes, and the down-line of the server does not affect the operation of the business system, minimizes performance impact, and simplifies international field maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114116045B_ABST
    Figure CN114116045B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of web medical systems, and discloses an international business method and platform for acquiring data based on SDK asynchronous threads. The platform includes: a business system, in which there is a business application system corresponding to an international demand interface, which is connected to an international client SDK for matching and replacing international content; an international server, which provides international data import for business parties to import international data; an international client SDK, which asynchronously loads international content and performs dynamic matching and replacement of the client, which is exposed to the business system through the SDK, and an international cache pool maintained inside the international client SDK. The present invention greatly reduces the time, manpower and maintenance costs of the internationalization of the web medical system, uses excel lightweight import, and avoids the interface development of adding, deleting, modifying and checking international fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The patent of this invention relates to the technical field of web medical systems, specifically, to an international business method and platform for acquiring data based on SDK asynchronous threads. Background Art

[0002] With the deepening of China's opening-up, more and more foreigners come to China to work and live. Foreigners in China have become an emerging group seeking medical treatment. The demand for the internationalization of the medical system has become stronger, especially in first-tier cities. However, since some hospitals did not consider internationalization when structuring their medical systems, the cost of internationalization is extremely high and there are many difficulties.

[0003] The current common solution is to directly couple to the business. For fields that need to be internationalized, the corresponding language fields are added. The maintenance and display of internationalized content are coupled to the business system and jointly maintained and managed by hospital operators and medical system developers. This strong coupling has the following defects:

[0004] 1. Due to the coupling with business, the international development cycle is long and requires high collaboration capabilities between operators and developers;

[0005] 2. It is strongly coupled with the business, which is extremely unfavorable for subsequent expansion. Every time a language is added, the business logic needs to be adjusted a lot;

[0006] Therefore, it is urgent to design an international business method and platform based on SDK asynchronous thread to obtain data to solve the above problems. Summary of the invention

[0007] The purpose of the present invention is to provide an international business method and platform based on SDK asynchronous thread data acquisition. The business system is easy to access and does not need to change the original business logic. It is very friendly to developers and has no impact on the performance of the business system. The coupling with the internationalization server is extremely low. Even if the server is offline, it will not affect the normal operation of the business system. It has good scalability and aims to solve the problem that the common solution in the prior art is to directly couple to the business, add the corresponding language field for the fields that need to be internationalized, and the maintenance and display of the internationalized content are coupled to the business system. Due to the coupling with the business, the internationalization development cycle is long, and the collaboration ability of the operators and developers is very high.

[0008] The present invention is implemented as follows: an internationalized business platform based on SDK asynchronous thread data acquisition includes: a business system, wherein the business system has a business application system corresponding to the internationalized demand interface, which is connected to the internationalized client SDK for internationalized content matching and replacement; an internationalized server, wherein the internationalized server provides internationalized data import for the business party to import internationalized data; an internationalized client SDK, wherein the internationalized client SDK asynchronously loads internationalized content and performs dynamic matching and replacement of the client, which is exposed to the business system through the SDK. Through an internationalized cache pool maintained inside the internationalized client SDK, the full data is synchronized when the application is started, and the incremental data is synchronized from the internationalized service at regular intervals during operation. The synchronized data will be cached in the cache pool for dynamic matching and replacement of interface fields.

[0009] Furthermore, the internationalization server also provides an internationalization full / incremental query service, which is used by the internationalization SDK for data synchronization.

[0010] The international business method for obtaining data based on SDK asynchronous thread specifically includes the following steps:

[0011] S1: In the stage of importing internationalized data, the business system integrates the internationalized client SDK. At this time, the business system interface responds to the VO object and the fields that need to be internationalized refer to the internationalized aspect annotation method to identify the relevant information;

[0012] S2: When the business system starts, the SDK will start an asynchronous thread and first read the full internationalization information from the local cache file. If the reading fails, the full data will be synchronized from the internationalization server.

[0013] S3: Internationalization data synchronization stage: After the business system obtains the full amount of internationalization data, it processes it to obtain the corresponding data structure and stores it in the internationalization cache pool;

[0014] S4: At regular intervals, the SDK will read incremental data from the server and store it in the internationalization cache pool. At the same time, the SDK will construct metadata for the response objects in the business system that use internationalization aspect annotations.

[0015] S5: In the interface dynamic data internationalization stage, the user front-end initiates a request with the current user's language information in the request header. After receiving the request, the back-end will match and replace the content of the fields that need to be internationalized based on the metadata and language of the response object. The business system interface responds to the VO object with internationalization matching and replacement and then responds to the caller's front-end.

[0016] Furthermore, in the stage of importing internationalized data in S1, the business system interface uses Excel data import method to control the development cost of the internationalized comparison input terminal.

[0017] Furthermore, in S1, the internationalization aspect annotation method is the internationalization annotation @I18n, and the internationalization annotation @I18n makes the original business transparent without considering the specific country / language environment.

[0018] Furthermore, in S2, asynchronous threads are used to asynchronously load internationalization information, isolate the strong coupling between the business system and the internationalization server, and ensure the synchronization of the full data with the server.

[0019] Furthermore, in S4, the internationalization cache pool is stored at regular intervals of 50-300 seconds. The cache mechanism is added to allow the internationalization server to crash and go offline without affecting the startup and normal operation of the business system.

[0020] Furthermore, in the interface dynamic data internationalization stage in S5, the matching method of the internationalized client SDK for matching and replacing related data is hash matching, which has low time complexity.

[0021] Compared with the prior art, the international business method and platform for obtaining data based on SDK asynchronous thread provided by the present invention has the following beneficial effects:

[0022] 1. It makes it easy to access the business system without changing the original business logic. It is very friendly to developers and has no impact on the performance of the business system. It has very low coupling with the international server. Even if the server is offline, it will not affect the normal operation of the business system. It has good scalability and is quick and convenient to add languages.

[0023] 2. Greatly reduces the time, manpower and maintenance costs of internationalizing the web medical system. It uses lightweight Excel import to avoid the interface development of adding, deleting, modifying and checking international fields. It is easy to expand, connect once, and expand the language infinitely without changing the code. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a timing diagram of the internationalization system of the internationalization business platform based on SDK asynchronous thread data acquisition proposed by the present invention;

[0025] Figure 2 This is a flowchart of the internationalization SDK initialization of the internationalization business method for acquiring data based on SDK asynchronous thread proposed by the present invention;

[0026] Figure 3 This is a flow chart of interface dynamic data internationalization of the internationalized business method for acquiring data based on SDK asynchronous thread proposed by the present invention;

[0027] Figure 4 This is a detailed flow chart of the internationalization aspect of the internationalization business method for acquiring data based on SDK asynchronous thread proposed by the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0029] The implementation of the present invention is described in detail below in conjunction with specific embodiments.

[0030] Reference Figure 1 As shown, the internationalized business platform based on SDK asynchronous thread data acquisition includes: business system, business application system corresponding to the internationalized demand interface of the business system, connecting to the internationalized client SDK for internationalized content matching and replacement; internationalized server, the internationalized server provides internationalized data import for the business party to import internationalized data; internationalized client SDK, the internationalized client SDK asynchronously loads internationalized content and performs dynamic matching and replacement of the client, which is exposed to the business system through the SDK. Through an internationalized cache pool maintained inside the internationalized client SDK, the full data is synchronized when the application starts, and the incremental data is synchronized from the internationalized service at regular intervals during operation. The synchronized data will be cached in the cache pool for dynamic matching and replacement of interface fields. The server (front end) imports information to the business system, and the business system directly uploads it through the internationalized client SDK, and parses and stores it in the internationalized service, making the business system access simple without changing the original business logic. It is very friendly to developers and has no impact on the performance of the business system.

[0031] Specifically, the server in this embodiment is the front end mentioned in this technical solution, and the functions and effects of the two are the same.

[0032] In this embodiment, the internationalization server also provides an internationalization full / incremental query service, which is used by the internationalization SDK for data synchronization. It has extremely low coupling with the internationalization server. Even if the server is offline, it will not affect the normal operation of the business system. It has good scalability and adding languages ​​is quick and convenient.

[0033] Reference Figure 2-4 , the international business method for obtaining data based on SDK asynchronous thread includes the following steps:

[0034] S1: In the stage of importing internationalized data, the business system integrates the internationalized client SDK. At this time, the business system interface responds to the VO object and the fields that need to be internationalized refer to the internationalized aspect annotation method to identify the relevant information;

[0035] S2: When the business system starts, the SDK will start an asynchronous thread and first read the full internationalization information from the local cache file. If the reading fails, the full data will be synchronized from the internationalization server.

[0036] S3: Internationalization data synchronization stage: After the business system obtains the full amount of internationalization data, it processes it to obtain the corresponding data structure and stores it in the internationalization cache pool;

[0037] S4: At regular intervals, the SDK will read incremental data from the server and store it in the internationalization cache pool. At the same time, the SDK will construct metadata for the response objects in the business system that use internationalization aspect annotations.

[0038] S5: In the interface dynamic data internationalization stage, the user front-end initiates a request with the current user's language information in the request header. After receiving the request, the back-end will match and replace the content of the fields that need to be internationalized based on the metadata and language of the response object. The business system interface responds to the VO object with internationalization matching and replacement and then responds to the caller's front-end.

[0039] in, Figure 2 This is the initialization flowchart of the international client SDK. The process is as follows: the business system starts and registers the internationalization aspect, so as to identify that Shidou has a full cache file. If it is Y, it will be read, that is, the synchronization of the full data will be completed. If it is N, the full data will be requested remotely. After the full request is successful, the synchronization of the full data will be completed. After completion, the brightening synchronization scheduled task will be started;

[0040] Figure 3 This is the interface dynamic data internationalization flow chart, and its process is as follows: first, the user uses the browser to request the interface, and then the back-end business staff performs logical processing, and then obtains the Response object after processing, and then confirms whether the Response object contains @I18n-lang. If it is Y, the internationalization aspect is processed and the internationalized interface response is returned. If it is N, the interface response is returned directly;

[0041] Figure 4 This is a detailed flowchart of the internationalization aspect. The process is as follows: Check whether the data response object has @I18n, and use entity name + attribute name + id + language to form a key, and use the key to match the cache data structure. Finally, check whether the cache is matched. If it is, if the corresponding language translation content is obtained, replace the attribute content of the response object, otherwise, do not replace the response cache content.

[0042] In this embodiment, in the stage of importing internationalized data in S1, the business system interface uses an Excel data import method to control the development cost of the internationalized comparison input terminal.

[0043] In this embodiment, in S1, the internationalization aspect annotation method is the internationalization annotation @I18n. Through the internationalization annotation @I18n, the aspect annotation method is transparent to the original business, does not need to consider the specific country / language environment, and is extremely friendly to developers.

[0044] In this embodiment, in S2, asynchronous threads are used to asynchronously load internationalization information, isolate the strong coupling between the business system and the internationalization server, and ensure the synchronization of the full data with the server.

[0045] In this embodiment, in S4, the internationalization cache pool is stored at regular intervals of 50-300 seconds. The cache mechanism is added to make the internationalization server crash and offline without affecting the startup and normal operation of the business system.

[0046] In this embodiment, in the interface dynamic data internationalization stage in S5, the internationalization client SDK uses hash matching to match and replace related data, which has low time complexity and minimizes the impact on business performance and response time. At the same time, a set of annotations is abstracted to abstract internationalization resources into entity domains, which can flexibly express business entities and the relationships between entities.

[0047] The platform of this technical solution makes it easy to access the business system without changing the original business logic. It is extremely friendly to developers and has no impact on the performance of the business system. It has extremely low coupling with the international server. Even if the server is offline, it will not affect the normal operation of the business system. It has good scalability and is quick and convenient to add languages. In addition, it uses lightweight Excel import to avoid the interface development of adding, deleting, modifying and checking international fields. It is simple to expand, connect once, and expand the language infinitely without changing the code.

[0048] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. An international business method for acquiring data based on SDK asynchronous thread, characterized in that: The specific steps include: S1: In the stage of importing internationalized data, the business system integrates the internationalized client SDK, and the business system interface responds to the VO object and the fields that need to be internationalized reference the internationalized aspect annotation method; S2: When the business system is started, the SDK will start an asynchronous thread and read the full internationalization information from the local cache file first. If the reading fails, the full internationalization information will be synchronized from the internationalization server. The full internationalization information is asynchronously loaded using the asynchronous thread to isolate the strong coupling between the business system and the internationalization server, thus ensuring the synchronization between the full internationalization information and the internationalization server. S3: Internationalization data synchronization stage: After the business system obtains the full amount of internationalization information, it processes it to obtain the corresponding data structure and stores it in the internationalization cache pool; S4: At regular intervals, the SDK will read incremental data from the internationalization server and store it in the internationalization cache pool. At the same time, the SDK will construct metadata for the response objects in the business system that use the internationalization aspect annotation method. The time set at regular intervals is 50-300 seconds for internationalization cache pool storage. S5: In the interface dynamic data internationalization stage, the user front-end initiates a request with the current user's language information in the request header. After receiving the request, the back-end will match and replace the content of the fields that need to be internationalized based on the metadata and language of the response object. The business system interface responds to the VO object with internationalization matching and replacement and then responds to the caller's front-end.

2. The international business method for obtaining data based on SDK asynchronous thread according to claim 1, characterized in that: In the stage of importing internationalized data in S1, the business system interface uses Excel data import method.

3. The international business method for obtaining data based on SDK asynchronous thread according to claim 2, characterized in that: In S1, the internationalization aspect annotation method is the internationalization annotation @I18n.

4. The international business method for obtaining data based on SDK asynchronous thread according to claim 1, characterized in that: In the interface dynamic data internationalization stage in S5, the matching method used by the internationalized client SDK to perform corresponding data matching and replacement is hash matching.