CN114723565B - Multi-source multi-language information processing method and system based on golang - Google Patents

Multi-source multi-language information processing method and system based on golang Download PDF

Info

Publication number
CN114723565B
CN114723565B CN202210618094.3A CN202210618094A CN114723565B CN 114723565 B CN114723565 B CN 114723565B CN 202210618094 A CN202210618094 A CN 202210618094A CN 114723565 B CN114723565 B CN 114723565B
Authority
CN
China
Prior art keywords
data
quotation
database
server
source
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
CN202210618094.3A
Other languages
Chinese (zh)
Other versions
CN114723565A (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.)
Gaoying International Innovation Technology Shenzhen Co ltd
Original Assignee
Gaoying International Innovation Technology Shenzhen 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 Gaoying International Innovation Technology Shenzhen Co ltd filed Critical Gaoying International Innovation Technology Shenzhen Co ltd
Priority to CN202210618094.3A priority Critical patent/CN114723565B/en
Publication of CN114723565A publication Critical patent/CN114723565A/en
Application granted granted Critical
Publication of CN114723565B publication Critical patent/CN114723565B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • 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
    • 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

Abstract

The invention relates to a multi-source multi-language information processing method and a system based on golang, wherein the method comprises the following steps: receiving a plurality of source data, wherein the source data are market data to be processed; converting the source data into first behavior data in the same language format; storing the first behavior data into a first database; synthesizing the first quotation data to form second quotation data, and storing the second quotation data into a second database; when an access request of a user side is received, acquiring first quotation data or second quotation data from a first database or a second database according to the access request of the user side so that the user side can acquire the first quotation data or the second quotation data; the method and the system realize the processing of the multi-source multi-language market source data, improve the richness of the source data and further improve the source data processing efficiency of the server.

Description

