Target data feedback method and device, storage medium and electronic device

By acquiring and integrating data from multiple data sources through pre-defined components, the problem of high access, read, write, and maintenance costs for different data storage solutions is solved, and efficient and fast data access is achieved.

CN119299520AInactive Publication Date: 2025-01-10QINGDAO HAIER TECH +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411396355.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2025-01-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Different data storage solutions use different driver methods for access and read/write operations, resulting in high maintenance costs.

Method used

Data access requests are retrieved from multiple data sources using preset components, and then integrated and fed back according to preset rules, enabling unified access to multiple data sources.

Benefits of technology

It reduces the cost of accessing and maintaining multiple data sources, and enables efficient and fast data access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119299520A_ABST
    Figure CN119299520A_ABST
Patent Text Reader

Abstract

The invention discloses a target data feedback method and device, a storage medium and an electronic device, and relates to the technical field of smart homes.The target data feedback method comprises the steps that a received data access request is analyzed, and request configuration of the data access request is obtained, the request configuration is used for indicating at least one data source needing to be accessed by the data access request in a plurality of data sources, and a plurality of data source types corresponding to the plurality of data sources at least comprise a relational data source, a non-relational data source and an object storage data source; data requested by the data access request is obtained from the at least one data source through a preset component, and the preset component allows access to the multiple data sources; the data are integrated according to a preset rule, target data obtained through integration are fed back to a target object, and the target object is an initiating object of the data access request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home technology, and more specifically, to a method and device for feedback of target data, a storage medium, and an electronic device. Background Art

[0002] In the context of the Internet era, data storage solutions are becoming more and more diverse with the continuous development of technology. With the application of different data storage solutions, different drivers and a set of dedicated interfaces are needed to access and read different data storage solutions during development. In addition, the processing complexity and maintenance cost of reading, writing and combining multiple data storage solutions are high.

[0003] In the related art, different data storage solutions use different drivers to access and read and write in different ways, resulting in high maintenance costs, and no effective solution has yet been proposed.

[0004] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the invention

[0005] The embodiments of the present application provide a method and device for feedback of target data, a storage medium, and an electronic device, so as to at least solve the problem in the related art that different data storage solutions use different drivers to access and read and write in different ways, resulting in high maintenance costs.

[0006] According to one aspect of an embodiment of the present application, a method for feedback of target data is provided, comprising: parsing a received data access request to obtain a request configuration of the data access request, wherein the request configuration is used to indicate at least one data source that the data access request needs to access among multiple data sources, and multiple data source types corresponding to the multiple data sources include at least: a relational data source, a non-relational data source, and an object storage data source; obtaining the data requested by the data access request from the at least one data source through a preset component, wherein the preset component allows access to the multiple data sources; integrating the data according to preset rules, and feeding back the integrated target data to a target object, wherein the target object is the initiator of the data access request.

[0007] In an exemplary embodiment, a received data access request is parsed to obtain a request configuration of the data access request, including: parsing the data access request to obtain a data source address and a data source type of the at least one data source; and determining the data source address and the data source type as the request configuration.

[0008] In an exemplary embodiment, obtaining the data requested by the data access request from the at least one data source through a preset component includes: determining a target data source belonging to the data source type; sending a data acquisition request to the at least one data source having the data source address in the target data source, so as to obtain the data through the data acquisition request.

[0009] In an exemplary embodiment, the data is integrated according to preset rules, including: determining first information corresponding to any data in the data, wherein the first information includes: a first data format of any data, and a first data field of any data; determining second information recorded in the preset rules, wherein the second information includes: a second data format, and a second data field; mapping the first data format to the second data format according to the preset rules, and mapping the first data field to the second data field according to the preset rules to obtain the target data.

[0010] In an exemplary embodiment, before integrating the data according to preset rules, the method also includes: determining the number of data sources of the at least one data source that needs to be accessed by the data access request through the request configuration; when the number of data sources is less than a preset threshold, obtaining a first rule from a configuration file of the preset component, and determining the first rule as the preset rule; when the number of data sources is greater than or equal to the preset threshold, obtaining a second rule from the configuration file of the preset component, and determining the second rule as the preset rule.

