Real-time database data interaction method and system based on micro-service

A data interaction and microservice technology, applied in database management systems, transmission systems, structured data retrieval, etc., can solve problems such as inability to provide RESTful interfaces, complex debugging and deployment processes, and low development efficiency, to ensure data access efficiency, The effect of avoiding service unavailability and improving utilization efficiency

Active Publication Date: 2020-10-09
NR ELECTRIC CO LTD +1
View PDF0 Cites 10 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0002] In the power industry, since the transmission rate of electric energy in the power grid is the speed of light, the monitoring of the power grid operation status requires fast data processing methods. Conventional power monitoring programs need to cache data in real-time databases in order to process data efficiently and quickly. , for data acquisition, processing and calculation programs, the SQL interface is used to access the real-time library. However, for the front-end program of human-computer interaction, the current mainstream efficient interaction method is the RESTful interface, but the current real-time library cannot provide the RESTful interface, which causes human-computer interaction. Computer-interactive applications must convert the data into the format required by the front-end interface by calling the SQL interface, and then transfer it to the front-end. There are many links in the middle, the development efficiency is low, the debugging and deployment process is complicated, and it cannot meet the frequent changes in the requirements of the front-end interface.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Real-time database data interaction method and system based on micro-service
  • Real-time database data interaction method and system based on micro-service
  • Real-time database data interaction method and system based on micro-service

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0069] This embodiment introduces a real-time database data interaction method based on microservices, refer to figure 1 ,include:

[0070] Receive an external REST interface request, and the external REST interface request includes a real-time database access request embedded with a SQL statement in the message body;

[0071] Analyze the HTTP message header of the external REST interface request to determine whether the external REST interface request is a real-time database access request with access rights;

[0072] In response to the external REST interface request being a real-time database access request with access rights, the real-time database access request is forwarded to a started access request execution microservice instance according to the preset allocation strategy; the access request execution microservice instance The quantity is at least one;

[0073] Execute the microservice instance through the access request to parse the message body requested by the e...

Embodiment 1-1

[0076] This embodiment specifically introduces an implementation manner of Embodiment 1. On the basis of Embodiment 1, it also involves authentication of the user identity of the requesting party, ie.

[0077] The method of the present embodiment includes the following aspects:

[0078] 1. Receiving and parsing of external REST access requests

[0079] This section can be implemented using service gateway technology.

[0080] Only consider that the type of external access request is a real-time database access request, and do not consider the case that the user's misoperation leads to a high frequency of access: After receiving and parsing the HTTP header of the external REST interface request, obtain the identity information of the requester. If the requester The identity information includes the user identity information, then find and match the identity information of the currently logged-in user, and if the match is successful, the external REST interface request is a rea...

Embodiment 2

[0121] Based on the same inventive concept as Embodiment 1 and Embodiment 1-1, this embodiment introduces a real-time database data interaction system based on microservices. Refer to figure 1 , the system includes a service gateway module and an access request execution microservice instance; the number of the access request execution microservice instance is at least one;

[0122] The service gateway module receives the external REST interface request, analyzes the http message header of the external REST interface request, and judges whether the external REST interface request is a real-time database access request with access rights, and if so, according to the preset allocation strategy, the real-time database The access request is forwarded to a started access request execution microservice instance; the external REST interface request includes a real-time database access request embedded with a SQL statement in the message body;

[0123] The access request execution mic...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a real-time database data interaction method and system based on micro-service. The method comprises the following steps: an SQL operation request is embedded into an REST request message body; the REST access request is received and the http message header is analyzed by adopting a service gateway technology; the request load is balanced to the access request execution micro-service instance, the access request execution micro-service instance analyzes the micro-service RESTful request message, SQL request content in the micro-service RESTful request message is extracted, a real-time database SQL interface is called for execution, and an execution result is returned. According to the method, the process of accessing the real-time database by the human-computer interaction front end can be simplified, the data access efficiency can be guaranteed, the programming difficulty can be reduced, the front end development efficiency can be greatly improved, and the interface display requirement of rapid change can be met.

Description

technical field [0001] The invention relates to the technical field of real-time database access in electric power dispatching automation systems, in particular to a real-time database data interaction method and system based on microservices. Background technique [0002] In the power industry, since the transmission rate of electric energy in the power grid is the speed of light, the monitoring of the power grid operation status requires fast data processing methods. Conventional power monitoring programs need to cache data in real-time databases in order to process data efficiently and quickly. , for data acquisition, processing and calculation programs, the SQL interface is used to access the real-time library. However, for the front-end program of human-computer interaction, the current mainstream efficient interaction method is the RESTful interface, but the current real-time library cannot provide the RESTful interface, which causes human-computer interaction. Compute...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F16/242G06F16/25H04L29/08
CPCG06F16/25G06F16/2433H04L67/02H04L67/51
Inventor 孙超史豪杰翟桂锋陆鑫顾全
Owner NR ELECTRIC CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products