Multi-source multi-language information processing method and system based on golang
Technical Field
The invention relates to the technical field of information processing, in particular to a multi-source multi-language information processing method and system based on golang.
Background
In recent years, people are conscious of investment consciousness, stocks, futures and options become main investment channels of investors, and the key of investment is to know investment quotations first, so a quotation system appears, which processes and displays various quotation information to the investors by using an information processing technology. The information processing is to receive, store, convert, transmit and release the information, the information processing technology is to process the information by the computer technology, the running speed of the computer is extremely high, a large amount of information can be automatically processed, and the value of the information is greatly improved.
The patent publication No. 202110381171.3 discloses a data processing method, which includes processing a single-channel multi-coupon quotation source based on a multi-channel parallel processing technology to obtain a single-coupon quotation information queue, filtering the quotation information in the single-coupon quotation information queue to obtain a to-be-processed quotation list, reading the quotation information in the quotation list based on a preset sequence to obtain the latest quotation information, calculating the corresponding reference price to obtain policy quotation information, and updating the policy quotation information with the received policy quotation information by a client if the policy quotation information meets the updating condition and the pneumatic control condition.
However, although the market source data processed by the data processing method in the prior art is based on the multi-coupon market source data, the multi-coupon market source data adopts market source data in the same language format, so that the processing of market source data information in the prior art is limited.
Disclosure of Invention
Therefore, the multi-source multi-language information processing method and system based on the golang can solve the problem that market data information of multi-source multi-language cannot be processed.
In order to achieve the above object, in one aspect, the present invention provides a multi-source multi-language information processing method based on golang, including:
receiving a plurality of source data, wherein the source data are market data to be processed;
converting the source data into first behavior data in the same language format;
storing the first behavior data into a first database;
synthesizing the first quotation data to form second quotation data, and storing the second quotation data in a second database;
when an access request of a user terminal is received, first quotation data or second quotation data is obtained from a first database or a second database according to the access request of the user terminal, so that the user terminal can obtain the first quotation data or the second quotation data.
Further, when the language format is converted, the language format adopted by the source data in the first transaction platform is c + +, a GRPC protocol is arranged in the server, when the first transaction platform establishes data transmission with the server, the server converts the source data in the language format c + + sent by the first transaction platform through the GRPC protocol to form first behavior data for the server to perform data processing, and the language format of the first behavior data is a golang language format.
Further, when the service end receives source data from a transaction platform group comprising a first transaction platform, the transaction platform group comprises a first transaction platform a and a second transaction platform B, at the same time T, the first transaction platform a and the second transaction platform B respectively transmit the source data A and B to the service end, when the source data A is the same as the source data B, the source data sent by the first transaction platform a and the source data sent by the second transaction platform B are determined to be the same, then the source data A or the source data B are screened and transmitted to the service end, when the source data A is different from the source data B, the source data sent by the first transaction platform a and the source data sent by the second transaction platform B are determined to be different, and then the source data A and the source data B are both transmitted to the service end.
Further, storing the first behavior data into the mongodb database, wherein the first behavior data is tick data.
Further, when first quotation data are synthesized to form second quotation data, the first quotation data comprise a name, time, a starting price, a highest price, a lowest price, an ending price and a volume of deals, the second quotation data are bar data, the synthesized bar data are stored in a mysql database or a redis database according to access frequency of the bar data, the bar data comprise a name, a frequency, a starting price, a highest price, a lowest price, an ending price, a volume of deals and a timestamp, the frequency is a preset synthesis period t, the timestamp is the starting time of bar data synthesis, the timestamp is any time in the first quotation data, all the first quotation data of the first quotation data passing through the preset synthesis period t from the starting time are synthesized, and the synthesized bar data are stored in the mysql database or the redis database.
Further, when a user side sends an access request to a server side, a gateway is arranged in the server side, the gateway receives the access request of the user side, the access request is a subscription information request or an information query request, when the access request is the subscription information request, the subscription information comprises a subscription name, the server side matches the name of the first behavior data with the subscription name of the subscription information request, and when the matching is successful, the first behavior information is pushed to the user side;
when the access request is a query information request, the server receives the query information request, takes out the first quotation data or the second quotation data from the first database or the second database and sends the first quotation data or the second quotation data to the client, when the client sends the query information request, the query information comprises a name to be queried, the server matches the name to be queried of the query information request with the name of the first quotation data in the first database and the name of the second quotation data in the second database, when the matching is successful, the first quotation data or the second quotation data are taken out from the first database or the second database and sent to the client, and when the matching is unsuccessful, the server requests the transaction platform group to send corresponding source data.
Further, the user side needs to register before sending out the access request, when the user side is increased, the server side starts a corresponding number of gateways and responds to the subscription information request sent by the user side, when the server side pushes the user side according to the subscription information request, the first line condition data subscribed by the user side is pushed to the user side through stream pushing, and the stream pushing is to package the same first line condition data subscribed by different user sides and send the same first line condition data to the user side.
Further, when a plurality of user terminals send query information requests at the same time, the query information comprises the name to be queried and the target transaction target;
the server performs priority ranking on the client sending the query information request according to the difference between the target transaction target and the reference target transaction amount, performs the query information request of the corresponding client according to the difference between the target transaction target and the reference target transaction amount, namely the difference Delta S, and performs the query information request of the corresponding client according to the sequence from large to small of the difference Delta S.
On the other hand, the multi-source multi-language information processing system based on the golang provided by the invention comprises the following components: the system comprises a server, a plurality of user sides and a transaction platform group, wherein the server is arranged between the user sides and the transaction platform group;
the server side comprises: the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a plurality of source data, and the source data are market data to be processed;
the conversion module is used for converting the source data into first behavior data in the same language format;
the first storage module is used for storing the first behavior data into a first database;
the second storage module is used for synthesizing the first quotation data to form second quotation data and storing the second quotation data into a second database;
the acquisition module acquires the first quotation data or the second quotation data from the first database or the second database according to the access request of the user end when receiving the access request of the user end, so that the user end acquires the first quotation data or the second quotation data.
Further, the present invention provides a server of the multi-source multi-language information processing system based on golang, further comprising:
before sending an access request, a user side needs to register at a server side, and a registration module is arranged in the server side in the embodiment of the invention, so that the user side registers at the server side;
after the user terminal is registered, the server terminal obtains the equipment identification of the user terminal, a gateway is arranged in the server terminal and is used for receiving an access request of the user terminal, matching the received market data with the user terminal, and processing an inquiry information request or a subscription information request according to the access request of the user terminal so that the user terminal obtains first market data or second market data;
and the query module is used for matching the query information request with the first quotation data or the second quotation data in the first database or the second database, and taking the successfully matched first quotation data or second quotation data from the first database or the second database to send to the user side.
Compared with the prior art, the method has the advantages that the source data of different languages of different platforms are converted into the first quotation data in the same language format by receiving the plurality of source data, and the first quotation data is processed to enable the user side to obtain the first quotation data or the second quotation data, so that the processing of the multi-source multi-language quotation source data is realized, the richness of the source data is improved, and the source data processing efficiency of the server side is improved.
Particularly, the server converts the source data in the language format c + + sent by the first transaction platform through a GRPC protocol to form first quotation data for the server to perform data processing.
Particularly, by screening the source data and screening and transmitting the repeated source data to the server, the problem that the data volume of the source data is too large and the transmission load is increased is avoided, the data volume of the source data is reduced by screening, and the transmission efficiency is improved.
Particularly, the first behavior data is stored in the mongodb database, the mongodb database is suitable for storing a large amount of data in real time, storage space is enlarged, and the mongobd database can be inquired in time, so that information inquiry efficiency is improved.
Particularly, by synthesizing the first behavior data, valuable information can be extracted from the first behavior data, and the synthesized bar data is stored in the mysql database and the redis database, so that the mysql database can store data in a lasting manner, the function is strong, the redis database stores frequently-used data, and the reading speed is improved.
Particularly, the access request is sent by the user side, when the access request is a subscription information request, the server side pushes the relevant subscription information to the user side, and when the access request is a query information request, the first quotation data or the second quotation data is taken out from the database in the first database or the second database by querying the information name and sent to the user side, so that the query information request can be responded quickly.
Particularly, through the registration of the user side, the server side starts a corresponding number of gateways along with the increase of the user side, the gateways receive the access requests of the user side and respond to the subscription information requests sent by the user side, and when the server side pushes the user side according to the subscription information requests, the first line situation data subscribed by the user side is pushed to the user side through stream pushing, so that load balancing is realized.
Particularly, the server performs priority ranking on the client sending the request according to the difference value between the target transaction target and the reference target transaction amount, so that the problem that the client sends too many query requests at the same time to cause untimely processing of the server is avoided, and the processing efficiency of the server is improved.
Particularly, a receiving module of the server receives a plurality of source data, a conversion module converts the source data into first behavior data in the same language format, then a first storage module stores the first behavior data, a second storage module synthesizes the first behavior data, and finally an acquisition module receives an access request of a user end, so that the user end acquires the first behavior data or the second behavior data, the processing and the non-inductive transmission of multi-source and multi-language information by the server end are realized, the richness of the source data is improved, and the source data processing efficiency of the server end is improved.
Particularly, the user side is registered through a registration module of the server side, after the user side is registered, the server side obtains the equipment identifier of the user side, a gateway is arranged in the server side and used for receiving an access request of the user side and matching the received market data with the user side, and the query module carries out processing of a query information request or a subscription information request according to the access request of the user side so that the user side can obtain the first market data or the second market data, and quick request and response of the server side to the user side are achieved.
Drawings
Fig. 1 is a schematic flow chart of a multi-source multi-language information processing method based on golang according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a multi-source multi-language information processing system based on golang according to an embodiment of the present invention.
Detailed Description
In order that the objects and advantages of the invention will be more clearly understood, the invention is further described below with reference to examples; it should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only for explaining the technical principle of the present invention, and do not limit the scope of the present invention.
It should be noted that in the description of the present invention, the terms of direction or positional relationship indicated by the terms "upper", "lower", "left", "right", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, which are only for convenience of description, and do not indicate or imply that the device or element must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention.
Furthermore, it should be noted that, in the description of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
Referring to fig. 1, a multi-source multi-language information processing method based on golang according to an embodiment of the present invention includes:
step S110: receiving a plurality of source data, wherein the source data are to-be-processed market data;
step S120: converting the source data into first behavior data in the same language format;
step S130: storing the first behavior data into a first database;
synthesizing the first quotation data to form second quotation data, and storing the second quotation data into a second database;
step S140: when an access request of a user terminal is received, first quotation data or second quotation data is obtained from a first database or a second database according to the access request of the user terminal, so that the user terminal can obtain the first quotation data or the second quotation data.
Specifically, the embodiment of the invention receives a plurality of source data, converts the source data of different languages of different platforms into the first quotation data of the same language format, and finally processes the first quotation data, so that the user side can acquire the first quotation data or the second quotation data, thereby realizing the processing of the multi-source multi-language quotation source data, improving the richness of the source data and further improving the source data processing efficiency of the server side.
Specifically, when the language format is converted, the language format adopted by the source data in the first transaction platform is c + +, a GRPC protocol is arranged in the server, when the first transaction platform establishes data transmission with the server, the server converts the source data in the language format c + + sent by the first transaction platform through the GRPC protocol to form first behavior data for the server to perform data processing, and the language format of the first behavior data is a golang language format.
Specifically, the server converts the source data in the language format c + + sent by the first transaction platform through the GRPC protocol to form first quotation data for the server to perform data processing.
Specifically, when a server receives source data from a transaction platform group comprising a first transaction platform, the transaction platform group comprises a first transaction platform a and a second transaction platform B, the first transaction platform a and the second transaction platform B transmit the source data A and B to the server respectively at the same time T, when the source data A is the same as the source data B, the source data sent by the first transaction platform a and the second transaction platform B are judged to be the same, then the source data A or the source data B are screened and transmitted to the server, when the source data A is different from the source data B, the source data sent by the first transaction platform a and the second transaction platform B are judged to be different, and then the source data A and the source data B are both transmitted to the server.
Specifically, the embodiment of the invention screens the source data and screens and transmits the repeated source data to the server, thereby avoiding overlarge data volume of the source data, increasing transmission load, reducing the data volume of the source data through screening and improving transmission efficiency.
Specifically, first behavior data is stored in the mongodb database, and the first behavior data is tick data.
Specifically, the first behavior data are stored in the mongodb database, the mongodb database is suitable for storing a large amount of data in real time, storage space is increased, the mongobd database can be queried in time, and information querying efficiency is improved.
Specifically, when first quotation data are synthesized to form second quotation data, the first quotation data comprise a name, time, a starting price, a highest price, a lowest price, an ending price and a transaction amount, the second quotation data are bar data, the synthesized bar data are stored in a mysql database or a redis database according to access frequency of the bar data, the bar data comprise a name, a frequency, a starting price, a highest price, a lowest price, an ending price, a transaction amount and a timestamp, the frequency is a preset synthesis period t, the timestamp is the starting time of bar data synthesis, the timestamp is any time in the first quotation data, all the first quotation data of the first quotation data passing through the preset synthesis period t from the starting time are synthesized, and the synthesized bar data are stored in the mysql database or the redis database.
Specifically, t =1min, timestamp 11: 34: 00, then the bar data is represented by start time 11: 34: 00 to end time 11: 35: all first line conditions data within 00 are synthesized.
Specifically, by synthesizing the first behavior data, valuable information can be extracted from the first behavior data, and the synthesized bar data is stored in the mysql database and the redis database, the mysql database can store data in a persistent manner, the function is strong, the redis database stores frequently-used data, and the reading speed is improved.
Specifically, when a user side sends an access request to a server side, a gateway is arranged in the server side, the gateway receives the access request of the user side, the access request is a subscription information request or an information query request, when the access request is the subscription information request, the subscription information comprises a subscription name, the server side matches the name of the first behavior data with the subscription name of the subscription information request, and when the matching is successful, the first behavior information is pushed to the user side;
when the access request is a query information request, the server receives the query information request, takes out the first quotation data or the second quotation data from the first database or the second database and sends the first quotation data or the second quotation data to the client, when the client sends the query information request, the query information comprises a name to be queried, the server matches the name to be queried of the query information request with the name of the first quotation data in the first database and the name of the second quotation data in the second database, when the matching is successful, the first quotation data or the second quotation data are taken out from the first database or the second database and sent to the client, and when the matching is unsuccessful, the server requests the transaction platform group to send corresponding source data.
Specifically, in the embodiment of the invention, the user side sends the access request, when the access request is a subscription information request, the server side pushes the relevant subscription information to the user side, and when the access request is a query information request, the first quotation data or the second quotation data is taken out from the database in the first database or the second database by querying the information name and sent to the user side, so that the query information request can be responded quickly.
Specifically, a user side needs to register before sending an access request, when the user side is increased, a server side starts a corresponding number of gateways and responds to a subscription information request sent by the user side, when the server side pushes the user side according to the subscription information request, first line condition data subscribed by the user side is pushed to the user side through stream pushing, and the stream pushing is to package the same first line condition data subscribed by different user sides and send the same first line condition data to the user side.
Specifically, both the user terminals subscribe to the first behavior data M, and then the first behavior data M is packaged and sent to both the user terminals.
Specifically, in the embodiment of the present invention, through the registration of the user side, the server side starts a corresponding number of gateways as the user side increases, the gateways receive the access request of the user side and respond to the subscription information request sent by the user side, and when the server side pushes the user side according to the subscription information request, the first behavior data subscribed by the user side is pushed to the user side through stream pushing, so as to implement load balancing.
Specifically, when a plurality of user sides send out query information requests at the same time, the query information comprises a name to be queried and a target transaction target;
the server performs priority ranking on the client sending the query information request according to the difference between the target transaction target and the reference target transaction amount, performs the query information request of the corresponding client according to the difference between the target transaction target and the reference target transaction amount, namely the difference Delta S, and performs the query information request of the corresponding client according to the sequence from large to small of the difference Delta S.
For example: three user ends C, D and F send out inquiry information request at the same time, the target trade targets of the inquiry information are 3500, 4100 and 4500, the benchmark target trade money amount is 4000, then the difference between the target trade targets and the benchmark target trade money amount is-500, + 100 and + 500, because-500 < + 100 < + 500, the priority of the user ends is that the inquiry information request of user end F is executed first, then the inquiry information request of user end D is executed, and finally the inquiry information request of user end C is executed.
Specifically, in the embodiment of the invention, the server performs priority ranking on the client sending the request according to the difference value between the target transaction target and the reference target transaction amount, so that the problem that the client sends too many query requests at the same time to cause untimely processing of the server is avoided, and the processing efficiency of the server is improved.
Referring to fig. 2, the golang-based multi-source multi-language information processing system according to the embodiment of the present invention includes: the system comprises a server, a plurality of clients and a transaction platform group, wherein the server is arranged between the clients and the transaction platform group;
the server side comprises: a receiving module 210, configured to receive a plurality of source data, where the source data is to-be-processed market data;
the conversion module 220 is used for converting the source data into first behavior data in the same language format;
a first storage module 230, which stores the first behavior data into a first database;
the second storage module 240 synthesizes the first quotation data to form second quotation data, and stores the second quotation data in a second database;
the obtaining module 250 obtains the first market data or the second market data from the first database or the second database according to the access request of the user terminal when receiving the access request of the user terminal, so that the user terminal obtains the first market data or the second market data.
Before sending an access request, a user needs to register at a server, and in the embodiment of the present invention, a registration module 260 is arranged in the server, so that the user registers at the server;
after the user terminal is registered, the server terminal obtains the equipment identifier of the user terminal, a gateway 270 is arranged in the server terminal and is used for receiving an access request of the user terminal, matching the received market data with the user terminal, and processing an inquiry information request or a subscription information request according to the access request of the user terminal so that the user terminal obtains the first market data or the second market data;
the query module 280 is configured to match the query information request with the first market data or the second market data in the first database or the second database, and fetch the successfully matched first market data or second market data in the first database or the second database and send the fetched data to the user side according to the query information request in the access request of the user side routed by the gateway.
Specifically, in the embodiment of the invention, a receiving module receives a plurality of source data, a conversion module converts the source data into first quotation data in the same language format, a processing module stores, synthesizes and pushes the first quotation data respectively to form second quotation data after synthesis, so that a user end obtains the first quotation data or the second quotation data, the user end registers through a registration module and sends an access request to a server end, a gateway receives a query information request in the access request and routes the query information request to the query module, the query module matches with a first database or a second database and sends the matched first quotation data or second quotation data to the user end, the processing and non-inductive transmission of multi-source multi-language information by the server end are realized, the richness of the source data is improved, and the processing efficiency of the source data of the server end is improved, the quick request and response of the server to the client are realized.
Specifically, when the multi-source multi-language information processing system based on the golang provided by the embodiment of the invention is deployed, the whole multi-source multi-language information processing system based on the golang is packaged into the container mirror image through the container technology, so that the cross-platform effects of instant use and rapid deployment are realized.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention; various modifications and alterations to this invention will become apparent to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A multi-source multi-language information processing method based on golang is characterized by comprising the following steps:
receiving a plurality of source data, wherein the source data are market data to be processed;
converting the source data into first behavior data in the same language format;
storing the first behavior data into a first database;
synthesizing the first quotation data to form second quotation data, and storing the second quotation data into a second database;
when an access request of a user side is received, acquiring first quotation data or second quotation data from a first database or a second database according to the access request of the user side so that the user side can acquire the first quotation data or the second quotation data;
when the language format is converted, the language format adopted by the source data in the first transaction platform is c + +, a GRPC protocol is arranged in the server, when the first transaction platform establishes data transmission with the server, the server converts the source data in the language format of c + + sent by the first transaction platform through the GRPC protocol to form first behavior data for the server to perform data processing, and the language format of the first behavior data is a golang language format;
when a user side sends an access request to a server side, a gateway is arranged in the server side, the gateway receives the access request of the user side, the access request is a subscription information request or an information query request, when the access request is the subscription information request, the subscription information comprises a subscription name, the server side matches the name of the first line condition data with the subscription name of the subscription information request, and the first line condition information is pushed to the user side after the matching is successful;
when the access request is a query information request, the server receives the query information request, takes out the first quotation data or the second quotation data from the first database or the second database and sends the first quotation data or the second quotation data to the client, when the client sends the query information request, the query information comprises a name to be queried, the server matches the name to be queried of the query information request with the name of the first quotation data in the first database and the name of the second quotation data in the second database, when the matching is successful, the first quotation data or the second quotation data are taken out from the first database or the second database and sent to the client, and when the matching is unsuccessful, the server requests the transaction platform group to send corresponding source data.
2. The method for multi-source and multi-language information processing based on golang according to claim 1, wherein the user terminal is registered before sending out the access request, when the user terminal is increased, the server terminal starts a corresponding number of gateways and responds to the subscription information request sent by the user terminal, when the server terminal pushes the user terminal according to the subscription information request, the first line condition data subscribed by the user terminal is pushed to the user terminal by stream pushing, and the stream pushing is to pack the same first line condition data subscribed by different user terminals and send the same first line condition data to the user terminal.
3. The multi-source multi-language information processing method based on golang according to claim 2, wherein when the server receives source data from a trading platform group including a first trading platform, the trading platform group includes a first trading platform a and a second trading platform B, the first trading platform a and the second trading platform B transmit the source data a and B to the server respectively at the same time T, when the source data a is the same as the source data B, the source data sent by the first trading platform a and the source data sent by the second trading platform B are the same, the source data a or the source data B are screened and transmitted to the server, when the source data a is different from the source data B, the source data sent by the first trading platform a are different from the source data sent by the second trading platform B, and the source data a and the source data B are both transmitted to the server.
4. The golang-based multi-source multi-lingual information processing method according to claim 3, wherein first behavior data is stored in a mongodb database, the first behavior data being tick data.
5. The golang-based multi-source multi-lingual information processing method according to claim 4, it is characterized in that when first quotation data are synthesized to form second quotation data, the first quotation data comprise name, time, initial price, highest price, lowest price, ending price and volume of bargaining, the second market data is bar data, the synthesized bar data is stored into a mysql database or a redis database according to the access frequency of the bar data, the bar data includes a name, a frequency, a starting price, a highest price, a lowest price, an ending price, a volume of interest, and a timestamp, the frequency is a preset synthesis period t, the timestamp is the synthesis starting time of the bar data, the timestamp is any time in the first behavior data, all the first behavior data in the first behavior data passing the preset synthesis period t from the starting time are synthesized, and the synthesized bar data are stored in a mysql database or a redis database.
6. The multi-source multi-language information processing method based on golang according to claim 5, wherein when there are a plurality of clients simultaneously making query information requests, the query information contains a name to be queried and a target transaction object;
the server performs priority ranking on the client sending the query information request according to the difference between the target transaction target and the reference target transaction amount, performs the query information request of the corresponding client according to the difference between the target transaction target and the reference target transaction amount, namely the difference Delta S, and performs the query information request of the corresponding client according to the sequence from large to small of the difference Delta S.
7. A golang-based multi-source multi-language information processing system applied to the golang-based multi-source multi-language information processing method according to any one of claims 1 to 6, comprising: the system comprises a server, a plurality of user sides and a transaction platform group, wherein the server is arranged between the user sides and the transaction platform group;
the server side comprises: the system comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving a plurality of source data, and the source data are market data to be processed;
the conversion module is used for converting the source data into first behavior data in the same language format;
the first storage module is used for storing the first behavior data into a first database;
the second storage module is used for synthesizing the first quotation data to form second quotation data and storing the second quotation data into a second database;
and the acquisition module acquires the first quotation data or the second quotation data from the first database or the second database according to the access request of the user side when receiving the access request of the user side so that the user side acquires the first quotation data or the second quotation data.
8. The golang-based multi-source multi-lingual information processing system of claim 7, wherein the server further comprises:
before the user side sends an access request, the user side needs to register at the server side, and a registration module is arranged in the server side so that the user side can register at the server side;
after the user terminal is registered, the server terminal obtains the equipment identification of the user terminal, a gateway is arranged in the server terminal and is used for receiving an access request of the user terminal, matching the received market data with the user terminal, and processing an inquiry information request or a subscription information request according to the access request of the user terminal so that the user terminal obtains first market data or second market data;
and the query module is used for matching the query information request with the first quotation data or the second quotation data in the first database or the second database, and taking the successfully matched first quotation data or second quotation data from the first database or the second database to send to the user side.
CN202210618094.3A 2022-06-02 2022-06-02 Multi-source multi-language information processing method and system based on golang Active CN114723565B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210618094.3A CN114723565B (en) 2022-06-02 2022-06-02 Multi-source multi-language information processing method and system based on golang

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210618094.3A CN114723565B (en) 2022-06-02 2022-06-02 Multi-source multi-language information processing method and system based on golang