[0011] In an exemplary embodiment, before parsing the received data access request to obtain the request configuration of the data access request, the method further includes: obtaining a data source address of any data source among the multiple data sources, and obtaining access information that allows access to any data source, wherein the access information includes at least: a user name and a key; and generating the configuration file through the data source address of any data source and the access information.

[0012] In an exemplary embodiment, after generating the configuration file using the data source address of any data source and the access information, the method further includes: detecting the data source address and / or the access information of any data source according to a preset period to obtain a detection result; and when the detection result indicates that the data source address and / or the access information of any data source have changed, updating the configuration file using the changed data source address and / or the changed access information of any data source.

[0013] According to another aspect of an embodiment of the present application, a target data feedback device is also provided, including: a parsing module, used to parse a received data access request to obtain a request configuration of the data access request, wherein the request configuration is used to indicate at least one data source that the data access request needs to access among multiple data sources, and the multiple data source types corresponding to the multiple data sources include at least: a relational data source, a non-relational data source, and an object storage data source; an acquisition module, used to obtain the data requested by the data access request from the at least one data source through a preset component, wherein the preset component allows access to the multiple data sources; a feedback module, used to integrate the data according to preset rules, and feed back the integrated target data to a target object, wherein the target object is the initiating object of the data access request.

[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned target data feedback method when running.

[0015] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the target data feedback method through the computer program.

[0016] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the above-mentioned target data feedback method is implemented.

[0017] Through the present application, the received data access request is parsed to obtain the request configuration of the data access request, wherein the request configuration is used to indicate at least one data source that the data access request needs to access among multiple data sources, and the multiple data source types corresponding to the multiple data sources include at least: relational data source, non-relational data source, object storage data source; the data requested by the data access request is obtained from the at least one data source through a preset component, wherein the preset component allows access to the multiple data sources; the data is integrated according to preset rules, and the integrated target data is fed back to the target object, wherein the target object is the initiating object of the data access request. Therefore, the above technical solution is adopted to solve the problem of high maintenance cost in that different data storage solutions in the related technology use different drivers to access and read and write in different ways; thereby, multiple data sources can be accessed efficiently and quickly, reducing the access cost and maintenance cost of multiple data sources. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0019] In order to more clearly illustrate the embodiments of the present application 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0020] Figure 1 is a schematic diagram of a hardware environment of an optional target data feedback method according to an embodiment of the present application;

[0021] Figure 2 is a flow chart of an optional method for feedback of target data according to an embodiment of the present application;

[0022] Figure 3 It is an interaction sequence diagram of the client, server service, data access components and databases according to an embodiment of the present application;

[0023] Figure 4 is a structural block diagram of an optional target data feedback device according to an embodiment of the present application;

[0024] Figure 5 This is another structural block diagram of an optional target data feedback device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] According to one aspect of an embodiment of the present application, a method for feedback of target data is provided. The method for feedback of target data is widely used in smart home, smart home, smart home device ecology, smart house ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned method for feedback of target data can be applied to Figure 1 In the hardware environment shown in FIG. 1 , a plurality of terminal devices 102 and a server 104 are formed. Figure 1 As shown, the server 104 is connected to multiple terminal devices 102 via a network, and can be used to provide services (such as application services, etc.) for the terminals or clients installed on the terminals. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0028] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0029] In this embodiment, a method for feeding back target data is provided, including but not limited to being applied to a device deployed with a unified access component, etc. Figure 2 : is a flow chart of a method for feedback of target data according to an embodiment of the present application, the process includes the following steps:

[0030] Step S202: parsing the received data access request to obtain a request configuration of the data access request, wherein the request configuration is used to indicate at least one data source that the data access request needs to access among multiple data sources, and multiple data source types corresponding to the multiple data sources include at least: a relational data source, a non-relational data source, and an object storage data source;

[0031] Step S204: obtaining the data requested by the data access request from the at least one data source through a preset component, wherein the preset component allows access to the multiple data sources;

[0032] Optionally, the preset component is a unified access component capable of accessing multiple data sources.

[0033] Step S206: Integrate the data according to preset rules, and feed back the integrated target data to the target object, wherein the target object is the initiator of the data access request.

