Business data acquisition method and device, computer device and readable storage medium

By detecting the open/closed state of page components, using dynamic scripts to associate with page components, and employing a script engine to execute compiled scripts to obtain business data, the problem of poor flexibility in hard-coding methods is solved, achieving fast response and efficient data updates.

CN116861125BActive Publication Date: 2025-11-25KANG JIAN INFORMATION TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310819930.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-05
Publication Date
2025-11-25
Estimated Expiration
2043-07-05

AI Technical Summary

Technical Problem

Hard-coded methods for obtaining business data are inflexible, requiring source code modifications when the source of medical and health data changes, resulting in slow update response times and low efficiency for activity pages.

Method used

By detecting the open/closed state of page components, dynamic scripts are associated with page components, and a script engine is used to execute compiled scripts to call remote interfaces to obtain business data, thus avoiding intrusion into the page source code and achieving the expansion and decoupling of data sources and data structures.

Benefits of technology

It improves page update response speed and developer productivity, avoiding the slow response and low efficiency problems caused by hard-coding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116861125B_ABST
    Figure CN116861125B_ABST
Patent Text Reader

Abstract

The application discloses a service data acquisition method and device, computer equipment and a readable storage medium, relates to the technical field of Internet and digital medical treatment, and can improve the flexibility of medical health data acquisition. Once a developer wants to change the medical health data source of a component, the opening and closing states of different dynamic scripts can be updated in an operation management background, and the response speed of page updating is improved. The method comprises the following steps: in response to a target page access request, detecting all page components of the target page, determining the script identifier of a target dynamic script, and the target dynamic script being a dynamic script in an open state and associated with any page component; according to the script identifier, querying the target compiled script corresponding to the target dynamic script in the memory; if the target compiled script exists in the memory, executing the script content of the target compiled script by using a target script engine, so that the target compiled script calls a remote interface to acquire service data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of Internet technology and digital healthcare, and in particular to a method, apparatus, computer equipment, and readable storage medium for acquiring business data. Background Technology

[0002] With the continuous development of Internet technology, more and more medical service applications have emerged. Medical applications generally provide targeted diagnosis, treatment and management services based on medical and health data such as the patient's condition, medical history and physical examination results. These services are usually displayed on the user's client in the form of an activity page.

[0003] In related technologies, enterprises typically choose a CMS (Content Management System) architecture to write activity page scripts. Specifically, configuration data for each floor is hard-coded. When a user requests access to an activity page configured in the CMS via a client, the script corresponding to that activity page is run. Each floor, according to its configuration data, calls the corresponding RPC interface to retrieve business data provided by different business parties and displays this business data on the client page.

[0004] In the process of developing this application, the applicant discovered that the relevant technology has at least the following problems:

[0005] Hard-coding the acquisition of business data is inflexible. If the source of medical and health data for a floor needs to change, developers must modify the corresponding floor's configuration data in the source code. Furthermore, any changes to the activity page's source code require a redeployment process, resulting in slow update response times and low efficiency for the activity page. Summary of the Invention

[0006] In view of this, this application provides a method, apparatus, computer device, and readable storage medium for acquiring business data. The main purpose is to address the current problem of inflexible hard-coded acquisition of business data. If the source of medical and health data for a floor needs to change, developers must modify the corresponding floor's configuration data in the source code. Furthermore, changes to the activity page's source code require a complete re-release process, resulting in slow update response times and low efficiency.

[0007] According to a first aspect of this application, a method for acquiring business data is provided, the method comprising:

[0008] In response to a target page access request, all page components of the target page are detected, and the script identifier of the target dynamic script is determined. The target dynamic script is a dynamic script whose open / closed state is on and associated with any page component.

[0009] According to the script identifier, query the target compiled script corresponding to the target dynamic script in memory;

[0010] If the target compilation script exists in the memory, the target script engine executes the script content of the target compilation script so that the target compilation script calls the remote interface to obtain business data.

[0011] Optionally, before detecting all page components of the target page in response to a target page access request, the method further includes:

[0012] Receive the dynamic script uploaded by the operation management backend, store the dynamic script in the database, obtain the script identifier of the dynamic script, and return the script identifier to the operation management backend;

[0013] Receive script configuration information uploaded by the operation management backend. The script configuration information includes the start / stop status of the dynamic script to be associated, the script identifier of the dynamic script to be associated, and the component identifier associated with the script identifier.

[0014] In the database, according to the script configuration information, the start / stop status of the dynamic script to be associated is set, and the page component to be associated is determined according to the component identifier, and the script identifier of the dynamic script to be associated is associated with the page component to be associated.

[0015] Optionally, the step of responding to a target page access request by detecting all page components of the target page and determining the script identifier of the target dynamic script includes:

[0016] In response to the target page access request, obtain a list of available components associated with the target page;

[0017] Iterate through each page component recorded in the list of available components, take the page component associated with the dynamic script as the target page component, obtain all the target page components corresponding to the target page, and detect the opening and closing status of the dynamic script associated with each of the target page components.

[0018] When the open / closed state is in the open state, the dynamic script corresponding to the open / closed state is used as the target dynamic script.

[0019] Optionally, after querying the target compiled script corresponding to the target dynamic script in memory according to the script identifier, the method further includes:

[0020] If the target compiled script does not exist in the memory, the target dynamic script is retrieved from the database according to the script identifier, and the target script engine is determined according to the script language of the target dynamic script, wherein the target script engine is a script engine that matches the script language.

[0021] The target script engine is used to compile the target dynamic script to obtain the target compiled script, and the script identifier is associated with the target compiled script.

[0022] A preset caching tool is used to cache the target compilation scripts associated with script identifiers in the memory.

[0023] The target script engine is used to execute the script content of the target compiled script, so that the target compiled script can call a remote interface to obtain business data.

[0024] Optionally, the step of using a target script engine to execute the script content of the target compiled script, so that the target compiled script calls a remote interface to obtain business data, includes:

[0025] The general interface parameters are passed to the preset properties of the target script engine, and the script content and script parameters of the target compiled script are passed to the preset properties. The general interface parameters are the internal interface parameters of the distributed service framework injected from the dependency injection container.

[0026] The target script engine is used to execute the script content of the target compiled script to generate a general instance of the general interface parameters, so that the general instance extracts the script parameters from the preset attributes and calls the remote interface to obtain the business data based on the script parameters.

[0027] Optionally, the step of using the target script engine to execute the script content of the target compiled script to generate a general instance of the general interface parameters, so that the general instance extracts the script parameters from the preset attributes and calls the remote interface to obtain the business data based on the script parameters, includes:

[0028] The target script engine calls the implementation class of the helper interface attribute instance in the target compilation script, extracts the fully qualified name of the remote interface from the script parameters in the preset attribute, and generates a general instance of the general interface parameter based on the fully qualified name.

[0029] The general instance extracts the method name, parameter type array, and parameter value array from the script parameters in the preset attributes, writes the method name, parameter type array, and parameter value array into a method call request, and executes the method call request to generalize the call to the target method indicated by the method name to access the remote interface and obtain the business data.

[0030] Optionally, after executing the script content of the target compiled script using the target script engine to enable the target compiled script to call a remote interface to obtain business data, the method further includes:

[0031] Execute all the target dynamic scripts associated with the target page, fill all the business data obtained by all the target dynamic scripts into the data model of the associated page component one by one, obtain the page to be displayed, and send the page to be displayed to the client for rendering and display.

[0032] According to a second aspect of this application, a business data acquisition apparatus is provided, the apparatus comprising:

[0033] The detection module is used to respond to a target page access request, detect all page components of the target page, and determine the script identifier of the target dynamic script, wherein the target dynamic script is a dynamic script whose open / closed state is on and associated with any page component.

[0034] The query module is used to query the target compiled script corresponding to the target dynamic script in memory according to the script identifier;

[0035] The acquisition module is used to execute the script content of the target compilation script using the target script engine if the target compilation script exists in the memory, so that the target compilation script can call a remote interface to obtain business data.

[0036] Optionally, the device further includes:

[0037] The receiving module is used to receive dynamic scripts uploaded by the operation management backend, store the dynamic scripts in the database, obtain the script identifier of the dynamic scripts, and return the script identifier to the operation management backend.

[0038] The receiving module is also used to receive script configuration information uploaded by the operation management backend. The script configuration information includes the start / stop status of the dynamic script to be associated, the script identifier of the dynamic script to be associated, and the component identifier associated with the script identifier.

[0039] The setting module is used to set the start / stop status of the dynamic script to be associated in the database according to the script configuration information, and to determine the page component to be associated according to the component identifier, and associate the script identifier of the dynamic script to be associated with the page component to be associated.

[0040] Optionally, the detection module is configured to, in response to the target page access request, obtain a list of available components associated with the target page; traverse each page component recorded in the list of available components, take the page component associated with the dynamic script as the target page component, obtain all target page components corresponding to the target page, and detect the on / off state of the dynamic script associated with each of the target page components; when the on / off state is on, take the dynamic script corresponding to the on / off state as the target dynamic script.

[0041] Optionally, the acquisition module is further configured to: if the target compiled script does not exist in the memory, acquire the target dynamic script from the database according to the script identifier; determine the target script engine based on the script language of the target dynamic script, wherein the target script engine is a script engine matching the script language; use the target script engine to compile the target dynamic script to obtain the target compiled script, and associate the script identifier with the target compiled script; use a preset caching tool to cache the target compiled script associated with the script identifier in the memory; and use the target script engine to execute the script content of the target compiled script so that the target compiled script calls a remote interface to obtain business data.

[0042] Optionally, the acquisition module is used to pass general interface parameters to a preset attribute of the target script engine, and to pass the script content and script parameters of the target compiled script to the preset attribute. The general interface parameters are internal interface parameters of the distributed service framework injected from the dependency injection container. The target script engine executes the script content of the target compiled script to generate a general instance of the general interface parameters, so that the general instance extracts the script parameters from the preset attribute and calls the remote interface to obtain the business data based on the script parameters.

[0043] Optionally, the acquisition module is configured to use the target script engine to call the implementation class of the helper interface attribute instance in the target compiled script, extract the fully qualified name of the remote interface from the script parameters in the preset attribute, and generate a general instance of the general interface parameter based on the fully qualified name; extract the method name, parameter type array, and parameter value array from the script parameters in the preset attribute through the general instance, write the method name, parameter type array, and parameter value array into a method call request, and execute the method call request to generically call the target method indicated by the method name to access the remote interface and obtain the business data.

[0044] Optionally, the device further includes:

[0045] The display module is used to execute all the target dynamic scripts associated with the target page, fill all the business data obtained by all the target dynamic scripts into the data model of the associated page component one by one to obtain the page to be displayed, and send the page to be displayed to the client for rendering and display.

[0046] According to a third aspect of this application, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any of the first aspects above.

[0047] According to a fourth aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of the first aspects above.

[0048] By employing the above technical solutions, this application provides a business data acquisition method, apparatus, computer equipment, and readable storage medium. In response to a target page access request, this application detects all page components of the target page and determines the script identifier of the target dynamic script that is in an "on" state and associated with any page component. Further, according to the script identifier, the target compiled script corresponding to the target dynamic script is queried in memory. If the target compiled script exists in memory, the target script engine executes the script content of the target compiled script, enabling the target compiled script to call a remote interface to acquire business data. This application extends the writing of dynamic scripts capable of calling remote interfaces, and then, by associating the dynamic script with components of the target page, fills the corresponding components with the business data acquired by the dynamic script, without intruding into the target page's source code, thus maintaining the integrity of the target page. If developers want to change the source of medical business data for a component, they only need to close the currently used dynamic script and open the required dynamic script in the operations management backend. The expansion and decoupling of the data source and data structure can be achieved without modifying the source code, improving the response speed of page updates and the work efficiency of developers, and avoiding the slow response speed and low efficiency problems caused by hard-coded acquisition of medical business data.

[0049] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0050] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:

[0051] Figure 1 This illustration shows a flowchart of a business data acquisition method provided in an embodiment of this application.

[0052] Figure 2A This illustration shows a flowchart of a business data acquisition method provided in an embodiment of this application.

[0053] Figure 2B This illustration shows a flowchart of a business data acquisition method provided in an embodiment of this application.

[0054] Figure 2C This illustration shows a flowchart of a business data acquisition method provided in an embodiment of this application.

[0055] Figure 3A This paper shows a schematic diagram of the structure of a business data acquisition device provided in an embodiment of this application;

[0056] Figure 3B This paper shows a schematic diagram of the structure of a business data acquisition device provided in an embodiment of this application;

[0057] Figure 3C This illustration shows a structural schematic diagram of a business data acquisition device provided in an embodiment of this application.

[0058] Figure 4 A schematic diagram of the device structure of a computer device provided in an embodiment of this application is shown. Detailed Implementation

[0059] Exemplary embodiments of the present application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present application are shown in the drawings, it should be understood that the present application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.

[0060] With the continuous development of internet technology, an increasing number of medical service applications have emerged. These applications typically provide targeted diagnosis, treatment, and management services based on patients' conditions, medical history, and physical examination results. These services are usually displayed on the user's client in the form of activity pages. Currently, enterprises often choose a CMS (Content Management System) architecture to write activity page scripts. Specifically, configuration data for each floor is hard-coded. When a user requests access to the activity page configured in the CMS from the client, the script corresponding to that activity page is run. Each floor, according to its configuration data, calls the corresponding RPC interface to obtain business data from different business parties and displays this data on the client page. However, the applicant recognizes that the hard-coded method of obtaining business data lacks flexibility. If the source of the medical and health data for a floor needs to change, developers must modify the corresponding floor's configuration data in the source code. Furthermore, any changes to the activity page source code require a redeployment process, resulting in slow update response times and low efficiency. Therefore, this application provides a method for acquiring business data. In response to a target page access request, this method detects all page components of the target page and determines the script identifier of the target dynamic script that is in an "on" state and associated with any page component. Further, according to the script identifier, the method queries the memory for the target compiled script corresponding to the target dynamic script. If the target compiled script exists in memory, the target script engine executes the script content of the target compiled script, enabling the target compiled script to call a remote interface to acquire business data. This application extends the writing of dynamic scripts capable of calling remote interfaces, and then, by associating the dynamic script with components of the target page, it achieves the filling of the business data acquired by the dynamic script into the corresponding component, without intruding into the target page's source code, thus maintaining the integrity of the target page. If developers want to change the source of medical business data for a component, they only need to disable the currently used dynamic script and enable the required dynamic script in the operations management backend. The expansion and decoupling of the data source and data structure can be achieved without modifying the source code, improving the response speed of page updates and the work efficiency of developers, and avoiding the slow response speed and low efficiency problems caused by hard-coded acquisition of medical business data.

[0061] This application provides a method for acquiring business data, such as... Figure 1 As shown, the method includes:

[0062] 101. In response to a request to access the target page, detect all page components of the target page and determine the script identifier of the target dynamic script. The target dynamic script is a dynamic script whose open / closed state is on and associated with any page component.

[0063] In this embodiment, the target page is a landing page configured by a CMS (Content Management System). The landing page is a user interface for mobile applications and other clients, composed of multiple page components. Each page component in the landing page can be dynamically configured to use dynamic scripts according to business needs.

[0064] Specifically, in the healthcare field, CMS applications are commonly used to manage and share medical data and documents, as well as to provide healthcare services and support. For example, a hospital's CMS application can provide various functions and services such as patient information management, medical record management, appointment booking, online consultation, and medication delivery. In actual operation, the CMS core processing application responds to user requests for access to a target page sent from the client, detecting all page components of the target page. For each page component, it checks whether the page component is associated with a dynamic script. If the page component is associated with a dynamic script, it checks the enabled / disabled status of each associated dynamic script one by one. When the enabled / disabled status indicates it is closed, the dynamic script is filtered, and the enabled / disabled status of the next dynamic script is checked. When the enabled / disabled status indicates it is open, the dynamic script is used as the target dynamic script, and the enabled / disabled status of the next dynamic script is checked.