Publications (2)

Publication Number Publication Date
CN114723565A CN114723565A (en) 2022-07-08
CN114723565B true CN114723565B (en) 2022-08-23

Family

ID=82232678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210618094.3A Active CN114723565B (en) 2022-06-02 2022-06-02 Multi-source multi-language information processing method and system based on golang

Country Status (1)

Country Link
CN (1) CN114723565B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201886520U (en) * 2010-08-06 2011-06-29 中国工商银行股份有限公司 Multi-language supporting data conversion equipment
CN106294486A (en) * 2015-06-04 2017-01-04 交通银行股份有限公司 The processing method of finance market data and system
CN111225069A (en) * 2020-03-13 2020-06-02 浙江书香荷马文化有限公司 Distributed market data processing system and method
CN113254519A (en) * 2021-05-28 2021-08-13 北京奇岱松科技有限公司 Access method, device, equipment and storage medium of multi-source heterogeneous database

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100501740C (en) * 2007-01-25 2009-06-17 无敌科技(西安)有限公司 Method and system for converting text data of different formats to uniform format
CN103218738A (en) * 2012-01-20 2013-07-24 北京富基融通科技有限公司 Information processing method and information processing system for online trading platform
WO2015025189A1 (en) * 2013-08-18 2015-02-26 Yogesh Chunilal Rathod Enable user to establish request data specific connections with other users for communication, participation and collaboration
CN107748797A (en) * 2017-11-07 2018-03-02 众安信息技术服务有限公司 The processing method of financial market data
CN108769141A (en) * 2018-05-09 2018-11-06 深圳市深弈科技有限公司 A kind of method of multi-source real-time deal market data receiver and merger processing
CN110335148A (en) * 2019-05-31 2019-10-15 上海芯与网络科技有限公司 Securities data parallel processing system (PPS) and method
CN110619580B (en) * 2019-09-06 2023-11-24 北京神州同道智能信息技术有限公司 Whole market multi-variety gold financing system based on intelligent data processing platform
CN110912808B (en) * 2019-11-29 2021-04-13 三一重工股份有限公司 Message subscription method, device, system, equipment terminal and readable storage medium
CN112328806A (en) * 2020-10-30 2021-02-05 广州市西美信息科技有限公司 Data processing method, system, computer equipment and storage medium
CN112486592B (en) * 2020-11-30 2024-04-02 成都新希望金融信息有限公司 Distributed data processing method, device, server and readable storage medium
CN114385128A (en) * 2021-12-07 2022-04-22 北京达佳互联信息技术有限公司 Data processing method, device, apparatus, storage medium and program product
CN114461425A (en) * 2022-02-16 2022-05-10 深圳市科陆电子科技股份有限公司 Data processing method, device, equipment and computer readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201886520U (en) * 2010-08-06 2011-06-29 中国工商银行股份有限公司 Multi-language supporting data conversion equipment
CN106294486A (en) * 2015-06-04 2017-01-04 交通银行股份有限公司 The processing method of finance market data and system
CN111225069A (en) * 2020-03-13 2020-06-02 浙江书香荷马文化有限公司 Distributed market data processing system and method
CN113254519A (en) * 2021-05-28 2021-08-13 北京奇岱松科技有限公司 Access method, device, equipment and storage medium of multi-source heterogeneous database

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
通用Internet数据库访问模式的研究;张德运等;《西安交通大学学报》;20000420(第04期);第46-50页 *

Also Published As

Publication number Publication date
CN114723565A (en) 2022-07-08

Similar Documents

Publication Publication Date Title
TWI342693B (en) Method, client computer system, network system, and computer readable medium for remotely printing a document on a network
WO2018068628A1 (en) Live video method and related device
US8478895B2 (en) Content adaptation realizing method and content adaptation server
JP2003091393A (en) Printing system and method thereof
WO1998053393A1 (en) Data stream processing on networked computer system lacking format-specific data processing resources
US20160337290A1 (en) Message Push Method and Apparatus
WO2019028415A1 (en) Data sharing between participants using disparate message formats
EP2879426B1 (en) Method for service content distribution under heterogeneous network and service management platform
US20020101829A1 (en) Electronic conference system using presentation data processing based on audience equipment information
CN114723565B (en) Multi-source multi-language information processing method and system based on golang
JP4155133B2 (en) Accounting data processing method and system
CN112203135B (en) Intelligent double-recording method, system and server
EP1439684A3 (en) Apparatus, method and system for providing information in accordance with one of a plurality of protocols
EP2533499A1 (en) Method and system for service message transmission based on matching rule
CN109586979B (en) Message transmission method and device
CN117278622A (en) Message format conversion method and device, terminal equipment and storage medium
US7171456B2 (en) Document data transmission device, document data transmission reception system, and document data transmission method
CN111107080B (en) Error information pushing method, device and equipment and readable storage medium
CN113225570A (en) Playing processing method based on global virtual data view and related equipment
US20070016697A1 (en) Web services system and method using common type envelope machine
CN113126744A (en) Virtual business hall system, business processing method, electronic device, and storage medium
KR101442485B1 (en) System and method for transmitting data
CN109684341B (en) Real-time synchronization system and method for service data
CN111128184A (en) Voice interaction method and device between devices
JP4338942B2 (en) Information providing system and CC / PP conversion method

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