[0034] Through the above steps, the received data access request is parsed to obtain the request configuration of the data access request, wherein the request configuration is used to indicate at least one data source that the data access request needs to access among multiple data sources, and the multiple data source types corresponding to the multiple data sources include at least: relational data source, non-relational data source, object storage data source; the data requested by the data access request is obtained from the at least one data source through a preset component, wherein the preset component allows access to the multiple data sources; the data is integrated according to preset rules, and the integrated target data is fed back to the target object, wherein the target object is the initiator of the data access request. Therefore, the above technical solution is adopted to solve the problem that different data storage solutions in the related technology use different drivers to access and read and write in different ways, and the maintenance cost is high; thereby, multiple data sources can be accessed efficiently and quickly, reducing the access cost and maintenance cost of multiple data sources.

[0035] In an exemplary embodiment, a received data access request is parsed to obtain a request configuration of the data access request, including: parsing the data access request to obtain a data source address and a data source type of the at least one data source; and determining the data source address and the data source type as the request configuration.

[0036] By parsing the data access request, it is possible to clarify at least one data source that the data access request needs to access and the data source address and data source type of the at least one data source, thereby obtaining the request configuration.

[0037] In an exemplary embodiment, obtaining the data requested by the data access request from the at least one data source through a preset component includes: determining a target data source belonging to the data source type; sending a data acquisition request to the at least one data source having the data source address in the target data source, so as to obtain the data through the data acquisition request.

[0038] After obtaining the request configuration, the target data source can be determined from multiple data sources belonging to different data source types by data source type, and a data acquisition request can be further sent to at least one data source in the target data source having the data source address in the request configuration to obtain the data.

[0039] Therefore, the embodiment of the present application can clarify at least one data source that the initiating object of the data access request needs to access by parsing the data access request, and then obtain the data required by the initiating object from the at least one data source.

[0040] In an exemplary embodiment, the data is integrated according to preset rules, including: determining first information corresponding to any data in the data, wherein the first information includes: a first data format of any data, and a first data field of any data; determining second information recorded in the preset rules, wherein the second information includes: a second data format, and a second data field; mapping the first data format to the second data format according to the preset rules, and mapping the first data field to the second data field according to the preset rules to obtain the target data.

[0041] After acquiring the data, the data format and field type of the data need to be integrated so as to feed back the data to the initiating object. Specifically, the integration process includes: reading preset rules from the configuration file of the unified access component, and mapping the first data format and the first data field of any data in the data to the second data format and the second data field recorded in the preset rules.

[0042] For example, the data includes data A and data B, data A has a first data format A1 and a first data field A2, and data B has a first data format B1 and a first data field B2; the preset rule records the second data format C1 and the second data field C2, then A1 and B1 are mapped to C1, and A2 and B2 are mapped to C2.

[0043] Optionally, after mapping the first data fields to the second data fields according to the preset data rule, it can also be determined whether the data access request carries a data merge indication, and if so, the data is merged according to the data merge indication to obtain the target data. If the data merge indication records a merge order, the data is merged according to the merge order.

[0044] In an exemplary embodiment, before integrating the data according to preset rules, the method also includes: determining the number of data sources of the at least one data source that needs to be accessed by the data access request through the request configuration; when the number of data sources is less than a preset threshold, obtaining a first rule from a configuration file of the preset component, and determining the first rule as the preset rule; when the number of data sources is greater than or equal to the preset threshold, obtaining a second rule from the configuration file of the preset component, and determining the second rule as the preset rule.

[0045] It can be understood that, according to the number of data sources of at least one data source that needs to be accessed by the data access request, it can be determined how to obtain the preset rule from the configuration file of the unified access component. Specifically, the preset threshold can be 2. Therefore, when the number of data sources is less than 2, the first rule is read as the preset rule, and when the number of data sources is greater than or equal to 2, the second rule is read as the preset rule. Specifically, the first rule can be how to map 1 data (including the 1 data) obtained from 1 data source to the target data required for the initiating object, and the second rule can be how to map at least two data (including the at least two data) obtained from at least two data sources to the target data. More specifically, the second rule can be, for example, a default order for merging the mapped at least two data after mapping the first data format and the first data field of the at least two data to the second data format and the second data field when the data merge indication does not record the merge order.

[0046] In an exemplary embodiment, before parsing the received data access request to obtain the request configuration of the data access request, the method further includes: obtaining a data source address of any data source among the multiple data sources, and obtaining access information that allows access to any data source, wherein the access information includes at least: a user name and a key; and generating the configuration file through the data source address of any data source and the access information.

