A dynamic data acquisition method, device, equipment and readable medium
By receiving user events triggering operations and dynamically assigning address parameters of data interface addresses using preset parameter values of target components, the problem of limited dynamic data acquisition range in the prior art is solved, and the effect of flexibly adjusting the data acquisition range is achieved.
Patent Information
- Application Number
- CN202110990692.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-26
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2041-08-26
AI Technical Summary
In the prior art, the dynamic data acquisition range is limited and the modification is inconvenient, resulting in the data acquisition range being limited and cannot be flexibly adjusted when the list of parameter values corresponding to the address parameters of the data interface address is fixed and the data acquisition range is not flexibly adjusted.
By receiving the user's event trigger operation for the target component, the target variable is assigned a value by using the value of the preset parameter in the component information of the target component, and the value of the target variable is assigned to the address parameters in the data interface address, thereby dynamically obtaining the target data.
It realizes the flexible adjustment of the address parameters of the data interface address without manually binding the data acquisition interface or manually setting the address parameter value list, and dynamically obtaining the latest target data, avoiding the inefficiency and error-prone caused by manual configuration. , cumbersome operation issues.
Smart Images

Figure CN113672304B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a dynamic data acquisition method, device, equipment and computer-readable medium. Background Art
[0002] When building a data visualization project, a data interface is used to dynamically obtain data. During the project construction process, the project builder can pre-configure a parameter value list corresponding to the address parameters in the data interface address. After the project is built, when the project user obtains data based on the interface address, the data can be dynamically obtained by dynamically assigning each parameter value in the parameter value list to the address parameters in the interface address.
[0003] Usually, when the project is built, the parameter value list corresponding to the address parameter is fixed, so the dynamic data acquisition range is limited to the case where the address parameter takes values from the fixed parameter value list. In actual application, if you want to adjust the dynamic data acquisition range based on the interface address, the project builder needs to modify or rebuild the parameter value list.
[0004] In view of this, a more flexible dynamic data acquisition method needs to be provided. Summary of the invention
[0005] The embodiments of the present specification provide a dynamic data acquisition method, apparatus, device and computer-readable medium to solve the problems of the existing dynamic data acquisition methods, such as limited dynamic data acquisition range and inconvenient modification.
[0006] To solve the above technical problems, the embodiments of this specification are implemented as follows:
[0007] A dynamic data acquisition method provided by an embodiment of the present specification includes: receiving an event trigger operation performed by a user on a target component; the event trigger operation is used to assign a value to a target variable; in response to the event trigger operation, assigning the value of a preset parameter in the component information of the target component to the target variable; the value of the target variable is used to assign a target address parameter in a target data interface address; in response to the assignment event to the target variable, based on the target data interface address containing the target address parameter, acquiring target data from a target data interface corresponding to the target data interface address.
[0008] A dynamic data acquisition device provided by an embodiment of the present specification includes: an event trigger operation receiving module, which is used to receive an event trigger operation performed by a user on a target component; the event trigger operation is used to assign a value to a target variable; a target variable assignment module, which is used to assign the value of a preset parameter in the component information of the target component to the target variable in response to the event trigger operation; the value of the target variable is used to assign a target address parameter in a target data interface address; and a target data acquisition module, which is used to acquire target data from a target data interface corresponding to the target data interface address based on a target data interface address containing the target address parameter in response to an assignment event to the target variable.
[0009] A dynamic data acquisition device provided in an embodiment of the present specification includes:
[0010] at least one processor; and,
[0011] a memory communicatively connected to the at least one processor; wherein,
[0012] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0013] Receive an event trigger operation performed by a user on a target component; the event trigger operation is used to assign a value to a target variable; in response to the event trigger operation, assign the value of a preset parameter in the component information of the target component to the target variable; the value of the target variable is used to assign a target address parameter in a target data interface address; in response to the assignment event to the target variable, based on the target data interface address containing the target address parameter, obtain target data from a target data interface corresponding to the target data interface address.
[0014] An embodiment of the present specification provides a computer-readable medium on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement a dynamic data acquisition method.
[0015] One embodiment of the present specification can achieve at least the following beneficial effects: when a user operates a target component to obtain target data, the parameter value is first obtained from the component information and assigned to the target variable, and then the value of the target variable is used to assign the address parameter in the data interface address, thereby making it possible to obtain the latest target data based on the updated data interface address. Even if the target data is updated, there is no need to manually bind the data acquisition interface or manually set the value list of the address parameter, thereby avoiding problems such as low efficiency, easy errors, and cumbersome operations caused by manual configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0017] Figure 1 A flow chart of a dynamic data acquisition method provided in an embodiment of this specification;
[0018] Figure 2 A schematic diagram of a setting page for a target event provided in an embodiment of this specification;
[0019] Figure 3 The embodiments of this specification provide corresponding to Figure 1 A structural schematic diagram of a dynamic data acquisition device;
[0020] Figure 4 The embodiments of this specification provide corresponding to Figure 1 A structural schematic diagram of a dynamic data acquisition device. DETAILED DESCRIPTION
[0021] In the prior art, when building a data visualization project, a data interface is used to dynamically obtain data. During the project building process, the project builder can pre-configure a parameter value list corresponding to the address parameter in the data interface address. After the project is built, when obtaining data based on the interface address, the data can be dynamically obtained by dynamically assigning each parameter value in the parameter value list to the address parameter in the interface address.
[0022] For example, if you need to obtain relevant descriptive data (e.g., population data, economic data, etc.) of different cities through a certain data interface address, you can configure parameter values corresponding to multiple cities in the parameter value list. For example, you can configure parameter values "1", "2", and "3" in the parameter value list to correspond to the cities "Beijing", "Shanghai", and "Shenzhen", respectively. After the configuration is completed, in response to different trigger conditions, the parameter values "1", "2", or "3" can be assigned to the address parameters in the data interface, respectively, so that the descriptive data related to "Beijing", "Shanghai", or "Shenzhen" can be obtained, respectively.
[0023] Usually, when the project is built, the parameter value list corresponding to the address parameter is fixed, so the dynamic data acquisition range is limited to the case where the address parameter takes values from the fixed parameter value list. In actual application, if you want to adjust the dynamic data acquisition range based on the interface address, the project builder needs to modify or rebuild the parameter value list.
[0024] Continuing with the previous example, since only the parameter values corresponding to the three cities of "Beijing", "Shanghai" and "Shenzhen" are configured in the parameter value list corresponding to the address parameter, which are "1", "2" and "3" respectively, when the project user uses the constructed project, only the data corresponding to the three cities of "Beijing", "Shanghai" and "Shenzhen" can be obtained through the data interface. In actual applications, if you want to obtain relevant description data of other cities such as "Guangzhou" based on the data interface, the project builder needs to manually modify the aforementioned parameter value list, for example, configure the parameter value "4" in the parameter value list to correspond to the city "Guangzhou". In addition, during this modification process, the project builder needs to accurately set the corresponding relationship between the parameter value and the city, such as the corresponding relationship of "Guangzhou-4".
[0025] In addition, in some specific application scenarios, for example, a data interface address is used to obtain the top 30 cities in China's economic size. As time goes by, the list of cities will change accordingly. Every time the list of cities changes, the project builder needs to manually modify the parameter value list. For another example, a data interface address is used to obtain data with high timeliness, such as countries or regions with current global epidemics. As time goes by, the list of countries or regions will change frequently, for example, it may change in hours or days. In this case, it will be very difficult to manually modify the parameter value list.
[0026] Based on the above description, it can be known that in the prior art, the parameter value list corresponding to the address parameters of the data interface address is manually configured. On the one hand, since the number of parameters involved in the parameter value list is usually large, the workload of the project builder for each manual modification is large and prone to errors; on the other hand, when the parameter value list changes frequently over time, the project builder needs to modify the parameter value list more frequently, which will also lead to a sharp increase in workload and is prone to errors.
[0027] In order to solve the defects in the prior art, the embodiments of this specification provide a more flexible dynamic data acquisition method. Based on the solution of the embodiments of this specification, an intermediate variable is used to assign a value to the address parameter of the interface address, and the value of the intermediate variable can be assigned by the parameter value of the preset parameter of the page component. Therefore, if the information of the page component changes, the parameter value of the preset parameter of the page component changes, which will cause the intermediate variable to change, and then cause the parameter value of the address parameter in the target interface address to change, so that different data results can be obtained based on the target interface address.
[0028] For example, when the top four cities in terms of economic size change from "Beijing", "Shanghai", "Shenzhen" and "Guangzhou" to "Beijing", "Shanghai", "Shenzhen" and "Chongqing", the project builders no longer need to manually configure the parameter value list, for example, the original parameter value list containing "1" (parameter corresponding to Beijing), "2" (parameter corresponding to Shanghai), "3" (parameter corresponding to Shenzhen) and "4" (parameter corresponding to Guangzhou) is modified to a parameter value list containing "1" (parameter corresponding to Beijing), "2" (parameter corresponding to Shanghai), "3" (parameter corresponding to Shenzhen) and "5" (parameter corresponding to Chongqing). Based on the scheme of the embodiments of this specification, when the preset assignment trigger condition is triggered, the parameter value of the preset parameter corresponding to the component related to the target city (for example, Chongqing) can be automatically obtained and assigned to the intermediate variable, thereby causing the relevant data of the target city (for example, Chongqing) to be obtained based on the interface address containing the address parameter assigned by the intermediate variable.
[0029] For another example, when the list of cities where the epidemic occurs changes from "City A", "City B" and "City C" to "City B" and "City D", the project builders no longer need to manually configure the parameter value list, for example, modify the original parameter value list containing "a" (City A parameter), "b" (City B parameter), and "c" (City C parameter) to a parameter value list containing "b" (City B parameter) and "d" (City D parameter). Based on the scheme of the embodiment of this specification, when the preset assignment trigger condition is triggered, the parameter value of the preset parameter corresponding to the component related to the target city (for example, City D) can be automatically obtained and assigned to the intermediate variable, thereby causing the relevant data of the target city (for example, City D) to be obtained based on the interface address containing the address parameter assigned by the intermediate variable.
[0030] It can be seen that based on the solution of the embodiment of this specification, the address parameters of the interface address are dynamically assigned by dynamically obtaining the values of the parameters of the page components, so as to achieve the purpose of more convenient dynamic data acquisition. This process does not require project builders to manually configure parameter value lists multiple times, which is efficient and not prone to errors.
[0031] In order to make the purpose, technical solutions and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of one or more embodiments of this specification.
[0032] It should be understood that although the terms first, second, third, etc. may be used in this application document to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
[0033] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.
[0034] Figure 1 The following is a flow chart of a dynamic data acquisition method provided by an embodiment of the present specification. From the perspective of the program, the execution subject of the process can be a program installed in an application terminal or an application server.
[0035] like Figure 1 As shown, the process may include the following steps:
[0036] Step 102: receiving an event triggering operation performed by a user on a target component; the event triggering operation is used to assign a value to a target variable.
[0037] In actual application, when previewing the constructed data visualization project, or when the terminal user browses the constructed data visualization project, the solution of the embodiment of this specification can be triggered to execute. The user in step 102 can refer to the user who previews or browses the constructed visualization project.
[0038] In an embodiment of the present specification, when a user wants to obtain target data, he can operate on a target component associated with the target data. The association relationship between the target component and the target data can be pre-established. Specifically, the association relationship at least includes: the value of the preset parameter in the target component can be used to assign a value to an address parameter in the data interface address used to obtain the target data. For example, a user can obtain descriptive data related to city A by operating the component corresponding to city A in the page.
[0039] In practice, the target component can be displayed on the page based on the component information obtained from the specified data interface. Specifically, before receiving the event triggering operation performed by the user on the target component, it can also include: obtaining component information from the specified data interface; and based on the component information, displaying the target component corresponding to the component information on the page. The component information at least includes the value of a preset parameter, the value of the preset parameter can be used to assign to the target variable, and the value of the target variable can be used to assign to the target address parameter in the target data interface address.
[0040] The target component may be bound to a target event. Specifically, before receiving an event triggering operation performed by a user on the target component, a target event associated with the target component may be established. The event information of the target event may at least include the event triggering condition and event execution action of the target event; the event execution action may at least include assigning a value to a target variable using the value of a preset parameter in the component information of the target component.
[0041] The target event may be pre-set by the project builder. For example, the event triggering condition may include a mouse click operation, a mouse slide operation, a touch click operation, a touch long press operation, a touch slide operation, etc., but is not limited to these examples. The mouse click operation may include a mouse single click operation, a mouse right click operation, a mouse double click operation, etc., but is not limited to this. The specific event triggering condition may be set according to actual needs, and will not be described one by one here.
[0042] For ease of understanding, the Figure 2 Provide explanation. Figure 2 This is a schematic diagram of a target event setting page provided in an embodiment of this specification. Figure 2 As shown in , as an example, a "variable change" event can be predefined, the event trigger condition of the event can be set to "mouse click", and the event execution action of the event can be set to implement "variable assignment". Specifically, the "variable assignment" action can be set to assign the value of the preset parameter "changetype" to the target variable "types".
[0043] In step 102, the receiving of the event triggering operation performed by the user on the target component may specifically include: receiving the user's operation on the target component; then determining whether the operation on the target component meets the event triggering condition for triggering the target event, and obtaining a first judgment result; if the first judgment result indicates that the operation on the target component meets the event triggering condition for triggering the target event, then determining that the operation on the target component is the event triggering operation for triggering the target event, thereby continuing to execute subsequent operation steps, specifically, the value of the preset parameter in the component information of the target component can be assigned to the target variable.
[0044] Following the previous example, Figure 2 As shown, in actual application, when the user performs an operation, it will be determined whether the user's operation is the "mouse click" operation defined in the target event. If so, the "variable assignment" event corresponding to the target event will be triggered, that is, the value of the preset parameter "changetype" is assigned to the target variable "types".
[0045] Step 104: In response to the event triggering operation, assign the value of the preset parameter in the component information of the target component to the target variable; the value of the target variable is used to assign a value to a target address parameter in a target data interface address.
[0046] Continuing with the previous example, in the variable assignment operation defined in the target event, the assigned target variable "types" can be used to assign a value to an address parameter in the data interface address accessed when the user obtains the target data, and the value of the preset parameter "changetype" used to assign a value to the target variable "types" comes from the component information of the target component currently operated by the user.
[0047] In practice, a batch of target components can be created when setting up a project, and associated target events can be created for the target components. When a user triggers a target event for a target component, the return data of the target component can be obtained first and the preset operation of assigning a variable in the target event can be performed. Specifically, in step 104, the value of a preset parameter (e.g., "changetype") is actually obtained first, and then the value of the preset parameter (e.g., "changetype") is assigned to the target variable (e.g., "types").
[0048] In the embodiments of this specification, the component information may be in a form that facilitates obtaining the value of a preset parameter. Here, for example, three components may be defined as follows. [
[0050] {
[0051] id: 1,
[0052] name: 'A City',
[0053] changeType: 100
[0054] },
[0055] {
[0056] id: 2,
[0057] name: 'B City',
[0058] changeType: 200
[0059] },
[0060] {
[0061] id: 3,
[0062] name: 'City',
[0063] changeType: 300
[0064] } ]
[0066] In this example, three components are defined, and the component information of each component includes three component parameters "id", "name" and "changeType", and the values of these three parameters.
[0067] In practical application, combined with Figure 2 In the example, when the user clicks on the first component "A City" on the page with the mouse, it can trigger the acquisition of the value "100" of the preset parameter "changetype", and assign "100" to the target variable "types"; when the user clicks on the second component "B City" at the end of the page with the mouse, it can trigger the acquisition of the value "200" of the preset parameter "changetype", and assign "200" to the target variable "types"; and when the user clicks on the third component "C City" on the page with the mouse, it can trigger the acquisition of the value "300" of the preset parameter "changetype", and assign "300" to the target variable "types".
[0068] Step 106: In response to the assignment event to the target variable, based on the target data interface address including the target address parameter, obtain target data from the target data interface corresponding to the target data interface address.
[0069] In actual applications, optionally, a monitoring event can be set to execute an operation of obtaining target data based on the target data interface address containing the target address parameter when a change in the value of the target variable is monitored, or when a target event for assigning a value to the target variable is monitored to be triggered.
[0070] For ease of understanding, an example is given here. For example, the target data interface address for obtaining target data may be "http: / / raykite.com / xxxxxx?type=${types}", in which "type" is the address parameter and "types" is the target variable. In response to the assignment event of the target variable to the target variable, a new data request may be caused, that is, a data request based on the address containing the target variable "types" may be caused.
[0071] In an optional embodiment, the acquired target data may be used for display in a visual form such as a chart. When displayed in a chart form, for example, data acquired from a target data interface address may be used for display in a corresponding chart.
[0072] Optionally, after acquiring the target data from the target data interface corresponding to the target data interface address, if a chart corresponding to the acquired target data has not yet been drawn in the page, you can: use the target data to draw a target chart corresponding to the target component based on a target chart template that has a corresponding relationship with the target data interface address.
[0073] Optionally, after obtaining the target data from the target data interface corresponding to the target data interface address, if a chart corresponding to the obtained target data has been drawn in the page, it is possible to: use the target data to update the target chart drawn based on the target chart template that has a corresponding relationship with the target data interface address, and obtain an updated target chart corresponding to the target component.
[0074] When applied to a specific scenario, for example, if the user clicks on the component corresponding to "City A", the chart corresponding to "City A" can be displayed or updated on the page, wherein the data used to draw the chart corresponding to "City A" comes from the target data interface address, and the value of the address parameter in the target data interface address comes from the assignment of the target variable, and the assignment of the target variable comes from the component information of the component corresponding to "City A" clicked by the user, and the component information of the component corresponding to "City A" is obtained from the specified data interface.
[0075] In practice, assuming that a new "City D" is added, there is no need to modify the target data interface address, nor the target variable used to assign the address parameters in the target data interface address, and there is no need to modify the preset parameters used to assign the target variable. Based on the solution of the embodiment of this specification, the component information corresponding to "City D" can be automatically obtained from the specified data interface, that is, the display of the chart corresponding to "City A" can be realized.
[0076] It should be understood that in the methods described in one or more embodiments of this specification, the order of some steps can be adjusted according to actual needs, or some steps can be omitted.
[0077] It should be noted that step 102, step 104 and step 106 in the embodiment of this specification are described in the order of program execution in the process of acquiring the target data, and when the project developer is building the project, the order of setting the data interface address and setting the target event can be adjusted as needed. For example, the data interface address of the target data used to draw the chart can be set first, and the target variable used to assign the address parameter in the data interface address can be set; then the target event bound to the target component can be set to assign the target variable.
[0078] based on Figure 2In the method, when the user operates the target component to obtain the target data, the parameter value is first obtained from the component information and assigned to the target variable, and then the value of the target variable is used to assign the address parameter in the data interface address, thereby enabling the latest target data to be obtained based on the updated data interface address. Even if the target data is updated, there is no need to manually bind the data acquisition interface or manually set the value list of the address parameter, thereby avoiding problems such as low efficiency, easy errors, and cumbersome operations caused by manual configuration.
[0079] based on Figure 1 The method can make multiple interfaces deeply linked within the expected range. Specifically, the linkage between the designated data interface for obtaining component information and the target data interface for obtaining target data is realized. In the process of data association, instead of binding fixed values to the parameters in the data request address, a dynamic mapping relationship is established. Therefore, in actual operation, the data content value returned by a data interface (for example, the designated data interface) can be used to control the data obtained by the linked data interface (for example, the target data interface).
[0080] based on Figure 1 The method, the embodiments of this specification also provide some specific implementation methods of the method, which are described below.
[0081] In an optional embodiment, multiple target variables can be assigned values in the same target event, and the multiple target variables can also be used to assign values to different address parameters, and the different assigned address parameters can belong to the same target data interface address or different target data interface addresses. The following takes the case of assigning values to two target variables in the same target event as an example for explanation. It can be understood that in practice, it is not limited to assigning values to two target variables, and more target variables can be assigned values in the same target event.
[0082] Specifically, the event execution action corresponding to the target event may include: using the value of the first preset parameter in the component information of the target component to assign a value to the first target variable, and using the value of the second preset parameter in the component information of the target component to assign a value to the second target variable. Thus, assigning the value of the preset parameter in the component information of the target component to the target variable may include: assigning the value of the first preset parameter in the component information of the target component to the first target variable; and assigning the value of the second preset parameter in the component information of the target component to the second target variable.
[0083] Optionally, the value of the first target variable and the value of the second target variable can be used to assign values to different target address parameters in the same target data interface address. Specifically, the value of the first target variable can be used to assign a value to a first target address parameter in the target data interface, and the value of the second target variable can be used to assign a value to a second target address parameter in the target data interface.
[0084] Correspondingly, in response to the assignment event to the target variable, based on the target data interface address including the target address parameter, obtaining the target data from the target data interface corresponding to the target data interface address, may specifically include: in response to the assignment event to the first target variable and / or the assignment event to the second target variable, based on the target data interface address including the first target address parameter and the second target address parameter, obtaining the target data from the target data interface corresponding to the target data interface address.
[0085] For example, taking the target data interface address "http: / / raykite.com / xxxxxx? type1=${types1}&type2=${types2}" as an example, the value of the first preset parameter "changeType1" can be used to assign a value to the first target variable "types1", and the value of the second preset parameter "changeType2" can be used to assign a value to the second target variable "types2". In actual application, when at least one of the first target variable "types1" or the second target variable "types2" is assigned a value, an operation of obtaining target data based on the target data interface address containing the address parameter "type1" assigned by the first target variable "types1" and the address parameter "type2" assigned by the second target variable "type2" can be triggered.
[0086] Based on this example, optionally, the target variable used to assign values to different address parameters in the same target data interface address can be assigned in the same target event or in different target events. Continuing with the above example, the event execution action of assigning the value of the first preset parameter "changeType1" to the first target variable "types1" and the event execution action of assigning the value of the second preset parameter "changeType2" to the second target variable "types2" can be defined in the same target event or in different target events.
[0087] Optionally, the value of the first target variable and the value of the second target variable can be used to assign values to different target address parameters in different target data interface addresses, respectively. Specifically, the value of the first target variable can be used to assign a value to a first target address parameter in a first target data interface address; the value of the second target variable can be used to assign a value to a second target address parameter in a second target data interface address.
[0088] Correspondingly, in response to the assignment event to the target variable, based on the target data interface address including the target address parameter, the target data is obtained from the target data interface corresponding to the target data interface address, which may specifically include: in response to the assignment event to the first target variable, based on the first target data interface address including the first target address parameter, the first target data is obtained from the first target data interface corresponding to the first target data interface address, the value of the first target address parameter is assigned by the value of the first target variable; and / or, in response to the assignment event to the second target variable, based on the second target data interface address including the second target address parameter, the second target data is obtained from the second target data interface corresponding to the second target data interface address, the value of the second target address parameter is assigned by the value of the second target variable.
[0089] For example, the value of the first preset parameter "changeType1" can be used to assign a value to the first target variable "types1" in the first target data interface address, and the value of the second preset parameter "changeType2" can be used to assign a value to the second target variable "types2" in the second target data interface address. In actual application, when the first target variable "types1" is assigned, it can cause an operation of obtaining the first target data based on the first target data interface address containing the address parameter "type1" assigned by the first target variable "types1". An example of the first target data interface address may be "http: / / raykite.com / xxxxxx?type1=${types1}". Similarly, when the second target variable "types2" is assigned, it can cause an operation of obtaining the second target data based on the second target data interface address containing the address parameter "type2" assigned by the second target variable "type2". An example of the second target data interface address may be "http: / / raykite.com / xxxxxx?type2=${types2}".
[0090] In actual application, the data obtained by the first target data interface address and the data obtained by the second target data interface address can be used to draw different charts, for example, they can be used to draw a population data chart and a GDP data chart of the same city. It can be understood that, optionally, the data obtained by the first target data interface address and the data obtained by the second target data interface address can be used to draw different parts of the same chart, for example, they can be used to draw parts of the same city information chart that reflect population data and GDP data.
[0091] In an optional embodiment, multiple target events can be bound to the same target component, and the trigger conditions of the multiple target events can be different. The following is an example of binding two target events to the same target component. It can be understood that in practice, it is not limited to binding two target events, and more target events can be bound to the same target component.
[0092] Specifically, the establishment of a target event having an association relationship with the target component may specifically include: establishing a first target event and a second target event having an association relationship with the target component; the event information of the first target event at least includes a first event trigger condition and a first event execution action of the first target event, wherein the first event execution action at least includes assigning a value to a third target variable using the value of a third preset parameter in the component information of the target component; the event information of the second target event at least includes a second event trigger condition and a second event execution action of the second target event, wherein the second event execution action at least includes assigning a value to a third target variable using the value of a third preset parameter in the component information of the target component.
[0093] Correspondingly, the receiving an event triggering operation performed by a user on a target component may specifically include: receiving a first event triggering operation or a second event triggering operation performed by a user on the target component.
[0094] If a first event trigger operation performed by the user on the target component is received, the following can be done: in response to the first event trigger operation, the value of the third preset parameter in the component information of the target component is assigned to the third target variable; the value of the third target variable is used to assign a third target address parameter in the third target data interface address; and then in response to the change in the value of the third target variable, based on the third target data interface address containing the third target address parameter, the third target data is obtained from the third target data interface corresponding to the third target data interface address.
[0095] If a second event trigger operation performed by the user on the target component is received, the following can be done: in response to the second event trigger operation, the value of the fourth preset parameter in the component information of the target component is assigned to the fourth target variable; the value of the fourth target variable is used to assign a fourth target address parameter in the fourth target data interface address; and then in response to the change in the value of the fourth target variable, based on the fourth target data interface address containing the fourth target address parameter, the fourth target data is obtained from the fourth target data interface corresponding to the fourth target data interface address.
[0096] In practice, the first event triggering operation and the second event triggering operation can be respectively selected from a mouse click operation, a mouse slide operation, a touch click operation, a touch long press operation, a touch slide operation, etc., but are not limited to these examples. The mouse click operation can include a mouse single click operation, a mouse right click operation, a mouse double click operation, etc., but are not limited to these. The specific event triggering conditions can be selected and set according to actual needs, and will not be described one by one here.
[0097] For example, for the same target component (such as "City A"), a first target event and a second target event bound to the target component can be defined, wherein the first target event can be used to obtain the value of the third preset parameter "changeType3" of the component to assign a value to the third target variable "types3" when a user clicks the mouse on the target component, and the second target event can be used to assign a value to the fourth target variable "types4" using the value of the fourth preset parameter "changeType4" when a user double-clicks the mouse on the target component.
[0098] When the third target variable "types3" is assigned a value, it may cause an operation of obtaining the third target data based on the third target data interface address including the address parameter "type3" assigned by the third target variable "types3", and an example of the third target data interface address may be "http: / / raykite.com / xxxxxx?type3=${types3}". Similarly, when the fourth target variable "types4" is assigned a value, it may cause an operation of obtaining the fourth target data based on the fourth target data interface address including the address parameter "type4" assigned by the fourth target variable "type4", and an example of the fourth target data interface address may be "http: / / raykite.com / xxxxxx?type4=${types4}".
[0099] In actual application, the data obtained by the third target data interface address and the data obtained by the fourth target data interface address can be used to draw different charts, for example, they can be used to draw a population data chart and a GDP data chart of the same city. It can be understood that, optionally, the data obtained by the third target data interface address and the data obtained by the fourth target data interface address can be used to draw different parts of the same chart, for example, they can be used to draw parts of the same city information chart that reflect population data and GDP data.
[0100] It should be noted that although the above description is based on the example of binding one or two target events to a target component, in actual applications, more target events can be bound to the same target component. Although the above description is based on the example of setting one or two target variables for assignment in the same target event, in actual applications, more target variables can be set for assignment in the same target event. This will not be repeated here.
[0101] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 3 The embodiments of this specification provide corresponding to Figure 1 A structural diagram of a dynamic data acquisition device. Figure 3 As shown, the device may include:
[0102] An event triggering operation receiving module 302 is used to receive an event triggering operation performed by a user on a target component; the event triggering operation is used to assign a value to a target variable;
[0103] The target variable assignment module 304 is used to assign the value of the preset parameter in the component information of the target component to the target variable in response to the event triggering operation; the value of the target variable is used to assign the target address parameter in the target data interface address;
[0104] The target data acquisition module 306 is used to respond to the assignment event of the target variable and, based on the target data interface address including the target address parameter, acquire the target data from the target data interface corresponding to the target data interface address.
[0105] It is understood that the above modules refer to computer programs or program segments for executing one or more specific functions. In addition, the distinction between the above modules does not mean that the actual program codes must also be separated.
[0106] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.
[0107] Figure 4 The embodiments of this specification provide corresponding to Figure 1 A structural diagram of a dynamic data acquisition device. Figure 4 As shown, the device 400 may include:
[0108] at least one processor 410; and,
[0109] A memory 430 is communicatively connected to the at least one processor; wherein,
[0110] The memory 430 stores instructions 420 executable by the at least one processor 410. The instructions are executed by the at least one processor 410 to enable the at least one processor 410 to:
[0111] Receiving an event-triggered operation performed by a user on a target component; the event-triggered operation is used to assign a value to a target variable;
[0112] In response to the event triggering operation, assigning the value of the preset parameter in the component information of the target component to the target variable; the value of the target variable is used to assign a value to a target address parameter in the target data interface address;
[0113] In response to an assignment event to the target variable, based on a target data interface address including the target address parameter, target data is acquired from a target data interface corresponding to the target data interface address.
[0114] Based on the same idea, the embodiment of this specification also provides a computer-readable medium corresponding to the above method. The computer-readable medium stores computer-readable instructions, which can be executed by a processor to implement the following method:
[0115] Receiving an event-triggered operation performed by a user on a target component; the event-triggered operation is used to assign a value to a target variable;
[0116] In response to the event triggering operation, assigning the value of the preset parameter in the component information of the target component to the target variable; the value of the target variable is used to assign a value to a target address parameter in the target data interface address;
[0117] In response to an assignment event to the target variable, based on a target data interface address including the target address parameter, target data is acquired from a target data interface corresponding to the target data interface address.
[0118] The above describes specific embodiments of the present specification. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0119] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other.
[0120] The devices, equipment and methods provided in the embodiments of this specification correspond to each other, and therefore, the devices and equipment also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding devices and equipment will not be repeated here.
[0121] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0122] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0123] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0124] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0125] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0127] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0128] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0129] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A dynamic data acquisition method, comprising: Receive event-triggered actions performed by users on target components; The event triggering operation is used to assign a value to a target variable; The receiving of the event triggering operation performed by the user on the target component includes: receiving the operation of the user on the target component; the target component is bound to a target event; judging whether the operation on the target component meets the event triggering condition for triggering the target event, and obtaining a first judgment result; the event information of the target event at least includes the event triggering condition and event execution action of the target event; the event execution action at least includes assigning a value to the target variable using the value of a preset parameter in the component information of the target component; In response to the event triggering operation, assigning the value of the preset parameter in the component information of the target component to the target variable; the value of the target variable is used to assign a value to a target address parameter in a target data interface address; in response to the event triggering operation, assigning the value of the preset parameter in the component information of the target component to the target variable includes: if the first judgment result indicates that the operation on the target component meets the event triggering condition for triggering the target event, assigning the value of the preset parameter in the component information of the target component to the target variable; In response to an assignment event to the target variable, based on a target data interface address including the target address parameter, target data is acquired from a target data interface corresponding to the target data interface address.
2. The method according to claim 1, before receiving the user's operation on the target component, further comprising: A target event associated with the target component is established.
3. The method according to claim 2, wherein the event execution action at least specifically comprises: The first target variable is assigned a value using the value of the first preset parameter in the component information of the target component, and the second target variable is assigned a value using the value of the second preset parameter in the component information of the target component.
4. The method according to claim 3, wherein assigning the value of the preset parameter in the component information of the target component to the target variable specifically comprises: Assigning the value of the first preset parameter in the component information of the target component to the first target variable; And, assigning the value of the second preset parameter in the component information of the target component to the second target variable; The step of responding to the assignment event of the target variable and acquiring the target data from the target data interface corresponding to the target data interface address based on the target data interface address including the target address parameter specifically includes: In response to an assignment event to the first target variable and / or the second target variable, based on the target data interface address including the first target address parameter and / or the second target address parameter, the target data is obtained from the target data interface corresponding to the target data interface address.
5. The method according to claim 2, wherein the step of establishing a target event associated with the target component comprises: Establishing a first target event and a second target event associated with the target component; The event information of the first target event at least includes a first event triggering condition and a first event execution action of the first target event; The first event execution action at least includes assigning a value to a third target variable using a value of a third preset parameter in the component information of the target component; The event information of the second target event at least includes a second event triggering condition and a second event execution action of the second target event; The second event execution action at least includes assigning a value to a third target variable using the value of a third preset parameter in the component information of the target component.
6. The method according to claim 5, wherein receiving the event triggering operation performed by the user on the target component specifically comprises: A first event-triggered operation or a second event-triggered operation performed by a user on the target component is received.
7. The method of claim 1, wherein in response to the assignment event to the target variable, after acquiring the target data from the target data interface corresponding to the target data interface address based on the target data interface address including the target address parameter, the method further comprises: Using the target data, a target graph corresponding to the target component is drawn based on a target graph template having a corresponding relationship with the target data interface address.
8. The method of claim 1, wherein after obtaining target data from a target data interface corresponding to the target data interface address based on the target data interface address including the target address parameter in response to the assignment event to the target variable, the method further comprises: Using the target data, a target chart drawn based on a target chart template having a corresponding relationship with the target data interface address is updated to obtain an updated target chart corresponding to the target component.
9. The method according to claim 1, before receiving the event triggering operation performed by the user on the target component, further comprising: Get component information from the specified data interface; The component information at least includes the value of the preset parameter; Based on the component information, the target component corresponding to the component information is displayed on the page.
10. A dynamic data acquisition device, comprising: An event-triggered operation receiving module, used to receive an event-triggered operation performed by a user on a target component; The event triggering operation is used to assign a value to a target variable; The event trigger operation receiving module is specifically used to receive the user's operation on the target component; the target component is bound to a target event; determine whether the operation on the target component meets the event triggering condition for triggering the target event, and obtain a first judgment result; the event information of the target event at least includes the event triggering condition and event execution action of the target event; The event execution action at least includes assigning a value to the target variable using the value of a preset parameter in the component information of the target component; A target variable assignment module, used to assign the value of a preset parameter in the component information of the target component to the target variable in response to the event triggering operation; the value of the target variable is used to assign a target address parameter in the target data interface address; The target variable assignment module is specifically configured to assign the value of the preset parameter in the component information of the target component to the target variable if the first judgment result indicates that the operation on the target component meets the event triggering condition for triggering the target event; The target data acquisition module is used to respond to the assignment event of the target variable and acquire the target data from the target data interface corresponding to the target data interface address based on the target data interface address including the target address parameter.
11. A dynamic data acquisition device, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Receive an event trigger operation performed by a user on a target component; the event trigger operation is used to assign a value to a target variable; the receiving of the event trigger operation performed by a user on a target component includes: receiving an operation performed by a user on a target component; the target component is bound to a target event; judging whether the operation on the target component meets an event trigger condition for triggering the target event, and obtaining a first judgment result; the event information of the target event at least includes the event trigger condition and event execution action of the target event; the event execution action at least includes assigning a value to the target variable using the value of a preset parameter in the component information of the target component; In response to the event triggering operation, assigning the value of the preset parameter in the component information of the target component to the target variable; the value of the target variable is used to assign a value to a target address parameter in a target data interface address; in response to the event triggering operation, assigning the value of the preset parameter in the component information of the target component to the target variable includes: if the first judgment result indicates that the operation on the target component meets the event triggering condition for triggering the target event, assigning the value of the preset parameter in the component information of the target component to the target variable; In response to an assignment event to the target variable, based on a target data interface address including the target address parameter, target data is acquired from a target data interface corresponding to the target data interface address. 12 . A computer-readable medium having computer-readable instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the dynamic data acquisition method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Page display method and device, computer readable storage medium and electronic equipment
CN112799663A