[0065] 102. Based on the script identifier, search for the target compiled script corresponding to the target dynamic script in memory.

[0066] The script identifier, or script ID, can be in the form of numbers, letters, or a combination of numbers and letters. This application does not impose specific limitations on the form of the script identifier. The target compilation script is a file that compiles the target dynamic script into a specific bytecode format.

[0067] Because medical applications require real-time responses and processing of large amounts of medical data and documents, using dynamic scripts for data acquisition and processing has become a common practice. However, since the initial compilation of dynamic scripts is time-consuming, in practice, to improve response speed and efficiency, the compiled script is usually cached in local memory for subsequent access and use. Specifically, after the dynamic script is compiled for the first time, the CMS core processing application uses caching tools such as Caffeine to cache the compiled script in local memory. Therefore, in this embodiment, to enable the front-end to respond faster, the CMS core processing application needs to query local memory for the existence of a pre-compiled target dynamic script, i.e., the target compiled script.

[0068] 103. If the target compiled script exists in memory, the target script engine is used to execute the script content of the target compiled script so that the target compiled script can call the remote interface to obtain business data.

[0069] The target script engine is a script engine that matches the scripting language of the target dynamic script. It is used to compile the target dynamic script and perform the evaluation and execution of the target compiled script.

[0070] Specifically, if the target compiled script exists in memory, it means that the CMS core processing application has previously compiled the target dynamic script using a target script engine that matches the target dynamic script language. In this case, the target script engine can be used directly to execute the content of the target compiled script, and the remote interface can be called to retrieve business data by running the target compiled script. In the medical field, caching the target compiled script can provide a more efficient, secure, and reliable operating environment for medical applications, thereby helping medical workers better manage medical data and improve the quality and efficiency of medical services.

[0071] The business data acquisition method provided in this embodiment, in response to a target page access request, detects all page components of the target page and determines the script identifier of the target dynamic script that is in the open state and associated with any page component. Further, according to the script identifier, it queries the target compiled script corresponding to the target dynamic script in memory. If the target compiled script exists in memory, the target script engine executes the script content of the target compiled script, enabling the target compiled script to call a remote interface to acquire business data. This embodiment extends the writing of dynamic scripts capable of calling remote interfaces, and then, by associating the dynamic script with components of the target page, it achieves the filling of the business data acquired by the dynamic script into the corresponding component without intruding into the target page's source code, thus maintaining the integrity of the target page. If developers want to change the source of medical business data for a component, they only need to close the currently used dynamic script and open the required dynamic script in the operations management backend. The expansion and decoupling of the data source and data structure can be achieved without modifying the source code, improving the response speed of page updates and the work efficiency of developers, and avoiding the slow response speed and low efficiency problems caused by hard-coded acquisition of medical business data.

[0072] Furthermore, as a refinement and extension of the specific implementation methods of the above embodiments, and in order to fully illustrate the implementation process of this embodiment, this application provides a method for acquiring business data, such as... Figure 2A As shown, the method includes:

[0073] 201. Set the association between dynamic scripts and page components.

[0074] The operation management backend includes a menu page for configuring and managing dynamic scripts, including language selection, importing, modifying, debugging, approving, and decommissioning / launching. Dynamic scripts support multiple languages ​​and can be written in Groovy, Scala, JavaScript, and Python. During operation, the operation management backend connects to the CMS core processing application. Staff can upload their written dynamic scripts to the CMS core processing application, which then stores them in the database and returns the data identifier of the dynamic script to the operation management backend.

[0075] Furthermore, in the medical field, to improve the flexibility and configurability of CMS applications, it is common practice to allow the uploading of script configuration information and dynamic scripts to the management backend. The script configuration information includes the enabled / disabled status of the dynamic script to be associated, the script identifier of the dynamic script to be associated, and the component identifier associated with the script identifier. The CMS core processing application, according to the script configuration information, sets the enabled / disabled status of the dynamic script to be associated in the database, and determines the page component to be associated according to the component identifier, thus associating the script identifier of the dynamic script with the page component to be associated. It should be noted that when uploading a dynamic script, technical personnel can also upload the script configuration information of that dynamic script simultaneously. In this case, the script configuration information includes the enabled / disabled status of the dynamic script and the component identifier associated with the dynamic script. After storing the dynamic script in the database, the CMS core processing application retrieves the script identifier of the dynamic script. Then, according to the script configuration information, it sets the enabled / disabled status of the dynamic script to be associated, determines the page component corresponding to the component identifier in the script configuration information, and associates the script identifier with that page component.

[0076] 202. In response to a request to access the target page, detect all page components of the target page and determine the script identifier of the target dynamic script.

[0077] In this embodiment, the CMS core processing application responds to a user's target page access request sent by the client by detecting all page components of the target page. For each page component, it checks whether the page component is associated with a dynamic script. If the page component is associated with a dynamic script, it checks the enable / disable status of each associated dynamic script one by one, and determines whether it can be used as a target dynamic script based on the enable / disable status of each dynamic script.