[0047] It can be understood that the unified access component generates a configuration file according to the data source addresses corresponding to the multiple data sources, the user names and keys corresponding to the multiple data sources, so as to establish access relationships with the multiple data sources.

[0048] In an exemplary embodiment, after generating the configuration file using the data source address of any data source and the access information, the method further includes: detecting the data source address and / or the access information of any data source according to a preset period to obtain a detection result; and when the detection result indicates that the data source address and / or the access information of any data source have changed, updating the configuration file using the changed data source address and / or the changed access information of any data source.

[0049] It can be understood that when a change is detected in the data source address, user name for access, key, etc. of any data source among multiple data sources, the configuration file is updated; when it is detected that the unified access component needs to establish an access relationship with a new data source, the configuration file is updated according to the data source address, user name, key of the new data source; and when the first rule and / or the second rule is changed, or a third rule needs to be added, the configuration file is updated.

[0050] Obviously, the above-described embodiments are only part of the embodiments of the present application, not all of the embodiments. In order to better understand the above-mentioned target data feedback method, the above-mentioned process is described below in conjunction with optional embodiments, but it is not intended to limit the technical solutions of the embodiments of the present application, specifically:

[0051] At present, there are various data storage solutions, including but not limited to relational databases, non-relational databases, object storage and other solutions. When developing, different data storage solutions need to be targeted, and different drivers need to be used to access and read and write in different ways. In order to reduce the complexity of data reading and writing, the optional embodiment of the present application provides a universal, flexible and configurable data access component by encapsulating a unified data access component (equivalent to a preset component or a unified access component), thereby reducing the learning cost and complexity of the development process. And the unified access entrance of the unified component (equivalent to the preset component) can reduce the maintenance cost in the development of multiple databases and improve the readability of the code.

[0052] Specifically, the data access component in the optional embodiment of the present application abstracts a unified style of functional interface for various storage solutions, and provides flexible combination configuration of multiple types of storage solutions, thereby reducing the learning cost and complexity of the development process, reducing the maintenance cost in multi-database development, and improving readability.

[0053] Figure 3 is an interactive sequence diagram of the client, server service, data access components and databases according to an embodiment of the present application, such as Figure 3 As shown,

[0054] When developing the server, you need to introduce components and configure the data storage resources (equivalent to multiple data sources) to be accessed in the project. You can access a single type of data resource or multiple types of data resources, or you can combine multiple different types of storage resources for data integration access. The component dynamically identifies data access requests and configures concurrent access to the requested data resources (equivalent to at least one data source) based on the request obtained by parsing the data access request to improve data resource access efficiency. When the component identifies a request to integrate multiple types of storage resources (when the number of data sources of at least one data source is identified to be multiple, a unified access component initiates the request itself), the data obtained from different storage resources (equivalent to at least one data) is integrated according to the given integration rules (equivalent to the preset rules).

[0055] like Figure 3 As shown, the specific feedback request for target data includes:

[0056] Step 1: The user (User, equivalent to the target object in the above embodiment) initiates a data access request;

[0057] Step 2: The server identifies the data access request and forwards the data access request to the component (essentially, it initiates a data read and write request to the component);

[0058] Step 3: The component performs request parsing and identifies dynamic configuration information (equivalent to request configuration) to load necessary information such as data source and data configuration rules (equivalent to preset rules);

[0059] Step 4: The component dynamically loads configuration information (ie, the configuration file in the above embodiment).

[0060] Step 5: The component retrieves the request configuration and identifies the data source (i.e., at least one data source);

[0061] Step 6: Acquire at least one data from at least one data source in parallel (the data includes at least one data, Figure 3 3 data sources are shown in );

[0062] Step 7: Data integration, mapping into a unified data format;

[0063] Step 8: Return the data result (i.e. target data) to the server;

[0064] Step 9: The server-side business logic processes the data result and feeds back the response result (carrying the data result) to the user-side.

[0065] It should be noted that the following configurations are required during component development:

[0066] 1) Introduce unified data access components.

[0067] 2) Data resource configuration: configure the accessed data resource link (equivalent to the data source address), user, key and other necessary information.

[0068] 3) If multiple types of resources are integrated for access, it is necessary to configure the integration rules between different resource data (equivalent to configuring the first rule and the second rule).

