CN111339128A - Data acquisition method and device, electronic equipment and storage medium - Google Patents

Data acquisition method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111339128A
CN111339128A CN201811554929.3A CN201811554929A CN111339128A CN 111339128 A CN111339128 A CN 111339128A CN 201811554929 A CN201811554929 A CN 201811554929A CN 111339128 A CN111339128 A CN 111339128A
Authority
CN
China
Prior art keywords
country
time
service
data
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811554929.3A
Other languages
Chinese (zh)
Other versions
CN111339128B (en
Inventor
刘澍
李奘
杜龙志
付俊强
何龙
王志明
范育峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Didi Infinity Technology and Development Co Ltd
Original Assignee
Beijing Didi Infinity Technology and Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Didi Infinity Technology and Development Co Ltd filed Critical Beijing Didi Infinity Technology and Development Co Ltd
Priority to CN201811554929.3A priority Critical patent/CN111339128B/en
Publication of CN111339128A publication Critical patent/CN111339128A/en
Application granted granted Critical
Publication of CN111339128B publication Critical patent/CN111339128B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a data acquisition method, a data acquisition device, electronic equipment and a storage medium, and relates to the technical field of processing. Wherein, the method comprises the following steps: acquiring a data export request, wherein the data export request comprises a country identifier and request time; inquiring a corresponding configuration file from a database according to the country identification, wherein the configuration file comprises a service identification of a country corresponding to the country identification and a time zone difference with a reference country; calculating a target time according to the request time and the time zone difference; and acquiring target service data according to the service identifier and the target time. The device is used for executing the method. According to the embodiment of the invention, the corresponding configuration file is searched through the country identification, the target time is calculated according to the time zone difference in the configuration file, the target time and the service identification are obtained, and the corresponding target service data is obtained, wherein the time corresponding to the obtained target service data is the same as the time of the reference country, so that the subsequent unified management of the service data is facilitated.

Description

Data acquisition method and device, electronic equipment and storage medium
Technical Field
The invention relates to the technical field of data processing, in particular to a data acquisition method, device electronic equipment and storage medium.
Background
For an international company, there are services in a plurality of countries, and in order to know the service conditions in each country, it is necessary to acquire service data corresponding to the plurality of countries. Because the time zones of different countries are different, the corresponding times of the business data derived at the same time are inconsistent, and thus the unified management of the business data of a plurality of countries is inconvenient.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a data acquisition method, an apparatus, an electronic device, and a storage medium, which can search a corresponding configuration file according to a country identifier, where the configuration file includes a method for calculating a target time according to a time zone difference, so that service data at the same time can be acquired, and it is convenient to perform unified management on service data of multiple countries in the following.
According to an aspect of an embodiment of the present invention, there is provided an electronic device that may include one or more storage media and one or more processors in communication with the storage media. One or more storage media store machine-readable instructions executable by a processor. When the electronic device is operated, the processor communicates with the storage medium through the bus, and the processor executes the machine readable instructions to perform one or more of the following operations:
acquiring a data export request, wherein the data export request comprises a country identifier and request time;
inquiring a corresponding configuration file from a database according to the country identification, wherein the configuration file comprises a service identification of a country corresponding to the country identification and a time zone difference with a reference country;
calculating a target time according to the request time and the time zone difference;
and acquiring target service data according to the service identifier and the target time.
According to the embodiment of the invention, the corresponding configuration file is searched through the country identification, the target time is calculated according to the time zone difference in the configuration file, the target time and the service identification are obtained, and the corresponding target service data is obtained, wherein the time corresponding to the obtained target service data is the same as the time of the reference country, so that the subsequent unified management of the service data is facilitated.
In some embodiments, the method further comprises:
acquiring time zone differences between each country and the reference country respectively and business identifications corresponding to each country;
generating a configuration file according to the time zone difference and the service identification corresponding to each country;
and binding the configuration file with the country identification of the corresponding country and storing the configuration file in the database.
Because the time zones of the countries are different and the services developed in the countries are possibly different, the corresponding configuration files are generated according to the time zone difference between the countries and the reference country and the service identification, when the target service data of a certain country needs to be acquired, the corresponding configuration files are directly generated, when the service data corresponding to the country needs to be acquired, the target time can be calculated through the configuration files and then acquired, so that the time of the acquired service data is consistent with that of the reference country, and the subsequent unified management of the service data of a plurality of countries is facilitated.
In some embodiments, the obtaining target service data according to the service identifier and the target time includes:
generating a Structured Query Language (SQL) file according to the service identifier and the target time;
and inquiring from a database according to the SQL file to obtain the target service data.
According to the embodiment of the invention, the SQL file is generated according to the target time and the service identifier in the configuration file, and the target service data is obtained by querying the SQL file.
In some embodiments, the get data export request comprises:
and acquiring the data export request according to the trigger time determined by the time zone difference.
According to the embodiment of the invention, the triggering time is set according to the time zone difference, so that a plurality of countries in different time zones can acquire the data export request at the same reference time, and the time corresponding to the acquired service data is the same.
In some embodiments, the method further comprises:
configuring an SQL file template in advance;
the generating of the SQL file according to the service identifier and the target time comprises the following steps:
and filling the SQL file template according to the service identifier and the target time to obtain the SQL file.
According to the embodiment of the invention, the SQL file template is configured in advance, and then is automatically filled after the service identifier and the target time are obtained, so that the rewriting is not required each time, and the efficiency of data query is improved.
An embodiment of the present invention further provides a data acquisition apparatus, including:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a data export request, and the data export request comprises a country identifier and request time;
the query module is used for querying a corresponding configuration file from a database according to the country identification, wherein the configuration file comprises a service identification of a country corresponding to the country identification and a time zone difference between the service identification and a reference country;
a calculation module for calculating a target time according to the request time and the time zone difference;
and the second acquisition module is used for acquiring target service data according to the service identifier and the target time.
In some embodiments, the apparatus further comprises:
a third obtaining module, configured to obtain time zone differences between each country and the reference country, and a service identifier corresponding to each country;
the configuration file generation module is used for generating configuration files according to the time zone difference and the service identification corresponding to each country;
and the binding module is used for binding the configuration file with the country identification of the corresponding country and storing the configuration file into the database.
In some embodiments, the second obtaining module is specifically configured to:
generating a Structured Query Language (SQL) file according to the service identifier and the target time;
and inquiring from a database according to the SQL file to obtain the target service data.
In some embodiments, the first obtaining module is specifically configured to:
and acquiring the data export request according to the trigger time determined by the time zone difference.
In some embodiments, the apparatus further comprises:
the template configuration module is used for configuring the SQL file template in advance;
the second obtaining module is specifically configured to:
and filling the SQL file template according to the service identifier and the target time to obtain the SQL file.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a schematic diagram of exemplary hardware and software components of an electronic device provided by an embodiment of the present invention;
fig. 2 is a schematic flow chart of a data acquisition method according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a configuration file generation method according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a data acquisition apparatus according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of another data acquisition apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it should be understood that the drawings in the present invention are for illustrative and descriptive purposes only and are not used to limit the scope of the present invention. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this disclosure illustrate operations implemented according to some embodiments of the present invention. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the direction of this summary, may add one or more other operations to, or remove one or more operations from, the flowchart.
In addition, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
In order to enable those skilled in the art to use the present invention, the following embodiments are given in conjunction with a specific application scenario "a network contract provider with a service line abroad needs to acquire service data of each country". It will be apparent to those skilled in the art that the general principles defined herein may be applied to other embodiments and applications without departing from the spirit and scope of the invention.
It should be noted that the term "comprising" will be used in the embodiments of the invention to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.
It should be noted that before the present invention is applied, some companies with services in multiple countries, such as the internet appointment company, may keep the service logic substantially consistent for the data management platform, for example: the business lines of ordinary express trains, luxury express trains, taxis and the like need to produce data such as the sending number and the ending number of each business of the previous day, the nearly 7 days, the nearly 14 days and the nearly 30 days. However, because the time zone of each country is different, when the business data of the previous day is acquired at the same time, the distribution of the time of the business data output of each country in one day is different, which is inconvenient for the unified management of the business data of a plurality of countries. However, the data acquisition method provided by the embodiment of the present invention can calculate the target time according to the time zone difference in the configuration file of a certain country when the service data of the country needs to be acquired, so that the service data of the same time as the reference country can be acquired.
FIG. 1 is a diagram of exemplary hardware and software components of an electronic device provided by an embodiment of the invention.
Electronic device 100 may be a general purpose computer or a special purpose computer, both of which may be used to implement the data acquisition methods of embodiments of the present invention. Although only a single computer is shown, for convenience, the functions described herein may be implemented in a distributed fashion across multiple similar platforms to balance processing loads.
For example, the electronic device 100 may include a network port 110 connected to a network, one or more processors 120 for executing program instructions, a communication bus 130, and a storage medium 140 of different form, such as a disk, ROM, or RAM, or any combination thereof. Illustratively, the computer platform may also include program instructions stored in ROM, RAM, or other types of non-transitory storage media, or any combination thereof. The method of the present invention can be implemented according to these program instructions. The electronic device 100 also includes an Input/Output (I/O) interface 150 between the computer and other Input/Output devices (e.g., keyboard, display screen).
For ease of illustration, only one processor is depicted in electronic device 100. However, it should be noted that the electronic device 100 in the present invention may also comprise a plurality of processors, and thus the steps performed by one processor described in the present invention may also be performed by a plurality of processors in combination or individually. For example, if the processor of the electronic device 100 executes steps a and B, it should be understood that steps a and B may also be executed by two different processors together or separately in one processor. For example, a first processor performs step a and a second processor performs step B, or the first processor and the second processor perform steps a and B together.
Fig. 2 is a schematic flow chart of a data acquisition method according to an embodiment of the present invention, as shown in fig. 2, the method includes:
step 201: obtaining a data export request, wherein the data export request comprises a country identification and a request time.
In a specific implementation process, the data obtaining device obtains a data export request, wherein the data export request comprises a country identifier and a request time. The country identifier is used to indicate which country data is to be obtained, and each country has a unique identifier, which may be a country code or a unique ID assigned to each country in advance. The request time is used for determining which time of service data is to be acquired, wherein the time zone of the request time is the time zone of the reference country. It should be noted that the request time may be a certain time point or a certain time period. The data export request may further include other information, which is not specifically limited in this embodiment of the present invention. The data export request may be triggered and sent by the user actively, or may be triggered and sent automatically when a trigger event is reached, the trigger time being preset in the data acquisition device.
Step 202: and inquiring a corresponding configuration file from a database according to the country identification, wherein the configuration file comprises the service identification of the country corresponding to the country identification and the time zone difference with the reference country.
In a specific implementation process, the data acquisition device includes a database, and configuration files of a plurality of countries and country identifiers corresponding to the configuration files are stored in the database in advance, wherein each country corresponds to one configuration file, and the configuration files include service identifiers of the corresponding country and time zone differences between the country and a reference country. Therefore, after the data acquisition device acquires the country identifier, the corresponding configuration file can be obtained by querying the database according to the country identifier, and the service identifier in the configuration file and the time zone difference from the reference country are further acquired. It should be noted that the service lines set in each country may not be exactly the same, but the same service data acquisition logic is substantially consistent for different countries, for example: the services set in country a include luxurious express buses and taxis, and the services set in country B include ordinary express buses and taxis. Therefore, the service identifier of the corresponding country needs to be set in the configuration file, so that which services exist in the country can be determined according to the service identifier, and which service data in the country are to be acquired can be known. The reference country is preset, and because the time zones of different countries are different, a reference needs to be found, and the requested time is converted according to the time zone difference, so that the service data in the same time period can be obtained.
Step 203: and calculating the target time according to the request time and the time zone difference.
In a specific implementation, the data acquisition means may calculate the target time based on the requested time and a time zone difference between the country and a reference country. For example: country a is 8 hours later than the reference country, and its time zone difference is 8, and at this time, the target time is the request time + 8. Accordingly, country B is 2 hours earlier than the reference country, with a time difference of 2, and the target time is the request time-2.
Step 204: and acquiring target service data according to the service identifier and the target time.
In a specific implementation process, after the data acquisition device calculates and acquires the target time, the data acquisition device acquires corresponding target service data according to the service identifier and the target time.
According to the embodiment of the invention, the corresponding configuration file is searched through the country identification, the target time is calculated according to the time zone difference in the configuration file, the target time and the service identification are obtained, and the corresponding target service data is obtained, wherein the time corresponding to the obtained target service data is the same as the time of the reference country, so that the subsequent unified management of the service data is facilitated.
On the basis of the foregoing embodiment, fig. 3 is a schematic flow chart of a configuration file generation method provided in an embodiment of the present invention, and as shown in fig. 3, the method includes:
step 301: acquiring time zone differences between each country and the reference country respectively and business identifications corresponding to each country;
step 302: generating a configuration file according to the time zone difference and the service identification corresponding to each country;
step 303: and binding the configuration file with the country identification of the corresponding country and storing the configuration file in the database.
In a specific implementation process, the configuration file is generated in advance, because different countries mainly differ in time zone difference and service, the time zone difference and the service can be encapsulated in the configuration file, and at this time, each country corresponds to one configuration file. When a configuration file corresponding to a country is generated, acquiring the time zone difference between the country and a reference country and a service identifier corresponding to a service set in the country, and then generating the configuration file corresponding to the country according to the time zone difference and the service identifier. And then binding the configuration file with the country identification of the country and storing the configuration file in a database, so that the configuration file which has a binding relation with the country identification is inquired from the database after the data acquisition device acquires the country identification.
Because the time zones of the countries are different and the services developed in the countries are possibly different, the embodiment of the invention generates the corresponding configuration files according to the time zone difference between the countries and the reference country and the service identification, directly generates the corresponding configuration files when the target service data of a certain country needs to be acquired, and calculates and acquires the target time through the configuration files when the service data corresponding to the country needs to be acquired, and then acquires the data, so that the time of the acquired service data is consistent with that of the reference country, and the service data of a plurality of countries can be conveniently managed in a subsequent unification mode.
On the basis of the above embodiment, the acquiring target service data according to the service identifier and the target time includes:
generating a Structured Query Language (SQL) file according to the service identifier and the target time;
and inquiring from a database according to the SQL file to obtain the target service data.
In a specific implementation process, after a configuration file is obtained according to a country identifier, a target time is obtained by calculation according to a time zone difference in the configuration file, and then an SQL file is generated according to a service identifier and the target time. And the data acquisition device performs data query from the database according to the generated SQL file to acquire corresponding target service data. It should be noted that the SQL language is a database query and programming language, and the user accesses data and queries, updates, and manages the relational database system, and has two usage modes, i.e. it can be used directly and interactively in command mode, and can also be embedded into host languages such as C, C + +, FORTRAN, COBOL, JAVA, and the like. The generated SQL file is used for acquiring corresponding target business data from the database.
According to the embodiment of the invention, the SQL file is generated according to the target time and the service identifier in the configuration file, and the target service data is obtained by querying the SQL file.
On the basis of the foregoing embodiments, the obtaining a data export request includes:
and acquiring the data export request according to the trigger time determined by the time zone difference.
In a specific implementation process, the trigger time for acquiring the service data of the corresponding country may be configured in advance according to the time zone difference, and since the time zones of the countries are different, the trigger times are also different, and then the data acquisition device may automatically trigger the data export request whenever the trigger time is reached. For example: country a is 8 hours later than the time of the reference country, country B is 2 hours earlier than the time of the reference country, and if 8: 00 (time of reference country) acquires data of the previous day, and at this time, the trigger time for acquiring service data in country a is 16:00 per day of the local time, and the trigger time for acquiring service data in country B is 6:00 of the local time.
According to the embodiment of the invention, the triggering time is set according to the time zone difference, so that a plurality of countries in different time zones can acquire the data export request at the same reference time, and the time corresponding to the acquired service data is the same.
On the basis of the above embodiment, the method further includes:
configuring an SQL file template in advance;
the generating of the SQL file according to the service identifier and the target time comprises the following steps:
and filling the SQL file template according to the service identifier and the target time to obtain the SQL file.
In a specific implementation process, as the SQL logics for acquiring the service data are basically the same, the data acquisition device can uniformly configure the SQL file template in advance. Therefore, after the data acquisition device acquires the service identifier and the target time, the corresponding fields in the SQL file template are filled, so that an SQL file is formed, and corresponding data can be queried from the database through the SQL file.
According to the embodiment of the invention, the SQL file template is configured in advance, and then is automatically filled after the service identifier and the target time are obtained, so that the rewriting is not required each time, and the efficiency of data query is improved.
Fig. 4 is a schematic structural diagram of a data acquisition apparatus according to an embodiment of the present invention, as shown in fig. 4, the apparatus includes: a first obtaining module 401, a querying module 402, a calculating module 403 and a second obtaining module 404, wherein:
the first obtaining module 401 is configured to obtain a data export request, where the data export request includes a country identifier and a request time; the query module 402 is configured to query a corresponding configuration file from a database according to the country identifier, where the configuration file includes a service identifier of a country corresponding to the country identifier and a time zone difference from a reference country; the calculating module 403 is configured to calculate a target time according to the requested time and the time zone difference; the second obtaining module 404 is configured to obtain target service data according to the service identifier and the target time.
In a specific implementation process, the first obtaining module 401 obtains a data export request, where the data export request includes a country identifier and a request time. The country identifier is used to indicate which country data is to be obtained, and each country has a unique identifier, which may be a country code or a unique ID assigned to each country in advance. The request time is used for determining which time of service data is to be acquired, wherein the time zone of the request time is the time zone of the reference country.
The data acquisition device comprises a database, wherein configuration files of a plurality of countries and country identifications corresponding to the configuration files are stored in the database in advance, each country corresponds to one configuration file, and the configuration files comprise service identifications of the corresponding country and time zone differences between the country and a reference country. Therefore, after acquiring the country identifier, the query module 402 may query the database according to the country identifier to obtain a corresponding configuration file, and further acquire the service identifier in the configuration file and the time zone difference from the reference country. The calculation module 403 may calculate the obtained target time based on the requested time and the time zone difference between the country and the reference country. After the target time is obtained through calculation, the second obtaining module 404 obtains corresponding target service data according to the service identifier and the target time.
According to the embodiment of the invention, the corresponding configuration file is searched through the country identification, the target time is calculated according to the time zone difference in the configuration file, the target time and the service identification are obtained, and the corresponding target service data is obtained, wherein the time corresponding to the obtained target service data is the same as the time of the reference country, so that the subsequent unified management of the service data is facilitated.
On the basis of the foregoing embodiment, fig. 5 is a schematic structural diagram of another data acquisition apparatus according to an embodiment of the present invention, and as shown in fig. 5, the data acquisition apparatus includes: the third obtaining module 501, the configuration file generating module 502, the binding module 503, the first obtaining module 504, the querying module 505, the calculating module 506, and the second obtaining module 507, where the first obtaining module 504, the querying module 505, the calculating module 506, and the second obtaining module 507 are respectively the same as the first obtaining module 401, the querying module 402, the calculating module 403, and the second obtaining module 404 in the above embodiments, and are not described herein again.
The third obtaining module 501 is configured to obtain time zone differences between each country and the reference country, and service identifiers corresponding to each country; the configuration file generation module 502 is configured to generate a configuration file according to the time zone difference and the service identifier corresponding to each country; the binding module 503 is configured to bind the configuration file with the country identifier of the corresponding country, and store the configuration file in the database.
In a specific implementation process, when generating a configuration file corresponding to a country, the third obtaining module 501 obtains a time zone difference between the country and a reference country and a service identifier corresponding to a service set in the country, and then the configuration file generating module 502 generates the configuration file corresponding to the country according to the time zone difference and the service identifier. After generating the configuration file, the binding module 503 binds the configuration file with the country identifier of the country and stores the configuration file in the database.
The embodiment of the invention generates the corresponding configuration file according to the time zone difference and the service identification between each country and the reference country, directly generates the corresponding configuration file when the target service data of a certain country needs to be acquired, and can calculate and obtain the target time through the configuration file when the service data corresponding to the country needs to be acquired, and then acquires the data, so that the time of the acquired service data is consistent with that of the reference country, and the subsequent unified management on the service data of a plurality of countries is facilitated.
On the basis of the foregoing embodiment, the second obtaining module is specifically configured to:
generating a Structured Query Language (SQL) file according to the service identifier and the target time;
and inquiring from a database according to the SQL file to obtain the target service data.
In a specific implementation process, after the configuration file is acquired according to the country identifier, the second acquisition module calculates and acquires target time according to the time zone difference in the configuration file, then generates an SQL file according to the service identifier and the target time, and performs data query from the database according to the generated SQL file to acquire corresponding target service data.
According to the embodiment of the invention, the SQL file is generated according to the target time and the service identifier in the configuration file, and the target service data is obtained by querying the SQL file.
On the basis of the foregoing embodiment, the first obtaining module is specifically configured to:
and acquiring the data export request according to the trigger time determined by the time zone difference.
In a specific implementation process, the first obtaining module may obtain the trigger time of the service data of the corresponding country according to the time zone difference configuration in advance, the trigger time is different for each country due to different time zones, and then the data obtaining apparatus may automatically trigger the data export request whenever the trigger time is reached.
On the basis of the above embodiment, the apparatus further includes:
the template configuration module is used for configuring the SQL file template in advance;
the second obtaining module is specifically configured to:
and filling the SQL file template according to the service identifier and the target time to obtain the SQL file.
In a specific implementation process, since SQL logic for acquiring the business data is basically the same, the template configuration module (not shown in fig. 5) may uniformly configure the SQL file template in advance. Therefore, after the second acquisition module acquires the service identifier and the target time, the corresponding fields in the SQL file template are filled, so that an SQL file is formed, and corresponding data can be queried from the database through the SQL file.
According to the embodiment of the invention, the SQL file template is configured in advance, and then is automatically filled after the service identifier and the target time are obtained, so that the rewriting is not required each time, and the efficiency of data query is improved.
The modules may be connected or in communication with each other via a wired or wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, etc., or any combination thereof. The wireless connection may comprise a connection over a LAN, WAN, bluetooth, ZigBee, NFC, or the like, or any combination thereof. Two or more modules may be combined into a single module, and any one module may be divided into two or more units.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail herein. In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the present invention shall be covered thereby. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. A method of data acquisition, comprising:
acquiring a data export request, wherein the data export request comprises a country identifier and request time;
inquiring a corresponding configuration file from a database according to the country identification, wherein the configuration file comprises a service identification of a country corresponding to the country identification and a time zone difference with a reference country;
calculating a target time according to the request time and the time zone difference;
and acquiring target service data according to the service identifier and the target time.
2. The method of claim 1, further comprising:
acquiring time zone differences between each country and the reference country respectively and business identifications corresponding to each country;
generating the configuration file according to the time zone difference and the service identification corresponding to each country;
and binding the configuration file with the country identification of the corresponding country and storing the configuration file in the database.
3. The method of claim 1, wherein the obtaining target service data according to the service identifier and the target time comprises:
generating a Structured Query Language (SQL) file according to the service identifier and the target time;
and inquiring from a database according to the SQL file to obtain the target service data.
4. The method of any of claims 1-3, wherein obtaining the data export request comprises:
and acquiring the data export request according to the trigger time determined by the time zone difference.
5. The method of claim 3, further comprising:
configuring an SQL file template in advance;
the generating of the SQL file according to the service identifier and the target time comprises the following steps:
and filling the SQL file template according to the service identifier and the target time to obtain the SQL file.
6. A data acquisition apparatus, comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a data export request, and the data export request comprises a country identifier and request time;
the query module is used for querying a corresponding configuration file from a database according to the country identification, wherein the configuration file comprises a service identification of a country corresponding to the country identification and a time zone difference between the service identification and a reference country;
a calculation module for calculating a target time according to the request time and the time zone difference;
and the second acquisition module is used for acquiring target service data according to the service identifier and the target time.
7. The apparatus of claim 6, further comprising:
a third obtaining module, configured to obtain time zone differences between each country and the reference country, and a service identifier corresponding to each country;
the configuration file generation module is used for generating configuration files according to the time zone difference and the service identification corresponding to each country;
and the binding module is used for binding the configuration file with the country identification of the corresponding country and storing the configuration file into the database.
8. The apparatus of claim 6, wherein the second obtaining module is specifically configured to:
generating a Structured Query Language (SQL) file according to the service identifier and the target time;
and inquiring from a database according to the SQL file to obtain the target service data.
9. The apparatus according to any one of claims 6 to 8, wherein the first obtaining module is specifically configured to:
and acquiring the data export request according to the trigger time determined by the time zone difference.
10. The apparatus of claim 8, further comprising:
the template configuration module is used for configuring the SQL file template in advance;
the second obtaining module is specifically configured to:
and filling the SQL file template according to the service identifier and the target time to obtain the SQL file.
11. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating via the bus when the electronic device is operating, the processor executing the machine-readable instructions to perform the steps of the method of data acquisition of any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, performs the steps of the method of data acquisition as claimed in any one of the claims 1 to 5.
CN201811554929.3A 2018-12-18 2018-12-18 Data acquisition method and device, electronic equipment and storage medium Active CN111339128B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811554929.3A CN111339128B (en) 2018-12-18 2018-12-18 Data acquisition method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811554929.3A CN111339128B (en) 2018-12-18 2018-12-18 Data acquisition method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111339128A true CN111339128A (en) 2020-06-26
CN111339128B CN111339128B (en) 2023-09-26

Family

ID=71185040

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811554929.3A Active CN111339128B (en) 2018-12-18 2018-12-18 Data acquisition method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111339128B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030093465A1 (en) * 2001-10-31 2003-05-15 International Business Machines Corporation Management strategies for internationalization in a distributed computer environment
CN1482766A (en) * 2002-09-13 2004-03-17 华为技术有限公司 Method for automatic generating of net management report form
CN101046812A (en) * 2006-06-12 2007-10-03 华为技术有限公司 Method of data base table recording structure and detection and its device
CN102110110A (en) * 2009-12-28 2011-06-29 中国移动通信集团公司 Method and device for data access based on SOA (Service-Oriented Architecture)
US20110265061A1 (en) * 2010-04-27 2011-10-27 Verizon Patent And Licensing Inc. Code generation
CN103092959A (en) * 2013-01-18 2013-05-08 中兴通讯股份有限公司 Processing method and device for task time zone
CN104809254A (en) * 2015-05-19 2015-07-29 郑州悉知信息技术有限公司 Data query method and device
CN105138326A (en) * 2015-08-11 2015-12-09 北京思特奇信息技术股份有限公司 Method and system for achieving structured query language (sql) dynamic configuration based on ibatis
CN106487895A (en) * 2016-10-14 2017-03-08 深圳市欧瑞博电子有限公司 Time control method and device
CN106487861A (en) * 2015-09-01 2017-03-08 腾讯科技(北京)有限公司 Network data provides method and apparatus
CN107622091A (en) * 2017-08-23 2018-01-23 阿里巴巴集团控股有限公司 A kind of data base query method and device
CN108052676A (en) * 2017-12-28 2018-05-18 广东金赋科技股份有限公司 The collocation method and device of multi-data source data
CN108121564A (en) * 2017-12-22 2018-06-05 武汉楚鼎信息技术有限公司 A kind of json data Fast synchronization and the method and system device of control
CN108876330A (en) * 2018-06-01 2018-11-23 阿里巴巴集团控股有限公司 Zone day blanking method and device
CN108984723A (en) * 2018-07-10 2018-12-11 阿里巴巴集团控股有限公司 Creation index, data query method, apparatus and computer equipment

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030093465A1 (en) * 2001-10-31 2003-05-15 International Business Machines Corporation Management strategies for internationalization in a distributed computer environment
CN1482766A (en) * 2002-09-13 2004-03-17 华为技术有限公司 Method for automatic generating of net management report form
CN101046812A (en) * 2006-06-12 2007-10-03 华为技术有限公司 Method of data base table recording structure and detection and its device
CN102110110A (en) * 2009-12-28 2011-06-29 中国移动通信集团公司 Method and device for data access based on SOA (Service-Oriented Architecture)
US20110265061A1 (en) * 2010-04-27 2011-10-27 Verizon Patent And Licensing Inc. Code generation
CN103092959A (en) * 2013-01-18 2013-05-08 中兴通讯股份有限公司 Processing method and device for task time zone
CN104809254A (en) * 2015-05-19 2015-07-29 郑州悉知信息技术有限公司 Data query method and device
CN105138326A (en) * 2015-08-11 2015-12-09 北京思特奇信息技术股份有限公司 Method and system for achieving structured query language (sql) dynamic configuration based on ibatis
CN106487861A (en) * 2015-09-01 2017-03-08 腾讯科技(北京)有限公司 Network data provides method and apparatus
CN106487895A (en) * 2016-10-14 2017-03-08 深圳市欧瑞博电子有限公司 Time control method and device
CN107622091A (en) * 2017-08-23 2018-01-23 阿里巴巴集团控股有限公司 A kind of data base query method and device
CN108121564A (en) * 2017-12-22 2018-06-05 武汉楚鼎信息技术有限公司 A kind of json data Fast synchronization and the method and system device of control
CN108052676A (en) * 2017-12-28 2018-05-18 广东金赋科技股份有限公司 The collocation method and device of multi-data source data
CN108876330A (en) * 2018-06-01 2018-11-23 阿里巴巴集团控股有限公司 Zone day blanking method and device
CN108984723A (en) * 2018-07-10 2018-12-11 阿里巴巴集团控股有限公司 Creation index, data query method, apparatus and computer equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
邱杰泓: "驴妈妈旅游网开放平台接口设计与实现", 中国优秀硕士学位论文全文数据库 信息科技辑, vol. 2017, no. 3, pages 138 - 619 *

Also Published As

Publication number Publication date
CN111339128B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
CN108280365B (en) Data access authority management method, device, terminal device and storage medium
US9116899B2 (en) Managing changes to one or more files via linked mapping records
CN108829746B (en) Main data management system and device based on memory database
CN104965735A (en) Apparatus for generating upgrade SQL script
CN112948427B (en) Data query method, device, equipment and storage medium
CN107908521A (en) A kind of monitoring method of container performance on the server performance and node being applied under cloud environment
CN104572975B (en) A kind of real time data processing analysis system
CN104580284A (en) Service assignment device and service assignment method
CN111061766A (en) Business data processing method and device, computer equipment and storage medium
CN106951254B (en) Method and device for multiplexing similar service function modules in payment system
CN105100211A (en) Configuration file obtaining method and device
CN112948723A (en) Interface calling method and device and related equipment
CN111414410A (en) Data processing method, device, equipment and storage medium
CN111090803A (en) Data processing method and device, electronic equipment and storage medium
CN111752723A (en) Visual multi-source service management system and implementation method thereof
CN110109893A (en) The method and apparatus of data modeling and operation
CN104601338A (en) Charging method and device for system
CN104025087A (en) Method and system for data filing systems
CN111339128A (en) Data acquisition method and device, electronic equipment and storage medium
CN108897858A (en) The appraisal procedure and device, electronic equipment of distributed type assemblies index fragment
CN111931965A (en) Vaccination recommendation method and device, electronic equipment and storage medium
CN108153841B (en) Pipe gallery management system based on three-dimensional scene and routing planning method thereof
CN111027093A (en) Access right control method and device, electronic equipment and storage medium
CN106559493B (en) Service issuing method and service delivery system
CN110532311A (en) A kind of distributed data deriving method and system based on queue

Legal Events

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