[0078] Specifically, in the healthcare field, CMS applications are commonly used to manage and share medical data and documents, as well as to provide medical services and support. For example, a hospital's CMS application can provide various functions and services such as patient information management, medical record management, appointment booking, online consultation, and drug delivery. In actual operation, the CMS core processing application responds to a target page access request and obtains a list of available components associated with the target page. Further, the CMS core processing application iterates through each page component recorded in the list of available components, selecting page components associated with dynamic scripts as target page components, thus obtaining all target page components corresponding to the target page. Subsequently, it checks the enabled / disabled status of the dynamic scripts associated with each target page component. When the enabled / disabled status is off, the dynamic scripts corresponding to that status are filtered, and the enabled / disabled status of the next dynamic script is checked. When the enabled / disabled status is on, the dynamic script corresponding to that status is selected as the target dynamic script, and the enabled / disabled status of the next dynamic script is checked. In actual operation, a page component can be associated with multiple dynamic scripts. Each dynamic script corresponds to retrieving business data from a specific business party. The dynamic script whose activation status is enabled is used as the target dynamic script to retrieve the business data corresponding to that business party. For example, promotional image component A is associated with three dynamic scripts, A1, A2, and A3, which retrieve service introduction display images from medical service providers a1, a2, and a3, respectively. If dynamic script A2 is enabled, then A2 is used as the target dynamic script, and its execution calls the remote interface to retrieve the service introduction display image provided by medical service provider a2.

[0079] 203. Based on the script identifier, search for the target compiled script corresponding to the target dynamic script in memory.

[0080] Specifically, since medical applications require real-time response and processing of large amounts of medical data and documents, using dynamic scripts for data acquisition and processing has become a common practice. However, since the initial compilation of dynamic scripts is time-consuming, in practical applications, to improve response speed and efficiency, the compiled script is usually cached in local memory for subsequent access and use. Specifically, after the initial compilation of the dynamic script, caching tools such as Caffeine are used to cache the compiled script in local memory. Therefore, in this embodiment, to enable the front-end to respond faster, the CMS core processing application needs to check in local memory whether a pre-compiled target dynamic script, i.e., a target compiled script, exists. If the target compiled script exists in memory, step 204 can be executed to save compilation time, and the target script engine can be used directly to execute the target compiled text to obtain business data. If the target compiled script does not exist in memory, step 205 needs to be executed, which takes time to compile the target dynamic script to obtain the target compiled script. Then, the target script engine is used to execute the target compiled text to obtain business data.

[0081] 204. If the target compiled script exists in memory, the target script engine is used to execute the script content of the target compiled script so that the target compiled script can call the remote interface to obtain business data.

[0082] In the medical field, caching target compiled scripts can provide a more efficient, secure, and reliable operating environment for medical applications, thereby helping healthcare professionals better manage medical data and improve the quality and efficiency of medical services. If the target compiled script exists in memory, it means that the CMS core processing application has already compiled the target dynamic script. In this case, the target script engine can directly execute the target compiled script stored in local memory. The specific process of using the target script engine to execute the target compiled script's content, enabling the target compiled script to call remote interfaces to obtain business data based on the Dubbo SPI architecture, is as follows:

[0083] First, the CMS core processing application passes the GenericService parameter, which is the internal generic interface parameter of the distributed service framework Dubbo, injected from the Spring container via dependency injection, to the Bindings property of the target script engine, and passes the script content and script parameters of the target compiled script to the default property.

[0084] Subsequently, the target script engine executes the content of the target compiled script to generate a generic instance of the generic interface parameter. Specifically, the target dynamic script introduces a Java helper interface attribute bean, which is instantiated to obtain a helper interface attribute instance. The target script engine calls the implementation class of the helper interface attribute instance in the target compiled script and passes in the fully qualified name of the remote interface in the preset attributes. This implementation class can generate, register, and obtain a generic instance of the Dubbo generic interface parameter GenericService based on the fully qualified name of the remote interface.

[0085] Finally, the generic instance extracts script parameters from preset attributes and calls the remote interface to obtain business data based on these parameters. Specifically, the generic instance extracts the method name, parameter type array, and parameter value array from the script parameters in the preset attributes, writes the method name, parameter type array, and parameter value array into the method invocation request $invoke(method_name, param_type, param_value), and executes the method invocation request to generically invoke the target method indicated by the method name to access the remote interface and obtain business data.

[0086] 205. If the target compiled script does not exist in memory, the target dynamic script is retrieved from the database, compiled, and cached in memory. The target compiled script is then executed using the target script engine to enable the target compiled script to call the remote interface to obtain business data.

[0087] In this embodiment, if the target compiled script does not exist in memory, time is required to compile the target dynamic script. After obtaining the target compiled script, the target script engine is used to execute the target compiled text to obtain business data. Specifically, if the target compiled script does not exist in memory, the target dynamic script is retrieved from the database according to the script identifier. Based on the script language and JSR-223 specification of the target dynamic script, the target script engine matching the script language is determined in the engine management class ScriptEngineManager. Subsequently, the target script engine is used to compile the target dynamic script to obtain the target compiled script, and the script identifier is associated with the target compiled script. A preset caching tool, such as Caffeine, is then used to cache the target compiled script with the associated script identifier in memory. Finally, the target script engine executes the script content of the target compiled script to enable the target compiled script to call a remote interface to obtain business data. Furthermore, if the determined target compilation engine cannot support compilation during actual runtime, an exception message is generated and sent to the operation management backend for relevant personnel to handle the exception.

[0088] 206. Generate the target page to be displayed and send the page to be displayed to the client for page display.

[0089] Furthermore, all target dynamic scripts associated with the target page are executed, and all business data obtained from these scripts is populated into the data models of the associated page components, resulting in the target page to be displayed—the page populated with business data. Finally, the page to be displayed is sent to the client for rendering. For example, if the target page displays a patient's medical records, it may contain multiple components, such as a medical record overview, consultation records, and examination reports. Each component needs to call its corresponding target dynamic script to obtain business data and then populate its own data model. In actual runtime, the CMS core processing application executes all target dynamic scripts associated with the target page according to the interface parameters, obtaining all business data returned by the target dynamic scripts. The CMS core processing application then populates the obtained business data into the data models associated with the page components, resulting in the page to be displayed—the target page populated with business data. Finally, the CMS core processing application sends the page to be displayed to the client for rendering.

[0090] In summary, such as Figure 2B and 2C As shown, this application includes a client, a gateway, a CMS core processing application, an operations management backend, and a database. In actual operation, the user uploads a target page access request via the client. This request is forwarded to the CMS core processing application via the gateway, causing the CMS core processing application to respond to the request and detect whether a target dynamic script exists on the target page. If it exists, the CMS core processing application retrieves the target dynamic script from the database based on its script identifier. Further, it queries the local memory to check if a compiled target script exists. If it exists, the generic interface parameter `GenericService` is passed to the preset properties of the target script engine, along with the script content and parameters of the compiled target script. If it does not exist, the target script engine is first determined based on the script language of the target dynamic script. The target dynamic script is then compiled using the target script engine, and the generic interface parameter `GenericService` is passed to the preset properties of the target script engine, along with the script content and parameters of the compiled target script. Finally, the target script engine executes the target compiled script, enabling the target compiled script to call remote interfaces to obtain business data, populate the data model of the corresponding component with the business data, and then send the target page to the client for display.

[0091] The business data acquisition method provided in this application, in response to a target page access request, detects all page components of the target page and determines the script identifier of the target dynamic script that is in the open state and associated with any page component. Further, according to the script identifier, it queries the target compiled script corresponding to the target dynamic script in memory. If the target compiled script exists in memory, it executes the script content of the target compiled script using the target script engine, so that the target compiled script calls a remote interface to acquire business data. This application extends the writing of dynamic scripts capable of calling remote interfaces, and then, by associating the dynamic script with components of the target page, it achieves the filling of the business data acquired by the dynamic script into the corresponding component, without intruding into the page source code of the target page, thus maintaining the integrity of the target page. Once developers want to change the source of medical business data for a component, they only need to close the currently used dynamic script and open the required dynamic script in the operation management backend. The expansion and decoupling of the data source and data structure can be achieved without modifying the source code, improving the response speed of page updates and the work efficiency of developers, and avoiding the slow response speed and low efficiency problems caused by hard-coded acquisition of medical business data.

[0092] Furthermore, as Figure 1 To specifically implement the method, this application provides a business data acquisition device, such as... Figure 3A As shown, the device includes: a detection module 301, a query module 302, and an acquisition module 303.

[0093] The detection module 301 is used to respond to a target page access request, detect all page components of the target page, and determine the script identifier of the target dynamic script, wherein the target dynamic script is a dynamic script whose open state is on and associated with any page component.

[0094] The query module 302 is used to query the target compiled script corresponding to the target dynamic script in memory according to the script identifier;

[0095] The acquisition module 303 is used to execute the script content of the target compilation script using the target script engine if the target compilation script exists in the memory, so that the target compilation script can call the remote interface to obtain business data.

[0096] In specific application scenarios, such as Figure 3B As shown, the device further includes a receiving module 304 and a setting module 305.

[0097] The receiving module 304 is used to receive dynamic scripts uploaded by the operation management backend, store the dynamic scripts in the database, obtain the script identifier of the dynamic scripts, and return the script identifier to the operation management backend;

[0098] The receiving module 304 is also used to receive script configuration information uploaded by the operation management background. The script configuration information includes the start / stop status of the dynamic script to be associated, the script identifier of the dynamic script to be associated, and the component identifier associated with the script identifier.

[0099] The setting module 305 is used to set the on / off state of the dynamic script to be associated in the database according to the script configuration information, and to determine the page component to be associated according to the component identifier, and associate the script identifier of the dynamic script to be associated with the page component to be associated.

[0100] In a specific application scenario, the detection module 301 is used to respond to the target page access request, obtain a list of available components associated with the target page; traverse each page component recorded in the list of available components, take the page component associated with the dynamic script as the target page component, obtain all target page components corresponding to the target page, and detect the on / off state of the dynamic script associated with each of the target page components; when the on / off state is on, take the dynamic script corresponding to the on / off state as the target dynamic script.

[0101] In a specific application scenario, the acquisition module 303 is further configured to: if the target compiled script does not exist in the memory, retrieve the target dynamic script from the database according to the script identifier; determine the target script engine based on the script language of the target dynamic script, wherein the target script engine is a script engine that matches the script language; use the target script engine to compile the target dynamic script to obtain the target compiled script, and associate the script identifier with the target compiled script; use a preset caching tool to cache the target compiled script associated with the script identifier in the memory; and use the target script engine to execute the script content of the target compiled script so that the target compiled script calls a remote interface to obtain business data.