[0069] Therefore, the optional embodiment of the present application integrates various data storage solutions through data service components, abstracts and encapsulates unified style service interfaces, reduces development difficulty, and improves code readability. In addition, the components can provide data integration of different types of storage solutions in the form of configuration, reducing the difficulty of data reading and writing and data integration development of multiple data storage types.

[0070] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0071] In the present embodiment, a feedback device for target data is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions thereof will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and contemplated.

[0072] Figure 4 : is a structural block diagram of an optional target data feedback device according to an embodiment of the present application, the device comprising:

[0073] The parsing module 42 is used to parse the received data access request to obtain a request configuration of the data access request, wherein the request configuration is used to indicate at least one data source that the data access request needs to access among multiple data sources, and multiple data source types corresponding to the multiple data sources include at least: a relational data source, a non-relational data source, and an object storage data source;

[0074] an acquisition module 44, configured to acquire the data requested by the data access request from the at least one data source through a preset component, wherein the preset component allows access to the plurality of data sources;

[0075] The feedback module 46 is used to integrate the data according to a preset rule and feed back the integrated target data to the target object, wherein the target object is the initiator of the data access request.

[0076] Through the above-mentioned device, the received data access request is parsed to obtain the request configuration of the data access request, wherein the request configuration is used to indicate at least one data source that the data access request needs to access among multiple data sources, and the multiple data source types corresponding to the multiple data sources include at least: relational data source, non-relational data source, object storage data source; the data requested by the data access request is obtained from the at least one data source through a preset component, wherein the preset component allows access to the multiple data sources; the data is integrated according to preset rules, and the integrated target data is fed back to the target object, wherein the target object is the initiator of the data access request. Therefore, the above-mentioned technical solution is adopted to solve the problem that different data storage solutions in the related technology use different drivers to access and read and write in different ways, and the maintenance cost is high; thereby, multiple data sources can be accessed efficiently and quickly, reducing the access cost and maintenance cost of multiple data sources.

[0077] In an exemplary embodiment, the parsing module 42 is further used to: parse the data access request to obtain the data source address and data source type of the at least one data source; and determine the data source address and the data source type as the request configuration.

[0078] In an exemplary embodiment, the acquisition module 44 is further used to: determine a target data source belonging to the data source type; and send a data acquisition request to at least one of the target data sources having the data source address to acquire the data through the data acquisition request.

[0079] In an exemplary embodiment, the feedback module 46 is also used to: determine the first information corresponding to any data in the data, wherein the first information includes: the first data format of any data and the first data field of any data; determine the second information recorded in the preset rule, wherein the second information includes: the second data format and the second data field; map the first data format to the second data format according to the preset rule, and map the first data field to the second data field according to the preset rule to obtain the target data.

[0080] In an exemplary embodiment, before integrating the at least one data according to a preset rule, Figure 5 As shown, the device also includes a determination module 48, which is used to: determine the number of data sources of the at least one data source that needs to be accessed by the data access request through the request configuration; when the number of data sources is less than a preset threshold, obtain a first rule from the configuration file of the preset component, and determine the first rule as the preset rule; when the number of data sources is greater than or equal to the preset threshold, obtain a second rule from the configuration file of the preset component, and determine the second rule as the preset rule.

[0081] In an exemplary embodiment, before parsing the data access request through a unified access component to obtain the request configuration of the data access request, the device also includes a generation module for: obtaining a data source address of any data source among the multiple data sources, and obtaining access information that allows access to any data source, wherein the access information includes at least: a user name and a key; and generating the configuration file through the data source address of any data source and the access information.

[0082] In an exemplary embodiment, after the configuration file is generated using the data source address of any data source and the access information, the device further includes an update module, which is used to: detect the data source address and / or the access information of any data source according to a preset period to obtain a detection result; and when the detection result indicates that the data source address and / or the access information of any data source have changed, update the configuration file using the changed data source address and / or the changed access information of any data source.

[0083] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0084] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:

[0085] S1, parsing a received data access request to obtain a request configuration of the data access request, wherein the request configuration is used to indicate at least one data source that the data access request needs to access among multiple data sources, and multiple data source types corresponding to the multiple data sources include at least: a relational data source, a non-relational data source, and an object storage data source;

[0086] S2, obtaining the data requested by the data access request from the at least one data source through a preset component, wherein the preset component allows access to the multiple data sources;

