CN111698324B - Data request method, device and system - Google Patents

Data request method, device and system Download PDF

Info

Publication number
CN111698324B
CN111698324B CN202010533856.0A CN202010533856A CN111698324B CN 111698324 B CN111698324 B CN 111698324B CN 202010533856 A CN202010533856 A CN 202010533856A CN 111698324 B CN111698324 B CN 111698324B
Authority
CN
China
Prior art keywords
data
service
request
target
requested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010533856.0A
Other languages
Chinese (zh)
Other versions
CN111698324A (en
Inventor
周正
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202010533856.0A priority Critical patent/CN111698324B/en
Publication of CN111698324A publication Critical patent/CN111698324A/en
Application granted granted Critical
Publication of CN111698324B publication Critical patent/CN111698324B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • H04L67/63Routing a service request depending on the request content or context
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Abstract

The embodiment of the invention provides a data request method, a device and a system, which relate to the technical field of data transmission and are applied to gateway equipment, wherein the gateway equipment is provided with a uniform data query interface, and the method comprises the following steps: receiving a data acquisition request sent by a request end through the unified data query interface; obtaining a target data type identifier and a data query condition of data to be requested carried in the data obtaining request; determining a target service for providing the data to be requested; accessing a server providing the target service to obtain data which is provided by the target service and meets the data query condition; screening the data to be requested from the obtained data according to the target data type identification; and sending the data to be requested to the request terminal through the unified data query interface. By applying the scheme provided by the embodiment of the invention to request data, the data acquisition requirement of a request end can be accurately met.

Description

Data request method, device and system
Technical Field
The present invention relates to the field of data transmission technologies, and in particular, to a data request method, apparatus, and system.
Background
The request terminal can send a data acquisition request to the gateway device through the aggregation interface provided by the gateway device, and further acquire data from various services provided by the server through the gateway device. However, each aggregation interface provided by the gateway device can only allow the requesting end to request the preset data, and in addition, each aggregation interface corresponds to the preset service provided by the server. The preset service is a service capable of providing the preset data.
In the prior art, when a request end needs to obtain data, a target aggregation interface capable of feeding back the required data to the request end is determined first, and then a data obtaining request is sent to a gateway device through the target aggregation interface. And the gateway equipment determines a target service for providing data for the request terminal according to the target aggregation interface for receiving the data acquisition request, accesses a server for providing the target service, acquires data to be fed back to the request terminal and feeds back the acquired data to the request terminal. The data to be fed back to the request end includes all data that the target aggregation interface allows the request end to request. Therefore, even if the request end only wants to request a part of data of the target aggregation interface permission request, all the data of the target aggregation interface permission request are finally obtained, so that redundant data exist in the data obtained by the request end, and the data obtaining requirement of the request end is difficult to accurately meet.
Disclosure of Invention
The embodiment of the invention aims to provide a data request method, a data request device and a data request system so as to meet the data acquisition requirement of a request end. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a data request method, which is applied to a gateway device, where the gateway device has a unified data query interface, and the method includes:
receiving a data acquisition request sent by a request end through the unified data query interface;
obtaining a target data type identifier and a data query condition of data to be requested carried in the data obtaining request;
determining a target service for providing the data to be requested;
accessing a server providing the target service to obtain data which is provided by the target service and meets the data query condition;
screening the data to be requested from the obtained data according to the type identification of the target data;
and sending the data to be requested to the request terminal through the uniform data query interface.
In an embodiment of the present invention, the determining a target service for providing the data to be requested includes:
obtaining a target service identifier carried in the data obtaining request;
and determining the service corresponding to the target service identification as the target service for providing the data to be requested.
In an embodiment of the present invention, the gateway device further has a service query interface, and the method further includes:
receiving a service query request sent by the request terminal through the service query interface;
after receiving the service inquiry request, obtaining the service identification of each service provided by the server and the data type identification of data provided by each service;
and sending the obtained service identifier and the obtained data type identifier to the request terminal through the service query interface.
In a second aspect, an embodiment of the present invention provides a data request method, which is applied to a request end, and the method includes:
generating a data acquisition request carrying a target data type identifier of data to be requested and a data query condition;
sending the data acquisition request to a gateway device through a unified data query interface of the gateway device, so that the gateway device acquires data which is provided by a target service and meets the query condition from a server which provides the target service, and screening out the data to be requested from the acquired data according to the target data type identifier, wherein the target service is as follows: providing the service of the data to be requested;
and receiving the data to be requested, which is sent by the gateway equipment through the unified data query interface.
In an embodiment of the present invention, the generating a data obtaining request carrying a target data type identifier of data to be requested and a data query condition includes:
determining a target service identification of the target service;
and generating a data acquisition request carrying a target data type identifier of the data to be requested, a data query condition and the target service identifier.
In one embodiment of the invention, the method further comprises:
sending a service query request to the gateway device through a service query interface of the gateway device;
and receiving the service identification of each service provided by the server and the data type identification of data provided by each service, which are sent by the gateway equipment through the service inquiry interface.
In a third aspect, an embodiment of the present invention provides a data request apparatus, which is applied to a gateway device, where the gateway device has a unified data query interface, and the apparatus includes:
the first request receiving module is used for receiving a data acquisition request sent by a request end through the unified data query interface;
the condition obtaining module is used for obtaining a target data type identifier of data to be requested and a data query condition which are carried in the data obtaining request;
the service determining module is used for determining a target service for providing the data to be requested;
the data obtaining module is used for accessing a server providing the target service to obtain the data which is provided by the target service and meets the data query condition;
the data screening module is used for screening the data to be requested from the obtained data according to the target data type identification;
and the data sending module is used for sending the data to be requested to the request terminal through the unified data query interface.
In an embodiment of the present invention, the service determination module is specifically configured to:
obtaining a target service identifier carried in the data obtaining request;
and determining the service corresponding to the target service identification as the target service for providing the data to be requested.
In an embodiment of the present invention, the gateway device further has a service query interface, and the apparatus further includes:
a second request receiving module, configured to receive, through the service query interface, a service query request sent by the request end;
an identifier obtaining module, configured to obtain, after receiving the service query request, a service identifier of each service provided by the server and a data type identifier of data provided by each service;
and the identifier sending module is used for sending the obtained service identifier and the obtained data type identifier to the request terminal through the service query interface.
In a fourth aspect, an embodiment of the present invention provides a data request apparatus, which is applied to a request end, and the apparatus includes:
the request generating module is used for generating a data obtaining request carrying a target data type identifier of data to be requested and a data query condition;
a first request sending module, configured to send the data obtaining request to a gateway device through a unified data query interface of the gateway device, so that the gateway device obtains, from a server that provides a target service, data that meets the query condition and is provided by the target service, and screens out, according to the target data type identifier, the data to be requested from the obtained data, where the target service is: providing the service of the data to be requested;
and the data receiving module is used for receiving the data to be requested, which is sent by the gateway equipment through the unified data query interface.
In an embodiment of the present invention, the request generating module is specifically configured to:
determining a target service identification of the target service;
and generating a data acquisition request carrying a target data type identifier of the data to be requested, a data query condition and the target service identifier.
In one embodiment of the present invention, the apparatus further comprises:
a second request sending module, configured to send a service query request to the gateway device through a service query interface of the gateway device;
and the identification receiving module is used for receiving the service identification of each service provided by the server and the data type identification of the data provided by each service, which are sent by the gateway equipment through the service inquiry interface.
In a fifth aspect, an embodiment of the present invention provides a data request system, where the system includes: a request terminal, gateway equipment and a server;
the request terminal is used for generating a data acquisition request carrying a target data type identifier of data to be requested and a data query condition; sending the data acquisition request to the gateway equipment through a unified data query interface of the gateway equipment;
the gateway equipment is used for receiving a data acquisition request sent by a request end through the unified data query interface; obtaining a target data type identifier and a data query condition of the data to be requested carried in the data obtaining request; determining a target service for providing the data to be requested; accessing a server providing the target service based on the data query condition;
the server is used for sending the data which is provided by the target service and meets the data query condition to the gateway equipment;
the gateway device is used for receiving the data which is sent by the server and meets the data query condition; screening the data with the request from the received data according to the type identification of the target data; sending the data to be requested to the request terminal through the unified data query interface;
the request end is used for receiving the data to be requested, which is sent by the gateway device through the unified data query interface.
In an embodiment of the present invention, the generating a data obtaining request carrying a target data type identifier of data to be requested and a data query condition includes:
determining a target service identification of the target service;
generating a data acquisition request carrying a target data type identifier of data to be requested, a data query condition and the target service identifier;
the determining a target service for providing the data to be requested includes:
obtaining a target service identifier carried in the data obtaining request;
and determining the service corresponding to the target service identification as the target service for providing the data to be requested.
In an embodiment of the present invention, the gateway device further has a service query interface;
the request terminal is further configured to send a service query request to the gateway device through a service query interface of the gateway device;
the gateway device is further configured to receive a service query request sent by the request end through the service query interface; after receiving the service inquiry request, obtaining the service identification of each service provided by the server and the data type identification of data provided by each service; sending the obtained service identifier and the data type identifier to the request terminal through the service query interface;
the request end is further configured to receive a service identifier of each service provided by the server and a data type identifier of data provided by each service, where the service identifiers are sent by the gateway device through the service query interface.
In a sixth aspect, an embodiment of the present invention provides an electronic device, which is used as a gateway device and includes a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any one of the first aspect when executing a program stored in the memory.
In a seventh aspect, an embodiment of the present invention provides a computer-readable storage medium, which is applied to a gateway device, and a computer program is stored in the computer-readable storage medium, and when being executed by a processor, the computer program implements the method steps in any one of the first aspects.
In an eighth aspect, an embodiment of the present invention provides an electronic device, as a request end, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of the second aspect when executing the program stored in the memory.
In a ninth aspect, an embodiment of the present invention provides a computer-readable storage medium, which is applied to a requesting end, and a computer program is stored in the computer-readable storage medium, and when being executed by a processor, the computer program implements the method steps described in any one of the second aspects.
The embodiment of the invention has the following beneficial effects:
when the scheme provided by the embodiment of the invention is applied to request data, the gateway equipment firstly obtains the target data type identifier and the data query condition of the data to be requested carried by the data acquisition request according to the received data acquisition request after receiving the data acquisition request sent by the request terminal, determines the target service for providing the data to be requested, accesses the server for providing the target service, and obtains the data meeting the data query condition. Therefore, in the embodiment of the present invention, the gateway device screens out data with a data type identifier as the target data type identifier, that is, the data to be requested, from the data that satisfies the data query condition, and sends the data to be requested to the request end through the unified data query interface. Because the data sent to the request end is the data with the data type identifier of the target data type identifier in the data meeting the data query condition, the request end does not receive the unnecessary redundant data. Therefore, the scheme provided by the embodiment of the invention is applied to obtain data, and the data obtaining requirement of a request end can be accurately met.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a first data request method according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a first service query method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a second data requesting method according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a third data request method according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating a second service query method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a first data request apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a second data request device according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a data request system according to an embodiment of the present invention;
fig. 9 is a signaling flow diagram of a data request system according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the prior art, when the request terminal obtains data through the aggregation interface of the gateway device, the request terminal may obtain unnecessary redundant data, so that it is difficult to accurately meet the data obtaining requirement of the request terminal.
For example, in the case that the requesting end needs to obtain the name data and the age data of the user, a target aggregation interface to which the name data and the age data can be fed back is first determined, and then a data obtaining request is sent to the gateway device through the target aggregation interface. If the target aggregation interface allows the data requested by the request end to be name data, age data and address data of the user, and the target aggregation interface corresponds to the user information service provided by the server, the gateway device accesses the server providing the user information service after receiving the data obtaining request, obtains the name data, the age data and the address data of the user, and feeds back the obtained name data, the age data and the address data of the user to the request end. However, the requesting end only wants to request the name data and the age data of the user through the target aggregation interface, so that the requesting end receives the unnecessary address data, redundant data exists in the data obtained by the requesting end, and the data obtaining requirement of the requesting end is difficult to accurately meet.
To solve the problem, embodiments of the present invention provide a data request method, apparatus, and system.
In an embodiment of the present invention, a data request method is provided, which is applied to a gateway device, where the gateway device has a unified data query interface, and the method includes:
receiving a data acquisition request sent by a request end through the unified data query interface;
obtaining a target data type identifier and a data query condition of data to be requested carried in the data obtaining request;
determining a target service for providing the data to be requested;
accessing a server providing the target service to obtain data which is provided by the target service and meets the data query condition;
screening the data to be requested from the obtained data according to the type identification of the target data;
and sending the data to be requested to the request terminal through the unified data query interface.
As can be seen from the above, the data that meets the data query condition includes not only the data whose data type identifier is the target data type identifier, but also other types of data that can be provided by the target service externally. Because the data sent to the request end is the data with the data type identifier of the target data type identifier in the data meeting the data query condition, the request end does not receive the unnecessary redundant data. Therefore, the scheme provided by the embodiment of the invention is applied to obtain data, and the data obtaining requirement of a request end can be accurately met.
Corresponding to the above embodiment, an embodiment of the present invention further provides a data request method, which is applied to a request end, and the method includes:
generating a data acquisition request carrying a target data type identifier of data to be requested and a data query condition;
sending the data acquisition request to the gateway device through a unified data query interface of the gateway device, so that the gateway device acquires data, which is provided by a target service and meets the query condition, from a server providing the target service, and screens out the data to be requested from the acquired data according to the target data type identifier, wherein the target service is as follows: providing the service of the data to be requested;
and receiving the data to be requested, which is sent by the gateway equipment through the unified data query interface.
As can be seen from the above, the data obtaining request sent by the request end to the gateway device carries the data type identifier of the data required by the request end and the data query condition, so that the gateway device can obtain the data required by the request end from the service provided by the server according to the data query condition. In addition, the scheme provided by the embodiment of the invention is different from the prior art, after the gateway equipment obtains the data for serving the service feedback provided by the gateway equipment, all the obtained data are not directly fed back to the request end, but the data specifically required by the request end are determined according to the data type identification of the data required by the request end, and the data required by the request end are fed back to the request end, so that the request end can accurately obtain the data meeting the requirements of the request end.
In addition, the request end can send various data acquisition requests to the unified data query interface, and compared with the prior art, the request end does not need to select the aggregation interface corresponding to the data type of the data to be requested in the gateway equipment from the aggregation interfaces of the gateway equipment, but can acquire various data to be requested directly through the unified data query interface, so that the efficiency of acquiring the data by the request end is improved.
The following describes a data request method, device and system provided by the embodiments of the present invention with specific embodiments.
Referring to fig. 1, an embodiment of the present invention provides a flowchart of a first data requesting method, where the method is applied to a gateway device, where the gateway device has a uniform data query interface, so that when each request end desires to obtain data from a server through the gateway device, it is not necessary to select an aggregation interface corresponding to a data type of data to be requested from among aggregation interfaces of the gateway device in the prior art, and send a data obtaining request to the selected aggregation interface.
Specifically, the method includes the following steps S101-S106.
S101: and receiving a data acquisition request sent by a request end through the unified data query interface.
Specifically, the gateway device may receive, through the unified data query interface, a data obtaining request that is sent by the request end and requests various types of data from each service in the server.
The data obtaining request may carry a target data type identifier of the data to be requested and a data query condition.
In addition, the data obtaining request may also carry a target data type identifier, a data query condition, and a target service identifier of the data to be requested. .
Specifically, the data obtaining request may be represented in the form of an SQL (Structured Query Language) statement. The gateway device may also define each query object in the form of SQL, where each query object corresponds to each service in the server, and the service corresponding to the query object may be managed by the query object.
S102: and obtaining a target data type identifier and a data query condition of the data to be requested carried in the data obtaining request.
Specifically, the target data type identifier is an identifier of a data type of data to be requested at the request end, for example, a name identifier and an age identifier of the user.
The data query conditions are as follows: the data required by the requesting end needs to satisfy conditions, e.g. the user's age is greater than 18 years, etc.
If the data acquisition request is the following information expressed in an SQL statement:
GET < gateway >/query-by-sql = select + name, age + from + user + where + id \ 16, the target data type is identified as "name, age", that is, name identification and age identification of the user, and the data query condition is "id =16", that is, the number of the user is equal to 16.
S103: and determining a target service for providing the data to be requested.
Since the data to be requested is provided by a service in the server, the service providing the data to be requested needs to be determined when the data to be requested is obtained from the server, which may be referred to as a target service.
For example, if the data type of the data to be requested is a video playing amount and a video score in video information, the target service is a video information service.
In an embodiment of the present invention, a corresponding relationship between a target data type identifier and a target service may be recorded in the gateway device, where the target service may provide data whose data type identifier is the target data type identifier, and based on this, the target service may be determined according to the obtained target data type identifier and the corresponding relationship, and the corresponding relationship may be stored in a form of a data table.
For example, the correspondence is a correspondence between a user name identifier and a user information service, and the target service may be determined to be the user information service when the data acquisition request acquired by the gateway device carries the user name identifier.
In another embodiment of the present invention, the data obtaining request may also carry a target service identifier in addition to the target data type identifier and the data query condition, and in view of this, the target service may be determined through the following steps a to B.
Step A: and obtaining the target service identification carried in the data obtaining request.
Specifically, the target service identifier is: the requesting end can be provided with an identifier of a target service in the server for requesting data, for example, an identifier of a user information service.
In the case that the data obtaining request carries the target service identifier, the S102 may obtain the target service identifier together with the target data type identifier and the data query condition carried in the data obtaining request.
If the data acquisition request represents the following information in an SQL statement:
GET < gateway >/query-by-sql = select + name, age + from + user + where + id \ 16, then the target service id is "user", i.e. the user information service id.
And B: and determining the service corresponding to the target service identification as the target service for providing the data to be requested.
For example, if the target service identifier is a user information service identifier, the target service corresponding to the target service identifier is a user information service.
In addition, the data to be requested of the request end may be provided by more than one target service respectively, so that the data obtaining request may carry a plurality of target service identifiers, and the obtained plurality of target services are determined according to the target service identifiers.
For example, the data to be requested of the request end is name data of a user and area information of a house of the user, the name data of the user is provided by a user information service, the area information of the house of the user is provided by a house information service, both the user information service and the house information service are the target service, and a target service identifier carried by the data obtaining request is two target service identifiers, namely a user information service identifier and a house information service identifier.
S104: and accessing a server providing the target service to obtain the data which is provided by the target service and meets the data query condition.
Specifically, the gateway device may access the target service through a target server interface of the server. The target server interface corresponds to a target service, and the gateway device can access the target service through the target server interface.
The gateway device may store url (Uniform Resource Locator) addresses of the services and access modes of the services, so that url addresses of the target services and access modes of the target services may be determined, and data may be obtained from the determined url addresses according to the determined access modes. For example, the access mode may be a microservice mode.
When data is acquired from the service in the server, the target service identifier, the data query condition, the access mode and the url address can be combined into a data query request and sent to the server, and after the server receives the data query request, the data which is provided by the target service and meets the data query condition is fed back to the gateway equipment.
In addition, the server may send all data that satisfies the data query condition and is included in the target service to the gateway device, so that the data received by the gateway device includes data of each data type provided by the target service.
For example, the target service is a video information service, the video information service includes name data, duration data, and release time data of a video, and the data query condition may be that the duration of the video is greater than 5 minutes, and then the gateway device may obtain three types of data, i.e., the name data, the duration data, and the release time data of the video with the duration greater than 5 minutes, provided by the video information service.
S105: and screening the data to be requested from the obtained data according to the target data type identification.
Since the target service sends the data of each data type that can be provided by the target service and meets the data query condition to the gateway device, and the target type of the data to be requested of the request end may include only a part of all data types provided by the target service, the obtained data needs to be screened, and the obtained data type is the data of the target type, so that the screened data only includes the data to be requested by the request end.
For example, the obtained data includes three types of data, namely name data, duration data and release time data of the video, and the target data type identifier is a name identifier and a duration identifier, and the name data and the duration data are screened from the obtained data according to the target data type identifier.
S106: and sending the data to be requested to the request terminal through the unified data query interface.
Because the gateway equipment receives the data acquisition request sent by the request end through the uniform data query interface and sends the data to be requested to the request end through the uniform data query interface, the gateway equipment can meet various data acquisition requests of the request end only by providing the uniform data query interface to the request end, thereby reducing the complexity of interface setting of the gateway equipment.
When the service provided by the server changes, only the parameters of the unified data query interface in the gateway device need to be adjusted, so that the request end can obtain the changed data provided by the service through the unified data query port. The request end can still obtain the changed data provided by the service in the server through the unified data query interface, so that the change of the service in the server does not affect the request end, the functions of the server and the request end are mutually separated, and the expandability of a data obtaining system consisting of the server, the gateway equipment and the request end is high.
As can be seen from the above, the data meeting the data query condition includes not only the data whose data type identifier is the target data type identifier, but also other types of data that can be provided by the target service, and therefore, in the embodiment of the present invention, the gateway device screens out the data whose data type identifier is the target data type identifier, that is, the data to be requested, from the data meeting the data query condition, and sends the data to be requested to the request terminal through the unified data query interface. Because the data sent to the request end is the data with the data type identifier of the target data type identifier in the data meeting the data query condition, the request end does not receive the unnecessary redundant data. Therefore, the scheme provided by the embodiment of the invention can be applied to obtain data, and the data obtaining requirement of a request end can be accurately met.
In an embodiment of the present invention, referring to fig. 2, a flowchart of a first service query method is provided, and is applied to a gateway device, where the gateway device further has a service query interface, and the method includes the following steps S201 to S203.
S201: and receiving a service inquiry request sent by the request terminal through the service inquiry interface.
Specifically, since a plurality of services are provided in the server, and the services provided in the server and data provided by the services may change, in order for the request terminal to be able to determine the services provided in the server and information of the data provided by each service in time, the service query interface is provided, and the gateway device receives a service query request from the request terminal through the interface and sends a query result of the service query request to the request terminal.
S202: and after receiving the service inquiry request, obtaining the service identifier of each service provided by the server and the data type identifier of the data provided by each service.
In an embodiment of the present invention, the gateway device may traverse each service provided in the server and data provided by each service, so as to obtain a service identifier of each service and a data type identifier of data provided by each service.
In another embodiment of the present invention, the server may also feed back, to the gateway device, the service identifier of each service provided by the server and the data type identifier of data provided by each service at preset time intervals.
Specifically, the service identifier may be a number of the service in the server, such as 5, "user," and the like, and the data type identifier may be a name of a type of data provided by the service, such as a publishing time, a duration, and the like of the video.
S203: and sending the obtained service identifier and the data type identifier to the request terminal through the service query interface.
Specifically, after receiving the service identifier and the data type identifier, the requesting end may determine, according to the data type of the requested data, the data type identifier of the requested data in the received data type identifier and the service identifier of the service providing the requested data when the requesting end needs to request data from the server through the gateway device, and carry the determined data type identifier and the service identifier in the data obtaining request, thereby sending the data obtaining request to the gateway device.
As can be seen from the above, the request end can determine the data types of the services included in the server and the data provided by the services through the service query interface, and in the case that the services provided in the server and the data provided by the services change, the request end can timely determine the services provided in the server and the information of the data provided by the services, and can generate a data acquisition request according to the determined information of the services and the data provided by the services, and send the data acquisition request to the gateway device, thereby acquiring the data required by the request end.
Referring to fig. 3, an embodiment of the present invention provides a flowchart of a second data request method.
The method includes that a dotted arrow 1 indicates that a request end sends a data obtaining request to a gateway device, the gateway device analyzes the data obtaining request after obtaining the data obtaining request, a dotted arrow 2 indicates a target data type identifier and a data query condition obtained by analyzing the data obtaining request, a dotted arrow 3 indicates that the gateway device accesses a server according to the target data type identifier and the data query condition obtained by analyzing, a dotted arrow 4 indicates that the gateway device receives data provided by a target service in the server, a dotted arrow 5 indicates data received by the gateway device from the server, the gateway device screens the received data to screen the data to be requested, which is requested by the data request end, included in the received data, and a dotted arrow 6 indicates that the gateway device sends the data to be requested to the request end, so that the request end receives the data to be requested.
In addition, the service query interface in fig. 3 enables the requesting end to obtain the service identifier of each service provided by the server and the data type identifier of the data provided by each service through the service query interface.
Referring to fig. 4, an embodiment of the present invention provides a flowchart of a third data requesting method, and specifically, the method is applied to a requesting end, and the method includes the following steps S401 to S403.
S401: and generating a data acquisition request carrying a target data type identifier of the data to be requested and a data query condition.
Specifically, the target data type identifier and the data query condition may be determined according to a data requirement of the request end.
For example, if the data requirement of the request end is to obtain the name data of the video with the duration of 10 minutes or more, the target data type identifier is a name identifier, and the data query condition is that the duration data of the video is greater than 10 minutes.
The data acquisition request may be represented in the form of an SQL statement.
In addition, in another embodiment of the present invention, the data obtaining request may also carry a target service identifier in addition to the target data type identifier and the data query condition, and in view of this, the data obtaining request may be generated through the following steps C to D.
And C: a target service identification of the target service is determined.
Specifically, the request end may query, through a service query interface of the gateway device, a service identifier of each service provided by the server and a data type identifier of data provided by each service. The specific steps of the requesting end querying the service identifier and the data type identifier through the service query interface may be referred to as steps S501-S502, which are not described in detail herein.
For example, the service identifier may be a video information service identifier, and the data type identifier may be a video name identifier, a video publishing time identifier, or the like.
Therefore, the data type of the requested data can be determined according to the data requirement of the request end, the target service capable of providing the data of the requested data type can be determined according to the data type identifier, and the service identifier of the target service is determined as the target service identifier.
Step D: and generating a data acquisition request carrying a target data type identifier, a data query condition and the target service identifier of the data to be requested.
S402: and sending the data acquisition request to the gateway equipment through a unified data query interface of the gateway equipment so that the gateway equipment acquires the data which is provided by the target service and meets the query condition from a server providing the target service, and screening the data to be requested from the acquired data according to the target data type identifier.
The target service is as follows: and providing the service of the data to be requested.
Specifically, after receiving the data obtaining request, the gateway device may obtain the data to be requested of the requesting end through the steps S101 to S106 and send the data to be requested to the requesting end, which is not described herein again.
S403: and receiving the data to be requested, which is sent by the gateway equipment through the unified data query interface.
As can be seen from the above, the data obtaining request sent by the request end to the gateway device carries the data type identifier of the data required by the request end and the data query condition, so that the gateway device can obtain the data required by the request end from the service provided by the server according to the data query condition. In addition, the scheme provided by the embodiment of the invention is different from the prior art, after the gateway equipment obtains the data for serving the service feedback provided by the gateway equipment, all the obtained data are not directly fed back to the request end, but the data specifically required by the request end are determined according to the data type identification of the data required by the request end, and the data required by the request end are fed back to the request end, so that the request end can accurately obtain the data meeting the requirements of the request end.
In addition, the request end can send various data acquisition requests to the unified data query interface, and compared with the prior art, the request end does not need to select the aggregation interface corresponding to the data type of the data to be requested in the gateway equipment from the aggregation interfaces of the gateway equipment, but can acquire various data to be requested directly through the unified data query interface, so that the efficiency of acquiring the data by the request end is improved.
In an embodiment of the present invention, referring to fig. 5, a flowchart of a second service query method is provided, and is applied to a request end, where the method includes the following steps S501 to S502:
s501: and sending a service inquiry request to the gateway equipment through a service inquiry interface of the gateway equipment.
Specifically, since the service in the server and the data provided by the service change, the request end needs to determine the service identifier of the service provided in the server and the data type identifier of the data provided by the service, so as to generate the data obtaining request carrying the target data type identifier and the service identifier, thereby obtaining the data. Therefore, the request end can timely acquire the service provided by the server and the information of the data provided by the service by sending the service query request to the service query interface.
S502: and receiving the service identifier of each service provided by the server and the data type identifier of the data provided by each service, which are sent by the gateway device through the service query interface.
After the request end receives the service identifier and the data type identifier, when the request end needs to request data from the server through the gateway device, the request end can determine the data type identifier of the requested data in the received data type identifier according to the data type of the requested data, and carry the determined data type identifier and the service identifier in the data obtaining request, so as to send the data obtaining request to the gateway device.
As can be seen from the above, the request end can determine the data types of the services included in the server and the data provided by the services through the service query interface, and in the case that the services provided in the server and the data provided by the services change, the request end can timely determine the services provided in the server and the information of the data provided by the services, and can generate a data acquisition request according to the determined information of the services and the data provided by the services, and send the data acquisition request to the gateway device, thereby acquiring the data required by the request end.
Corresponding to the data obtaining method, the embodiment of the invention also provides a data request device.
Referring to fig. 6, an embodiment of the present invention provides a schematic structural diagram of a first data request apparatus, which is applied to a gateway device, where the gateway device has a unified data query interface, and specifically, the apparatus includes:
a first request receiving module 601, configured to receive, through the unified data query interface, a data obtaining request sent by a request end;
a condition obtaining module 602, configured to obtain a target data type identifier of data to be requested and a data query condition, where the target data type identifier and the data query condition are carried in the data obtaining request;
a service determining module 603, configured to determine a target service for providing the data to be requested;
a data obtaining module 604, configured to access a server that provides the target service, and obtain data that meets the data query condition and is provided by the target service;
a data screening module 605, configured to screen the data to be requested from the obtained data according to the target data type identifier;
a data sending module 606, configured to send the data to be requested to the request end through the unified data query interface.
In an embodiment of the present invention, the service determining module 603 is specifically configured to:
obtaining a target service identifier carried in the data obtaining request;
and determining the service corresponding to the target service identification as the target service for providing the data to be requested.
As can be seen from the above, the data meeting the data query condition includes not only the data whose data type identifier is the target data type identifier, but also other types of data that can be provided by the target service, and therefore, in the embodiment of the present invention, the gateway device screens out the data whose data type identifier is the target data type identifier, that is, the data to be requested, from the data meeting the data query condition, and sends the data to be requested to the request terminal through the unified data query interface. Because the data sent to the request end is the data with the data type identifier of the target data type identifier in the data meeting the data query condition, the request end does not receive the unnecessary redundant data. Therefore, the scheme provided by the embodiment of the invention is applied to obtain data, and the data obtaining requirement of a request end can be accurately met.
In an embodiment of the present invention, the gateway device further has a service query interface, and the apparatus further includes:
a second request receiving module, configured to receive, through the service query interface, a service query request sent by the request end;
an identifier obtaining module, configured to obtain, after receiving the service query request, a service identifier of each service provided by the server and a data type identifier of data provided by each service;
and the identifier sending module is used for sending the obtained service identifier and the data type identifier to the request terminal through the service query interface.
As can be seen from the above, the request end can determine the data types of the services included in the server and the data provided by the services through the service query interface, and when the services provided in the server and the data provided by the services change, the request end can determine the information of the services provided in the server and the data provided by the services in time, and can generate a data acquisition request according to the determined information of the services and the data provided by the services, and send the data acquisition request to the gateway device, so as to acquire the data required by the request end.
Referring to fig. 7, an embodiment of the present invention provides a schematic structural diagram of a second data request apparatus, which is specifically applied to a request end, where the apparatus includes:
a request generating module 701, configured to generate a data obtaining request carrying a target data type identifier of data to be requested and a data query condition;
a first request sending module 702, configured to send the data obtaining request to a gateway device through a unified data query interface of the gateway device, so that the gateway device obtains, from a server providing a target service, data that meets the query condition and is provided by the target service, and screens out, according to the target data type identifier, the data to be requested from the obtained data, where the target service is: providing the service of the data to be requested;
a data receiving module 703, configured to receive the data to be requested, which is sent by the gateway device through the unified data query interface.
In this embodiment of the present invention, the request generating module 701 is specifically configured to:
determining a target service identification of the target service;
and generating a data acquisition request carrying a target data type identifier, a data query condition and the target service identifier of the data to be requested.
As can be seen from the above, the data obtaining request sent by the request end to the gateway device carries the data type identifier of the data required by the request end and the data query condition, so that the gateway device can obtain the data required by the request end from the service provided by the server according to the data query condition. In addition, the solution provided in the embodiment of the present invention is different from the prior art, after the gateway device obtains the data for serving the service feedback provided by the gateway device, the gateway device does not directly feed back all the obtained data to the request end, but determines the data specifically required by the request end according to the data type identifier of the data required by the request end, and feeds back the data required by the request end to the request end, so that the request end can accurately obtain the data meeting the requirement.
In addition, the request end can send various data acquisition requests to the unified data query interface, and compared with the prior art, the request end does not need to select the aggregation interface corresponding to the data type of the data to be requested in the gateway equipment from the aggregation interfaces of the gateway equipment, but can acquire various data to be requested directly through the unified data query interface, so that the efficiency of acquiring the data by the request end is improved.
In one embodiment of the present invention, the apparatus further comprises:
a second request sending module, configured to send a service query request to the gateway device through a service query interface of the gateway device;
and the identification receiving module is used for receiving the service identification of each service provided by the server and the data type identification of the data provided by each service, which are sent by the gateway equipment through the service inquiry interface.
As can be seen from the above, the request end can determine the data types of the services included in the server and the data provided by the services through the service query interface, and under the condition that the services provided in the server and the data provided by the services change, the request end can timely determine the information of the services provided in the server and the data provided by the services, and can generate a data acquisition request according to the determined information of the services and the data provided by the services, and send the data acquisition request to the gateway device, so as to acquire the data required by the request end.
Referring to fig. 8, there is provided a schematic structural diagram of a data request system, the system including: a request terminal 801, a gateway device 802, and a server 803;
the request terminal 801 is configured to generate a data obtaining request carrying a target data type identifier of data to be requested and a data query condition; the data acquisition request is sent to the gateway device 802 through the unified data query interface of the gateway device 802.
The gateway device 802 is configured to receive, through the unified data query interface, a data obtaining request sent by the request terminal 801; obtaining a target data type identifier and a data query condition of the data to be requested, which are carried in the data obtaining request; determining a target service for providing the data to be requested; based on the data query condition, the server 803 providing the target service is accessed.
Specifically, the gateway device 802 may send the data query condition to the server 803 providing the target service.
The server 803 is configured to send the data provided by the target service and satisfying the data query condition to the gateway device 802.
Specifically, the server 803 may receive the data query condition, determine data satisfying the data query condition according to the data query condition, and transmit the determined data to the gateway device 802.
The gateway device 802, configured to receive the data that is sent by the server 803 and satisfies the data query condition; screening the data to be requested from the received data according to the target data type identification; the data to be requested is sent to the requesting end 801 through the unified data query interface.
The request terminal 801 is configured to receive the data to be requested, which is sent by the gateway device 802 through the unified data query interface.
Specifically, the data request flow among the request terminal 801, the gateway device 802, and the server 803 in the data request system is similar to the foregoing steps S101 to S106 and steps S201 to S203, and is not repeated herein.
Referring to fig. 9, a signaling flow diagram of a data request system is provided.
S901: the requesting end 801 generates a data acquisition request.
S902: the requesting side 801 sends a data acquisition request to the gateway device 802 through the unified data query interface of the gateway device 802.
S903: the gateway device 802 obtains the target data type identifier and the data query condition of the data to be requested, which are carried in the data obtaining request.
S904: the gateway device 802 determines a target service that provides the data to be requested.
S905: the gateway device 802 accesses the target service of the server 803.
S906: the server 803 transmits data satisfying the data query condition to the gateway apparatus 802.
S907: the gateway device 802 screens the data to be requested among the received data that satisfy the data query condition.
S908: the gateway device 802 sends the data to be requested to the requesting terminal 801 through the unified data query interface.
As can be seen from the above, the data obtaining request sent by the request end to the gateway device carries the data type identifier of the data required by the request end and the data query condition, so that the gateway device can obtain the data required by the request end from the service provided by the server according to the data query condition. In addition, the solution provided in the embodiment of the present invention is different from the prior art, after the gateway device obtains the data for serving the service feedback provided by the gateway device, the gateway device does not directly feed back all the obtained data to the request end, but determines the data specifically required by the request end according to the data type identifier of the data required by the request end, and feeds back the data required by the request end to the request end, so that the request end can accurately obtain the data meeting the requirement.
In addition, the request end can send various data acquisition requests to the unified data query interface, and compared with the prior art, the request end does not need to select the aggregation interface corresponding to the data type of the data to be requested in the gateway equipment from the aggregation interfaces of the gateway equipment, and can acquire various data to be requested directly through the unified data query interface, so that the efficiency of acquiring data by the request end is improved.
In an embodiment of the present invention, the generating a data obtaining request carrying a target data type identifier of data to be requested and a data query condition includes:
determining a target service identifier of the target service;
generating a data acquisition request carrying a target data type identifier, a data query condition and the target service identifier of data to be requested;
the determining of the target service providing the data to be requested includes:
obtaining a target service identifier carried in the data obtaining request;
and determining the service corresponding to the target service identification as the target service for providing the data to be requested.
In an embodiment of the present invention, the gateway device 802 further has a service query interface;
the request terminal 801 is further configured to send a service query request to the gateway device 802 through the service query interface of the gateway device 802.
The gateway device 802 is further configured to receive a service query request sent by the requesting end 801 through the service query interface; after receiving the service query request, obtaining a service identifier of each service provided by the server 803 and a data type identifier of data provided by each service; the obtained service identifier and data type identifier are sent to the requesting end 801 through the service query interface.
The request terminal 801 is further configured to receive a service identifier of each service provided by the server 803 and a data type identifier of data provided by each service, which are sent by the gateway device 802 through the service query interface.
As can be seen from the above, the request end can determine the data types of the services included in the server and the data provided by the services through the service query interface, and in the case that the services provided in the server and the data provided by the services change, the request end can timely determine the services provided in the server and the information of the data provided by the services, and can generate a data acquisition request according to the determined information of the services and the data provided by the services, and send the data acquisition request to the gateway device, thereby acquiring the data required by the request end.
The embodiment of the present invention further provides an electronic device, which is used as a gateway device, and the gateway device has a unified data query interface, as shown in fig. 10, and includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, where the processor 1001, the communication interface 1002 and the memory 1003 complete mutual communication through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001 is configured to implement the method steps of any data request method embodiment when executing the program stored in the memory 1003.
When the gateway device requests data by applying the embodiment provided by the embodiment of the invention, after receiving a data acquisition request sent by a request terminal, the gateway device firstly acquires a target data type identifier and a data query condition of data to be requested carried by the data acquisition request according to the received data acquisition request, determines a target service for providing the data to be requested, accesses a server for providing the target service, and acquires data meeting the data query condition. Therefore, in the embodiment of the present invention, the gateway device screens out data with a data type identifier being the target data type identifier from the data meeting the data query condition, that is, the data to be requested, and sends the data to be requested to the request end through the unified data query interface. Because the data sent to the request end is the data with the data type identifier of the target data type identifier in the data meeting the data query condition, the request end does not receive the unnecessary redundant data. Therefore, the scheme provided by the embodiment of the invention is applied to obtain data, and the data obtaining requirement of a request end can be accurately met.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In a further embodiment of the present invention, the present invention is applied to a gateway device, and further provides a computer readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of any of the above data request method embodiments.
When the gateway device requests data by using a computer program stored in a computer-readable storage medium provided by this embodiment, after receiving a data acquisition request sent by a request end, the gateway device first obtains a target data type identifier and a data query condition of data to be requested, which are carried by the data acquisition request, according to the received data acquisition request, determines a target service for providing the data to be requested, accesses a server for providing the target service, and obtains data satisfying the data query condition. Therefore, in the embodiment of the present invention, the gateway device screens out data with a data type identifier being the target data type identifier from the data meeting the data query condition, that is, the data to be requested, and sends the data to be requested to the request end through the unified data query interface. Because the data sent to the request end is the data with the data type identifier of the target data type identifier in the data meeting the data query condition, the request end does not receive the unnecessary redundant data. Therefore, the scheme provided by the embodiment of the invention is applied to obtain data, and the data obtaining requirement of a request end can be accurately met.
In a further embodiment of the present invention, the gateway device is applied, and a computer program product containing instructions is provided, which when run on a computer causes the computer to perform the method steps as described in any of the above embodiments of the data request method.
When the gateway device executes the computer program product request data provided by this embodiment, after receiving a data obtaining request sent by a request end, the gateway device first obtains a target data type identifier and a data query condition of data to be requested carried by the data obtaining request according to the received data obtaining request, determines a target service for providing the data to be requested, accesses a server for providing the target service, and obtains data satisfying the data query condition. Therefore, in the embodiment of the present invention, the gateway device screens out data with a data type identifier being the target data type identifier from the data meeting the data query condition, that is, the data to be requested, and sends the data to be requested to the request end through the unified data query interface. Because the data sent to the request end is the data with the data type identifier of the target data type identifier in the data meeting the data query condition, the request end does not receive the unnecessary redundant data. Therefore, the scheme provided by the embodiment of the invention can be applied to obtain data, and the data obtaining requirement of a request end can be accurately met.
An embodiment of the present invention further provides another electronic device, where the electronic device serves as a request end, as shown in fig. 11, and includes a processor 1101, a communication interface 1102, a memory 1103 and a communication bus 1104, where the processor 1101, the communication interface 1102, and the memory 1103 complete mutual communication through the communication bus 1104,
a memory 1103 for storing a computer program;
the processor 1101 is configured to implement the method steps of any of the embodiments of the data request method when executing the program stored in the memory 1103.
When the request terminal requests data by applying the embodiment provided by the embodiment of the invention, the data acquisition request sent by the request terminal to the gateway device carries the data type identifier of the data required by the request terminal and the data query condition, so that the gateway device can acquire the data required by the request terminal from the service provided by the server according to the data query condition. In addition, the scheme provided by the embodiment of the invention is different from the prior art, after the gateway equipment obtains the data for serving the service feedback provided by the gateway equipment, all the obtained data are not directly fed back to the request end, but the data specifically required by the request end are determined according to the data type identification of the data required by the request end, and the data required by the request end are fed back to the request end, so that the request end can accurately obtain the data meeting the requirements of the request end.
In addition, the request end can send various data acquisition requests to the unified data query interface, and compared with the prior art, the request end does not need to select the aggregation interface corresponding to the data type of the data to be requested in the gateway equipment from the aggregation interfaces of the gateway equipment, but can acquire various data to be requested directly through the unified data query interface, so that the efficiency of acquiring the data by the request end is improved.
In a further embodiment of the present invention, the present invention is applied to a request end, and further provides a computer readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of any of the above data request method embodiments.
When the request terminal requests data by using the computer program stored in the computer-readable storage medium provided by this embodiment, the data obtaining request sent from the request terminal to the gateway device carries the data type identifier of the data required by the request terminal and the data query condition, so that the gateway device can obtain the data required by the request terminal from the service provided by the server according to the data query condition. In addition, the scheme provided by the embodiment of the invention is different from the prior art, after the gateway equipment obtains the data for serving the service feedback provided by the gateway equipment, all the obtained data are not directly fed back to the request end, but the data specifically required by the request end are determined according to the data type identification of the data required by the request end, and the data required by the request end are fed back to the request end, so that the request end can accurately obtain the data meeting the requirements of the request end.
In addition, the request end can send various data acquisition requests to the unified data query interface, and compared with the prior art, the request end does not need to select the aggregation interface corresponding to the data type of the data to be requested in the gateway equipment from the aggregation interfaces of the gateway equipment, but can acquire various data to be requested directly through the unified data query interface, so that the efficiency of acquiring the data by the request end is improved.
In a further embodiment provided by the present invention, there is also provided a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method steps as described in any of the data request method embodiments above.
When the request end executes the computer program product provided by this embodiment to request data, the data obtaining request sent by the request end to the gateway device carries the data type identifier of the data required by the request end and the data query condition, so that the gateway device can obtain the data required by the request end from the service provided by the server according to the data query condition. In addition, the scheme provided by the embodiment of the invention is different from the prior art, after the gateway equipment obtains the data for serving the service feedback provided by the gateway equipment, all the obtained data are not directly fed back to the request end, but the data required by the request end are fed back to the request end according to the data type identification of the data required by the request end, and the data specifically required by the request end are determined, so that the request end can accurately obtain the data meeting the requirements of the request end.
In addition, the request end can send various data acquisition requests to the unified data query interface, and compared with the prior art, the request end does not need to select the aggregation interface corresponding to the data type of the data to be requested in the gateway equipment from the aggregation interfaces of the gateway equipment, and can acquire various data to be requested directly through the unified data query interface, so that the efficiency of acquiring data by the request end is improved.
In the above embodiments, all or part of the implementation may be realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to be performed in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus, the system, the gateway device, the requesting end, the computer-readable storage medium and the computer program product, since they are substantially similar to the method embodiments, the description is relatively simple, and it suffices to refer to the partial description of the method embodiments in relation thereto.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (19)

1. A data request method is applied to a gateway device, the gateway device is provided with a unified data query interface, and the method comprises the following steps:
receiving a data acquisition request sent by a request end through the unified data query interface;
obtaining a target data type identifier and a data query condition of data to be requested carried in the data obtaining request;
determining a target service for providing the data to be requested;
accessing a server providing the target service to obtain data which is provided by the target service and meets the data query condition;
screening the data to be requested from the obtained data according to the target data type identification;
sending the data to be requested to the request terminal through the unified data query interface;
the gateway equipment records the corresponding relation between the target data type identification and the target service;
the determining a target service for providing the data to be requested comprises:
and determining the target service according to the obtained target data type identification and the corresponding relation.
2. The method of claim 1, wherein the determining a target service for providing the data to be requested comprises:
obtaining a target service identifier carried in the data obtaining request;
and determining the service corresponding to the target service identification as the target service for providing the data to be requested.
3. The method according to claim 1 or 2, wherein the gateway device further has a service query interface, the method further comprising:
receiving a service query request sent by the request terminal through the service query interface;
after receiving the service inquiry request, obtaining the service identification of each service provided by the server and the data type identification of data provided by each service;
and sending the obtained service identifier and the obtained data type identifier to the request terminal through the service query interface.
4. A data request method is applied to a request end, and the method comprises the following steps:
generating a data acquisition request carrying a target data type identifier of data to be requested and a data query condition;
sending the data acquisition request to gateway equipment through a unified data query interface of the gateway equipment, so that the gateway equipment acquires data which is provided by target service and meets the data query condition from a server which provides the target service, and screens out the data to be requested from the acquired data according to the target data type identifier, wherein the target service is as follows: providing the service of the data to be requested;
receiving the data to be requested sent by the gateway equipment through the unified data query interface;
the gateway equipment records the corresponding relation between the target data type identification and the target server;
and the target service is determined by the gateway equipment according to the target data type identification carried in the acquisition request and the corresponding relation.
5. The method of claim 4, wherein the generating a data obtaining request carrying a target data type identifier of data to be requested and a data query condition comprises:
determining a target service identification of the target service;
and generating a data acquisition request carrying a target data type identifier of data to be requested, a data query condition and the target service identifier.
6. The method according to claim 4 or 5, characterized in that the method further comprises:
sending a service query request to the gateway device through a service query interface of the gateway device;
and receiving the service identification of each service provided by the server and the data type identification of data provided by each service, which are sent by the gateway equipment through the service inquiry interface.
7. A data request apparatus, applied to a gateway device, the gateway device having a unified data query interface, the apparatus comprising:
the first request receiving module is used for receiving a data acquisition request sent by a request end through the unified data query interface;
a condition obtaining module, configured to obtain a target data type identifier of data to be requested and a data query condition, where the target data type identifier and the data query condition are carried in the data obtaining request;
the service determining module is used for determining a target service for providing the data to be requested;
the data obtaining module is used for accessing a server providing the target service to obtain the data which is provided by the target service and meets the data query condition;
the data screening module is used for screening the data to be requested from the obtained data according to the target data type identifier;
the data sending module is used for sending the data to be requested to the request terminal through the unified data query interface;
the gateway equipment records the corresponding relation between the target data type identification and the target service;
the service determination module is specifically configured to determine the target service according to the obtained target data type identifier and the corresponding relationship.
8. The apparatus of claim 7, wherein the service determination module is specifically configured to:
obtaining a target service identifier carried in the data obtaining request;
and determining the service corresponding to the target service identification as the target service for providing the data to be requested.
9. The apparatus according to claim 7 or 8, wherein the gateway device further has a service query interface, the apparatus further comprising:
the second request receiving module is used for receiving the service inquiry request sent by the request terminal through the service inquiry interface;
an identifier obtaining module, configured to obtain, after receiving the service query request, a service identifier of each service provided by the server and a data type identifier of data provided by each service;
and the identifier sending module is used for sending the obtained service identifier and the data type identifier to the request terminal through the service query interface.
10. A data request apparatus, applied to a request side, the apparatus comprising:
the request generating module is used for generating a data obtaining request carrying a target data type identifier of data to be requested and a data query condition;
a first request sending module, configured to send the data obtaining request to a gateway device through a unified data query interface of the gateway device, so that the gateway device obtains, from a server that provides a target service, data that meets the data query condition and is provided by the target service, and screens, according to the target data type identifier, the data to be requested from the obtained data, where the target service is: providing the service of the data to be requested;
the data receiving module is used for receiving the data to be requested, which is sent by the gateway equipment through the unified data query interface;
the gateway equipment records the corresponding relation between the target data type identification and the target server;
and the target service is determined by the gateway equipment according to the target data type identification carried in the acquisition request and the corresponding relation.
11. The apparatus of claim 10, wherein the request generation module is specifically configured to:
determining a target service identification of the target service;
and generating a data acquisition request carrying a target data type identifier of the data to be requested, a data query condition and the target service identifier.
12. The apparatus of claim 10 or 11, further comprising:
a second request sending module, configured to send a service query request to the gateway device through a service query interface of the gateway device;
and the identifier receiving module is used for receiving the service identifiers of the services provided by the server and the data type identifiers of the data provided by the services, which are sent by the gateway equipment through the service query interface.
13. A data request system, the system comprising: the system comprises a request terminal, gateway equipment and a server, wherein the gateway equipment is provided with a uniform data query port;
the request terminal is used for generating a data acquisition request carrying a target data type identifier of data to be requested and a data query condition; sending the data acquisition request to the gateway equipment through a unified data query interface of the gateway equipment;
the gateway device is used for receiving a data acquisition request sent by a request end through the unified data query interface; obtaining a target data type identifier and a data query condition of the data to be requested carried in the data obtaining request; determining a target service for providing the data to be requested; accessing a server providing the target service based on the data query condition;
the server is used for sending the data which is provided by the target service and meets the data query condition to the gateway equipment;
the gateway device is used for receiving the data which is sent by the server and meets the data query condition; screening the data to be requested from the received data according to the target data type identification; sending the data to be requested to the request terminal through the unified data query interface;
the request terminal is used for receiving the data to be requested, which is sent by the gateway device through the unified data query interface;
the gateway equipment records the corresponding relation between the target data type identification and the target service;
the determining a target service for providing the data to be requested includes:
and determining the target service according to the obtained target data type identification and the corresponding relation.
14. The system of claim 13, wherein the generating a data obtaining request carrying a target data type identifier of data to be requested and a data query condition comprises: determining a target service identification of the target service; generating a data acquisition request carrying a target data type identifier, a data query condition and the target service identifier of data to be requested;
the determining a target service for providing the data to be requested includes: obtaining a target service identifier carried in the data obtaining request; and determining the service corresponding to the target service identification as the target service for providing the data to be requested.
15. The system according to claim 13 or 14, characterized in that the gateway device further has a service query interface;
the request terminal is further configured to send a service query request to the gateway device through a service query interface of the gateway device;
the gateway device is further configured to receive a service query request sent by the request end through the service query interface; after receiving the service inquiry request, obtaining the service identification of each service provided by the server and the data type identification of data provided by each service; sending the obtained service identifier and the obtained data type identifier to the request terminal through the service query interface;
the request end is further configured to receive a service identifier of each service provided by the server and a data type identifier of data provided by each service, where the service identifiers are sent by the gateway device through the service query interface.
16. An electronic device, as a gateway device, is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 3 when executing a program stored in the memory.
17. A computer-readable storage medium for a gateway device, characterized in that the computer-readable storage medium has stored therein a computer program which, when being executed by a processor, carries out the method steps of any one of claims 1 to 3.
18. An electronic device is used as a request end and is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are used for completing mutual communication through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 4 to 6 when executing a program stored in the memory.
19. A computer-readable storage medium for a requesting end, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of the claims 4-6.
CN202010533856.0A 2020-06-12 2020-06-12 Data request method, device and system Active CN111698324B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010533856.0A CN111698324B (en) 2020-06-12 2020-06-12 Data request method, device and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010533856.0A CN111698324B (en) 2020-06-12 2020-06-12 Data request method, device and system

Publications (2)

Publication Number Publication Date
CN111698324A CN111698324A (en) 2020-09-22
CN111698324B true CN111698324B (en) 2022-12-06

Family

ID=72480650

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010533856.0A Active CN111698324B (en) 2020-06-12 2020-06-12 Data request method, device and system

Country Status (1)

Country Link
CN (1) CN111698324B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836822A (en) * 2014-02-10 2015-08-12 腾讯科技(深圳)有限公司 Method and device for obtaining downloaded data, and method and system for downloading data
CN107889069A (en) * 2017-12-28 2018-04-06 广东蜂助手网络技术股份有限公司 A kind of Short Message Service Gateway system of selection, device, server and readable storage medium storing program for executing
CN108881328A (en) * 2018-09-29 2018-11-23 北京东土军悦科技有限公司 Packet filtering method, device, gateway and storage medium
CN109067558A (en) * 2018-06-11 2018-12-21 玖富金科控股集团有限责任公司 data service method and system

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197843B (en) * 2007-11-13 2010-12-01 华为技术有限公司 Page reorientation method and wireless application protocol gateway
CN102238703B (en) * 2010-05-07 2015-09-16 中兴通讯股份有限公司 A kind of direct interface selects the method and system set up
CN108924110A (en) * 2012-06-12 2018-11-30 华为技术有限公司 The processing method and system and equipment of data packet
CN103647663A (en) * 2013-12-09 2014-03-19 中山爱科数字家庭产业孵化基地有限公司 Resource management method in server cluster
US9363736B2 (en) * 2013-12-16 2016-06-07 Qualcomm Incorporated Methods and apparatus for provisioning of credentials in network deployments
CN103618667A (en) * 2013-12-16 2014-03-05 苏州工业园区服务外包职业学院 Information transfer method, access gateway and system
CN106844405B (en) * 2015-12-07 2019-10-22 杭州海康威视数字技术股份有限公司 Data query method and apparatus
CN106959963B (en) * 2016-01-12 2020-04-28 杭州海康威视数字技术股份有限公司 Data query method, device and system
CN108090064B (en) * 2016-11-21 2021-10-08 腾讯科技(深圳)有限公司 Data query method and device, data storage server and system
US10694445B2 (en) * 2018-01-17 2020-06-23 T-Mobile Usa, Inc. Methods for serving gateway selection based on type-of-service in a wireless communication network
CN109218417A (en) * 2018-09-04 2019-01-15 浙江中控技术股份有限公司 A kind of data capture method and device
CN110636103B (en) * 2019-07-22 2021-06-04 中山大学 Unified scheduling method for multi-heterogeneous cluster jobs and API (application program interface)

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104836822A (en) * 2014-02-10 2015-08-12 腾讯科技(深圳)有限公司 Method and device for obtaining downloaded data, and method and system for downloading data
CN107889069A (en) * 2017-12-28 2018-04-06 广东蜂助手网络技术股份有限公司 A kind of Short Message Service Gateway system of selection, device, server and readable storage medium storing program for executing
CN109067558A (en) * 2018-06-11 2018-12-21 玖富金科控股集团有限责任公司 data service method and system
CN108881328A (en) * 2018-09-29 2018-11-23 北京东土军悦科技有限公司 Packet filtering method, device, gateway and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Ryota Ogasawara ; Masayuki Arai."Data aggregation on smart grid communications considering fault tolerance and privacy".《 2017 IEEE 3rd International Future Energy Electronics Conference and ECCE Asia (IFEEC 2017 - ECCE Asia)》.2017,全文. *
李继蕊 ; 李小勇 ; 高雅丽 ; 高云全 ; 方滨兴."物联网环境下数据转发模型研究".《软件学报》.2017,全文. *

Also Published As

Publication number Publication date
CN111698324A (en) 2020-09-22

Similar Documents

Publication Publication Date Title
CN113364853B (en) Business service system, business request method and gateway equipment
US8396941B2 (en) Digital living network alliance (DLNA) server that serves contents from IVL services
US7974982B2 (en) System and method for device profiling using cascaded databases
CN107360261A (en) A kind of HTTP request processing method, device and electronic equipment
CN110022259B (en) Message arrival rate determining method and device, data statistics server and storage medium
CN108173839B (en) Authority management method and system
CN109522462B (en) Cloud query method, device, equipment and storage medium based on block chain
CN111782652B (en) Data calling method, device, computer equipment and storage medium
CN110933152B (en) Preheating method, device and system and electronic equipment
CN110677684B (en) Video processing method, video access method, distributed storage method and distributed video access system
CN110430070B (en) Service state analysis method, device, server, data analysis equipment and medium
CN109446445B (en) Resource acquisition method and device
CN111382206A (en) Data storage method and device
CN108132836B (en) Task distribution method and device and electronic equipment
CN111698324B (en) Data request method, device and system
CN108737493B (en) Address allocation method and device and electronic equipment
US20220101287A1 (en) System and method of managing access to time-restricted content
CN112783842B (en) Log collection method and device
CN111400327B (en) Data synchronization method and device, electronic equipment and storage medium
CN112579682A (en) Data model change notification method and device, electronic device and storage medium
CN111163088B (en) Message processing method, system and device and electronic equipment
CN109254855B (en) Registration method and device of parameter transmission protocol and electronic equipment
CN110990694A (en) Recommendation method, device and system
CN111061543A (en) Multi-tenant workflow engine service method, device and server
CN111327716A (en) Service interaction method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant