CN113806416B - Method and device for realizing real-time data service and electronic equipment - Google Patents

Method and device for realizing real-time data service and electronic equipment Download PDF

Info

Publication number
CN113806416B
CN113806416B CN202110270835.9A CN202110270835A CN113806416B CN 113806416 B CN113806416 B CN 113806416B CN 202110270835 A CN202110270835 A CN 202110270835A CN 113806416 B CN113806416 B CN 113806416B
Authority
CN
China
Prior art keywords
real
time data
target
data
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110270835.9A
Other languages
Chinese (zh)
Other versions
CN113806416A (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.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding 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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202110270835.9A priority Critical patent/CN113806416B/en
Publication of CN113806416A publication Critical patent/CN113806416A/en
Application granted granted Critical
Publication of CN113806416B publication Critical patent/CN113806416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2477Temporal data queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/283Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a method and a device for realizing real-time data service and electronic equipment, and belongs to the technical field of computer application. The method for realizing the real-time data service comprises the following steps: receiving a service request of a real-time data service, the service request comprising: real-time data identification and target business scene category; determining a target storage device and a target data warehouse corresponding to the target traffic scene category from among a plurality of storage devices; and acquiring real-time data to which the real-time data identifier belongs from the target storage device by adopting a storage form corresponding to the target data warehouse. Therefore, by the method for realizing the real-time data service, the real-time data analysis requirements and the use requirements of various business scenes can be simultaneously realized, and the universality of the real-time data service is improved.

Description

Method and device for realizing real-time data service and electronic equipment
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a method and an apparatus for implementing a real-time data service, and an electronic device.
Background
With the development of internet technology, business scale and enterprise data asset value of each industry are developed in a explosive and various mode. At present, mass streaming media data such as various file data, video and audio, internet of things data, various database data of a production system and the like are commonly existed in various industry businesses.
In the business decision analysis process, real-time and offline data processing and calculation are needed for the data, so that decision information with high value on enterprise marketing, enterprise operation, enterprise service and the like is extracted through data analysis and data mining summary. However, the existing real-time data warehouse of the enterprise can be realized only based on a certain fixed technical stack, and can only support individual real-time data statistical analysis scenes, so that the universality is poor.
Disclosure of Invention
The method, the device, the electronic equipment and the storage medium for realizing the real-time data service are used for solving the problems that in the related technology, the real-time data warehouse of an enterprise can only be realized based on a certain fixed technical stack, and only can support individual real-time data statistical analysis scenes and the universality is poor.
In one aspect, the implementation method of the real-time data service provided by the embodiment of the application comprises the following steps: receiving a service request for a real-time data service, the service request comprising: real-time data identification and target business scene category; determining a target storage device and a target data warehouse corresponding to the target traffic scene category from among a plurality of storage devices; acquiring real-time data to which the real-time data identifier belongs from the target storage device by adopting a storage form corresponding to the target data warehouse; the target storage device belongs to a plurality of storage devices, the plurality of storage devices respectively have a plurality of corresponding data warehouses, the target data warehouses belong to the plurality of data warehouses, the plurality of data warehouses respectively have a plurality of corresponding business scene categories, and the target business scene categories belong to the plurality of business scene categories.
In another aspect, an implementation apparatus for real-time data service provided by an embodiment of the present application includes: a receiving module, configured to receive a service request of a real-time data service, where the service request includes: real-time data identification and target business scene category; a first determining module, configured to determine a target storage device and a target data warehouse corresponding to the target traffic scene category from among a plurality of storage devices; the first acquisition module is used for acquiring real-time data of the real-time data identifier from the target storage device by adopting a storage form corresponding to the target data warehouse; the target storage device belongs to a plurality of storage devices, the plurality of storage devices respectively have a plurality of corresponding data warehouses, the target data warehouses belong to the plurality of data warehouses, the plurality of data warehouses respectively have a plurality of corresponding business scene categories, and the target business scene categories belong to the plurality of business scene categories.
In another aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of implementing a real-time data service as described above when executing the program.
In a further aspect, the embodiment of the present application provides a computer readable storage medium, on which a computer program is stored, where the program is executed by a processor to implement a method for implementing a real-time data service as described above.
The method, the device, the electronic equipment and the computer readable storage medium for realizing the real-time data service provided by the embodiment of the application are characterized in that the real-time data belonging to the real-time data identifier is obtained from the target storage device by receiving the service request of the real-time data service comprising the real-time data identifier and the target business scene category, determining the target storage device and the target data warehouse corresponding to the target business scene category from a plurality of storage devices, and further adopting the storage form corresponding to the target data warehouse. Therefore, the data architecture comprising the storage device and the data warehouse corresponding to each business scene is pre-established to store the real-time data required by each business scene, so that the real-time data analysis requirement and the use requirement of various business scenes can be simultaneously realized, and the universality of real-time data service is improved.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
fig. 1 is a flow chart of a method for implementing a real-time data service according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a real-time data warehouse technology architecture according to an embodiment of the present application;
FIG. 3 is a flow chart illustrating another implementation method of a real-time data service according to an embodiment of the present application;
FIG. 4 is a flow chart illustrating a method for implementing a real-time data service according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an implementation apparatus for real-time data service according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the like or similar elements throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present application and should not be construed as limiting the application.
Aiming at the problems of poor universality and poor generality of an individual real-time data statistical analysis scene, the embodiment of the application provides a real-time data service realization method, wherein the real-time data warehouse of an enterprise can only be realized based on a certain fixed technical stack.
The method for realizing the real-time data service provided by the embodiment of the application receives the service request of the real-time data service comprising the real-time data identifier and the target business scene category, determines the target storage device and the target data warehouse corresponding to the target business scene category from a plurality of storage devices, and further acquires the real-time data to which the real-time data identifier belongs from the target storage devices in a storage form corresponding to the target data warehouse. Therefore, the data architecture comprising the storage device and the data warehouse corresponding to each business scene is pre-established to store the real-time data required by each business scene, so that the real-time data analysis requirement and the use requirement of various business scenes can be simultaneously realized, and the universality of real-time data service is improved.
The implementation method, the device, the electronic equipment, the storage medium and the computer program for the real-time data service provided by the application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a method for implementing a real-time data service according to an embodiment of the present application.
As shown in fig. 1, the implementation method of the real-time data service includes the following steps:
Step 101, receiving a service request of a real-time data service, wherein the service request comprises: real-time data identification and target traffic scenario categories.
It should be noted that, the implementation method of the real-time data service according to the embodiment of the present application may be executed by the implementation device of the real-time data service according to the embodiment of the present application. The implementation device of the real-time data service in the embodiment of the application can be configured in any electronic equipment to execute the implementation method of the real-time data service in the embodiment of the application.
For example, the implementation device of the real-time data service in the embodiment of the present application may be configured in a server corresponding to the e-commerce service, so that when the client needs the real-time data service, a service request of the real-time data service may be sent to the server, so that the server provides the real-time data service to the client.
The service request of the real-time data service may be sent to the server by the user according to the actual service requirement, or may be automatically triggered by the server according to a preset rule.
For example, when the user needs to perform the ad hoc query on the real-time data, the user may set the real-time data to be queried through the client and send an ad hoc query request to the server, so that the client may determine the real-time data identifier according to the real-time data to be queried set by the user, determine the ad hoc query as the target traffic scene category, and further generate a service request of the real-time data service according to the real-time data identifier and the target traffic scene category and send the service request to the server. For another example, the user may preset a preset rule in the server for triggering the service request of the real-time data service, for example, the preset rule may be "perform user behavior analysis with a preset frequency", so that the server may determine each preset time according to the preset frequency, automatically trigger the service request of the real-time data server when each preset time arrives, determine an identifier of real-time data required for performing user behavior analysis at the preset time as a real-time data identifier, and determine user behavior analysis as a target traffic scenario category.
The service scene categories may include scene categories such as real-time data consumption and real-time service application. The real-time data consumption can comprise business scene categories such as marketing real-time war report/large screen, running real-time data index analysis, impromptu inquiry, online analysis processing (Online Analytical Processing, OLAP), business intelligence (Business Intelligence, BI) report and the like; the real-time business applications may include business scenario categories such as real-time data visualization, search recommendations, user behavior analysis, and the like.
In the embodiment of the application, when receiving the service request of the real-time data service, the server can analyze the service request of the real-time data service to determine the real-time data identifier and the target service scene category included in the service request.
Step 102, determining a target storage device and a target data warehouse corresponding to the target business scenario category from among a plurality of storage devices.
The target storage device belongs to a plurality of storage devices, the plurality of storage devices are respectively provided with a plurality of corresponding data warehouses, the target data warehouses belong to a plurality of data warehouses, the plurality of data warehouses are respectively provided with a plurality of corresponding business scene categories, and the target business scene categories belong to a plurality of business scene categories.
In the embodiment of the application, a data architecture comprising a plurality of storage devices and a plurality of data warehouses can be constructed in advance and used for storing real-time data in a business system, and different storage devices and different data warehouses can be used for storing real-time data corresponding to different business scene categories so as to simultaneously support real-time data services of a plurality of business scenes and promote the universality of the real-time data services.
As a possible implementation manner, after the data architecture for storing real-time data is constructed, according to the characteristics of each storage device and each data warehouse contained in the data architecture, the service scene category applicable to each storage device and each data warehouse is determined, and the mapping relationship between the storage device and the data warehouse and the mapping relationship between the storage device and the service scene category are established. Therefore, after the target service scene category is determined, the storage device corresponding to the target service scene category can be determined as the target storage device according to the mapping relation between the storage device and the service scene category, and then the data warehouse corresponding to the target storage device can be determined as the target data warehouse according to the mapping relation between the storage device and the data warehouse.
For example, as shown in the real-time data warehouse technical architecture of fig. 2, assuming that the target traffic scenario type is real-time consumption, it may be determined that the target storage device is Kafka, and the target data warehouse is Ridm and Rsdm.
And step 103, acquiring real-time data of the real-time data identifier from the target storage device by adopting a storage form corresponding to the target data warehouse.
In the embodiment of the application, before the acquired real-time data is stored in the storage device, the real-time data can be operated through the data warehouse corresponding to the storage device to determine the storage form of the real-time data in the storage device, and the storage forms of the real-time data by different storage devices can be different to adapt to the requirements of different business scenes. Thus, after the target storage device and the target data warehouse are determined, the real-time data corresponding to the real-time data identifier can be acquired from the target storage device according to the storage form corresponding to the target data warehouse.
For example, if the storage format corresponding to the target data warehouse is row-wise storage, that is, the target storage device may store real-time data with the real-time data identifier as an index, and store one piece of real-time data in each row. Therefore, each row of data corresponding to each real-time data identifier in the target storage device can be determined to be the real-time data to be acquired according to the real-time data identifier contained in the service request.
For another example, if the storage format corresponding to the target data warehouse is stored in columns, that is, the target storage device may store real-time data with the real-time data identifier as an index, and each column stores one piece of real-time data. Therefore, each column of data corresponding to each real-time data identifier in the target storage device can be determined to be the real-time data to be acquired according to the real-time data identifier contained in the service request.
The method for realizing the real-time data service provided by the embodiment of the application receives the service request of the real-time data service comprising the real-time data identifier and the target business scene category, determines the target storage device and the target data warehouse corresponding to the target business scene category from a plurality of storage devices, and further acquires the real-time data to which the real-time data identifier belongs from the target storage devices in a storage form corresponding to the target data warehouse. Therefore, the data architecture comprising the storage device and the data warehouse corresponding to each business scene is pre-established to store the real-time data required by each business scene, so that the real-time data analysis requirement and the use requirement of various business scenes can be simultaneously realized, and the universality of real-time data service is improved.
In one possible implementation of the present application, real-time data may be obtained from log files and messages of the system and stored in various storage devices.
The implementation method of the real-time data service provided by the embodiment of the application is further described below with reference to fig. 3.
Fig. 3 is a flow chart of another implementation method of real-time data service according to an embodiment of the present application.
As shown in fig. 3, the implementation method of the real-time data service includes the following steps:
step 201, respectively obtaining a plurality of corresponding real-time database logs and/or a plurality of real-time database messages from a plurality of production system data sources.
In the embodiment of the application, the implementation method of the real-time data service of the embodiment of the application can be applied to any production system, so that a plurality of production systems can be used as data sources, and at least one of the real-time database log and the real-time database message can be respectively acquired from the plurality of production system data sources so as to acquire real-time data from the real-time database log and the real-time database message. As one example, a real-time database log may be obtained from a binary log file of a production system data source, and a real-time database message may be obtained from a message queue of the production system data source.
Step 202, analyzing the plurality of real-time database logs and/or the plurality of real-time database messages to obtain a plurality of corresponding real-time data and real-time data identifiers corresponding to the plurality of real-time data.
In the embodiment of the application, a large amount of real-time data can be included in the real-time database logs and the real-time database messages, so that analysis processing can be performed on the plurality of real-time database logs and/or the plurality of real-time database messages to determine the plurality of real-time data included in each real-time database log and the corresponding real-time data identifiers thereof, and determine the plurality of real-time data included in each real-time database message and the corresponding real-time data identifiers thereof.
In step 203, the plurality of real-time data are written into the corresponding plurality of real-time data streams, respectively.
In the embodiment of the application, the real-time data is required to be respectively stored in the plurality of storage devices, so that the plurality of real-time data can be respectively written into the plurality of real-time data streams, each real-time data stream contains the whole real-time data, and the plurality of real-time data are respectively stored into different storage devices through each real-time data stream.
And 204, respectively writing the real-time data in the plurality of real-time data streams into a plurality of corresponding storage devices, and marking the stored real-time data by adopting the real-time data identification mark and the real-time data corresponding to the stored real-time data.
In the embodiment of the application, since each real-time data stream contains the full real-time data, the real-time data in each real-time data stream can be respectively stored in different storage devices, and the stored real-time data is marked by adopting the real-time data identification corresponding to the real-time data.
Further, before the real-time data is stored in the storage device, the real-time data can be calculated according to the data warehouse corresponding to the storage device and then stored in the storage device, so as to generate the real-time data suitable for the business scene corresponding to the storage device. That is, in one possible implementation manner of the embodiment of the present application, the step 204 may include:
acquiring a plurality of service scene categories;
determining a plurality of data warehouses corresponding to the business scene categories respectively, wherein the data warehouses are provided with a plurality of corresponding storage devices and a plurality of corresponding data operation modes respectively;
and respectively carrying out operation processing on the real-time data by adopting a plurality of data operation modes to obtain a plurality of real-time data warehouse models respectively corresponding to the plurality of data operation modes, wherein the real-time data warehouse models at least comprise: real-time data, and an operation result obtained by operating the real-time data;
And respectively storing the plurality of real-time data warehouse models into a plurality of corresponding storage devices, wherein the service scene categories associated with the real-time data warehouse models and the corresponding storage devices are the same.
In the embodiment of the application, the data warehouse corresponding to a plurality of business scenes, namely the data warehouse corresponding to a plurality of storage devices, can have a plurality of corresponding data operation modes, so that the data warehouse can respectively carry out operation processing on real-time data by adopting the plurality of operation modes to obtain the real-time data warehouse models respectively corresponding to the plurality of storage devices corresponding to the data warehouse, and further, each real-time data warehouse model is divided into the storage devices corresponding to the storage values.
Further, different storage devices may have different storage forms, so that the real-time data warehouse model may be stored in the storage devices according to the storage form corresponding to each storage device. That is, in one possible implementation manner of the embodiment of the present application, the plurality of data warehouses respectively have a plurality of corresponding storage forms; correspondingly, the storing the plurality of real-time data warehouse models in the corresponding plurality of storage devices respectively includes:
And respectively storing the real-time data warehouse models into a plurality of corresponding storage devices according to the storage form.
In the embodiment of the application, when the data warehouse corresponds to a plurality of storage devices, the data warehouse can have a plurality of corresponding storage forms, so that after a plurality of real-time data warehouse models are generated, each real-time data warehouse model can be respectively stored into the corresponding storage device according to the corresponding storage form of each storage device.
Step 205, receiving a service request of a real-time data service, wherein the service request includes: real-time data identification and target traffic scenario categories.
At step 206, a target storage device and a target data repository corresponding to the target traffic scenario category are determined from among the plurality of storage devices.
In step 207, the real-time data to which the real-time data identifier belongs is acquired from the target storage device in a storage form corresponding to the target data warehouse.
The specific implementation and principles of the steps 205-207 may refer to the detailed description of the embodiments, and are not repeated here.
The method for realizing the real-time data service provided by the embodiment of the application receives the service request of the real-time data service comprising the real-time data identifier and the target business scene category, determines the target storage device and the target data warehouse corresponding to the target business scene category from a plurality of storage devices, and further acquires the real-time data to which the real-time data identifier belongs from the target storage devices in a storage form corresponding to the target data warehouse. Therefore, the data architecture comprising the storage device and the data warehouse corresponding to each business scene is pre-established to store the real-time data required by each business scene, so that the real-time data analysis requirement and the use requirement of various business scenes can be simultaneously realized, and the universality of real-time data service is improved.
In one possible implementation form of the present application, different real-time data may have different data magnitudes, so that according to the data magnitudes of the real-time data, different data processing modes may be used to process the real-time data of different data magnitudes respectively.
The implementation method of the real-time data service provided by the embodiment of the application is further described below with reference to fig. 4.
Fig. 4 is a flow chart of a method for implementing a real-time data service according to an embodiment of the present application.
As shown in fig. 4, the implementation method of the real-time data service includes the following steps:
step 301, respectively obtaining a plurality of corresponding real-time database logs and/or a plurality of real-time database messages from a plurality of production system data sources.
Step 302, parsing the plurality of real-time database logs and/or the plurality of real-time database messages to obtain a plurality of corresponding real-time data and real-time data identifiers corresponding thereto.
In step 303, the plurality of real-time data are written into the corresponding plurality of real-time data streams, respectively.
The specific implementation process and principle of the above steps 301 to 303 may refer to the detailed description of the above embodiments, which is not repeated here.
In step 304, a destination address corresponding to each of the plurality of real-time data streams is determined, the destination address corresponding to a server in the stream processing platform.
In the embodiment of the application, different real-time data may have different data magnitudes, so that the real-time data with different data magnitudes can be respectively processed by adopting different data processing modes according to the data magnitudes of the real-time data. Therefore, the target address corresponding to the real-time data can be determined according to the data magnitude of the real-time data.
As a possible implementation manner, different data processing manners can be adopted to respectively process real-time data with large data volume and real-time data with medium and small data volume, so that a data magnitude threshold can be preset, and when the data magnitude of the real-time data stream is smaller than the data magnitude threshold, the address of a server in a stream processing platform for processing the real-time data with medium and small data volume is determined as a target address corresponding to the real-time data stream; when the data magnitude of the real-time data stream is greater than or equal to a data magnitude threshold, determining the address of a server in a stream processing platform for processing large data magnitude real-time data as a target address corresponding to the real-time data stream.
For example, as shown in fig. 2, the real-time data processing calculation of the medium and small data volume level may be processed by using the kafka+flink technique of the upper half of fig. 2; the large data volume level real-time data manipulation calculations may be processed using the kafka+clickhouse technique in the bottom half of fig. 2.
In step 305, protocol conversion is performed on each of the plurality of real-time data streams according to the data transmission protocol of the stream processing platform.
In the embodiment of the present application, the stream processing platform may specifically use a specific data transmission protocol, such as Kafka, so that when the data transmission protocol of the stream processing platform is different from the data transmission protocol of the real-time data stream, protocol conversion may be performed on the multiple real-time data streams, so that the multiple real-time data streams may be issued to the stream processing platform.
And 306, synchronizing the multiple real-time data streams after protocol conversion to a server corresponding to the target address by adopting a data transmission protocol.
In the embodiment of the application, after the protocol conversion is carried out on the plurality of real-time data streams, the data transmission protocol of the stream data platform can be adopted to respectively synchronize the plurality of real-time data streams after the protocol conversion to the servers corresponding to the target addresses.
Further, after determining the target address corresponding to the real-time data stream, it may also be determined whether the server corresponding to the target address is in an available state, so as to ensure the reliability of real-time data stream processing. That is, in a possible implementation manner of the embodiment of the present application, after the step 304, the method may further include:
Checking connectivity of the target address;
accordingly, the step 306 may further include:
and if the connectivity check is passed, synchronizing the plurality of real-time data streams after protocol conversion to a server corresponding to the target address.
As a possible implementation manner, after determining the target address corresponding to the real-time data stream, connectivity of the target address may also be checked, so as to synchronize the real-time data stream to the server corresponding to the target address when the server corresponding to the target address is available. Therefore, when the connectivity test of the target address is passed, the availability of the server corresponding to the target address can be determined, and the real-time data stream after protocol conversion can be synchronized to the server corresponding to the target address.
In step 307, the real-time data in the plurality of real-time data streams are written into the corresponding plurality of storage devices, and the stored real-time data is marked by the real-time data identifier, and the real-time data is corresponding to the stored real-time data.
Step 308, receiving a service request of the real-time data service, wherein the service request includes: real-time data identification and target traffic scenario categories.
In step 309, a target storage device and a target data repository corresponding to the target traffic scenario category are determined from among the plurality of storage devices.
In step 310, the real-time data to which the real-time data identifier belongs is obtained from the target storage device in a storage form corresponding to the target data warehouse.
The specific implementation and principles of the steps 307-310 may refer to the detailed description of the embodiments, which is not repeated here.
As a possible implementation manner, different real-time data may have different data magnitudes, so that according to the data magnitudes of the real-time data, different data processing flows can be adopted to respectively process the real-time data with different data magnitudes. Therefore, the real-time data can be written into the real-time data streams according to the data magnitude of the real-time data, so that the real-time data can be processed in different data processing modes.
The method for realizing the real-time data service provided by the embodiment of the application receives the service request of the real-time data service comprising the real-time data identifier and the target business scene category, determines the target storage device and the target data warehouse corresponding to the target business scene category from a plurality of storage devices, and further acquires the real-time data to which the real-time data identifier belongs from the target storage devices in a storage form corresponding to the target data warehouse. Therefore, the data architecture comprising the storage device and the data warehouse corresponding to each business scene is pre-established to store the real-time data required by each business scene, so that the real-time data analysis requirement and the use requirement of various business scenes can be simultaneously realized, and the universality of real-time data service is improved.
In order to implement the above embodiment, the present application further provides an implementation device for real-time data service.
Fig. 5 is a schematic structural diagram of an implementation apparatus for real-time data service according to an embodiment of the present application.
As shown in fig. 5, the apparatus 40 for implementing a real-time data service includes:
the receiving module 41 is configured to receive a service request of a real-time data service, where the service request includes: real-time data identification and target business scene category;
a first determining module 42 for determining a target storage device and a target data warehouse corresponding to a target traffic scene category from among a plurality of storage devices; and
a first obtaining module 43, configured to obtain, from among the target storage devices, real-time data to which the real-time data identifier belongs, in a storage form corresponding to the target data warehouse;
the target storage device belongs to a plurality of storage devices, the plurality of storage devices are respectively provided with a plurality of corresponding data warehouses, the target data warehouses belong to a plurality of data warehouses, the plurality of data warehouses are respectively provided with a plurality of corresponding business scene categories, and the target business scene categories belong to a plurality of business scene categories.
In practical use, the implementation device of the real-time data service provided by the embodiment of the application can be configured in any electronic equipment to execute the implementation method of the real-time data service.
The device for realizing the real-time data service provided by the embodiment of the application receives the service request of the real-time data service comprising the real-time data identifier and the target business scene category, determines the target storage device and the target data warehouse corresponding to the target business scene category from a plurality of storage devices, and further acquires the real-time data to which the real-time data identifier belongs from the target storage devices in a storage form corresponding to the target data warehouse. Therefore, the data architecture comprising the storage device and the data warehouse corresponding to each business scene is pre-established to store the real-time data required by each business scene, so that the real-time data analysis requirement and the use requirement of various business scenes can be simultaneously realized, and the universality of real-time data service is improved.
In one possible implementation form of the present application, the implementation apparatus 40 for real-time data service further includes:
the second acquisition module is used for respectively acquiring a plurality of corresponding real-time database logs and/or a plurality of real-time database messages from a plurality of production system data sources;
the analysis module is used for analyzing the plurality of real-time database logs and/or the plurality of real-time database messages to obtain a plurality of corresponding real-time data and real-time data identifiers corresponding to the real-time data;
The first writing module is used for writing a plurality of real-time data into a plurality of corresponding real-time data streams respectively; and
and the second writing module is used for writing the real-time data in the plurality of real-time data streams into the corresponding plurality of storage devices respectively, and marking the stored real-time data by adopting the real-time data identification mark and the real-time data corresponding to the stored real-time data identification mark.
Further, in another possible implementation manner of the present application, the second writing module includes:
an acquisition unit, configured to acquire a plurality of service scenario categories;
the determining unit is used for determining a plurality of data warehouses corresponding to the business scene categories respectively, wherein the data warehouses are provided with a plurality of corresponding storage devices and a plurality of corresponding data operation modes respectively;
the computing unit is used for respectively performing computing processing on the real-time data by adopting a plurality of data computing modes so as to obtain a plurality of real-time data warehouse models respectively corresponding to the plurality of data computing modes, wherein the real-time data warehouse models at least comprise: real-time data, and an operation result obtained by operating the real-time data;
and the storage unit is used for respectively storing the plurality of real-time data warehouse models into the corresponding plurality of storage devices, wherein the service scene categories associated with the real-time data warehouse models and the corresponding storage devices are the same.
Further, in still another possible implementation form of the present application, the plurality of data warehouses each have a corresponding plurality of storage forms; correspondingly, the storage unit is specifically used for:
and respectively storing the real-time data warehouse models into a plurality of corresponding storage devices according to the storage form.
Further, in still another possible implementation form of the present application, the implementation apparatus 40 of a real-time data service further includes:
the second determining module is used for determining target addresses respectively corresponding to the plurality of real-time data streams, and the target addresses correspond to the servers in the stream processing platform;
the protocol conversion module is used for respectively carrying out protocol conversion on a plurality of real-time data streams according to the data transmission protocol of the stream processing platform; and
and the synchronization module is used for synchronizing the plurality of real-time data streams converted by the protocol to the server corresponding to the target address by adopting the data transmission protocol.
Further, in still another possible implementation form of the present application, the implementation apparatus 40 of a real-time data service further includes:
the checking module is used for checking the connectivity of the target address;
correspondingly, the synchronization module comprises:
And the synchronization unit is used for synchronizing the plurality of real-time data streams after protocol conversion to the server corresponding to the target address when the connectivity test is passed.
It should be noted that the foregoing explanation of the embodiment of the implementation method of the real-time data service shown in fig. 1, 3 and 4 is also applicable to the implementation device 40 of the real-time data service of this embodiment, and will not be repeated here.
The device for realizing the real-time data service provided by the embodiment of the application receives the service request of the real-time data service comprising the real-time data identifier and the target business scene category, determines the target storage device and the target data warehouse corresponding to the target business scene category from a plurality of storage devices, and further acquires the real-time data to which the real-time data identifier belongs from the target storage devices in a storage form corresponding to the target data warehouse. Therefore, the data architecture comprising the storage device and the data warehouse corresponding to each business scene is pre-established to store the real-time data required by each business scene, so that the real-time data analysis requirement and the use requirement of various business scenes can be simultaneously realized, and the universality of real-time data service is improved.
In order to achieve the above embodiment, the present application further provides an electronic device.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
As shown in fig. 6, the electronic device 200 includes:
the memory 210 and the processor 220, the bus 230 connecting different components (including the memory 210 and the processor 220), the memory 210 stores a computer program, and the processor 220 implements the implementation method of the real-time data service according to the embodiment of the present application when executing the program.
Bus 230 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 200 typically includes a variety of electronic device readable media. Such media can be any available media that is accessible by electronic device 200 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 210 may also include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 240 and/or cache memory 250. The electronic device 200 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 260 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, commonly referred to as a "hard disk drive"). Although not shown in fig. 6, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 230 via one or more data medium interfaces. Memory 210 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the application.
Program/utility 280 having a set (at least one) of program modules 270 may be stored in, for example, memory 210, such program modules 270 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 270 generally perform the functions and/or methods of the embodiments described herein.
The electronic device 200 may also communicate with one or more external devices 290 (e.g., keyboard, pointing device, display 291, etc.), one or more devices that enable a user to interact with the electronic device 200, and/or any device (e.g., network card, modem, etc.) that enables the electronic device 200 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 292. Also, electronic device 200 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 293. As shown, network adapter 293 communicates with other modules of electronic device 200 over bus 230. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 200, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processor 220 executes various functional applications and data processing by running programs stored in the memory 210.
It should be noted that, the implementation process and the technical principle of the electronic device in this embodiment refer to the foregoing explanation of the implementation method of the real-time data service in this embodiment of the present application, and are not repeated here.
The electronic device provided by the embodiment of the application can execute the implementation method of the real-time data service, receives the service request of the real-time data service comprising the real-time data identifier and the target business scene category, determines the target storage device and the target data warehouse corresponding to the target business scene category from among a plurality of storage devices, and further acquires the real-time data belonging to the real-time data identifier from the target storage device by adopting the storage form corresponding to the target data warehouse. Therefore, the data architecture comprising the storage device and the data warehouse corresponding to each business scene is pre-established to store the real-time data required by each business scene, so that the real-time data analysis requirement and the use requirement of various business scenes can be simultaneously realized, and the universality of real-time data service is improved.
In order to implement the above embodiments, the present application also proposes a computer-readable storage medium.
The computer readable storage medium stores a computer program, which when executed by a processor, implements the method for implementing real-time data services according to the embodiment of the present application.
In order to implement the above embodiments, an embodiment of the present application provides a computer program, which when executed by a processor, implements a method for implementing a real-time data service according to an embodiment of the present application.
In alternative implementations, the present embodiments may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the consumer electronic device, partly on the consumer electronic device, as a stand-alone software package, partly on the consumer electronic device and partly on the remote electronic device or entirely on the remote electronic device or server. In the case of remote electronic devices, the remote electronic device may be connected to the consumer electronic device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external electronic device (e.g., connected through the internet using an internet service provider).
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (10)

1. A method for implementing a real-time data service, the method comprising:
receiving a service request for a real-time data service, the service request comprising: real-time data identification and target business scene category;
determining a target storage device and a target data warehouse corresponding to the target traffic scene category from among a plurality of storage devices; and
acquiring real-time data to which the real-time data identifier belongs from the target storage device by adopting a storage form corresponding to the target data warehouse;
The target storage device belongs to a plurality of storage devices, the plurality of storage devices respectively have a plurality of corresponding data warehouses, the target data warehouses belong to the plurality of data warehouses, the plurality of data warehouses respectively have a plurality of corresponding business scene categories, and the target business scene categories belong to the plurality of business scene categories.
2. The method of claim 1, further comprising, prior to said receiving a service request for a real-time data service:
respectively acquiring a plurality of corresponding real-time database logs and/or a plurality of real-time database messages from a plurality of production system data sources;
analyzing the real-time database logs and/or the real-time database messages to obtain corresponding real-time data and real-time data identifiers corresponding to the real-time data;
writing the real-time data into corresponding real-time data streams respectively; and
and respectively writing the real-time data in the plurality of real-time data streams into a plurality of corresponding storage devices, and marking the stored real-time data by adopting the real-time data identification.
3. The method of claim 2, wherein writing real-time data in the plurality of real-time data streams into the corresponding plurality of storage devices, respectively, comprises:
Acquiring the plurality of service scene categories;
determining a plurality of data warehouses corresponding to the business scene categories respectively, wherein the data warehouses are provided with a plurality of corresponding storage devices and a plurality of corresponding data operation modes respectively;
and respectively carrying out operation processing on the real-time data by adopting the multiple data operation modes to obtain multiple real-time data warehouse models respectively corresponding to the multiple data operation modes, wherein the real-time data warehouse models at least comprise: the real-time data and an operation result obtained by operating the real-time data;
and respectively storing the plurality of real-time data warehouse models into a plurality of corresponding storage devices, wherein the service scene categories associated with the real-time data warehouse models and the corresponding storage devices are the same.
4. The method of claim 3, wherein the plurality of data warehouses each have a corresponding plurality of storage forms, and wherein storing the plurality of real-time data warehouse models into the corresponding plurality of storage devices each comprises:
and respectively storing the plurality of real-time data warehouse models into a plurality of corresponding storage devices according to the storage form.
5. The method of claim 2, further comprising, after said writing said plurality of real-time data into a corresponding plurality of real-time data streams, respectively:
determining target addresses respectively corresponding to the plurality of real-time data streams, wherein the target addresses correspond to servers in a stream processing platform;
according to the data transmission protocol of the stream processing platform, respectively carrying out protocol conversion on the plurality of real-time data streams; and
and synchronizing the plurality of real-time data streams after protocol conversion to the server corresponding to the target address by adopting the data transmission protocol.
6. The method of claim 5, further comprising, after said determining the destination addresses corresponding to the plurality of real-time data streams, respectively:
checking connectivity of the target address;
the step of synchronizing the plurality of real-time data streams after protocol conversion to the server corresponding to the target address comprises the following steps:
and if the connectivity check is passed, synchronizing the plurality of real-time data streams after protocol conversion to a server corresponding to the target address.
7. An apparatus for implementing a real-time data service, the apparatus comprising:
A receiving module, configured to receive a service request of a real-time data service, where the service request includes: real-time data identification and target business scene category;
a first determining module, configured to determine a target storage device and a target data warehouse corresponding to the target traffic scene category from among a plurality of storage devices; and
the first acquisition module is used for acquiring real-time data of the real-time data identifier from the target storage device by adopting a storage form corresponding to the target data warehouse;
the target storage device belongs to a plurality of storage devices, the plurality of storage devices respectively have a plurality of corresponding data warehouses, the target data warehouses belong to the plurality of data warehouses, the plurality of data warehouses respectively have a plurality of corresponding business scene categories, and the target business scene categories belong to the plurality of business scene categories.
8. The apparatus of claim 7, wherein the apparatus further comprises:
the second acquisition module is used for respectively acquiring a plurality of corresponding real-time database logs and/or a plurality of real-time database messages from a plurality of production system data sources;
the analysis module is used for analyzing the real-time database logs and/or the real-time database messages to obtain corresponding real-time data and real-time data identifiers corresponding to the real-time data;
The first writing module is used for writing the real-time data into the corresponding real-time data streams respectively; and
and the second writing module is used for writing the real-time data in the real-time data streams into the corresponding storage devices respectively, and marking the stored real-time data by adopting the real-time data identification mark.
9. An electronic device, comprising: memory, a processor and a program stored on the memory and executable on the processor, characterized in that the processor implements the method of implementing a real-time data service according to any of claims 1-6 when executing the program.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a method of implementing a real-time data service according to any of claims 1-6.
CN202110270835.9A 2021-03-12 2021-03-12 Method and device for realizing real-time data service and electronic equipment Active CN113806416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110270835.9A CN113806416B (en) 2021-03-12 2021-03-12 Method and device for realizing real-time data service and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110270835.9A CN113806416B (en) 2021-03-12 2021-03-12 Method and device for realizing real-time data service and electronic equipment