[0102] In a specific application scenario, the acquisition module 303 is used to pass general interface parameters to the preset attributes of the target script engine, and to pass the script content and script parameters of the target compiled script to the preset attributes. The general interface parameters are internal interface parameters of the distributed service framework injected from the dependency injection container. The target script engine executes the script content of the target compiled script to generate a general instance of the general interface parameters, so that the general instance extracts the script parameters from the preset attributes and calls the remote interface to obtain the business data based on the script parameters.

[0103] In a specific application scenario, the acquisition module 303 is used to call the implementation class of the helper interface attribute instance in the target compiled script using the target script engine, extract the fully qualified name of the remote interface from the script parameters in the preset attribute, and generate a general instance of the general interface parameter based on the fully qualified name; extract the method name, parameter type array, and parameter value array from the script parameters in the preset attribute through the general instance, write the method name, parameter type array, and parameter value array into the method call request, and execute the method call request to generalize the call to the target method indicated by the method name to access the remote interface and obtain the business data.

[0104] In specific application scenarios, such as Figure 3C As shown, the device also includes a display module 306.

[0105] The display module 306 is used to execute all the target dynamic scripts associated with the target page, fill all the business data obtained by all the target dynamic scripts into the data model of the associated page component one by one to obtain the page to be displayed, and send the page to be displayed to the client for rendering and display.

[0106] The apparatus provided in this application, in response to a target page access request, detects all page components of the target page and determines the script identifier of the target dynamic script that is in the open state and associated with any page component. Further, according to the script identifier, it queries the memory for the target compiled script corresponding to the target dynamic script. If the target compiled script exists in memory, the target script engine executes the script content of the target compiled script, enabling the target compiled script to call a remote interface to obtain business data. This application extends the writing of dynamic scripts capable of calling remote interfaces, and then, by associating the dynamic script with components of the target page, it achieves the filling of the business data obtained by the dynamic script into the corresponding component without intruding into the target page's source code, thus maintaining the integrity of the target page. If developers want to change the source of medical business data for a component, they only need to close the currently used dynamic script and open the required dynamic script in the operations management backend. The expansion and decoupling of the data source and data structure can be achieved without modifying the source code, improving the response speed of page updates and the work efficiency of developers, and avoiding the slow response speed and low efficiency problems caused by hard-coded methods of obtaining medical business data.

[0107] It should be noted that other corresponding descriptions of the functional units involved in the business data acquisition device provided in this application embodiment can be found by referring to... Figure 1 The corresponding descriptions in Figure 2 will not be repeated here.

[0108] Based on the above, Figure 1As shown in Figure 2, this embodiment also provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the business data acquisition method.

[0109] Based on this understanding, the technical solution of this application can be embodied in the form of a software product. The software product to be identified can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive), including several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods described in the various implementation scenarios of this application.

[0110] Based on the above, Figure 1 The method shown in Figure 2, and Figures 3A to 3C The illustrated business data acquisition device embodiment, in order to achieve the above objectives, in an exemplary embodiment, refers to... Figure 4 Furthermore, a device is provided, comprising a communication bus, a processor, a memory, and a communication interface. It may also include input / output interfaces and a display device, wherein the various functional units can communicate with each other via the bus. The memory stores a computer program, and the processor executes the program stored in the memory to perform the business data acquisition method described in the above embodiments.

[0111] Optionally, the physical device may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.

[0112] Those skilled in the art will understand that the physical device structure for acquiring business data provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.

[0113] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the aforementioned physical device, supporting the operation of information processing programs and other software and / or programs to be identified. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.

[0114] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented using hardware. By applying the technical solution of this application, in response to a target page access request, all page components of the target page are detected, and the script identifier of the target dynamic script that is in the open state and associated with any page component is determined. Further, according to the script identifier, the target compiled script corresponding to the target dynamic script is queried in memory. If the target compiled script exists in memory, the target script engine is used to execute the script content of the target compiled script, so that the target compiled script calls the remote interface to obtain business data. Compared with the prior art, the embodiments of this application extend the writing of dynamic scripts that can call remote interfaces, and then, by associating the dynamic script with the components of the target page, the business data obtained by the dynamic script is filled into the corresponding component, without intruding into the page source code of the target page, thus maintaining the integrity of the target page. Once the developers want to change the source of medical business data of the component, they only need to close the currently used dynamic script and open the required dynamic script in the operation management backend. Without modifying the source code, the data source and data structure can be expanded and decoupled, improving the response speed of page updates and the work efficiency of developers, and avoiding the slow response speed and low efficiency caused by hard-coded acquisition of medical business data.

[0115] Those skilled in the art will understand that the accompanying drawings are merely schematic diagrams of a preferred embodiment, and the modules or processes shown in the drawings are not necessarily essential for implementing this application.

[0116] Those skilled in the art will understand that the modules in the apparatus of the implementation scenario can be distributed within the apparatus of the implementation scenario as described, or they can be located in one or more apparatuses different from this implementation scenario, with corresponding changes. The modules of the above-described implementation scenario can be combined into one module, or they can be further divided into multiple sub-modules.

[0117] The serial numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of the implementation scenario.

[0118] The above disclosures are only a few specific implementation scenarios of this application. However, this application is not limited to these. Any variations that can be conceived by those skilled in the art should fall within the protection scope of this application.

Claims

