WO2021134873A1 - 数据获取方法及其相关设备、系统及存储装置 - Google Patents

数据获取方法及其相关设备、系统及存储装置 Download PDF

Info

Publication number
WO2021134873A1
WO2021134873A1 PCT/CN2020/076809 CN2020076809W WO2021134873A1 WO 2021134873 A1 WO2021134873 A1 WO 2021134873A1 CN 2020076809 W CN2020076809 W CN 2020076809W WO 2021134873 A1 WO2021134873 A1 WO 2021134873A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
platform
data acquisition
user
target data
Prior art date
Application number
PCT/CN2020/076809
Other languages
English (en)
French (fr)
Inventor
王之龙
邹雨竹
郑猛猛
Original Assignee
上海商汤智能科技有限公司
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 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Priority to JP2021538376A priority Critical patent/JP2022518890A/ja
Priority to KR1020217020202A priority patent/KR20210113603A/ko
Publication of WO2021134873A1 publication Critical patent/WO2021134873A1/zh

Links

Images

Classifications

    • 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/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/972Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance

Definitions

  • This application relates to the field of data processing technology, and in particular to a data acquisition method and related equipment, system and storage device.
  • the user data such as the user’s name, age, class, etc. are the same, so these user data can be used by multiple platforms.
  • the underlying data model design of different platforms is different, so they are different. Data acquisition cannot be achieved between platforms.
  • This application provides a data acquisition method and related equipment, system and storage device.
  • the first aspect of the present application provides a data acquisition method, including: acquiring a data acquisition request, wherein the data acquisition request is used to request the target data of the target data providing side, and the target data is used to provide the data requesting side, and the data request
  • the data acquisition side and the target data providing side belong to different platforms; from a variety of pre-stored data acquisition methods, the data acquisition method associated with the target data providing side is selected; the selected data acquisition method is adopted to obtain the target data from the target data providing side.
  • the target data providing side obtains the target data, so different data acquisition methods can be configured for different data providing sides to achieve data acquisition on different data providing sides, which can be compatible with multiple data acquisition methods, so as to achieve multiple data acquisition for the data requesting side Data on the side.
  • the multiple data acquisition modes include at least one of a preset communication interface mode, a SQL script running mode, and a pre-stored code running mode.
  • the preset communication interface mode includes at least one of an HTTP interface mode and an RPC interface mode
  • the pre-stored code includes at least one of Java code, Lua code, JavaScript code, and Groovy code.
  • HTTP interface mode RPC interface mode
  • Java code Lua code
  • JavaScript code JavaScript code
  • Groovy code mode so as to adopt more diversified acquisition methods to realize data interaction with more different data providers.
  • the method further includes: acquiring a data acquisition mode required by a data providing side input by a user; establishing an association relationship between the data providing side and the required data acquisition mode, and combining the data acquisition mode with the The association relationship is saved as configuration information; the selection of the data acquisition method associated with the target data provider from the multiple prestored data acquisition methods includes: searching for the target data provider from the configuration information The data acquisition method that has an association relationship on the side.
  • said acquiring a data acquisition method required by a data provider input by a user includes: in a case where the data acquisition method is a preset communication interface method, acquiring a preset data acquisition method input by the user and required by a data provider Communication interface information; when the data acquisition mode is the running SQL script mode, obtain the SQL script input by the user for a data provider side; when the data acquisition mode is the running pre-stored code mode, obtain the user Input a code required by the data providing side; the storing the data acquisition method and the association relationship as configuration information includes: storing the data acquisition method and the association relationship as configuration information in a preset database.
  • said using the selected data acquisition method to acquire the target data from the target data providing side includes: when the data acquisition method is a preset communication interface method, using a preset communication interface, Send a data query request to the target data providing side, and receive the data query result fed back by the target data providing side; and use a pre-stored communication interface template to identify and extract the key field content from the data query result to obtain the Target data; in the case that the data acquisition mode is running SQL script, run the SQL script to generate a data query request; send a data query request to the target data providing side, and receive data fed back by the target data providing side Query results; and based on the data query results, obtain the target data; in the case that the data acquisition mode is to run the pre-stored code, run the pre-stored code to generate and send to the target data providing side Data query request, and receiving the data query result fed back by the target data providing side, and parse the data query result to obtain the target data.
  • the data acquisition mode is to run the pre-stored code, run the pre
  • the preset communication interface to obtain the data query results from the data provider, and use the pre-stored communication interface template to identify and extract the target data from the data query results; or to generate and send data by running SQL scripts or pre-stored codes Query the request and obtain the target data; thus, it is possible to realize the data interaction with different data providers by adopting the preset communication interface mode, running SQL script mode and running pre-stored code mode.
  • the data acquisition request includes: receiving the data acquisition request from the data requesting side through a preset communication interface; or generating a data acquisition request when it is detected that a preset condition is met.
  • the acquisition of the data acquisition request is realized, and the communication with the data requesting side can be realized through the preset communication interface, and then the data acquisition request of the data requesting side can be received, and the corresponding data can be obtained from the data requesting side in response to the request of the data requesting side.
  • the data requesting side and the target data providing side belong to different education platforms, and the target data is data of the target user.
  • the method further includes: sending a verification request from the data requesting side to the data providing side, wherein the verification request is used to request to verify whether the target user logs in on the data providing side; receiving the The verification result of the data providing side is fed back to the data requesting side.
  • a second aspect of the present application provides a data acquisition method, including: a first platform detects that there is a demand for acquiring target data; and the target data is acquired from the second platform through a data transfer platform.
  • the first platform needs to obtain the target data of the second platform, it obtains the target data from the second platform through the data transfer platform, thus realizing data acquisition between different platforms.
  • detecting that there is a need for obtaining target data includes: receiving a user's access request; wherein, the access request is generated when the user accesses the second platform; and authenticating the user based on the access request Whether you have logged in on the second platform; if so, it is determined that there is a demand for obtaining the target data, where the target data is data of the user.
  • the first platform receives the user’s access request, if it is determined that the user has logged in on the second platform, the first platform will serve as the data requesting side and the second platform will serve as the data providing side.
  • the second platform acquires the user data, that is, when the user visits the user, the first platform actively queries the second platform for user data, so as to obtain the latest data of the user and improve the real-time and accuracy of data acquisition.
  • it further includes: if the user has logged in on the second platform, determining that the user has successfully logged in on the first platform.
  • the method further includes: determining the user's accessible content on the first platform based on the user's data.
  • the first platform and the second platform are two different education platforms
  • the user's data includes at least one of name, school, class, and role
  • the accessible content includes classes that can be taught and classes can be taught. At least one of the courses.
  • the access request includes a second platform address and a first key
  • the verification based on the access request whether the user has logged in on the second platform includes: based on the second platform address, The second platform sends a verification request including the first key to request verification whether the first key and the second key generated by the second platform when the user successfully logs in to the second platform Match; receive the verification result of the first key fed back by the second platform; if the verification result is that the first key and the second key match, it is determined that the user is already in the Log in to the second platform.
  • the verification of the key by the second platform realizes the verification of the user's login status on the second platform.
  • the obtaining the target data from the second platform through the data transfer platform includes: sending a data acquisition request to the data transfer platform, so that the data transfer platform uses the data associated with the second platform
  • the obtaining method is to obtain the target data from the second platform.
  • the data transfer platform can use the data acquisition method associated with the second platform to achieve the acquisition of target data, that is, it can select the matching data acquisition method for the second platform with different data acquisition methods, so it is compatible with multiple data acquisition methods , So as to obtain data of a different second platform for the first platform.
  • a third aspect of the present application provides a data acquisition device, which includes: an acquisition module for acquiring a data acquisition request, wherein the data acquisition request is used to request acquisition of target data on the target data provider side, and the target Data is provided to the data requesting side, and the data requesting side and the target data providing side belong to different platforms; the selection module is used to select data associated with the target data providing side from a variety of pre-stored data acquisition methods Obtaining mode; an obtaining module for obtaining the target data from the target data providing side by adopting the selected data obtaining method.
  • the target data providing side obtains the target data, so different data acquisition methods can be configured for different data providing sides to achieve data acquisition on different data providing sides, which can be compatible with multiple data acquisition methods, so as to achieve multiple data acquisition for the data requesting side Data on the side.
  • the fourth aspect of the present application provides a data acquisition device, which is applied to a first platform, and includes: a detection module, configured to detect that there is a demand for acquiring target data; and an acquisition module, configured to obtain data from the second platform through a data transfer platform.
  • the platform obtains the target data.
  • the first platform needs to obtain the target data of the second platform, it obtains the target data from the second platform through the data transfer platform, thus realizing data acquisition between different platforms.
  • a fifth aspect of the present application provides a data transfer device, including a processor, a communication circuit and a memory coupled to the processor, wherein the processor is configured to execute a computer program stored in the memory to execute the data of the first aspect in combination with the communication circuit Obtaining method.
  • the target data providing side obtains the target data, so different data acquisition methods can be configured for different data providing sides to achieve data acquisition on different data providing sides, which can be compatible with multiple data acquisition methods, so as to achieve multiple data acquisition for the data requesting side Data on the side.
  • the sixth aspect of the present application provides a platform server, including a processor, a communication circuit and a memory coupled to the processor, wherein the processor is configured to execute a computer program stored in the memory to perform the data acquisition of the second aspect in combination with the communication circuit method.
  • the first platform needs to obtain the target data of the second platform, it obtains the target data from the second platform through the data transfer platform, thus realizing data acquisition between different platforms.
  • the seventh aspect of the present application provides a data sharing system, including a data transfer device, a first platform server and at least one second platform server respectively connected to the data transfer device; wherein the data transfer device is the device of the fifth aspect mentioned above,
  • the first platform server is the server of the above-mentioned sixth aspect, so that the first platform server obtains the user data of the second platform server through the data transfer device.
  • An eighth aspect of the present application provides a storage device that stores a computer program that can be executed by a processor to implement the data acquisition method of the first aspect and/or the second aspect.
  • the data requesting side can obtain the data of the data providing side through the data transfer platform, so data acquisition between different platforms can be realized.
  • a ninth aspect of the present application provides a computer program, which includes computer-readable code, and when the computer code is run in an electronic device, the processor in the electronic device executes the computer program to implement the first aspect and/ Or the data acquisition method of the second aspect.
  • the data requesting side can obtain the data of the data providing side through the data transfer platform, so data acquisition between different platforms can be realized.
  • FIG. 1 is a schematic flowchart of an embodiment of a data acquisition method according to the present application
  • FIG. 2 is a schematic flowchart of another embodiment of the data acquisition method of the present application.
  • FIG. 3 is a schematic flowchart of another embodiment of the data acquisition method according to the present application.
  • FIG. 4 is a schematic structural diagram of an embodiment of a data acquisition device according to the present application.
  • FIG. 5 is a schematic structural diagram of another embodiment of the data acquisition device of the present application.
  • FIG. 6 is a schematic diagram of the framework of an embodiment of the data transfer device of the present application.
  • FIG. 7 is a schematic diagram of the framework of an embodiment of the platform server of the present application.
  • FIG. 8 is a schematic diagram of the framework of an embodiment of the data sharing system of the present application.
  • FIG. 9 is a schematic diagram of a framework of an embodiment of a storage device of the present application.
  • FIG. 1 is a schematic flowchart of an embodiment of a data acquisition method according to the present application. Specifically, the method of the embodiment of the present disclosure includes the following steps:
  • Step S101 Obtain a data acquisition request.
  • the data acquisition request is used to request the acquisition of target data on the target data providing side, and the target data is used to provide the data requesting side.
  • the target data providing side and the data requesting side belong to different platforms, such as different education platforms.
  • the data requesting side is an online education platform
  • the data providing side is a third-party education platform.
  • the target data may be any data on the data providing side.
  • the target data may be data of a target user.
  • the target data may be different due to different types of platforms on the target data providing side. There are no restrictions on the types of platforms, such as education platforms, government affairs platforms, and legal consulting platforms.
  • the target data is the data of the target user, which can be understood as: the target user can be a student, teacher, etc., and the target user's data includes user name, course, Classes, schools, etc.
  • the execution subject of the method in the embodiment of the present disclosure is a data transfer device (ie, a device used to support the operation of a data transfer platform), which realizes the interaction between the target data providing side and the data requesting side.
  • the data transfer device may be a hardware device such as a server and a terminal device, or a processor that executes a specific computer program, or the like. It is understandable that the data transfer device and the data request side of the embodiment of the present application may be different devices or be implemented by the same device.
  • the data acquisition request may be actively generated by the data transfer device or generated by the data requesting side.
  • the data transfer device generates a data acquisition request when it detects a preset condition (such as a predetermined time), and then performs the following steps to obtain the target data.
  • the data transfer device saves the target data so that it needs to be obtained later on the data request side.
  • the saved target data is directly obtained from the data transfer device, thereby preparing the data for the data requesting side in advance, which can reduce the data acquisition time of the data requesting side.
  • the data request side generates a data acquisition request when it needs to acquire the target data.
  • the data transfer device After obtaining the data acquisition request, the data transfer device performs the following steps to obtain the target data, and then feeds the target data back to the data request side, thereby directly When there is a demand on the data requesting side, the embodiments of the present disclosure are executed to obtain target data.
  • the data transfer device does not obtain and save the data in advance, which can reduce the storage space requirement of the data transfer device.
  • the method for obtaining the data acquisition request by the data transfer device includes a preset communication interface, etc., that is, the data transfer device can receive the data from the data requesting side through the preset communication interface Get the request.
  • the preset communication interface may be a standard and universal data interface, which may be specifically determined according to the device on the data request side.
  • Step S102 Select a data acquisition method associated with the target data providing side from a plurality of pre-stored data acquisition methods.
  • the multiple data acquisition methods include at least one of a preset communication interface method, a SQL (Structured Query Language, structured query language) script method, and a stored code method.
  • the preset communication interface mode may include at least one of HTTP (HyperText Transfer Protocol) interface mode, RPC (Remote Procedure Call, remote procedure call) interface mode, and of course other network communication interfaces;
  • Pre-stored code includes, but is not limited to, Java (an object-oriented programming language) code, Lua (a lightweight and compact scripting language) code, JavaScript (lightweight, function-first, interpreted or just-in-time compiled programming language) ) Code and at least one of Groovy (an agile development language based on the Java virtual machine) code.
  • the data acquisition method associated with the target data provider needs to be selected.
  • the data acquisition mode required by the data providing side input by the user is acquired and saved.
  • the method before this step S102, the method further includes: obtaining a data acquisition mode required by the data provider input by the user; establishing an association relationship between the data provider and the required data acquisition mode , And save the data acquisition method and association relationship as configuration information. If it is necessary to select the data acquisition method associated with the target data provider from the multiple prestored data acquisition methods, then from the configuration information, find out the data acquisition method associated with the target data provider.
  • the data acquisition method may not be input by the user, but imported by other devices, for example, the device where the data providing side is located, the device where the data requesting side is located, or a preset user such as The administrator imports the data to the data transfer device after input by other terminal devices, so there is no restriction here.
  • the data transfer device may provide an interface for the administrator to input the data acquisition method.
  • the administrator may input the corresponding data acquisition method on the background operation interface of the data transfer device.
  • the data acquisition mode is the preset communication interface mode
  • the data acquisition mode is the running SQL script mode
  • the data acquisition mode is running the pre-stored code mode
  • the code required by a data providing side input by the user is obtained.
  • the data transfer device receives the data acquisition mode input by the user, it may save the data acquisition mode input by the user as configuration information.
  • the above configuration information can be stored in a database associated with the data transfer device.
  • the database contains at least one table for storing configuration information.
  • the table of the database may include the name of the target data providing side, the address information of the target data providing side, and the data acquisition method, etc., which are not limited here.
  • a database device (such as a database server) connected to the data transfer device builds a database in advance, and creates a table of the database by initializing the SQL script to store the configuration information required by the data transfer device.
  • the database can also be directly set in the data transfer device, that is, the data transfer device directly performs the construction of the above-mentioned database and the creation of related tables.
  • the data transfer equipment needs to install an operating environment and configure database parameters to run the data transfer platform to achieve data acquisition between the data requesting side and the target data side.
  • Database parameters include, but are not limited to, the address used to store the configuration information database. Through the address used to store the configuration information database, you can access the database storing the configuration information, and then obtain the data acquisition method associated with the data provider in the database. .
  • the aforementioned multiple data acquisition methods have been pre-stored, and because different target data providers have different underlying data model designs, the target data provider uses different data acquisition methods during data transmission.
  • the data provider and its required data acquisition methods can be stored in advance. After the data provider is identified, the corresponding data acquisition methods can be quickly learned to improve the efficiency of data acquisition. .
  • Step S103 Use the selected data acquisition method to acquire the target data from the target data providing side.
  • the target data After determining the required data acquisition method for the target data providing side, the target data can be obtained from the target data providing side.
  • the preset communication interface is used to send a data query request to the target data providing side, and receive the data query result fed back by the target data providing side; and use the pre-stored communication interface template to retrieve the data from the data Identify and extract the content of key fields from the query results to obtain target data.
  • the preset communication interface is an interface supported by the target data providing side, so it can be used for data interaction between the data transfer device and the target data providing side.
  • the data transfer device can generate a data query request that can be interpreted by the target data provider through the preset communication interface, and the target data provider uses its corresponding preset communication interface to analyze and execute the data query request to obtain and send the data query to the data transfer device Result:
  • the data transfer device receives the data query result fed back by the target data provider through the preset communication interface and then performs data analysis.
  • the pre-stored communication interface template is used to predefine the key fields in the data query result received by the corresponding communication interface, so as to correctly parse the data query result to obtain the target data, such as defining the key field username to represent the name, and defining the class to represent the class.
  • an online education platform sends a data acquisition request to a data transfer device to request user data on a third-party education platform with a user ID of 12314, and the data transfer device determines that the data acquisition method corresponding to the third-party education platform is the HTTP interface method. Therefore, an HTTP request is generated and sent to the third-party education platform.
  • the HTTP request contains the URL: http://exchange.study.com/userInfo/12314.
  • the third-party education platform queries the user data with the user ID of 12314 and returns the data containing the data.
  • the response message of the query result is as follows:
  • the data transfer platform uses the corresponding HTTP interface template to extract the content "Zhang San” of the key field "name” from the above response message as the user's name; the content "18" of the key field “age” as the user's age; keywords
  • the content "g123123” of the segment “gradeId” is used as the user's class ID; the content of the key field “gradeName” is "High Grade One Class” as the user's class; the content of the key field “schoolId” is “s3243243" as the user's school ID; the key The content of the field “schoolId” is "Happy Middle School” as the user's school name; the content of the key field “role” is "STUDENT" as the user's role as a student.
  • the data transfer device sends the user data obtained by the above analysis to the online education platform, and the online education platform obtains the above user data with a user ID of 12314.
  • the data acquisition method When the data acquisition method is to run the pre-stored code, run the pre-stored code to achieve the following: generate and send a data query request to the target data provider side, and receive the data query result feedback from the target data provider side, and check the data query result Perform analysis to get the target data.
  • the data transfer device cannot directly interact with the data providing side. Therefore, the user can input the corresponding code and run the code to realize data interaction with the data providing side.
  • the data transfer device may compile and execute the pre-stored code in the Java runtime environment.
  • the pre-stored code when running the pre-stored code, the pre-stored code can be compiled and executed using the preset tools in the Java runtime environment, that is, for different codes such as Java code, Lua code, JavaScript code, and Groovy code, the corresponding tools can be used to compile and execute.
  • the corresponding tools can be used to compile and execute.
  • JavaCompiler can be used to dynamically compile the code, and Java code fragments can be compiled in real time
  • the scriptEngineManager class can be used to implement compilation and execution
  • LuaJ tool can be used to implement compilation and execution.
  • the above-mentioned running pre-stored code mode can support online code editing to obtain target data on the target data provider side, and write specific business codes for different application scenarios and data query content, flexibly compatible with multiple types of target data provider sides.
  • the pre-stored code can use Java code, Lua code, JavaScript code, Groovy code, etc., which supports code generation for online editing in multiple languages. Even if the data transfer device does not have an interface configuration corresponding to the target data provider side, it can still achieve the target data acquisition with the target data provider side due to the custom encoding of the pre-stored code method.
  • SQL script is used to create a collection of statements for database objects, which can access the database.
  • the above-mentioned preset communication interface method and running pre-stored code method can directly obtain data with the corresponding platform, for example, directly interact with a third-party education platform, so that the third-party education platform obtains corresponding user data from its user database and returns the data Transfer equipment.
  • the data transfer device may also directly interact with the database of the platform, for example, by running a SQL script to query the user database of the third-party education platform for corresponding user data, and the user database will return the user data.
  • a SQL script to query the user database of the third-party education platform for corresponding user data
  • an online education platform sends a data acquisition request to a data transfer device to request user data on a third-party education platform with a user ID of 12314.
  • the data transfer device determines that the data provider is the user database of the third-party education platform.
  • Send a data query request the user database of the third-party education platform queries the user data with the user ID of 12314, and returns the data query results as follows: "Zhang San, 18, g123123, Grade One, Class One, s3243243, Xingfu Middle School, STUDENT", by This data transfer device sends the aforementioned returned user data to the online education platform, and the online education platform obtains the aforementioned user data with a user ID of 12314.
  • the aforementioned data requesting side can be a platform device, and the platform device and the data transfer device can be on the same device (such as a server) or belong to different devices; the aforementioned data providing side can be another platform server, or It is the device where the database of another platform is located, which is not limited here.
  • the data requesting side can obtain the data of the data providing side through the data transfer platform, so data acquisition between different platforms can be realized.
  • the data transfer platform receives the data acquisition request from the data requesting side, it selects the data acquisition method associated with the target data provider from the multiple pre-stored data acquisition methods, so that the target data provider of the acquired data and the data acquisition method One-to-one correspondence is achieved to obtain the target data from the target data providing side. Therefore, different data acquisition methods can be configured for different data providing sides to achieve data acquisition on different data providing sides. That is, the data transfer platform can be compatible with multiple data acquisition methods, thus Realize that the data requesting side obtains data from multiple data providing sides.
  • the data transfer device can also be used for any other information interaction between the data requesting side and the data providing side.
  • the obtaining method further includes sending a verification request from the data requesting side to the data providing side, wherein the verification request is used to request verification of the target user Whether to log in at the data providing side; receive the verification result of the data providing side and feed it back to the data requesting side.
  • the interaction method between the data transfer device and the data requesting side and the data providing side can be referred to the above description.
  • the acquisition method associated with the data providing side can be obtained. If it is a preset communication interface method, the communication interface method is used. The verification request is sent to the data providing side and the verification result fed back by the data providing side is received, and the verification result is identified by the preset communication interface template to obtain the content of the result, which is then fed back to the data requesting side.
  • the data requesting side receives the verification result, if it is determined that the target user has logged in on the data providing side, it can directly determine that the target user has also logged in on its own platform, eliminating the need for repeated user logins, which improves the efficiency of platform login.
  • the above-mentioned target data may be the data of the target user.
  • the above steps S101 to S103 are executed to obtain the target user's data from the data providing side, and then the data of the target user can be obtained according to the target The user's data is processed accordingly, such as providing matching accessible content for the target user.
  • FIG. 2 is a schematic flowchart of another embodiment of the data acquisition method of the present application. Specifically, the method of the embodiment of the present disclosure includes the following steps:
  • Step S201 The first platform detects that there is a demand for obtaining target data.
  • the first platform can set when there is a need for acquiring target data in the first platform according to actual conditions. For example, when the first platform receives a user's acquisition instruction for target data, it determines that there is a current demand for acquiring target data; for example, the first platform also stores the target data, so when it detects that the target data stored in itself is wrong , It is determined that there is a current demand for obtaining target data; for another example, the first platform can obtain target data on a regular basis, so when it detects that the preset time has been reached, it is determined that there is a current demand for obtaining target data.
  • the first platform needs to obtain user data when the user visits, so the first platform may determine that there is a current demand for obtaining target data when receiving the user's access request. Therefore, there is no specific limitation on the trigger event or the trigger time when the first platform detects that there is an acquisition requirement.
  • Step S202 Obtain the target data from the second platform through a data transfer platform.
  • the first platform and the second platform are two different platforms, but the type of the platform is not limited, such as an education platform, an government affairs platform, and the like.
  • the first platform is an online programming education platform
  • the second platform is an informationized education platform provided by a third-party education platform such as an education bureau or a school.
  • the data transfer platform, the first platform, and the second platform are different platforms for implementing the functions of the corresponding platforms respectively.
  • the devices used to run the data transfer platform, the first platform, and the second platform may all be hardware devices such as servers, terminal devices, or processors that execute specific computer programs.
  • the data transfer platform and the first platform can be implemented by the same device or by different devices, which is not limited here.
  • the first platform detects that there is a current demand for obtaining target data, and then obtains the target data from the second platform through the data transfer platform, and thus, the embodiment of the present disclosure is executed when the first platform has a demand to obtain the target data.
  • this step may specifically include the first platform sending a data acquisition request to the data transfer platform, so that the data transfer platform responds to the data acquisition request and obtains the target data from the second platform, or the data transfer platform responds to the data acquisition request from The target data is obtained locally, where the target data is obtained by the data transfer platform from the second platform in advance.
  • the data transfer platform can be pre-configured with multiple acquisition methods, and then select the acquisition that matches the second platform where the target data is located.
  • the data is obtained in a manner, and the specific obtaining process can be referred to the description of the foregoing embodiment, which will not be repeated here.
  • the acquisition methods of the second platform are unified, the data transfer platform does not need to configure multiple acquisition methods, and directly obtains data from the second platform through a unified method.
  • the first platform detects that there is a need for obtaining target data, it obtains the target data from the second platform through the data transfer platform, so that data acquisition between different platforms is realized.
  • FIG. 3 is a schematic flowchart of still another embodiment of the data acquisition method of the present application. Specifically, the method of the embodiment of the present disclosure includes the following steps:
  • Step S301 The first platform receives a user's access request; wherein, the access request is generated when the user accesses the second platform.
  • the user When accessing the platform, the user needs to register for the first time or log in. For example, when a user accesses a platform, it needs to perform login operations such as account and password authentication, face recognition, fingerprint recognition, etc., so that the platform detects that the account and password are correct, the face is successfully matched, and the fingerprint is successfully matched to complete the login authentication. , And provide the user with corresponding accessible content.
  • login operations such as account and password authentication, face recognition, fingerprint recognition, etc.
  • the first platform and the second platform are two different platforms, but the type of the platform is not limited, such as an education platform, an government affairs platform, and the like.
  • the first platform is an online programming education platform
  • the second platform is an informationized education platform provided by a third-party education platform such as an education bureau or a school.
  • the path for triggering access to the first platform is not limited, and may occur at any time during the user's access to the second platform. For example, after a user logs in to the second platform through his device, the second platform provides an entry link to the first platform; the user clicks on the link of the first platform displayed on the device, and the user device sends an access request to the first platform.
  • the access request is generated when the user accesses the second platform, and includes the identification information corresponding to the second platform and the user information.
  • the access request includes the address of the second platform and the first key generated by the second platform for the logged-in user.
  • the first platform can use the second platform address to determine the second platform from which the user comes, and then verify to the second platform whether the user is logged in and obtain the user information.
  • Step S303 Verify whether the user has logged in on the second platform based on the access request.
  • the first platform sends a verification request to the second platform based on the access request, and the second platform determines whether the user is logged in on the second platform, so as to feed back the verification result to the first platform.
  • the verification request can be directly sent by the first platform to the second platform, and the second platform directly feeds back the verification result to the first platform; or the first platform forwards the verification request to the second platform through the data transfer platform, and the second platform The platform feeds back the verification result to the first platform through the data transfer platform, where the interaction mode between the data transfer platform and the first platform and the second platform can refer to the relevant description of the above-mentioned embodiment, which will not be repeated here.
  • the access request includes the second platform address and the first key.
  • This step S303 may specifically include: based on the second platform address, sending a verification request including the first key to the second platform to request verification of the first key. Whether a key matches the second key generated by the second platform when the user successfully logs in to the second platform; receiving the second platform’s feedback on the verification result of the first key; if the verification result is the first key and the second secret If the key matches, it is determined that the user has logged in on the second platform. That is, the first platform obtains the first key from the access request, and the second platform generates the second key when confirming that the user successfully logs in.
  • the first platform sends the first key to the second platform through the second platform address in the access request, and the second platform matches the first key and the second key after obtaining the first key, and detects that the two are successfully matched. It is determined that the user has logged in on the second platform.
  • the verification result fed back by the second platform may include a result field used to indicate whether the user has logged in.
  • the verification result fed back by the second platform may include the user’s ID in addition to the above result fields, so that the first platform can use the ID to pass data
  • the transfer platform queries the second platform to obtain user data matching the ID.
  • the verification result fed back by the second platform may also only contain the user ID, that is, if the verification result contains the user ID, it means that the user is logged in, otherwise the user is not logged in.
  • the interaction between the first platform and the second platform can be direct data transfer between the first platform and the second platform.
  • Interaction, or the realization of data interaction between the first platform and the second platform through the data transfer platform, is not limited here.
  • Step S303 If yes, it is determined that there is acquisition demand data for the target data.
  • the target data may be the user's data, which specifically includes the user's name, course, class, school, etc.
  • the first platform can also complete the login of the platform according to the user's login status on the second platform. For example, if the user has logged in on the second platform, the first platform may determine that the user has successfully logged in on the first platform. Therefore, the user only needs to log in and authenticate successfully on the second platform, obtain and trigger the access path of the first platform on the second platform, and then directly log in to the first platform without having to perform login authentication on the first platform again.
  • users can return to the second platform from the first platform to switch back and forth between different platforms. The access of the first platform and the second platform will not affect each other, and users can freely switch between the two platforms.
  • the user device displays another web page to open and automatically log in to the first platform, and the user can directly click Corresponding webpage to access the corresponding platform, to achieve switching back and forth without affecting each other.
  • Step S304 Obtain target data from the second platform through the data transfer platform.
  • the first platform sends a data acquisition request to the data transfer platform, so that the data transfer platform is associated with the second platform
  • the data acquisition method is to obtain user data from the second platform. For example, taking user data as target data, the data transfer platform receives a data acquisition request from the first platform, where the data acquisition request is used to request the target data of the second platform, and the target data is used to provide the first platform; From the pre-stored multiple data acquisition methods, select the data acquisition method associated with the second platform; use the selected data acquisition method to acquire target data from the second platform.
  • the first platform serves as the aforementioned data requesting side
  • the second platform serves as the aforementioned data providing side
  • the data transfer platform may use the steps of the aforementioned data acquisition method embodiment to acquire the data of the second platform.
  • the first platform may send the data acquisition request including the user ID to the second platform through the data transfer device to acquire the user's data from the second platform.
  • the first platform After the first platform obtains the user's data from the second platform through the data transfer platform, it can determine the user's accessible content on the first platform based on the user's data. For example, when the first platform and the second platform are two different education platforms, the user's data includes at least one of name, school, class, role (for example, student or teacher, etc.); the accessible content includes available courses , At least one of the available courses. It is understandable that the data of different users may correspond to the same or different accessible content. For example, if the login user on the first platform is a student in the first grade of the first grade, only the online course and the first grade of the first grade will be provided.
  • the interactive module of the first class so that students and classmates can participate in the online course and interact together; if the login user of the first platform is the teacher of the second and fourth grades of the second grade, the second grade of the second grade will be provided.
  • the steps performed by the first platform and the second platform may be steps performed by the corresponding platform devices.
  • the steps related to the first platform are performed by the first platform server, and the steps related to the data transfer platform are performed by the data
  • the transfer device executes, and the second platform related steps are executed by the second platform server.
  • the first platform and the data transfer platform may belong to the same server or not on the same server, which is not limited here.
  • the two can be connected through a common standard interface.
  • the first platform can be configured to access the data transfer platform's address and interface number, etc., so as to communicate with the data transfer platform through this interface Data interaction.
  • the first platform is the online programming education platform (also known as the online programming education system), which can realize real-time online learning and teaching, etc.; the second platform is the education platform of Shenzhen Middle School; the data transfer platform can also be called UserDataExchange, The UserDataExchange is a software product that can implement the above-mentioned data acquisition method.
  • the user is student Zhang San. After logging into the education platform of Shenzhen Middle School, he triggers the entry link of the online programming education platform displayed in the education platform of Shenzhen Middle School, so as to directly enter the online programming education platform without logging in. At this time, the device used by Zhang San will send an access request to the online programming education platform.
  • the access request includes the address and the first key of the education platform of Shenzhen Middle School.
  • the online programming education platform After receiving Zhang San’s access request, the online programming education platform sends the first key to the education platform of Shenzhen middle school through the address of the education platform of Shenzhen middle school, so that the education platform of Shenzhen middle school matches the first key and Zhang San successfully logs in The second key generated by the education platform of Shenzhen Middle School.
  • the education platform of Shenzhen Middle School confirmed that Zhang San had successfully logged in to the education platform of Shenzhen Middle School, it fed back Zhang San's ID to the online programming education platform.
  • the online programming education platform receives Zhang San’s ID and determines that Zhang San has successfully logged in to the education platform of Shenzhen Middle School, so as to obtain user data from the education platform of Shenzhen Middle School through the data transfer platform.
  • the data transfer platform selects the HTTP interface as the default communication interface associated with the education platform of Shenzhen Middle School from a variety of pre-stored data acquisition methods
  • the HTTP interface method is the data acquisition method associated with the education platform of Shenzhen Middle School, so that the HTTP interface is used to send data query requests to the education platform of Shenzhen Middle School, and receive the data query results feedback from the education platform of Shenzhen Middle School; and use the corresponding
  • the pre-stored communication interface template of the HTTP interface identifies and extracts the key field content from the data query results, and obtains the data of Zhang San's name, school, class and other users, as well as accessible content such as available courses.
  • the first platform receives the access request generated when the user accesses the second platform; verifies whether the user has logged in on the second platform based on the access request; after determining that the user has logged in on the second platform, it is determined that there is The target data acquisition demand data, and then through the data transfer platform to obtain user data from the second platform, so as to achieve data acquisition between different platforms.
  • the first platform receives the user’s access request, if it is determined that the user has logged in on the second platform, the first platform will act as the data requesting side and the second platform will act as the data providing side.
  • the first platform directly transfers data from the second platform through the data transfer platform.
  • the platform obtains the user data, that is, the first platform actively queries the second platform for user data when the user visits, so as to obtain the latest data of the user.
  • the method of the embodiment of the present disclosure improves data acquisition The real-time and accuracy.
  • the first platform of the embodiment of the present application can actively query the data of the second platform to acquire the latest data of the user in real time, with higher real-time performance.
  • the method of the embodiment of this application does not require any functional changes to the platform, the configuration is simple, and the data can be actively inquired in real time. Reduce the inconsistency of information on different platforms due to data synchronization lag, and improve the accuracy and efficiency of data acquisition.
  • the data acquisition device 40 includes: a first acquisition module 41, a selection module 42, and a second acquisition module 43.
  • the first obtaining module 41 is configured to receive a data obtaining request from the data requesting side, where the data obtaining request is used to request obtaining target data of the target data providing side, and the data requesting side and the target data providing side belong to different platforms;
  • the selection module 42 is used to select the data acquisition method associated with the target data providing side from the multiple prestored data acquisition methods;
  • the second acquisition module 43 is used to adopt the selected data acquisition method to obtain the target data from the target data providing side data.
  • the multiple data acquisition modes selected by the selection module 42 include at least one of a preset communication interface mode, a running SQL script mode, and a running pre-stored code mode.
  • the preset communication interface mode includes at least one of an HTTP interface mode and an RPC interface mode
  • the pre-stored code includes at least one of Java code, Lua code, JavaScript code, and Groovy code.
  • the first acquiring module 41 includes an acquiring unit and a saving unit.
  • the obtaining unit is used to obtain a data obtaining mode required by the data providing side input by the user;
  • the saving unit is used to establish an association relationship between the data providing side and the required data obtaining mode, and to combine the data obtaining mode with
  • the association relationship is stored as configuration information, and the selection module 42 is further configured to find out a data acquisition method that has an association relationship with the target data providing side from the configuration information.
  • the obtaining unit is configured to obtain preset communication interface information required by a data provider input by the user when the data obtaining mode is a preset communication interface mode; In the case of running the SQL script mode, obtaining the SQL script required by the data provider side input by the user; also used to obtain a data provider input by the user when the data obtaining mode is running the pre-stored code mode The code required on the side. And the saving unit is also used to save the data acquisition mode and the association relationship as configuration information in a preset database.
  • the second obtaining module 43 is further configured to use the preset communication interface to send a data query request to the target data providing side when the data obtaining mode is a preset communication interface mode, and Receiving the data query result fed back by the target data providing side; and using a pre-stored communication interface template to identify and extract the key field content from the data query result to obtain the target data; and also used to obtain the target data in a manner of In the case of running the SQL script mode, run the SQL script to generate a data query request; send a data query request to the target data provider side, and receive the data query result fed back by the target data provider side; and based on the data query result , To obtain the target data; and also to run the pre-stored code when the data acquisition mode is to run the pre-stored code, so as to generate and send a data query request to the target data providing side, and receive The data query result fed back by the target data providing side is analyzed, and the target data is obtained by analyzing the data query result.
  • the first obtaining module 41 is configured to receive the data obtaining request from the data requesting side through a preset communication interface. The first obtaining module 41 is also configured to generate a data obtaining request when it is detected that a preset condition is met.
  • the data requesting side and the target data providing side belong to different education platforms, and the target data is data of a target user.
  • the data acquisition device 50 includes: a detection module 51 and an acquisition module 52.
  • the detection module 51 is used to detect that there is a need for obtaining target data;
  • the obtaining module 52 is used to obtain the target data from the second platform through a data transfer platform.
  • the detection module 51 includes a receiving unit, a verification unit, and a determination unit.
  • the receiving unit is used to receive the user's access request; the access request is generated when the user accesses the second platform; the verification unit is used to verify whether the user has logged in on the second platform based on the access request; the determining unit is used When verifying that the user has logged in on the second platform, it is determined that there is a demand for obtaining the target data.
  • the determining unit of the detection module 51 is further configured to determine the user's accessible content on the first platform based on the user's data after determining that there is a demand for acquiring the target data.
  • the first platform and the second platform are two different education platforms, and the user data includes at least one of name, school, class, and role; and the accessible content includes courses available for class , At least one of the available courses.
  • the access request includes the second platform address and the verification unit of the first key detection module 51 is further configured to send to the second platform the first key containing the first key based on the second platform address.
  • the acquisition module 52 is further configured to send a data acquisition request to the data transfer platform, so that the data transfer platform uses the data acquisition method associated with the second platform to obtain data from the second platform. Obtain the target data.
  • modules of the data acquisition device in the above-mentioned disclosed embodiment can refer to the relevant steps of the above-mentioned method embodiment, which will not be repeated here.
  • FIG. 6 is a schematic diagram of a framework of an embodiment of a data transfer device according to this application.
  • the data transfer device 60 in the embodiment of the present disclosure includes a processor 61, a communication circuit 62 coupled with the processor 61, and a memory 63, where the processor 61 is used to execute a computer program stored in the memory 63 to combine with the communication circuit. 62 Perform the steps of any embodiment of the above-mentioned data acquisition method.
  • FIG. 7 is a schematic diagram of a framework of an embodiment of a platform server of the application.
  • the platform server 70 in the embodiment of the present disclosure includes a processor 71, a communication circuit 72 coupled with the processor 71, and a memory 73, where the processor 71 is configured to execute a computer program stored in the memory 73 to combine with the communication circuit 72. Perform the steps of any embodiment of the above data acquisition method.
  • the processor in the foregoing embodiment of the data transfer device and the embodiment of the platform server may also be referred to as a CPU (Central Processing Unit, central processing unit).
  • the processor may be an integrated circuit chip with signal processing capabilities.
  • the processor can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (ASIC), a field programmable gate array (Field-Programmable Gate Array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
  • the processor may be jointly implemented by multiple circuit chips.
  • FIG. 8 is a schematic diagram of a framework of an embodiment of the data sharing system of this application.
  • the data sharing system 80 in the embodiment of the present disclosure includes a data transfer device 81 and a first platform server 82 and at least one second platform server 83 respectively connected to the data transfer device 81.
  • the present disclosure implements The example includes three second platform servers 83; among them, the data transfer device 81 is the foregoing data transfer device embodiment, and the first platform server 82 is the foregoing platform server embodiment, so that the first platform server 82 obtains the first platform server through the data transfer device 81. 2.
  • User data of the platform server is the data transfer device 81 and a first platform server 82 and at least one second platform server 83 respectively connected to the data transfer device 81.
  • the present disclosure implements The example includes three second platform servers 83; among them, the data transfer device 81 is the foregoing data transfer device embodiment, and the first platform server 82 is the foregoing platform server embodiment, so that the first platform server 82 obtains the first
  • FIG. 9 is a schematic diagram of a framework of an embodiment of a storage device 90 of this application.
  • the storage device 90 in the embodiment of the present application stores program instructions 901 that can be executed by a processor, and the program instructions 901 are used to implement the steps in any of the foregoing method embodiments.
  • the storage device 90 may specifically be a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and other media that can store the program instructions 901, Alternatively, it may also be a server storing the program instructions 901, and the server may send the stored program instructions 901 to other devices for operation, or may also run the stored program instructions 901 by itself.
  • the embodiments of the present disclosure also provide a storage device or a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.
  • the storage device or computer-readable storage medium may include a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.
  • An embodiment of the present disclosure also provides an electronic device, including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured as the method provided in any of the foregoing embodiments.
  • the embodiments of the present disclosure also provide a computer program, which includes computer readable code, and when the computer code runs in an electronic device, a processor in the electronic device executes the method provided in any of the foregoing embodiments.
  • the embodiments of the present disclosure also provide a computer program product for storing computer-readable instructions, which when executed, cause the computer to perform the operations of the method provided in any of the foregoing embodiments.
  • the computer program product can be specifically implemented by hardware, software, or a combination thereof.
  • the computer program product is specifically embodied as a computer storage medium.
  • the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc. Wait.
  • SDK software development kit
  • the disclosed method and device can be implemented in other ways.
  • the device implementation described above is illustrative.
  • the division of modules or units is a logical function division. In actual implementation, there may be other divisions, for example, multiple units or components can be combined or integrated. To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of this embodiment.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of this application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Tourism & Hospitality (AREA)
  • General Health & Medical Sciences (AREA)
  • Educational Technology (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Educational Administration (AREA)
  • Marketing (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Primary Health Care (AREA)
  • General Business, Economics & Management (AREA)
  • Bioethics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请公开了一种数据获取方法及其相关设备、系统及存储装置。其中,数据获取方法包括:获取数据获取请求,其中,数据获取请求用于请求获取目标数据提供侧的目标数据,且目标数据用于提供给数据请求侧,数据请求侧和目标数据提供侧属于不同的平台;从预存的多种数据获取方式中,选择与目标数据提供侧关联的数据获取方式;采用选择的数据获取方式,向目标数据提供侧获取目标数据。

Description

数据获取方法及其相关设备、系统及存储装置
本申请要求在2019年12月31日提交中国专利局、申请号为201911416897.5、申请名称为“数据获取方法及其相关设备、系统及存储装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及数据处理技术领域,特别是涉及一种数据获取方法及其相关设备、系统及存储装置。
背景技术
在信息化时代,越来越多的平台提供给用户进行访问。例如,学校提供的信息化教育平台,学生可以登录该信息化教育平台了解学校的一些信息;又例如一些在线教育平台,学生可登陆该在线教育平台进行远程上课。通常,同一个用户都会使用多个不同的平台,由于不同平台是相互独立的,故用户访问不同的平台的时候,需要分别登陆,且不同平台在用户登录之后,再从自身数据库中获取用户数据,进而为用户提供对应的平台功能。
实际上,对于一些平台,其用户数据如用户的姓名、年龄、班级等这些信息都是相同的,故这些用户数据可以供多个平台使用,然而,不同平台的底层数据模型设计不同,故不同平台之间无法实现数据获取。
基于此,如何实现不同平台之间的数据获取,成为亟待解决的问题。
发明内容
本申请提供一种数据获取方法及其相关设备、系统及存储装置。
本申请第一方面提供了一种数据获取方法,包括:获取数据获取请求,其中,数据获取请求用于请求获取目标数据提供侧的目标数据,且目标数据用于提供给数据请求侧,数据请求侧和目标数据提供侧属于不同的平台;从预存的多种数据获取方式中,选择与目标数据提供侧关联的数据获取方式;采用选择的数据获取方式,从目标数据提供侧获取目标数据。
因此,能够为数据请求侧向数据提供侧获取数据,实现不同平台之间的数据获取。而且,在获得数据获取请求后,从预存的多种数据获取方式中,选择与目标数据提供侧关联的数据获取方式,使得被获取数据的目标数据提供侧与数据获取方式一一对应,实现向目标数据提供侧获取目标数据,故可为不同数据提供侧配置不同的数据获取方式实现不同数据提供侧的数据获取,即可兼容多种数据获取方式,从而实现为数据请求侧获取多个数据提供侧的数据。
其中,所述多种数据获取方式包括预设通信接口方式、运行SQL脚本方式和运行预存代码方式中的至少一种。
因此,能够兼容预设通信接口方式、运行SQL脚本方式和运行预存代码方式,以实 现通过预设通信接口方式、运行SQL脚本方式和运行预存代码方式来实现与不同数据提供侧之间的数据交互。
其中,预设通信接口方式包括HTTP接口方式、RPC接口方式中的至少一种,预存代码包括Java代码、Lua代码、JavaScript代码和Groovy代码中的至少一种。
因此,可进一步兼容HTTP接口方式、RPC接口方式以及运行Java代码、Lua代码、JavaScript代码和Groovy代码方式,以采用更多种化的获取方式来实现与更多的不同的数据提供侧进行数据交互。
其中,所述方法还包括:获取用户输入的一数据提供侧所需的数据获取方式;建立所述数据提供侧与其所需的数据获取方式之间的关联关系,并将数据获取方式和所述关联关系保存作为配置信息;所述从预存的多种数据获取方式中,选择与所述目标数据提供侧关联的数据获取方式,包括:从所述配置信息中,查找出与所述目标数据提供侧具有关联关系的数据获取方式。
因此,能够实现根据用户输入为不同的数据提供侧配置其对应的数据获取方式。
其中,所述获取用户输入的一数据提供侧所需的数据获取方式,包括:在所述数据获取方式为预设通信接口方式的情况下,获取用户输入的一数据提供侧所需的预设通信接口信息;在所述数据获取方式为运行SQL脚本方式的情况下,获取用户输入的一数据提供侧所需的SQL脚本;在所述数据获取方式为运行预存代码方式的情况下,获取用户输入的一数据提供侧所需的代码;所述将数据获取方式和所述关联关系保存作为配置信息,包括:将数据获取方式和所述关联关系作为配置信息保存在预设数据库中。
因此,能够实现基于用户输入信息,而获得预设通信接口信息、SQL脚本和代码,进而实现采用预设通信接口方式、运行SQL脚本方式和运行预存代码方式来实现与不同数据提供侧之间的数据交互。
其中,所述采用所述选择的数据获取方式,从所述目标数据提供侧获取所述目标数据,包括:在所述数据获取方式为预设通信接口方式的情况下,利用预设通信接口,向所述目标数据提供侧发送数据查询请求,并接收所述目标数据提供侧反馈的数据查询结果;以及利用预存通信接口模板从所述数据查询结果中识别并提取关键字段内容,得到所述目标数据;在所述数据获取方式为运行SQL脚本方式的情况下,运行SQL脚本以生成数据查询请求;向所述目标数据提供侧发送数据查询请求,并接收所述目标数据提供侧反馈的数据查询结果;以及基于所述数据查询结果,获得所述目标数据;在所述数据获取方式为运行预存代码方式的情况下,运行所述预存代码,以实现生成并向所述目标数据提供侧发送数据查询请求,并接收所述目标数据提供侧反馈的数据查询结果,对所述数据查询结果进行解析得到目标数据。
因此,能够实现利用预设通信接口向数据提供侧获得数据查询结果,并利用预存通信接口模板从数据查询结果中识别并提取得到目标数据;或者,通过运行SQL脚本或预存代码实现生成并发送数据查询请求并获取目标数据;由此,可实现采用预设通信接口方式、运行SQL脚本方式和运行预存代码方式来实现与不同数据提供侧之间的数据交互。
其中,所述获取数据获取请求,包括:通过预设通信接口接收到所述数据请求侧的 数据获取请求;或者,检测到满足预设条件时,生成数据获取请求。
因此,实现了数据获取请求的获取,而且,可通过预设通信接口能实现与数据请求侧进行通信,进而接收数据请求侧的数据获取请求,由此响应于数据请求侧的请求从相应的数据提供侧中获取目标数据,实现不同平台之间的数据获取。
其中,数据请求侧和目标数据提供侧属于不同教育平台,所述目标数据为目标用户的数据。
因此,可实现不同教育平台之间的目标用户数据的获取。
其中,所述方法还包括:将来自所述数据请求侧的验证请求发送给所述数据提供侧,其中,所述验证请求用于请求验证目标用户是否在所述数据提供侧登录;接收所述数据提供侧的验证结果,并反馈给所述数据请求侧。
因此,能够实现数据请求侧和数据提供侧之间对用户登录的验证。
本申请第二方面提供了一种数据获取方法,包括:第一平台检测到存在对目标数据的获取需求;通过数据中转平台从所述第二平台获取所述目标数据。
因此,第一平台在需要获取第二平台的目标数据时,通过数据中转平台从第二平台获取目标数据,故实现不同平台之间的数据获取。
其中,所述检测到存在对目标数据的获取需求,包括:接收用户的访问请求;其中,所述访问请求是在所述用户访问第二平台时生成的;基于所述访问请求验证所述用户是否已在所述第二平台登录;若是,则确定存在对所述目标数据的获取需求,其中,所述目标数据为所述用户的数据。
因此,第一平台在接收到用户的访问请求时,若确定用户已在第二平台登录,则第一平台作为数据请求侧且第二平台作为数据提供侧,第一平台通过数据中转平台直接从第二平台获取所述用户的数据,即第一平台在用户访问时,主动向第二平台查询用户数据,实现获取用户的最新数据,提高数据获取的实时性和准确性。
其中,还包括:若所述用户已在所述第二平台登录,则确定所述用户在所述第一平台登录成功。
因此,在确定用户在第二平台登录后直接确定该用户在第一平台登录成功,无需用户重复登录,提高了平台登录效率。
其中,在所述通过数据中转平台从所述第二平台获取所述目标数据之后,还包括:基于所述用户的数据,确定所述用户在所述第一平台上的可访问内容。
因此,能够为不同用户提供不同的访问内容,实现用户区别化的访问。
其中,所述第一平台和第二平台为不同的两个教育平台,所述用户的数据包括姓名、学校、班级、角色中的至少一种;所述可访问内容包括可上课课程、可授课课程中的至少一种。
因此,能够实现不同教育平台之间用户数据的获取,另外,可针对用户的具体数据内容为该用户提供可上课课程和/或可授课课程。
其中,所述访问请求包括第二平台地址和第一密钥;所述基于所述访问请求验证所述用户是否已在所述第二平台登录,包括:基于所述第二平台地址,向所述第二平台发 送包含所述第一密钥的验证请求,以请求验证所述第一密钥与所述第二平台在所述用户成功登录所述第二平台时生成的第二密钥是否匹配;接收所述第二平台反馈对所述第一密钥的验证结果;若所述验证结果为所述第一密钥和所述第二密钥匹配,则确定所述用户已在所述第二平台登录。
因此,通过第二平台对密钥的验证实现了用户在第二平台的登录状态的验证。
其中,所述通过数据中转平台从所述第二平台获取所述目标数据,包括:向所述数据中转平台发送数据获取请求,以使所述数据中转平台采用与所述第二平台关联的数据获取方式,从所述第二平台获取所述目标数据。
因此,数据中转平台能够采用与第二平台关联的数据获取方式实现目标数据的获取,即能够为不同数据获取方式的第二平台选择与之匹配的数据获取方式,故可兼容多种数据获取方式,从而实现为第一平台获取不同的第二平台的数据。
本申请第三方面提供了一种数据获取装置,该装置包括:获取模块,用于获取数据获取请求,其中,所述数据获取请求用于请求获取目标数据提供侧的目标数据,且所述目标数据用于提供给数据请求侧,所述数据请求侧和目标数据提供侧属于不同的平台;选择模块,用于从预存的多种数据获取方式中,选择与所述目标数据提供侧关联的数据获取方式;获取模块,用于采用所述选择的数据获取方式,从所述目标数据提供侧获取所述目标数据。
因此,能够为数据请求侧向数据提供侧获取数据,实现不同平台之间的数据获取。而且,在获得数据获取请求后,从预存的多种数据获取方式中,选择与目标数据提供侧关联的数据获取方式,使得被获取数据的目标数据提供侧与数据获取方式一一对应,实现向目标数据提供侧获取目标数据,故可为不同数据提供侧配置不同的数据获取方式实现不同数据提供侧的数据获取,即可兼容多种数据获取方式,从而实现为数据请求侧获取多个数据提供侧的数据。
本申请第四方面提供了一种数据获取装置,应用于第一平台,包括:检测模块,用于检测到存在对目标数据的获取需求;获取模块,用于通过数据中转平台从所述第二平台获取所述目标数据。
因此,第一平台在需要获取第二平台的目标数据时,通过数据中转平台从第二平台获取目标数据,故实现不同平台之间的数据获取。
本申请第五方面提供了一种数据中转设备,包括处理器以及与处理器耦接的通信电路和存储器,其中,处理器用于执行存储器存储的计算机程序以结合通信电路执行上述第一方面的数据获取方法。
因此,能够为数据请求侧向数据提供侧获取数据,实现不同平台之间的数据获取。而且,在获得数据获取请求后,从预存的多种数据获取方式中,选择与目标数据提供侧关联的数据获取方式,使得被获取数据的目标数据提供侧与数据获取方式一一对应,实现向目标数据提供侧获取目标数据,故可为不同数据提供侧配置不同的数据获取方式实现不同数据提供侧的数据获取,即可兼容多种数据获取方式,从而实现为数据请求侧获取多个数据提供侧的数据。
本申请第六方面提供了一种平台服务器,包括处理器以及与处理器耦接的通信电路和存储器,其中,处理器用于执行存储器存储的计算机程序以结合通信电路执行上述第二方面的数据获取方法。
因此,第一平台在需要获取第二平台的目标数据时,通过数据中转平台从第二平台获取目标数据,故实现不同平台之间的数据获取。
本申请第七方面提供了一种数据共享系统,包括数据中转设备以及分别与数据中转设备连接的第一平台服务器和至少一个第二平台服务器;其中,数据中转设备为上述第五方面的设备,第一平台服务器为上述第六方面的服务器,以实现第一平台服务器通过数据中转设备获取第二平台服务器的用户数据。
因此,能够通过数据中转设备为第一平台服务器向第二平台服务器获取数据,实现不同平台之间的数据获取。而且,能够为不同的第二平台服务器配置不同的数据获取方式实现不同第二平台的数据获取,即可兼容多种数据获取方式,从而实现为第一平台服务器获取不同的第二平台服务器的数据。
本申请第八方面提供了一种存储装置,存储有能够被处理器运行以实现上述第一方面和/或第二方面的数据获取方法的计算机程序。
因此,作为不同平台的数据请求侧和数据提供侧,数据请求侧可通过数据中转平台获取数据提供侧的数据,故可实现不同平台之间的数据获取。
本申请第九方面提供了一种计算机程序,其中,包括计算机可读代码,当所述计算机代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述第一方面和/或第二方面的数据获取方法。
因此,作为不同平台的数据请求侧和数据提供侧,数据请求侧可通过数据中转平台获取数据提供侧的数据,故可实现不同平台之间的数据获取。
附图说明
图1是本申请数据获取方法一实施例的流程示意图;
图2是本申请数据获取方法另一实施例的流程示意图;
图3是本申请数据获取方法再一实施例的流程示意图;
图4是本申请数据获取装置一实施例的结构示意图;
图5是本申请数据获取装置另一实施例的结构示意图;
图6是本申请数据中转设备一实施例的框架示意图;
图7是本申请平台服务器一实施例的框架示意图;
图8是本申请数据共享系统一实施例的框架示意图;
图9是本申请存储装置一实施例的框架示意图。
具体实施方式
下面结合说明书附图,对本申请实施例的方案进行详细说明。
请参阅图1,图1是本申请数据获取方法一实施例的流程示意图。具体而言,本公开 实施例方法包括以下步骤:
步骤S101:获取数据获取请求。
数据获取请求用于请求获取目标数据提供侧的目标数据,该目标数据用于提供给数据请求侧。其中,目标数据提供侧与数据请求侧属于不同的平台,如不同的教育平台。例如,数据请求侧为一在线教育平台,数据提供侧为一第三方教育平台。
目标数据可以为数据提供侧中的任意数据,在一些实施例中,该目标数据可以是目标用户的数据,目标数据可因目标数据提供侧的平台类型不同而有所差异。平台类型不作任何限定,例如,教育平台、政务平台和法律咨询平台等。在一具体应用中,数据请求侧和目标数据提供侧属于不同教育平台时,目标数据是目标用户的数据可理解为:目标用户可以是学生、老师等,目标用户的数据包括用户名称、课程、班级、学校等。
本公开实施例方法的执行主体为数据中转设备(即用于支持运行数据中转平台的设备),其实现目标数据提供侧与数据请求侧两者之间的交互。具体地,该数据中转设备可以为服务器、终端设备等硬件设备,或者为执行特定计算机程序的处理器等。可以理解的是,本申请实施例的数据中转设备和该数据请求侧可为不同设备,或者由同一设备实现。
该数据获取请求可以为数据中转设备主动生成或由数据请求侧生成。例如,数据中转设备在自身检测到预设条件(如预定时间)时生成数据获取请求,进而执行下述步骤以获得目标数据,数据中转设备保存该目标数据,以后续在数据请求侧需要获取该目标数据时直接向数据中转设备获取该保存的目标数据,由此提前为数据请求侧准备数据,可减少数据请求侧的数据获取时间。又例如,由数据请求侧在需要获取目标数据时生成数据获取请求,数据中转设备获得该数据获取请求后执行下述步骤以获得目标数据,进而将该目标数据反馈给数据请求侧,由此直接在数据请求侧有需求时执行本公开实施例以获得目标数据,数据中转设备不预先获取并保存数据,可减低对数据中转设备的存储空间需求。在由数据请求侧生成数据获取请求的具体应用中,数据中转设备对数据获取请求的获取方式包括预设通信接口等,也即,数据中转设备可通过预设通信接口接收到数据请求侧的数据获取请求。该预设通信接口可以为标准且通用的数据接口,具体可以根据数据请求侧的设备确定。
步骤S102:从预存的多种数据获取方式中,选择与所述目标数据提供侧关联的数据获取方式。
多种数据获取方式包括预设通信接口方式、运行SQL(Structured Query Language,结构化查询语言)脚本方式和运行预存代码方式中的至少一种。其中,预设通信接口方式可以包括HTTP(HyperText Transfer Protocol,超文本传输协议)接口方式、RPC(Remote Procedure Call,远程过程调用)接口方式中的至少一种,当然还可以为其余网络通信接口;预存代码包括但不限于包括Java(一种面向对象编程语言)代码、Lua(一种轻量小巧的脚本语言)代码、JavaScript(具有函数优先的轻量级,解释型或即时编译型的编程语言)代码和Groovy(一种基于Java虚拟机的敏捷开发语言)代码中的至少一种。
不同目标数据提供侧对应的数据获取方式不同,因此,数据获取过程中,需选择与 目标数据提供侧关联的数据获取方式。例如,在本步骤S102之前获取并保存用户输入的数据提供侧所需的数据获取方式。在一些实施例中,在本步骤S102之前,所述方法还包括:获取用户输入的一数据提供侧所需的数据获取方式;建立该数据提供侧与其所需的数据获取方式之间的关联关系,并将数据获取方式和关联关系保存作为配置信息。若需从预存的多种数据获取方式中,选择与目标数据提供侧关联的数据获取方式,则从配置信息中,查找出与目标数据提供侧具有关联关系的数据获取方式即可。当然,在另一公开实施例中,该数据获取方式也可不是由用户输入,而是由其他设备导入,例如,由数据提供侧所在的设备、数据请求侧所在的设备或者为预设用户如管理员在其他终端设备输入后导入至该数据中转设备上的,故在此不作任何限定。
具体地,数据中转设备可提供给管理员输入数据获取方式的接口,例如管理员可在数据中转设备的后台操作界面输入相应数据获取方式。其中,在数据获取方式为预设通信接口方式的情况下,获取用户输入的一数据提供侧所需的预设通信接口信息;在数据获取方式为运行SQL脚本方式的情况下,获取用户输入的一数据提供侧所需的SQL脚本;在数据获取方式为运行预存代码方式的情况下,获取用户输入的一数据提供侧所需的代码。数据中转设备在接收到上述用户输入的数据获取方式,可将上述用户输入的数据获取方式保存作为配置信息。
上述配置信息可以存储于数据中转设备关联的数据库中。例如,该数据库包含至少一个表,以用于存入配置信息。数据库的表可包括目标数据提供侧名称、目标数据提供侧的地址信息和数据获取方式等,在此不作任何限定。
在一具体应用中,与数据中转设备连接的数据库设备(如数据库服务器)预先搭建数据库,并通过初始化SQL脚本,创建数据库的表,以用于存入数据中转设备所需要的配置信息。当然,该数据库也可直接设于数据中转设备中,即直接由数据中转设备进行上述数据库的搭建以及相关表的创建。数据中转设备为了提供数据请求侧与目标数据提供侧之间的数据中转服务,需安装运行环境,并配置数据库参数,以运行数据中转平台,实现数据请求侧和目标数据侧之间的数据获取。其中,若该数据中转平台由Java代码实现,即该运行环境为Java运行环境,例如,为Java语言的软件开发工具包JDK(Java Development Kit,Java开发套件)。数据库参数包括但不限于用于存储配置信息数据库的地址,通过该用于存储配置信息数据库的地址,即可访问存储有配置信息的数据库,进而获取到数据库中的数据提供侧关联的数据获取方式。
上述多种数据获取方式均已预先存储,并且由于不同的目标数据提供侧拥有不同的底层数据模型设计,因而,目标数据提供侧进行数据传输时的数据获取方式不同。为了能够适配于不同的目标数据提供侧,可预先存储数据提供侧与其所需的数据获取方式,当识别数据提供侧后,即可快速获知其对应的数据获取方式,以提高数据获取的效率。
步骤S103:采用所述选择的数据获取方式,从所述目标数据提供侧获取所述目标数据。
针对目标数据提供侧,确定其所需的数据获取方式后,即可从目标数据提供侧获取目标数据。
在数据获取方式为预设通信接口方式的情况下,利用预设通信接口,向目标数据提供侧发送数据查询请求,并接收目标数据提供侧反馈的数据查询结果;以及利用预存通信接口模板从数据查询结果中识别并提取关键字段内容,得到目标数据。
预设通信接口为目标数据提供侧所支持的接口,故可用于数据中转设备与目标数据提供侧的数据交互。数据中转设备通过预设通信接口能够生成目标数据提供侧能够解读的数据查询请求,目标数据提供侧利用其对应的预设通信接口解析并执行数据查询请求,以获得并向数据中转设备发送数据查询结果;数据中转设备通过预设通信接口接收目标数据提供侧反馈的数据查询结果后进行数据解析。
预存通信接口模板用于预先定义对应通信接口接收到的数据查询结果中的关键字段,以实现正确解析数据查询结果得到目标数据,如定义关键字段username表示姓名,定义class表示班级等。例如,在线教育平台向数据中转设备发送数据获取请求,以请求获取第三方教育平台中关于用户ID为12314的用户数据,数据中转设备确定该第三方教育平台对应的数据获取方式为HTTP接口方式,故生成并向第三方教育平台发送HTTP请求,该HTTP请求中包含URL:http://exchange.study.com/userInfo/12314,第三方教育平台查询用户ID为12314的用户数据,并返回包含数据查询结果的响应报文如下:
Figure PCTCN2020076809-appb-000001
数据中转平台利用对应的HTTP接口模板,从上述响应报文中提取关键字段“name”的内容“张三”作为用户姓名;关键字段“age”的内容“18”作为用户年龄;关键字段“gradeId”的内容“g123123”作为用户的班级ID;关键字段“gradeName”的内容“高一一班”作为用户班级;关键字段“schoolId”的内容“s3243243”作为用户学校ID;关键字段“schoolId”的内容“幸福中学”作为用户学校名称;关键字段“role”的内容“STUDENT”作为用户角色为学生。由此数据中转设备将上述解析得到的用户数据发送给在线教育平台,在线教育平台即获得用户ID为12314的上述用户数据。
在数据获取方式为运行预存代码方式的情况下,运行预存代码,以实现以下内容:生成并向目标数据提供侧发送数据查询请求,并接收目标数据提供侧反馈的数据查询结果,对数据查询结果进行解析得到目标数据。对于采用一些非标准接口的数据提供侧,数据中转设备无法直接与该数据提供侧进行数据交互。故可通过由用户输入相应代码,并运行该代码实现与数据提供侧进行数据交互。在一些实施例中,数据中转设备可在Java运行环境中,对该预存代码进行编译执行。其中,运行预存代码时,可利用Java运行环 境中的预设工具编译并执行预存代码,即针对Java代码、Lua代码、JavaScript代码和Groovy代码等不同代码,可采用对应的工具进行编译执行。具体地,对于Java代码,可采用JavaCompiler进行动态编译代码,实时编译Java代码片段;对于JavaScript和Groovy代码,可采用criptEngineManager类实现编译执行;对于Lua代码,可采用LuaJ工具实现编译执行。
上述运行预存代码方式,可支持在线编辑代码获取目标数据提供侧的目标数据,并且针对不同应用场景和数据查询内容编写具体的业务代码,灵活兼容多种类型的目标数据提供侧。此外,预存代码可采用Java代码、Lua代码、JavaScript代码和Groovy代码等,支持多语言在线编辑的代码生成。即使数据中转设备并无目标数据提供侧对应的接口配置,由于预存代码方式的自定义编码,仍能实现与目标数据提供侧的目标数据获取。
在数据获取方式为运行SQL脚本方式的情况下,运行SQL脚本以生成数据查询请求;向目标数据提供侧发送数据查询请求,并接收目标数据提供侧反馈的数据查询结果;以及基于数据查询结果,获得目标数据。SQL脚本用于创建数据库对象的语句的集合,可对数据库进行访问。上述预设通信接口方式和运行预存代码方式可直接与相应平台进行数据获取,例如,直接与第三方教育平台交互,以由该第三方教育平台从其用户数据库获取对应的用户数据并返回该数据中转设备。在一些实施例中,数据中转设备也可直接向平台的数据库交互,例如,通过运行SQL脚本方式向该第三方教育平台的用户数据库查询对应用户数据并由该用户数据库返回该用户数据。例如,在线教育平台向数据中转设备发送数据获取请求,以请求获取第三方教育平台中关于用户ID为12314的用户数据,数据中转设备确定该数据提供侧为第三方教育平台的用户数据库,故其对应的数据获取方式为运行SQL方式,故运行相应SQL脚本:“select name,age,gradeId,gradeName,schoolId,schoolName,role from user where id=12314”,以生成并向第三方教育平台的用户数据库发送数据查询请求,第三方教育平台的用户数据库查询用户ID为12314的用户数据,并返回数据查询结果如下:“张三,18,g123123,高一一班,s3243243,幸福中学,STUDENT”,由此数据中转设备将上述返回的用户数据发送给在线教育平台,在线教育平台即获得用户ID为12314的上述用户数据。
值得注意的是,上述数据请求侧可以为一平台设备,该平台设备和数据中转设备可为同一设备(如服务器)上,也可属于不同设备;上述数据提供侧可以为另一平台服务器,或者为另一平台的数据库所在的设备,在此不作限定。
通过上述方式,作为不同平台的数据请求侧和数据提供侧,数据请求侧可通过数据中转平台获取数据提供侧的数据,故可实现不同平台之间的数据获取。而且,数据中转平台接收来自数据请求侧的数据获取请求后,从预存的多种数据获取方式中,选择与目标数据提供侧关联的数据获取方式,使得被获取数据的目标数据提供侧与数据获取方式一一对应,实现向目标数据提供侧获取目标数据,故可为不同数据提供侧配置不同的数据获取方式实现不同数据提供侧的数据获取,即数据中转平台可兼容多种数据获取方式,从而实现数据请求侧获取多个数据提供侧的数据。
可以理解的是,数据中转设备除了用于实现数据请求侧与数据提供侧之间的目标数据获取外,还可用于进行数据请求侧与数据提供侧之间其他的任意信息交互。如在一公开实施例中,该获取方法除包含执行上述步骤外,还包括将来自所述数据请求侧的验证请求发送给所述数据提供侧,其中,所述验证请求用于请求验证目标用户是否在所述数据提供侧登录;接收所述数据提供侧的验证结果,并反馈给所述数据请求侧。由此,能够实现数据请求侧与数据提供侧之间的用户登录验证。其中,数据中转设备与数据请求侧和数据提供侧之间的交互方式可参考上面描述,例如可获取与数据提供侧关联的获取方式,如为一预设通信接口方式,则利用该通信接口方式将验证请求发送给数据提供侧并接收数据提供侧反馈的验证结果,利用预设通信接口模板对验证结果进行识别得到结果内容,进而反馈给数据请求侧。
另外,数据请求侧在收到该验证结果后,若确定目标用户已在数据提供侧登录,则可以直接确定目标用户在自身平台也完成登录,无需用户重复登录,提高了平台登录效率。上述目标数据可以为该目标用户的数据,在数据请求侧确定目标用户已在数据提供侧登录之后,再执行上述步骤S101至S103以向数据提供侧获取该目标用户的数据,进而可根据该目标用户的数据进行相应处理,例如为目标用户提供与之匹配的可访问内容等。
请参阅图2,图2是本申请数据获取方法另一实施例的流程示意图。具体而言,本公开实施例方法包括以下步骤:
步骤S201:第一平台检测到存在对目标数据的获取需求。
本公开实施例中,第一平台可根据实际情况设定自身何时存在对目标数据的获取需求。例如,第一平台在接收到用户对目标数据的获取指令时,确定当前存在对目标数据的获取需求;又例如,第一平台也存有该目标数据,故检测到自身存储的目标数据出错时,确定当前存在对目标数据的获取需求;又例如,第一平台可定期获取目标数据,故检测到当前已到达预先设定时间时,确定当前存在对目标数据的获取需求。再例如,第一平台需要在用户访问时获取用户数据,故第一平台可在接收到用户的访问请求时,确定当前存在对目标数据的获取需求。故在此不对第一平台检测到存在获取需求的触发事件或触发时间进行具体限定。
步骤S202:通过数据中转平台从所述第二平台获取所述目标数据。
本公开实施例中,第一平台与第二平台为不同的两个平台,但平台类型不作限定,例如教育平台、政务平台等。在一具体应用中,第一平台为一在线编程教育平台,第二平台为第三方教育平台如教育局或学校提供的信息化教育平台。
数据中转平台、第一平台、第二平台为不同的平台,以用于分别实现对应平台的功能。具体地,用于运行数据中转平台、第一平台、第二平台的设备均可以为服务器、终端设备等硬件设备,或者为执行特定计算机程序的处理器等。另外,该数据中转平台和第一平台可由同一设备实现或分别由不同设备实现,在此不做限定。
第一平台检测到当前存在对目标数据的获取需求,则通过数据中转平台从第二平台获取所述目标数据,由此,在第一平台有需求时执行本公开实施例以获得目标数据。具 体地,本步骤可具体包括第一平台向数据中转平台发送数据获取请求,以使数据中转平台响应该数据获取请求而从第二平台获取目标数据,或者以使数据中转平台响应数据获取请求从本地获取目标数据,其中,该目标数据为数据中转平台预先从第二平台中获取的。
针对于不同平台可能其获取方式有所不同,为实现第一平台可向不同第二平台获得数据,数据中转平台可预先配置多种获取方式,进而选择与目标数据所在的第二平台匹配的获取方式来获取数据,具体获取过程可参阅上述实施例的描述,在此不做赘述。当然,若第二平台的获取方式统一,则数据中转平台无需配置多种获取方式,直接通过统一方式来向第二平台获取数据。
通过上述方式,第一平台在检测到存在对目标数据的获取需求,通过数据中转平台从第二平台获取目标数据,故实现不同平台之间的数据获取。
请参阅图3,图3是本申请数据获取方法再一实施例的流程示意图。具体而言,本公开实施例方法包括以下步骤:
步骤S301:第一平台接收用户的访问请求;其中,所述访问请求是在所述用户访问第二平台时生成的。
平台访问时,需进行用户首次注册或用户登录。例如,用户访问一平台时,需进行账号和密码认证、人脸识别、指纹识别等登录操作,以使该平台检测到账号与密码均正确、人脸配成成功、指纹匹配成功后完成登录认证,并为该用户提供对应的可访问内容。
本公开实施例中,第一平台与第二平台为不同的两个平台,但平台类型不作限定,例如教育平台、政务平台等。在一具体应用中,第一平台为一在线编程教育平台,第二平台为第三方教育平台如教育局或学校提供的信息化教育平台。触发访问第一平台的路径不作限定,可以为用户在访问第二平台过程中的任意时刻发生的。例如,用户通过其设备登录第二平台后,第二平台提供第一平台的入口链接;用户通过点击设备上显示的第一平台的链接,用户设备即发送访问请求至第一平台。
访问请求是在用户访问第二平台时生成,其包含对应第二平台的标识信息和该用户信息,例如访问请求包括第二平台地址和第二平台为该登录用户生成的第一密钥,以使第一平台可利用第二平台地址确定用户所来自的第二平台,进而向该第二平台验证该用户是否登录并获取该用户信息。
步骤S303:基于所述访问请求验证所述用户是否已在所述第二平台登录。
例如,第一平台基于访问请求向第二平台发送验证请求,而第二平台判断用户是否在第二平台登录,从而反馈验证结果给第一平台。其中,该验证请求可以由第一平台直接发送给第二平台,且第二平台直接将验证结果反馈给第一平台;或者第一平台通过数据中转平台将验证请求转发给第二平台,第二平台通过数据中转平台将验证结果反馈给第一平台,其中数据中转平台与第一平台和第二平台之间的交互方式可参考上述实施例的相关描述,在此不做赘述。
在一实施例中,访问请求包括第二平台地址和第一密钥,本步骤S303可具体包括:基于第二平台地址,向第二平台发送包含第一密钥的验证请求,以请求验证第一密钥与 第二平台在用户成功登录第二平台时生成的第二密钥是否匹配;接收第二平台反馈对第一密钥的验证结果;若验证结果为第一密钥和第二密钥匹配,则确定用户已在第二平台登录。也即,第一平台从访问请求中获得第一密钥,第二平台在确认用户成功登录时生成第二密钥。第一平台通过访问请求中的第二平台地址发送第一密钥给第二平台,而第二平台获取第一密钥后匹配第一密钥和第二密钥,检测到两者匹配成功,则确定该用户已在第二平台登录。
上述第二平台反馈的验证结果可包括用于表示该用户是否已登录的结果字段。在一些实施例中,当该用户已在第二平台登录时,第二平台反馈的验证结果除包括上述结果字段以外,还可包括该用户的ID,以使第一平台可利用该ID通过数据中转平台向第二平台查询得到与该ID匹配的用户数据。当然,第二平台反馈的验证结果也可以只包含用户ID,即,若验证结果包含用户ID,则表示用户已登录,否则未登录。
可以理解的是,由第一平台向第二平台请求验证用户是否已在第二平台登录时,第一平台与第二平台之间的交互可以是第一平台与第二平台之间直接进行数据交互,或者,通过数据中转平台实现第一平台与第二平台之间的数据交互,在此不作限定。
步骤S303:若是,则确定存在对所述目标数据的获取需求数据。
其中,目标数据可以为该用户的数据,具体进而包括用户名称、课程、班级、学校等。
在一些实施例中,第一平台还可根据用户在第二平台的登录状态对应完成本平台的登录。例如,若用户已在第二平台登录,第一平台可确定用户在第一平台登录成功。由此,用户仅需在第二平台登录认证成功,在第二平台获取第一平台的访问路径并触发,即可直接登录第一平台,无需再次进行第一平台的登录认证。此外,用户可从第一平台返回第二平台,实现不同平台的来回切换。第一平台和第二平台的访问不会彼此影响,用户可在两平台间自由切换。例如,用户在其设备上的一网页上登录第二平台后,点击该网页上提供的第一平台的入口链接,用户设备显示另一网页来打开并自动登录第一平台,用户可直接点选对应网页来访问对应平台,实现来回切换访问互不影响。
步骤S304:通过数据中转平台从所述第二平台获取目标数据。
本公开实施例中,若用户已在第二平台登录,则确定存在对用户数据的获取需求数据,故第一平台向数据中转平台发送数据获取请求,以使数据中转平台采用与第二平台关联的数据获取方式,从第二平台获取用户的数据。例如,以用户的数据作为目标数据,数据中转平台接收来自第一平台的数据获取请求,其中,数据获取请求用于请求获取第二平台的目标数据,且目标数据用于提供给第一平台;从预存的多种数据获取方式中,选择与第二平台关联的数据获取方式;采用选择的数据获取方式,从第二平台获取目标数据。具体地,第一平台作为上述数据请求侧,第二平台作为上述数据提供侧,数据中转平台可采用上述数据获取方法实施例的步骤来获取得到第二平台的数据。
其中,若上述第二平台反馈的验证结果包括用户ID,则第一平台可将包含用户ID的数据获取请求通过数据中转设备发送至第二平台,以从第二平台获取用户的数据。
第一平台在通过数据中转平台从第二平台获取用户的数据之后,可基于用户的数据, 确定用户在第一平台上的可访问内容。例如,第一平台和第二平台为不同的两个教育平台时,用户的数据包括姓名、学校、班级、角色(例如为学生或老师等)中的至少一种;可访问内容包括可上课课程、可授课课程中的至少一种。可以理解的,不同用户的数据,对应的可访问内容可能相同或不同,例如,若第一平台登录用户为初一一班的学生,则仅提供该初一一班的在线上课课程以及初一一班的互动模块,以使学生与同班同学可一起参加该在线上课课程和进行互动;若第一平台的登录用户为初二一班和初二四班的老师,则提供该初二一班和初二四班的在线授课课程和在线答疑模块,以使该老师可对相应班级同学进行授课并进行答疑。由此,可实现班级实时互动、老师在线答疑等功能,在此不作限定。
可以理解的是,上述第一平台与第二平台所执行的步骤可以为相应平台设备所执行的步骤,例如上述方法中第一平台相关步骤由第一平台服务器执行、数据中转平台相关步骤由数据中转设备执行,第二平台相关步骤由第二平台服务器执行。另外,第一平台与数据中转平台可属于同一服务器上,亦可以不在同一服务器上,在此不作限定。当第一平台与数据中转平台分属于不同服务器时,两者可通过通用标准接口连接,第一平台可配置接入数据中转平台的地址和接口号等,以此通过该接口与数据中转平台进行数据交互。为进一步理解本申请一些实施例的技术方案,以下为一具体应用举例:
第一平台为在线编程教育平台(也可称为在线编程教育系统),该平台内可实现实时在线学习和授课等;第二平台为深圳中学的教育平台;数据中转平台也可称为UserDataExchange,该UserDataExchange为可实现上述数据获取方法的软件产品。用户为学生张三,其登录深圳中学的教育平台后,触发在深圳中学的教育平台中显示的在线编程教育平台的入口链接,从而直接免登录地进入在线编程教育平台。此时,张三所用设备将发送访问请求给在线编程教育平台,该访问请求包括深圳中学的教育平台的地址和第一密钥。在线编程教育平台接收到张三的访问请求后,通过深圳中学的教育平台的地址发送第一密钥给深圳中学的教育平台,以使深圳中学的教育平台匹配第一密钥和张三成功登录深圳中学的教育平台时生成的第二密钥。深圳中学的教育平台确定张三成功登录深圳中学的教育平台后,反馈张三的ID给在线编程教育平台。在线编程教育平台接收到张三的ID,确定张三成功登录深圳中学的教育平台,从而通过数据中转平台向深圳中学的教育平台获取用户的数据。在线编程教育平台通过数据中转平台向深圳中学的教育平台获取用户的数据时,数据中转平台从预存的多种数据获取方式中,选择与深圳中学的教育平台关联的预设通信接口方式为HTTP接口方式,该HTTP接口方式为深圳中学的教育平台关联的数据获取方式,从而利用HTTP接口,向深圳中学的教育平台发送数据查询请求,并接收深圳中学的教育平台反馈的数据查询结果;以及利用对应HTTP接口的预存通信接口模板从数据查询结果中识别并提取关键字段内容,得到张三的姓名、学校、班级等用户的数据,以及可上课课程等可访问内容。
本公开实施例中,第一平台接收用户访问第二平台时生成的访问请求;基于访问请求验证用户是否已在第二平台登录;在确定用户已在第二平台登录后,则确定存在对所述目标数据的获取需求数据,进而通过数据中转平台向第二平台获取用户的数据,从而 实现不同平台之间的数据获取。第一平台在接收到用户的访问请求时,若确定用户已在第二平台登录,则第一平台作为数据请求侧且第二平台作为数据提供侧,第一平台通过数据中转平台直接从第二平台获取所述用户的数据,即第一平台在用户访问时,主动向第二平台查询用户数据,实现获取用户的最新数据,相比于线下定时同步数据,本公开实施例方法提高数据获取的实时性和准确性。
为实现不同平台之间的数据获取,本申请实施例的第一平台可主动查询第二平台的数据,实时获取用户的最新数据,实时性更高。相较于传统定期同步不同平台之间的数据,且同步方法为拷贝、全量同步、增量同步等,本申请实施例的方法无需平台做任何功能更改,配置简单,且实时主动查询数据,可减少由于数据同步滞后而导致不同平台信息不一致的情况,提高数据获取的准确性和效率。
请参阅图4,图4是本申请数据获取装置一实施例的结构示意图。具体而言,本公开实施例中,数据获取装置40包括:第一获取模块41、选择模块42和第二获取模块43。其中,第一获取模块41,用于接收来自数据请求侧的数据获取请求,其中,数据获取请求用于请求获取目标数据提供侧的目标数据,数据请求侧和目标数据提供侧属于不同的平台;选择模块42,用于从预存的多种数据获取方式中,选择与目标数据提供侧关联的数据获取方式;第二获取模块43,用于采用选择的数据获取方式,向目标数据提供侧获取目标数据。
本公开实施例中,选择模块42所选择的多种数据获取方式包括预设通信接口方式、运行SQL脚本方式和运行预存代码方式中的至少一种。预设通信接口方式包括HTTP接口方式、RPC接口方式中的至少一种,所述预存代码包括Java代码、Lua代码、JavaScript代码和Groovy代码中的至少一种。
第一获取模块41包括获取单元和保存单元。其中,获取单元用于获取用户输入的一数据提供侧所需的数据获取方式;保存单元用于建立所述数据提供侧与其所需的数据获取方式之间的关联关系,并将数据获取方式和所述关联关系保存作为配置信息,并且选择模块42还用于从所述配置信息中,查找出与所述目标数据提供侧具有关联关系的数据获取方式。在一公开实施例中,获取单元用于在所述数据获取方式为预设通信接口方式的情况下,获取用户输入的一数据提供侧所需的预设通信接口信息;用于在所述数据获取方式为运行SQL脚本方式的情况下,获取用户输入的一数据提供侧所需的SQL脚本;还用于在所述数据获取方式为运行预存代码方式的情况下,获取用户输入的一数据提供侧所需的代码。并且保存单元还用于将数据获取方式和所述关联关系作为配置信息保存在预设数据库中。
在一公开实施例中,第二获取模块43还用于在所述数据获取方式为预设通信接口方式的情况下,利用预设通信接口,向所述目标数据提供侧发送数据查询请求,并接收所述目标数据提供侧反馈的数据查询结果;以及利用预存通信接口模板从所述数据查询结果中识别并提取关键字段内容,得到所述目标数据;还用于在所述数据获取方式为运行SQL脚本方式的情况下,运行SQL脚本以生成数据查询请求;向所述目标数据提供侧发送数据查询请求,并接收所述目标数据提供侧反馈的数据查询结果;以及基于所述数据查 询结果,获得所述目标数据;还用于在所述数据获取方式为运行预存代码方式的情况下,运行所述预存代码,以实现生成并向所述目标数据提供侧发送数据查询请求,并接收所述目标数据提供侧反馈的数据查询结果,对所述数据查询结果进行解析得到目标数据。
在一公开实施例中,第一获取模块41用于通过预设通信接口接收到所述数据请求侧的数据获取请求。第一获取模块41还用于检测到满足预设条件时,生成数据获取请求。其中,所述数据请求侧和目标数据提供侧属于不同教育平台,所述目标数据为目标用户的数据。
请参阅图5,图5是本申请数据获取装置另一实施例的结构示意图。具体而言,本公开实施例中,数据获取装置50包括:检测模块51、获取模块52。其中,检测模块51用于检测到存在对目标数据的获取需求;获取模块52用于通过数据中转平台从所述第二平台获取所述目标数据。
检测模块51包括接收单元、验证单元和确定单元。其中,接收单元,用于接收用户的访问请求;其中,访问请求是在用户访问第二平台时生成的;验证单元,用于基于访问请求验证用户是否已在第二平台登录;确定单元,用于在验证用户已在第二平台登录时,确定存在对所述目标数据的获取需求。
检测模块51的确定单元还用于在确定存在对所述目标数据的获取需求之后,基于所述用户的数据,确定所述用户在所述第一平台上的可访问内容。
在一公开实施例中,第一平台和第二平台为不同的两个教育平台,所述用户的数据包括姓名、学校、班级、角色中的至少一种;所述可访问内容包括可上课课程、可授课课程中的至少一种。
在一公开实施例中,访问请求包括第二平台地址和第一密钥检测模块51的验证单元还用于基于所述第二平台地址,向所述第二平台发送包含所述第一密钥的验证请求,以请求验证所述第一密钥与所述第二平台在所述用户成功登录所述第二平台时生成的第二密钥是否匹配;接收所述第二平台反馈对所述第一密钥的验证结果;若所述验证结果为所述第一密钥和所述第二密钥匹配,则确定所述用户已在所述第二平台登录。
在一公开实施例中,获取模块52还用于向所述数据中转平台发送数据获取请求,以使所述数据中转平台采用与所述第二平台关联的数据获取方式,从所述第二平台获取所述目标数据。
上述公开实施例中数据获取装置的各模块的功能可参阅上述方法实施例的相关步骤,在此不做赘述。
请参阅图6,图6为本申请数据中转设备一实施例的框架示意图。具体而言,本公开实施例中数据中转设备60包括处理器61以及与处理器61耦接的通信电路62和存储器63,其中,处理器61用于执行存储器63存储的计算机程序以结合通信电路62执行上述数据获取方法任一实施例的步骤。
请参阅图7,图7为本申请平台服务器一实施例的框架示意图。具体而言,本公开实施例中平台服务器70包括处理器71以及与处理器71耦接的通信电路72和存储器73,其中,处理器71用于执行存储器73存储的计算机程序以结合通信电路72执行上述数据 获取方法任一实施例的步骤。
上述数据中转设备实施例和平台服务器实施例中的处理器还可以称为CPU(Central Processing Unit,中央处理单元)。处理器可能是一种集成电路芯片,具有信号的处理能力。处理器还可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。另外,处理器可以由多个成电路芯片共同实现。
请参阅图8,图8为本申请数据共享系统一实施例的框架示意图。具体而言,本公开实施例中数据共享系统80包括数据中转设备81以及分别与数据中转设备81连接的第一平台服务器82和至少一个第二平台服务器83,如图8所示,本公开实施例包括三个第二平台服务器83;其中,数据中转设备81为上述数据中转设备实施例,第一平台服务器82为上述平台服务器实施例,以实现第一平台服务器82通过数据中转设备81获取第二平台服务器的用户数据。
请参阅图9,图9为本申请存储装置90一实施例的框架示意图。本申请实施例存储装置90存储有能够被处理器运行的程序指令901,程序指令901用于实现上述任一方法实施例中步骤。
该存储装置90具体可以为U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等可以存储程序指令901的介质,或者也可以为存储有该程序指令901的服务器,该服务器可将存储的程序指令901发送给其他设备运行,或者也可以自运行该存储的程序指令901。
本公开实施例还提供了一种存储装置或计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。存储装置或计算机可读存储介质可以包括非易失性计算机可读存储介质或者易失性计算机可读存储介质。
本公开实施例还提供了一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为上述任一实施例提供的方法。
本公开实施例还提供了一种计算机程序,其包括计算机可读代码,当所述计算机代码在电子设备中运行时,所述电子设备中的处理器执行上述任一实施例提供的方法。
本公开实施例还提供了一种计算机程序产品,用于存储计算机可读指令,指令被执行时使得计算机执行上述任一实施例提供的方法的操作。
该计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
在本申请所提供的几个实施例中,应该理解到,所揭露的方法和装置,可以通过其它的方式实现。例如,以上所描述的装置实施方式是示意性的,例如,模块或单元的划分,为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示 或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施方式方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。

Claims (21)

  1. 一种数据获取方法,其中,包括:
    获取数据获取请求,其中,所述数据获取请求用于请求获取目标数据提供侧的目标数据,且所述目标数据用于提供给数据请求侧,所述数据请求侧和目标数据提供侧属于不同的平台;
    从预存的多种数据获取方式中,选择与所述目标数据提供侧关联的数据获取方式;
    采用所述选择的数据获取方式,从所述目标数据提供侧获取所述目标数据。
  2. 根据权利要求1所述的方法,其中,所述多种数据获取方式包括预设通信接口方式、运行SQL脚本方式和运行预存代码方式中的至少一种。
  3. 根据权利要求2所述的方法,其中,所述预设通信接口方式包括HTTP接口方式、RPC接口方式中的至少一种,所述预存代码包括Java代码、Lua代码、JavaScript代码和Groovy代码中的至少一种。
  4. 根据权利要求1-3任一项所述的方法,其中,所述方法还包括:
    获取用户输入的一数据提供侧所需的数据获取方式;
    建立所述数据提供侧与其所需的数据获取方式之间的关联关系,并将数据获取方式和所述关联关系保存作为配置信息;
    所述从预存的多种数据获取方式中,选择与所述目标数据提供侧关联的数据获取方式,包括:
    从所述配置信息中,查找出与所述目标数据提供侧具有关联关系的数据获取方式。
  5. 根据权利要求4所述的方法,其中,所述获取用户输入的一数据提供侧所需的数据获取方式,包括:
    在所述数据获取方式为预设通信接口方式的情况下,获取用户输入的一数据提供侧所需的预设通信接口信息;
    在所述数据获取方式为运行SQL脚本方式的情况下,获取用户输入的一数据提供侧所需的SQL脚本;
    在所述数据获取方式为运行预存代码方式的情况下,获取用户输入的一数据提供侧所需的代码;
    所述将数据获取方式和所述关联关系保存作为配置信息,包括:
    将数据获取方式和所述关联关系作为配置信息保存在预设数据库中。
  6. 根据权利要求1-5任一项所述的方法,其中,所述采用所述选择的数据获取方式,从所述目标数据提供侧获取所述目标数据,包括:
    在所述数据获取方式为预设通信接口方式的情况下,利用预设通信接口,向所述目标数据提供侧发送数据查询请求,并接收所述目标数据提供侧反馈的数据查询结果;以及利用预存通信接口模板从所述数据查询结果中识别并提取关键字段内容,得到所述目标数据;
    在所述数据获取方式为运行SQL脚本方式的情况下,运行SQL脚本以生成数据查询请求;向所述目标数据提供侧发送数据查询请求,并接收所述目标数据提供侧反馈的数据查询结果;以及基于所述数据查询结果,获得所述目标数据;
    在所述数据获取方式为运行预存代码方式的情况下,运行所述预存代码,以实现生成并向所述目标数据提供侧发送数据查询请求,并接收所述目标数据提供侧反馈的数据查询结果,对所述数据查询结果进行解析得到目标数据。
  7. 根据权利要求1-6任一项所述的方法,其中,所述获取数据获取请求,包括:
    通过预设通信接口接收到所述数据请求侧的数据获取请求;或者,检测到满足预设条件时,生成数据获取请求。
  8. 根据权利要求1-6任一项所述的方法,其中,所述方法还包括:
    将来自所述数据请求侧的验证请求发送给所述数据提供侧,其中,所述验证请求用于请求验证目标用户是否在所述数据提供侧登录;
    接收所述数据提供侧的验证结果,并反馈给所述数据请求侧。
  9. 一种数据获取方法,其中,包括:
    第一平台检测到存在对目标数据的获取需求;
    通过数据中转平台从所述第二平台获取所述目标数据。
  10. 根据权利要求9所述的方法,其中,所述检测到存在对目标数据的获取需求,包括:
    接收用户的访问请求;其中,所述访问请求是在所述用户访问第二平台时生成的;
    基于所述访问请求验证所述用户是否已在所述第二平台登录;
    若是,则确定存在对所述目标数据的获取需求,其中,所述目标数据为所述用户的数据。
  11. 根据权利要求10所述的方法,其中,还包括:
    若所述用户已在所述第二平台登录,则确定所述用户在所述第一平台登录成功;
    和/或,在所述通过数据中转平台从所述第二平台获取所述目标数据之后,还包括:
    基于所述用户的数据,确定所述用户在所述第一平台上的可访问内容。
  12. 根据权利要求11所述的方法,其中,所述第一平台和第二平台为不同的两个教育平台,所述用户的数据包括姓名、学校、班级、角色中的至少一种;所述可访问内容包括可上课课程、可授课课程中的至少一种。
  13. 根据权利要求10-12任一项所述的方法,其中,所述访问请求包括第二平台地址和第一密钥;
    所述基于所述访问请求验证所述用户是否已在所述第二平台登录,包括:
    基于所述第二平台地址,向所述第二平台发送包含所述第一密钥的验证请求,以请求验证所述第一密钥与所述第二平台在所述用户成功登录所述第二平台时生成的第二密钥是否匹配;
    接收所述第二平台反馈对所述第一密钥的验证结果;
    若所述验证结果为所述第一密钥和所述第二密钥匹配,则确定所述用户已在所述第二平台登录。
  14. 根据权利要求9-13任一项所述的方法,其中,所述通过数据中转平台从所述第二平台获取所述目标数据,包括:
    向所述数据中转平台发送数据获取请求,以使所述数据中转平台采用与所述第二平台关联的数据获取方式,从所述第二平台获取所述目标数据。
  15. 一种数据获取装置,其特征在于,包括:
    获取模块,用于获取数据获取请求,其中,所述数据获取请求用于请求获取目标数据提供侧的目标数据,且所述目标数据用于提供给数据请求侧,所述数据请求侧和目标数据提供侧属于不同的平台;
    选择模块,用于从预存的多种数据获取方式中,选择与所述目标数据提供侧关联的数据获取方式;
    获取模块,用于采用所述选择的数据获取方式,从所述目标数据提供侧获取所述目标数据。
  16. 一种数据获取装置,其特征在于,应用于第一平台,包括:
    检测模块,用于检测到存在对目标数据的获取需求;
    获取模块,用于通过数据中转平台从所述第二平台获取所述目标数据。
  17. 一种数据中转设备,其中,包括处理器以及与所述处理器耦接的通信电路和存储器,其中,
    所述处理器用于执行所述存储器存储的计算机程序以结合所述通信电路执行权利要求1至8任一项所述的方法。
  18. 一种平台服务器,其中,包括处理器以及与所述处理器耦接的通信电路和存储器,其中,
    所述处理器用于执行所述存储器存储的计算机程序以结合所述通信电路执行权利要求9至14任一项所述的方法。
  19. 一种数据共享系统,其中,包括数据中转设备以及分别与所述数据中转设备连接的第一平台服务器和至少一个第二平台服务器;
    其中,所述数据中转设备为权利要求17所述的设备,所述第一平台服务器为权利要求18所述的服务器,以实现所述第一平台服务器通过所述数据中转设备获取所述第二平台服务器的用户数据。
  20. 一种存储装置,其中,存储有能够被处理器运行以实现如权利要求1-8中任一项所述数据获取方法的计算机程序;和/或,存储有能够被处理器运行以实现如权利要求9-14中任一项所述数据获取方法的计算机程序。
  21. 一种计算机程序,其中,包括计算机可读代码,当所述计算机代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1-8中任一项所述数据获取方法;和/或,所述电子设备中的处理器执行用于实现权利要求9-14中任一项所述数据获取方法。
PCT/CN2020/076809 2019-12-31 2020-02-26 数据获取方法及其相关设备、系统及存储装置 WO2021134873A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2021538376A JP2022518890A (ja) 2019-12-31 2020-02-26 データ取得方法及びその関連装置、システム、並びに記憶装置
KR1020217020202A KR20210113603A (ko) 2019-12-31 2020-02-26 데이터 취득 방법 및 그 관련 장치, 시스템, 및 기억 장치

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911416897.5 2019-12-31
CN201911416897.5A CN111177632A (zh) 2019-12-31 2019-12-31 数据获取方法及其相关设备、系统及存储装置

Publications (1)

Publication Number Publication Date
WO2021134873A1 true WO2021134873A1 (zh) 2021-07-08

Family

ID=70657660

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/076809 WO2021134873A1 (zh) 2019-12-31 2020-02-26 数据获取方法及其相关设备、系统及存储装置

Country Status (5)

Country Link
JP (1) JP2022518890A (zh)
KR (1) KR20210113603A (zh)
CN (1) CN111177632A (zh)
TW (1) TWI819215B (zh)
WO (1) WO2021134873A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111767093B (zh) * 2020-06-29 2023-08-08 抖音视界有限公司 数据处理方法、设备和存储介质
TWI817300B (zh) * 2021-12-28 2023-10-01 博盛半導體股份有限公司 金氧半場效電晶體品質管理整合系統及方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789023A (zh) * 2010-03-04 2010-07-28 浙江中医药大学 一种基于Web的食材信息发布管理系统及其发布管理方法
CN102111410A (zh) * 2011-01-13 2011-06-29 中国科学院软件研究所 一种基于代理的单点登录方法及系统
CN102609657A (zh) * 2012-02-11 2012-07-25 林福泉 射频识别的用户登录方法和装置
CN107851261A (zh) * 2015-04-03 2018-03-27 埃克斯凯利博Ip有限责任公司 用于提供相关广告的方法和系统

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003140956A (ja) * 2001-10-30 2003-05-16 Nec Corp ファイル共有プロキシシステム及びファイル共有制御方法
US8386485B2 (en) * 2008-07-31 2013-02-26 George Mason Intellectual Properties, Inc. Case-based framework for collaborative semantic search
US20110072487A1 (en) * 2009-09-23 2011-03-24 Computer Associates Think, Inc. System, Method, and Software for Providing Access Control Enforcement Capabilities in Cloud Computing Systems
JP5895415B2 (ja) * 2011-09-19 2016-03-30 株式会社リコー 通信システム、通信装置、プログラム及び割当装置
JP2013156713A (ja) * 2012-01-27 2013-08-15 Hitachi Consumer Electronics Co Ltd 情報端末及び情報処理方法
US9495227B2 (en) * 2012-02-10 2016-11-15 Twilio, Inc. System and method for managing concurrent events
US9158785B1 (en) * 2014-09-22 2015-10-13 Edifire LLC Managing and synchronizing content between a document sharing platform and an enterprise social platform
TWI624797B (zh) * 2015-07-09 2018-05-21 南臺科技大學 跨平台雲端生產履歷查詢方法、系統及程式產品
AU2016324159A1 (en) * 2015-09-17 2018-04-05 Uptake Technologies, Inc. Computer systems and methods for sharing asset-related information between data platforms over a network
US20190236154A1 (en) * 2018-01-26 2019-08-01 Vmware, Inc. Client side query model extensibility framework
CN109697215A (zh) * 2018-12-14 2019-04-30 安徽同徽网络技术有限公司 数据采集方法、数据采集系统和非易失性计算机存储介质
CN110196875B (zh) * 2019-06-03 2023-07-25 浪潮通用软件有限公司 一种基于配置实现数据交互的方法
CN116049785A (zh) * 2019-07-04 2023-05-02 创新先进技术有限公司 一种身份认证的方法和系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101789023A (zh) * 2010-03-04 2010-07-28 浙江中医药大学 一种基于Web的食材信息发布管理系统及其发布管理方法
CN102111410A (zh) * 2011-01-13 2011-06-29 中国科学院软件研究所 一种基于代理的单点登录方法及系统
CN102609657A (zh) * 2012-02-11 2012-07-25 林福泉 射频识别的用户登录方法和装置
CN107851261A (zh) * 2015-04-03 2018-03-27 埃克斯凯利博Ip有限责任公司 用于提供相关广告的方法和系统

Also Published As

Publication number Publication date
KR20210113603A (ko) 2021-09-16
JP2022518890A (ja) 2022-03-17
TWI819215B (zh) 2023-10-21
CN111177632A (zh) 2020-05-19
TW202127329A (zh) 2021-07-16

Similar Documents

Publication Publication Date Title
CN110602052B (zh) 微服务处理方法及服务器
US7690025B2 (en) Methods and systems for accessing a network-based computer system
US10673851B2 (en) Method and device for verifying a trusted terminal
US20160173518A1 (en) Adaptive client-aware session security
US20180198773A1 (en) Systems and methods for automated detection of login sequence for web form-based authentication
JP2016524765A (ja) カスタマイズされたソフトウェア開発キット(sdk)生成のための方法および装置
US8239493B2 (en) Automated server controlled client-side logging
CN111767095A (zh) 微服务生成方法、装置、终端设备及存储介质
CN112583815B (zh) 一种操作指令管理方法、装置
WO2021134873A1 (zh) 数据获取方法及其相关设备、系统及存储装置
CN104869128A (zh) 一种上传表单附件的方法、系统和web服务器
CN112437078A (zh) 文件存储方法、装置、设备及计算机可读存储介质
US20240179139A1 (en) Auto-Form Fill Based Website Authentication
US11055480B2 (en) Crowd-source as a backup to asynchronous identification of a type of form and relevant fields in a credential-seeking web page
US20180039771A1 (en) Method of and server for authorizing execution of an application on an electronic device
CN112148390A (zh) 任务处理方法、装置、电子设备及计算机可读存储介质
CN100465950C (zh) 用于客户支持的web浏览器控件
CN112988599A (zh) 一种页面调试方法、装置、电子设备和存储介质
CN113761514A (zh) 一种云桌面多因子安全认证方法及系统
CN103412944A (zh) 互联网寻址方法和装置
CN112925589A (zh) 扩展接口的调用方法及装置
US9137289B2 (en) Facilitating a stateless transmission of data in an information technology system
CN115941782A (zh) 基于rpa与聊天机器人的消息推送方法及系统
US11522942B2 (en) System and method for parsing application network activity
CN114629955A (zh) 一种身份认证方法、设备及计算机可读存储介质

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021538376

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20909226

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20909226

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 20909226

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 23.01.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20909226

Country of ref document: EP

Kind code of ref document: A1