Publications (2)

Publication Number Publication Date
CN113806416A CN113806416A (en) 2021-12-17
CN113806416B true CN113806416B (en) 2023-11-03

Family

ID=78892907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110270835.9A Active CN113806416B (en) 2021-03-12 2021-03-12 Method and device for realizing real-time data service and electronic equipment

Country Status (1)

Country Link
CN (1) CN113806416B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110851539A (en) * 2019-10-25 2020-02-28 东软集团股份有限公司 Metadata verification method and device, readable storage medium and electronic equipment
CN111538774A (en) * 2020-04-23 2020-08-14 上海携程商务有限公司 Data storage and display method, system, equipment and storage medium
CN111651510A (en) * 2020-05-14 2020-09-11 拉扎斯网络科技(上海)有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN111680108A (en) * 2019-03-11 2020-09-18 杭州海康威视数字技术股份有限公司 Data storage method and device and data acquisition method and device
CN112000636A (en) * 2020-08-31 2020-11-27 民生科技有限责任公司 User behavior statistical analysis method based on Flink streaming processing
CN112232962A (en) * 2020-11-19 2021-01-15 深圳前海微众银行股份有限公司 Transaction index processing method, device and equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9747420B2 (en) * 2005-10-26 2017-08-29 Cortica, Ltd. System and method for diagnosing a patient based on an analysis of multimedia content
US11449952B2 (en) * 2012-10-01 2022-09-20 Oracle International Corporation Efficiently modeling database scenarios for later use on live data
US20150120642A1 (en) * 2013-10-28 2015-04-30 Alex Gruener Realtime snapshot indices
US11036752B2 (en) * 2015-07-06 2021-06-15 Oracle International Corporation Optimizing incremental loading of warehouse data
US20170061501A1 (en) * 2015-09-01 2017-03-02 King.Com Limited Method and system for predicting data warehouse capacity using sample data
US11017176B2 (en) * 2019-03-15 2021-05-25 ContactEngine Limited Omnichannel data communications system using artificial intelligence (AI) based machine learning and predictive analysis
US11966870B2 (en) * 2019-04-18 2024-04-23 Oracle International Corporation System and method for determination of recommendations and alerts in an analytics environment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111680108A (en) * 2019-03-11 2020-09-18 杭州海康威视数字技术股份有限公司 Data storage method and device and data acquisition method and device
CN110851539A (en) * 2019-10-25 2020-02-28 东软集团股份有限公司 Metadata verification method and device, readable storage medium and electronic equipment
CN111538774A (en) * 2020-04-23 2020-08-14 上海携程商务有限公司 Data storage and display method, system, equipment and storage medium
CN111651510A (en) * 2020-05-14 2020-09-11 拉扎斯网络科技(上海)有限公司 Data processing method and device, electronic equipment and computer readable storage medium
CN112000636A (en) * 2020-08-31 2020-11-27 民生科技有限责任公司 User behavior statistical analysis method based on Flink streaming processing
CN112232962A (en) * 2020-11-19 2021-01-15 深圳前海微众银行股份有限公司 Transaction index processing method, device and equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
铁路数据服务平台综合管理驾驶舱的设计与实现;刘敏;马小宁;戚小玉;刘彦军;武威;;铁路计算机应用(第01期) *