1. A method for acquiring business data, characterized in that, include: In response to a target page access request, all page components of the target page are detected, and the script identifier of the target dynamic script is determined. The target dynamic script is a dynamic script whose open / closed state is on and associated with any page component. According to the script identifier, query the target compiled script corresponding to the target dynamic script in memory; If the target compilation script exists in the memory, the target script engine is used to execute the script content of the target compilation script so that the target compilation script can call the remote interface to obtain business data; The step of using a target script engine to execute the script content of the target compiled script, so that the target compiled script calls a remote interface to obtain business data, includes: The general interface parameters are passed to the preset properties of the target script engine, and the script content and script parameters of the target compiled script are passed to the preset properties. The general interface parameters are the internal interface parameters of the distributed service framework injected from the dependency injection container. The target script engine is used to execute the script content of the target compiled script to generate a general instance of the general interface parameters, so that the general instance extracts the script parameters from the preset attributes and calls the remote interface to obtain the business data according to the script parameters; The step of executing the target compiled script using the target script engine to generate a general instance of the general interface parameters, so that the general instance extracts the script parameters from the preset attributes, and calls the remote interface to obtain the business data based on the script parameters, includes: The target script engine calls the implementation class of the helper interface attribute instance in the target compilation script, extracts the fully qualified name of the remote interface from the script parameters in the preset attribute, and generates a general instance of the general interface parameter based on the fully qualified name. The general instance extracts the method name, parameter type array, and parameter value array from the script parameters in the preset attributes, writes the method name, parameter type array, and parameter value array into a method call request, and executes the method call request to generalize the call to the target method indicated by the method name to access the remote interface and obtain the business data.

2. The method according to claim 1, characterized in that, Before detecting all page components of the target page in response to a target page access request, the method further includes: Receive the dynamic script uploaded by the operation management backend, store the dynamic script in the database, obtain the script identifier of the dynamic script, and return the script identifier to the operation management backend; Receive script configuration information uploaded by the operation management backend. The script configuration information includes the start / stop status of the dynamic script to be associated, the script identifier of the dynamic script to be associated, and the component identifier associated with the script identifier. In the database, according to the script configuration information, the start / stop status of the dynamic script to be associated is set, and the page component to be associated is determined according to the component identifier, and the script identifier of the dynamic script to be associated is associated with the page component to be associated.

3. The method according to claim 1, characterized in that, The step of responding to a target page access request by detecting all page components of the target page and determining the script identifier of the target dynamic script includes: In response to the target page access request, obtain a list of available components associated with the target page; Iterate through each page component recorded in the list of available components, take the page component associated with the dynamic script as the target page component, obtain all the target page components corresponding to the target page, and detect the opening and closing status of the dynamic script associated with each of the target page components. When the open / closed state is in the open state, the dynamic script corresponding to the open / closed state is used as the target dynamic script.

4. The method according to claim 1, characterized in that, After querying the target compiled script corresponding to the target dynamic script in memory according to the script identifier, the method further includes: If the target compiled script does not exist in the memory, the target dynamic script is retrieved from the database according to the script identifier, and the target script engine is determined according to the script language of the target dynamic script, wherein the target script engine is a script engine that matches the script language. The target script engine is used to compile the target dynamic script to obtain the target compiled script, and the script identifier is associated with the target compiled script. A preset caching tool is used to cache the target compilation scripts associated with script identifiers in the memory. The target script engine is used to execute the script content of the target compiled script, so that the target compiled script can call a remote interface to obtain business data.

5. The method according to claim 1, characterized in that, After the target script engine executes the script content of the target compiled script to enable the target compiled script to call a remote interface to obtain business data, the method further includes: Execute all the target dynamic scripts associated with the target page, fill all the business data obtained by all the target dynamic scripts into the data model of the associated page component one by one, obtain the page to be displayed, and send the page to be displayed to the client for rendering and display.

6. A business data acquisition device, characterized in that, include: The detection module is used to respond to a target page access request, detect all page components of the target page, and determine the script identifier of the target dynamic script, wherein the target dynamic script is a dynamic script whose open / closed state is on and associated with any page component. The query module is used to query the target compiled script corresponding to the target dynamic script in memory according to the script identifier; The acquisition module is used to execute the script content of the target compilation script using the target script engine if the target compilation script exists in the memory, so that the target compilation script can call the remote interface to obtain business data. The acquisition module is specifically used to pass general interface parameters to the preset properties of the target script engine, and to pass the script content and script parameters of the target compiled script to the preset properties. The general interface parameters are internal interface parameters of the distributed service framework injected from the dependency injection container. The target script engine is used to execute the script content of the target compiled script to generate a general instance of the general interface parameters, so that the general instance extracts the script parameters from the preset attributes and calls the remote interface to obtain the business data according to the script parameters; The acquisition module is specifically used to call the implementation class of the helper interface attribute instance in the target compilation script using the target script engine, extract the fully qualified name of the remote interface from the script parameters in the preset attribute, and generate a general instance of the general interface parameter based on the fully qualified name. The general instance extracts the method name, parameter type array, and parameter value array from the script parameters in the preset attributes, writes the method name, parameter type array, and parameter value array into a method call request, and executes the method call request to generalize the call to the target method indicated by the method name to access the remote interface and obtain the business data.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

8. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Page display method and device, electronic equipment and storage medium

    CN113656720A

  • Webpage script control method and device, equipment and storage medium

    CN115017442A