Summary of the invention
The present invention provides a kind of collecting method and device, to solve the problems, such as that main website real time data time delay is longer.
To achieve the goals above, technical solution provided by the embodiment of the present invention is as follows:
In a first aspect, the embodiment of the present invention provides a kind of collecting method, it is applied to main website convergent point, comprising: to number
Data registration request is sent according to source;Wherein, the data source is the convergent point of multiple substation data;Receiving the data source
After the accreditation verification response of return, data sequence to be registered is sent to the data source;Wherein, the data sequence packet to be registered
Include N number of Data Identification;Receive the data sequence that the data source is sent;Wherein, the data sequence includes and N number of data
Identify corresponding N number of data.
It is described after the data sequence to be registered to data source transmission in alternative embodiment of the invention
Method further include: after the data sequence to be registered is sent, sends sequence to the data source and be sent information;It connects
It receives the sequence that the data source returns and is sent confirmation.
In alternative embodiment of the invention, before the transmission data registration request to data source, the method is also
It include: the subscription data command for receiving cloud platform and sending;Wherein, the subscription data command includes subscribing to Data Identification;According to
The subscription Data Identification finds data source corresponding with each subscription Data Identification.
In alternative embodiment of the invention, the data sequence for receiving the data source and sending, comprising: described in reception
What cloud platform was sent unsubscribes instruction;It is wherein, described that unsubscribe instruction include note corresponding with the subscription data command
Volume mark;Cancel register request is sent to the data source according to the sign-on ID;Receive the cancellation that the data source returns
Registration response.
In alternative embodiment of the invention, after the data sequence for receiving the data source transmission, the side
Method further include: the data sequence is sent to the cloud platform.
Second aspect, the embodiment of the present invention provide a kind of collecting method, are applied to data source, comprising: receiving
After the data registration request that main website convergent point is sent, accreditation verification response is sent to the main website convergent point;Receive the main website
The data sequence to be registered that convergent point is sent;Wherein, the data sequence to be registered includes N number of Data Identification;To the main website
Convergent point sends data sequence;Wherein, the data sequence includes N number of data corresponding with the N number of Data Identification.
In alternative embodiment of the invention, it is described receive data sequence to be registered that the main website convergent point is sent it
Afterwards, the method also includes: receive the sequence that the main website convergent point is sent and be sent information;It is sent out to the main website convergent point
Sequence is sent to be sent confirmation.
It is described to send data sequence to the main website convergent point, comprising: according to described in alternative embodiment of the invention
N number of Data Identification reads N number of data from substation;N number of data are sent to the main website convergent point;Receive the main website
The cancel register request that convergent point is sent;Cancel register response is sent to the main website convergent point, and stops converging to the main website
Accumulation sends data sequence.
The third aspect, the embodiment of the present invention provide a kind of data acquisition device, are applied to main website convergent point, comprising: first
Sending module, for sending data registration request to data source;Second sending module, for receiving the data source return
Accreditation verification response after, send data sequence to be registered to the data source;First receiving module, for receiving the data
The data sequence that source is sent.
Fourth aspect, the embodiment of the present invention provide a kind of data acquisition device, are applied to data source, comprising: third is sent
Module, for sending accreditation verification to the main website convergent point after the data registration request for receiving the transmission of main website convergent point
Response;Second receiving module, the data sequence to be registered sent for receiving the main website convergent point;4th sending module is used
In to the main website convergent point send data sequence.
5th aspect, the embodiment of the present invention provide a kind of electronic equipment, comprising: processor, memory and bus, it is described
Memory is stored with the executable machine readable instructions of the processor, when electronic equipment operation, the processor with
By bus communication between the memory, execution first aspect and the when the machine readable instructions are executed by the processor
Any method in any optional implementation of two aspects.
6th aspect, the embodiment of the present invention provide a kind of computer readable storage medium, the computer readable storage medium
On be stored with computer program, any optional of first aspect and second aspect is executed when which is run by processor
Implementation in any method.
The embodiment of the present invention provides a kind of collecting method and device, wherein the data applied to main website convergent point are adopted
Set method includes: to send data registration request to data source;Wherein, the data source is the convergent point of multiple substation data;?
After receiving the accreditation verification response that the data source returns, data sequence to be registered is sent to the data source;Wherein, described
Data sequence to be registered includes N number of Data Identification;Receive the data sequence that the data source is sent;Wherein, the data sequence
Including N number of data corresponding with the N number of Data Identification.Realize that main website convergent point is directly subscribed to needed for cloud platform by data source
The substation data wanted reduce the time delay of main website real time data.
To enable the above objects, features and advantages of the present invention to be clearer and more comprehensible, the embodiment of the present invention is cited below particularly, and match
Appended attached drawing is closed, is described in detail below.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description.Obviously, described embodiment is only a part of the embodiments of the present invention, instead of all the embodiments.It is logical
The component for the embodiment of the present invention being often described and illustrated herein in the accompanying drawings can be arranged and be designed with a variety of different configurations.
Therefore, the detailed description of the embodiment of the present invention provided in the accompanying drawings is not intended to limit below claimed
The scope of the present invention, but be merely representative of selected embodiment of the invention.Based on the embodiment of the present invention, those skilled in the art
Member's every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
It should also be noted that similar label and letter indicate similar terms in following attached drawing, therefore, once a certain Xiang Yi
It is defined in a attached drawing, does not then need that it is further defined and explained in subsequent attached drawing.
In the description of the present invention, it should be noted that term " in ", "upper", "lower", "horizontal", "inner", "outside" etc. refer to
The orientation or positional relationship shown is to be based on the orientation or positional relationship shown in the drawings or when invention product use usually puts
The orientation or positional relationship put, is merely for convenience of description of the present invention and simplification of the description, rather than the dress of indication or suggestion meaning
It sets or element must have a particular orientation, be constructed and operated in a specific orientation, therefore should not be understood as to limit of the invention
System.In addition, term " first ", " second " etc. are only used for distinguishing description, it is not understood to indicate or imply relative importance.
In addition, the terms such as term "horizontal", "vertical" are not offered as requiring component abswolute level or pendency, but can be slightly
Low dip.It is not to indicate that the structure has been had to if "horizontal" only refers to that its direction is more horizontal with respect to for "vertical"
It is complete horizontal, but can be slightly tilted.
In the description of the present invention, it should be noted that unless otherwise clearly defined and limited, term " setting ", " phase
Even ", " connection " shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or be integrally connected.It can
To be mechanical connection, it is also possible to be electrically connected.It can be directly connected, can also indirectly connected through an intermediary, it can be with
It is the connection inside two elements.For the ordinary skill in the art, it can understand that above-mentioned term exists with concrete condition
Concrete meaning in the present invention.
With reference to the accompanying drawing, it elaborates to some embodiments of the present invention.In the absence of conflict, following
Feature in embodiment and embodiment can be combined with each other.
The embodiment of the present invention provides a kind of data collection system 10, please refers to Fig. 1, and Fig. 1 is provided in an embodiment of the present invention
A kind of schematic diagram of data collection system.The data collection system 10 includes: cloud platform 100, main website convergent point 200, data source
300 and substation 400.When cloud platform 100 needs to know the volume of data of substation 400, ordered to the transmission of main website convergent point 200
Data command is read, the subscription data command that main website convergent point 200 is sent according to cloud platform 100 sends data note to data source 300
Volume request and data sequence to be registered, data source 300 receive main website convergent point 200 transmission data registration request and
After data sequence to be registered, correspondence is read from corresponding substation 400 according to the Data Identification for including in data sequence to be registered
Data, and the data of reading are sent to main website convergent point 200, the data received are uploaded to by main website convergent point 200 again
Cloud platform 100 carries out subsequent data processing or analysis etc. so that cloud platform 100 can use these data.
The embodiment of the present invention provides a kind of electronic equipment applied to main website convergent point 200, which may include
Memory, storage control, processor and network unit, wherein processor for realizing main website convergent point 200 function.This
Inventive embodiments also provide a kind of electronic equipment applied to data source 300, which may include memory, storage control
Device, processor and network unit processed, wherein processor for realizing data source 300 function.
It should be noted that the above-mentioned electronic equipment applied to main website convergent point 200 and the electricity applied to data source 300
In sub- equipment, memory can store various software programs and unit, such as collecting method provided in an embodiment of the present invention
And the corresponding program instruction/unit of device.Processor, which passes through, runs software program stored in memory and unit, thus
Perform various functions application and data processing, i.e. collecting method in the realization embodiment of the present invention.
Memory can include but is not limited to random access memory (Random Access Memory, RAM), read-only to deposit
Reservoir (Read Only Memory, ROM), programmable read only memory (Programmable Read-Only Memory,
PROM), erasable read-only memory (Erasable Programmable Read-Only Memory, EPROM), electric erasable
Read-only memory (Electric Erasable Programmable Read-Only Memory, EEPROM) etc..
Processor can be a kind of IC chip, have signal handling capacity.Above-mentioned processor can be general place
Manage device, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit (Network
Processor, abbreviation NP) etc.;It can also be digital signal processor (DSP), specific integrated circuit (ASIC), ready-made programmable
Gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hardware components.It can
To realize or execute various methods, step and logic diagram disclosed in the embodiment of the present invention.General processor can be micro-
Processor or the processor are also possible to any conventional processor etc..
First embodiment
The collecting method based on data collection system 10 in Fig. 1 is described in detail below, referring to figure 2., Fig. 2 is this hair
A kind of flow chart for collecting method that bright embodiment provides, collecting method include the following steps:
Step S103: main website convergent point sends data registration request to data source.
Step S104: data source converges after the data registration request for receiving the transmission of main website convergent point to the main website
Point sends accreditation verification response.
When main website convergent point needs data source to send data sequence to itself, data note can be sent to data source first
Volume request, it is true that data source sends registration after the data registration request for receiving the transmission of main website convergent point, to main website convergent point
Recognize response, to inform the received data registration request to be seen of main website convergent point data source, therefore, main website convergent point can be to right
The data source answered sends subsequent data sequence to be registered.
It should be noted that main website convergent point is not made to the number embodiment of the present invention that data source sends data registration request
It is specific to limit, it is understood that there may be data source is not received by the data registration request or data sources have arrived the data register
Request is but without sending data register response, at this point, main website convergent point can continue to send data registration request to data source, directly
The data register response of data source transmission is received to main website convergent point.
Step S105: main website convergent point is after receiving the accreditation verification response that the data source returns, to the data
Source sends data sequence to be registered.
The data sequence to be registered that main website convergent point is sent to data source should include N number of Data Identification.Wherein, this is N number of
Data Identification may include needing the contents such as received data type, substation mark corresponding with received data are needed, data
The implementation of mark can be the corresponding data number of data and data correspond to the corresponding coding of the number of substation, data with
And data correspond to the coding etc. of substation.
Step S110: the data sequence to be registered that main website convergent point described in data sources is sent.
Step S111: data source sends data sequence to the main website convergent point.
Data source is first after the data sequence to be registered comprising N number of Data Identification for receiving the transmission of main website convergent point
Can first be identified according to the substation in N number of Data Identification and search out the corresponding substation of data, further according in N number of Data Identification to
Log-on data obtains corresponding data from corresponding substation, i.e., data source to the data sequence that main website convergent point is sent include with
The corresponding N number of data of N number of Data Identification.
It should be noted that substation corresponding with a data source can have it is multiple, each substation it is continual with
The mode of periodicity sending sends all data of itself to corresponding data source.When data sources to main website convergent point are sent
Data sequence to be registered when, data to be registered can be read from all data that corresponding substation is sent, and by these data
It is sent to main website convergent point, to realize that main website convergent point directly acquires required substation data by data source, to reduce
The time delay of main website real time data.
Step S112: main website convergent point receives the data sequence that the data source is sent.
Further, referring to figure 3., Fig. 3 is the flow chart of another collecting method provided in an embodiment of the present invention,
Before step S103, collecting method further includes following steps:
Step S101: main website convergent point receives the subscription data command that cloud platform is sent.
The sequence to be registered that main website convergent point is sent may be what cloud platform provided, the number that cloud platform is needed according to oneself
According to main website convergent point transmission subscription data command, which should include subscribing to Data Identification.The subscription data
Mark may include the contents such as data type, substation mark corresponding with received data are needed that cloud platform needs to obtain, number
It can be the corresponding data number of data according to the implementation of mark and data correspond to the corresponding coding of the number of substation, data
And data correspond to the coding etc. of substation.
Step S102: main website convergent point finds number corresponding with each subscription Data Identification according to the subscription Data Identification
According to source.
Main website convergent point, can be according in subscription data command after the subscription data command for receiving cloud platform transmission
Subscription Data Identification, search out and need the corresponding data source in the corresponding substation of data known.It should be noted that a master
Convergent point of standing may correspond to multiple data sources, and therefore, main website convergent point needs to find corresponding data source according to Data Identification.
Further, referring to figure 4., Fig. 4 is the flow chart of another collecting method provided in an embodiment of the present invention,
After step S105, collecting method further includes following steps:
Step S106: main website convergent point sends sequence after the data sequence to be registered is sent, to the data source
Column are sent information.
Step S107: the sequence that main website convergent point described in data sources is sent is sent information.
Step S108: data source sends sequence to the main website convergent point and is sent confirmation.
Step S109: main website convergent point receives the sequence that the data source returns and is sent confirmation.
Main website convergent point can send sequence to data source and be sent letter after having sent data sequence to be registered
Breath, to inform that data source data sequence to be registered has been sent, data source can send data sequence according to sequence to be registered
Column.Data source can send sequence to main website convergent point after the sequence for receiving the transmission of main website convergent point is sent information
It is sent confirmation, information is sent to inform that sequence itself has been received in main website convergent point, data sequence will be sent.
Further, referring to figure 5., Fig. 5 is the flow chart of another collecting method provided in an embodiment of the present invention,
Step S111- step S112 could alternatively be following steps:
Step S201: data source reads N number of data from substation according to N number of Data Identification.
Step S202: data source sends N number of data to the main website convergent point.
The possible more than one in the corresponding substation of one data source, but multiple substations within the scope of certain geographical.When
After the data sequence to be registered that data sources are sent to main website convergent point, can be searched out according to Data Identification therein with
The corresponding substation of data, and the data of needs are read from all data that the correspondence substation is sent, it is sent to main website convergent point,
Substation is assigned in different data sources according to geographic area to realize.
It should be noted that it can only send once that data source, which sends data sequence to main website convergent point, it can also
Being sent in real time to main website convergent point according to the updates of substation data, can also be according to the update cycle property of substation data
It is sent to main website convergent point, concrete mode should be selected according to the actual situation.
Step S203: what main website convergent point received that the cloud platform sends unsubscribes instruction.
Step S204: main website convergent point sends cancel register to the data source according to the sign-on ID and requests.
Step S205: main website convergent point receives the cancel register response that the data source returns.
Step S206: the cancel register request that main website convergent point described in data sources is sent.
Step S207: data source sends cancel register response to the main website convergent point, and stops converging to the main website
Point sends data sequence.
Step S208: main website convergent point receives the data sequence that the data source is sent.
When cloud platform no longer needs to obtain the data of subscription, it can be sent to main website convergent point and unsubscribe instruction,
In, unsubscribing instruction includes sign-on ID corresponding with data command is subscribed to.Main website convergent point is ordered according to the cancellation received
The sign-on ID in instruction is read, sends cancel register response to corresponding data source.Data source is receiving the transmission of main website convergent point
Cancel register response after, to main website convergent point send cancel register respond and stop to main website convergent point transmission data sequence.
It should be noted that sign-on ID may include all Data Identifications subscribed in data command, at this point, this time is ordered
The total data read stops sending;Sign-on ID is also possible that a part of Data Identification subscribed in data command, for example,
All data corresponding with a substation, the perhaps and corresponding partial data in a substation or portion corresponding with a substation
Divided data and partial data corresponding with another substation etc., it should be adjusted according to the actual situation.
Further, Fig. 6 is please referred to, Fig. 6 is the flow chart of another collecting method provided in an embodiment of the present invention,
After step sl 12, collecting method further includes following steps:
Step S113: the data sequence is sent to the cloud platform by main website convergent point.
After the data sequence that main website convergent point receives data source transmission, the data sequence received can be sent to
Cloud platform, so that cloud platform carries out subsequent data processing or data analysis etc. using the data received.
In embodiments of the present invention, a kind of collecting method is provided, comprising: cloud platform is ordered to the transmission of main website convergent point
Data command is read, main website convergent point sends number to be registered to corresponding data source according to the subscription Data Identification subscribed in data command
According to sequence, data source reads the data in corresponding substation according to the Data Identification in data sequence to be registered, and will read
Data are sent to main website convergent point, and main website convergent point sends these data to cloud platform again.The method achieve cloud platform, converge
Data between accumulation, data source transmit the coordinating and unifying, improve the efficiency of data acquisition, while it is logical to realize main website convergent point
It crosses data source and directly subscribes to substation data required for cloud platform, reduce the time delay of main website real time data.
Second embodiment
The embodiment of the present invention provides a kind of data acquisition device 500, is applied to main website convergent point 200, please refers to Fig. 7, Fig. 7
For a kind of structural block diagram of data acquisition device provided in an embodiment of the present invention.Data applied to main website convergent point 200 acquire
Device 500 includes: the first sending module 510, the second sending module 520 and the first receiving module 530.Wherein, it first sends
Module 510 is used to send data registration request to data source 300;Second sending module 520 is for receiving the data source
After the 300 accreditation verification responses returned, data sequence to be registered is sent to the data source 300;First receiving module 530 is used for
Receive the data sequence that the data source 300 is sent.
The embodiment of the present invention also provides a kind of data acquisition device 600, is applied to data source 300, please refers to Fig. 8, Fig. 8 is
The structural block diagram of another kind data acquisition device provided in an embodiment of the present invention.Data acquisition device applied to data source 300
600 include: third sending module 610, the second receiving module 620 and the 4th sending module 630.Wherein, third sending module
610 to the main website convergent point 200 for sending and registering after the data registration request for receiving the transmission of main website convergent point 200
Confirmation response;Second receiving module 620 is used to receive the data sequence to be registered that the main website convergent point 200 is sent;4th hair
Send module 630 for sending data sequence to the main website convergent point 200.
The embodiment of the present invention also provides a kind of electronic equipment, comprising: processor, memory and bus, the memory
The executable machine readable instructions of the processor are stored with, when electronic equipment operation, the processor is deposited with described
By bus communication between reservoir, the machine readable instructions execute any of first embodiment when being executed by the processor
Any method in optional implementation.
The embodiment of the present invention also provides a kind of computer readable storage medium, is stored on the computer readable storage medium
Computer program executes any in any optional implementation of first embodiment when the computer program is run by processor
The method.
In conclusion the embodiment of the present invention provides a kind of collecting method and device, wherein be applied to main website convergent point
Collecting method include: to data source send data registration request;Wherein, the data source is the remittance of multiple substation data
Accumulation;After receiving the accreditation verification response that the data source returns, data sequence to be registered is sent to the data source;Its
In, the data sequence to be registered includes N number of Data Identification;Receive the data sequence that the data source is sent;Wherein, the number
It include N number of data corresponding with the N number of Data Identification according to sequence.Realize that main website convergent point is directly subscribed to cloud by data source and put down
Substation data required for platform reduce the time delay of main website real time data.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.