Also Published As

Publication number Publication date
CN113806416A (en) 2021-12-17

Similar Documents

Publication Publication Date Title
US10560465B2 (en) Real time anomaly detection for data streams
CN108563768B (en) Data conversion method, device, equipment and storage medium for different data models
CN111709527A (en) Operation and maintenance knowledge map library establishing method, device, equipment and storage medium
CN111813804B (en) Data query method and device, electronic equipment and storage medium
CN111796978B (en) Interface detection method, device, system, equipment and storage medium
CN112769802B (en) Access verification method and device based on server, electronic equipment and storage medium
CN109672722B (en) Data deployment method and device, computer storage medium and electronic equipment
CN111507439A (en) User information checking method and system based on information code
CN111694866A (en) Data searching and storing method, data searching system, data searching device, data searching equipment and data searching medium
CN111061740A (en) Data synchronization method, equipment and storage medium
CN111949509A (en) Application software response time testing method, device, equipment and storage medium
CN116069838A (en) Data processing method, device, computer equipment and storage medium
US20160283522A1 (en) Matching untagged data sources to untagged data analysis applications
CN113806416B (en) Method and device for realizing real-time data service and electronic equipment
CN111930385A (en) Data acquisition method, device, equipment and storage medium
CN115022201B (en) Data processing function test method, device, equipment and storage medium
CN112131611B (en) Data correctness verification method, device, equipment, system and storage medium
CN110753136B (en) Domain name resolution method, device, equipment and storage medium
CN114297495A (en) Service data searching method and device, electronic equipment and storage medium
CN113806556A (en) Method, device, equipment and medium for constructing knowledge graph based on power grid data
CN113535318A (en) Information reply method and device, storage medium and electronic equipment
CN115373831A (en) Data processing method, device and computer readable storage medium
CN113760920A (en) Data synchronization method and device, electronic equipment and storage medium
CN111262727A (en) Service capacity expansion method, device, equipment and storage medium
CN111966993B (en) Equipment identification code identification and generation algorithm test method, device, equipment and medium

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