[0087] S3, integrating the data according to preset rules, and feeding back the integrated target data to the target object, wherein the target object is the initiator of the data access request.

[0088] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0089] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0090] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0091] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0092] S1, parsing a received data access request to obtain a request configuration of the data access request, wherein the request configuration is used to indicate at least one data source that the data access request needs to access among multiple data sources, and multiple data source types corresponding to the multiple data sources include at least: a relational data source, a non-relational data source, and an object storage data source;

[0093] S2, obtaining the data requested by the data access request from the at least one data source through a preset component, wherein the preset component allows access to the multiple data sources;

[0094] S3, integrating the data according to preset rules, and feeding back the integrated target data to the target object, wherein the target object is the initiator of the data access request.

[0095] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0096] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0097] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0098] An embodiment of the present application also provides a computer program, which includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the above method embodiments.

[0099] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0100] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0101] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for feedback of target data, characterized in that: include: Parsing the received data access request to obtain a request configuration of the data access request, wherein the request configuration is used to indicate at least one data source that the data access request needs to access among multiple data sources, and multiple data source types corresponding to the multiple data sources include at least: a relational data source, a non-relational data source, and an object storage data source; Obtaining the data requested by the data access request from the at least one data source through a preset component, wherein the preset component allows access to the multiple data sources; The data is integrated according to preset rules, and the integrated target data is fed back to the target object, wherein the target object is the initiator of the data access request.

2. The target data feedback method according to claim 1, characterized in that: Parsing the received data access request to obtain the request configuration of the data access request includes: Parsing the data access request to obtain a data source address and a data source type of the at least one data source; The data source address and the data source type are determined as the request configuration.

3. The target data feedback method according to claim 2, characterized in that: Acquiring the data requested by the data access request from the at least one data source through a preset component includes: determining a target data source belonging to the data source type; A data acquisition request is sent to the at least one data source having the data source address among the target data sources, so as to acquire the data through the data acquisition request.

4. The target data feedback method according to claim 1, characterized in that: Integrate the data according to preset rules, including: Determine first information corresponding to any data among the data, wherein the first information includes: a first data format of the any data and a first data field of the any data; Determine the second information recorded in the preset rule, wherein the second information includes: a second data format and a second data field; The first data format is mapped to the second data format according to the preset rule, and the first data field is mapped to the second data field according to the preset rule to obtain the target data.

5. The target data feedback method according to claim 1, characterized in that: Before integrating the data according to preset rules, the method further includes: Determine, by means of the request configuration, the number of data sources of the at least one data source that the data access request needs to access; When the number of the data sources is less than a preset threshold, obtaining a first rule from a configuration file of the preset component, and determining the first rule as the preset rule; When the number of data sources is greater than or equal to the preset threshold, a second rule is obtained from a configuration file of the preset component, and the second rule is determined as the preset rule.

6. The method for feedback of target data according to claim 5, characterized in that: Before parsing the received data access request to obtain the request configuration of the data access request, the method further includes: Obtaining a data source address of any data source among the multiple data sources, and obtaining access information allowing access to any data source, wherein the access information at least includes: a user name and a key; The configuration file is generated according to the data source address of any data source and the access information.

7. The target data feedback method according to claim 6, characterized in that: After generating the configuration file by using the data source address of any data source and the access information, the method further includes: Detecting the data source address and / or the access information of any data source according to a preset period to obtain a detection result; When the detection result indicates that the data source address of any data source and / or the access information is changed, the configuration file is updated using the changed data source address of any data source and / or the changed access information.

8. A target data feedback device, characterized in that: include: A parsing module, used to parse the received data access request to obtain a request configuration of the data access request, wherein the request configuration is used to indicate at least one data source that the data access request needs to access among multiple data sources, and multiple data source types corresponding to the multiple data sources include at least: a relational data source, a non-relational data source, and an object storage data source; an acquisition module, configured to acquire the data requested by the data access request from the at least one data source through a preset component, wherein the preset component allows access to the plurality of data sources; The feedback module is used to integrate the data according to preset rules and feed back the integrated target data to the target object, wherein the target object is the initiator of the data access request.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 7 when executed.

10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.

Citation Information

Patent Citations

  • Data integration method

    CN103927344A

  • Data access method and device

    CN106547766A

  • Data access method and device and electronic equipment

    CN114297221A