Electricity-selling system data acquisition system (DAS), the formula of certainly upgrading electricity-selling system
Technical field
The invention relates to utility commodity (such as water, electricity, gas etc.), especially grid power prepayment metering technical field, in more specific words it, the invention relates to a kind of electricity-selling system data acquisition system (DAS) that realizes novel data acquisition, and auto-update formula card prepay charging management system based on this design of data acquisition system, and further relate to a kind of method of system auto-update of the power meter reading system of realizing based on thin-client technology.
Background technology
B/S(browser/server) framework is browser/server structure, and it is the rise along with Internet technology, to original C/S(client/server) one of framework changes or improved structure.Under this structure, user job interface is to realize by www browser, and few part the affair logic is realized at front end (Browser), but main the affair logic is in server end (Server) realization, forms so-called three layers of 3-tier structure.B/S structure great majority or main service logic are all present in server end, therefore, the system of B/S structure does not need to install client software, it operates on the browser of client, system upgrade or only need update server end software while safeguarding, so just greatly simplify client computer load, alleviated cost and the workload of system maintenance and upgrading, reduced user's overall cost.The system that is produced as of B/S structural system is faced unlimited unknown subscriber possibility is provided.Certainly, compared with C/S structure, it is slower that B/S structure also exists system running speed, the uncontrollable weakness of user of access system.
Current, in the data acquisition main station system of utility commodity, mainly to have adopted B/S framework to be designed, design based on this widely used system architecture, but, although this mode easy operating, and be directed to electricity-selling system, not also a kind of being suitable for completely and easy structure.Especially, technician notices that it exists increasing defect, for example, topmost problem is after having set up communication between user and main website, mode by the WEB page is carried out data interaction, while use for the smaller area of some network bandwidth, owing to needing the contents such as downloading data, figure or form in communication process, the stand-by period that needs user to grow, and can not ensure that each communication is all effectively, may there will be connection error, the uneasy congruent problem of information.Or, for the user without type, can not meet its different performance requirement, system must rely on manually upgrading and debug of maintainer, and has the key issues such as clock is inconsistent, therefore needs to improve.
Summary of the invention
The present invention is intended to solve the defect that prior art exists, and designs a kind of electricity-selling system data acquisition system (DAS), and further designs a kind of electricity-selling system of upgrading formula certainly that utilizes this data acquisition system (DAS), and further disclose the method for the auto-update of this kind of electricity-selling system.In the preferred technical solution of the present invention, provided WEB_SERVICE interface can be provided a server end of notebook data acquisition system, provide access such as main website terminal database, cryptographic services, for example, with the difference request (sale of electricity request) of customer in response end, server is receiving after request, obtain corresponding data or parameter, then with cipher mode request sale of electricity TOKEN code.
The present invention adopts the mode of thin-client to design, and facilitates client to install and uses; Meanwhile, between client and server, be the request msg of pure TOKEN mode by the data communication of network, and do not relate to picture figure, form or other irrelevant stream medium datas, saved data traffic and bandwidth.
In order to realize above-mentioned purpose of design, first the present invention proposes a kind of data acquisition system (DAS) of applying thin client terminal, and between the user side of thin client terminal and sale of electricity main website end, apply the server end of a PC class, can realize the data communication between user side and electricity-selling terminal and encryption.Specific as follows:
A kind of electricity-selling system data acquisition system (DAS), it comprises Client application end, server end and electricity-selling terminal, described Client application end is connected with electricity-selling terminal communication by server end, in wherein said server end, includes:
WEB_SERVICE port, described server end is connected to receive and send data message with Client application end and electricity-selling terminal communication respectively by described WEB_SERVICE port;
For the storage unit that the data message receiving is stored;
The data encryption control end that these data messages is decrypted and is encrypted in the reception of data message with while sending; And
Processing unit, it is of coupled connections that with storage unit and data encryption control end these data messages are processed respectively.
Further, in a preferred embodiment of the invention, described Client application end is provided with thin customer unit, described electricity-selling terminal is provided with thin-client, described thin customer unit is connected to WEB_SERVICE port by a PORT COM of Client application end, and described thin-client is connected to WEB_SERVICE port by a PORT COM.
Further, in a preferred embodiment of the invention, described Client application end is further provided with one for showing the display unit of data message, and described display unit and thin customer unit are of coupled connections.
Further, in a preferred embodiment of the invention, described server end carries out communication data recovery according to following steps:
1) command request of reception Client application end;
2) send communication connection request to electricity-selling terminal;
3) obtain the request return information of electricity-selling terminal, set up communication with Client application end and electricity-selling terminal and be connected;
4) be that a communication connects a period of time T 0 capable of circulation of setting, to described period of time T 0, interior communication connects a data information memory that receives and send in storage unit;
5) circulation step 4) until when communication disconnecting, extract the data message in a upper period of time T 0, and be back to step 1).
Further, in a preferred embodiment of the invention, described server end carries out data delay processing according to following steps:
1) obtain data message from Client application end, by these data information memory in storage unit;
2) from electricity-selling terminal acquisition time synchronizing information;
3) be data message synchronizing information setup time by processing unit.
Further, in a preferred embodiment of the invention, further comprise step in step 1): set a very first time cycle T 1 taking time order I as data message;
Further, in a preferred embodiment of the invention, in step 2) further comprise step: set second period of time T 2 taking time order II as time synchronization information;
Further, in a preferred embodiment of the invention, wherein said very first time cycle T 1 is less than the second period of time T 2.
Further, in a preferred embodiment of the invention, further comprise step in step 3): for the corresponding very first time cycle T 1 of data message compensates a time limit number, to make very first time cycle T 1 equal the second period of time T 2.
In order to realize above-mentioned purpose of design, the present invention further proposes a kind of card prepay charging management system based on aforementioned techniques scheme, is provided with thin client terminal equipment in this system, can realize the data transmission of unique safety.Specific as follows:
A kind of from upgrading formula electricity-selling system, it comprises that server end, electricity-selling terminal and several are provided with the electric power acquisition terminal of Client application end, described electric power acquisition terminal is connected to server end, and described server end is connected to electricity-selling terminal, in wherein said server end, includes:
WEB_SERVICE port, described server end is connected to receive and send data message with electric power acquisition terminal and electricity-selling terminal communication respectively by described WEB_SERVICE port;
For the storage unit that the data message receiving is stored;
The data encryption control end that these data messages is decrypted and is encrypted in the reception of data message with while sending; And
Processing unit, it is of coupled connections that with storage unit and data encryption control end these data messages are processed respectively.
Further, in the first preferred embodiment of the present invention, described electric power acquisition terminal comprises:
Metering units, it obtains the electric signal of electric system line of electric force by sample circuit, these electric signal are converted to digital signal and calculated data value;
Thin customer unit, it is connected in metering units and receives and process these data values;
Display unit, described display unit and thin customer unit are of coupled connections; And
A PORT COM, it is connected in thin customer unit and data value after treatment is transferred to server end, wherein said thin customer unit and display unit composition Client application end.
Further, in the second preferred embodiment of the present invention, described electric power acquisition terminal comprises:
Metering units, it obtains the electric signal of electric system line of electric force by sample circuit, these electric signal are converted to digital signal and calculated data value;
Thin customer unit, it is connected in metering units and receives and process these data values;
Display unit, described display unit and thin customer unit are of coupled connections;
The thin client's display unit being of coupled connections with described display unit, and
A PORT COM, it is connected in thin customer unit and data value after treatment is transferred to server end, wherein said thin customer unit and thin client's display unit composition Client application end.
Further, in a preferred embodiment of the invention, described electricity-selling terminal is provided with thin-client, and described thin customer unit is to be connected to WEB_SERVICE port by PORT COM, and described thin-client is connected to WEB_SERVICE port by a PORT COM.
The system that the present invention has further proposed a kind of aforementioned card prepay charging management system is upgraded the method for upgrading automatically, in solving the effective transmission communication of data, and the upgrading that can upgrade in time of the plug-in unit to redaction and software function.Specific as follows:
A foregoing automatically updating method from upgrading formula electricity-selling system, comprises the following steps:
1) send update request by the thin customer unit of Client application end to server end
2) processing unit of described server end receives and verifies this update request, and sends lastest imformation to a thin-client of electricity-selling terminal;
3) described thin-client receives update request, and passes through a PORT COM from outside down loading updating data;
4) by thin-client, the more new data of downloading is resolved, and set communications protocol order;
5) by thin-client, the more new data after setting is sent to server end by PORT COM;
6) server end will upgrade data setting in a storage unit;
7) processing unit of described server will be more new data resolve, and isolate the required more new data of thin customer unit;
8) by data encryption control end, data are encrypted;
9) described more new data is sent to thin customer unit by the WEB_SERVICE port of described server.
Further, in a preferred embodiment of the invention, described refresh routine is sent with TOKEN code.
The preferred embodiments of the invention are by below with in addition detailed description of the mode with reference to accompanying drawing.
Brief description of the drawings
Fig. 1 is the structure principle chart of the preferred embodiment of electricity-selling system of the present invention data acquisition system (DAS);
Fig. 2 is the theory diagram that the present invention has the card prepay charging management system of this kind of data acquisition system (DAS).
Embodiment
Embodiment 1:
With reference to Fig. 1, electricity-selling system data acquisition system (DAS) of the present invention, it comprises Client application end 1, server end 2 and electricity-selling terminal 3, described Client application end 1 is connected with electricity-selling terminal 3 communications by server end 2, in wherein said server end 2, includes:
WEB_SERVICE port 24, server end 2 is connected to receive and send data message with Client application end 1 and electricity-selling terminal 3 communications respectively by described WEB_SERVICE port 24, this port is not subject to the restriction of any communications protocol and the impact of band width in physical, but need in use its residing hardware environment to be arranged, the processor 21 of server end 2 of the present invention has solved this problem;
For the storage unit 22 that the data message receiving is stored, be preferably an EEPROM class storer;
The data encryption control end 23 that these data messages is decrypted and is encrypted in the reception of data message with while sending, described encryption control end 23 is hardware controls, at data receiver then, before the code in requisition for encrypting, send an identifier by processor 21, these identifiers are only effective to Client application end 1, or, this control end 23 can be carried out to software modularity, but actual effect and stability do not have hardware control ideal yet; And
Processing unit 21, it is of coupled connections that with storage unit 22 and data encryption control end 23 these data messages are processed respectively.
Further, in a preferred embodiment of the invention, described Client application end 1 is provided with thin customer unit 11, described electricity-selling terminal 3 is provided with thin-client 31, described thin customer unit 11 is connected to WEB_SERVICE port 24 by a PORT COM 12 of Client application end 1, and described thin-client 31 is connected to WEB_SERVICE port 24 by a PORT COM 32.
Further, in a preferred embodiment of the invention, user can carry out communication by application port 12 and server end 2, for example user can use a radio-frequency card, accounts information in card is transferred to thin customer unit 11, or be transferred to Client application end 1 by handheld device PDA with infrared mode, or connect an operating key in the outside of Client application end 1, in order to direct input user profile.
Further, in a preferred embodiment of the invention, described Client application end 1 is further provided with one for showing the display unit 13 of data message, and described display unit 13 is of coupled connections with thin customer unit 11.
Further, in a preferred embodiment of the invention, described server end 2 carries out communication data recovery according to following steps:
1) command request of reception Client application end 1;
2) send communication connection request to electricity-selling terminal 3;
3) obtain the request return information of electricity-selling terminal 3, set up communication with Client application end 1 and electricity-selling terminal 3 and be connected;
4) be that a communication connects a period of time T 0 capable of circulation of setting, to described period of time T 0, interior communication connects a data information memory that receives and send in storage unit 22;
Circulation step 4) until when communication disconnecting, extract the data message in a upper period of time T 0, and be back to step 1).
Further, in a preferred embodiment of the invention, described server end 2 carries out data delay processing according to following steps:
Obtain data message from Client application end 1, by these data information memory in storage unit 22;
From electricity-selling terminal 3 acquisition time synchronizing informations;
Be data message synchronizing information setup time by processing unit 21.
Further, in a preferred embodiment of the invention, further comprise step in step 1): set a very first time cycle T 1 taking time order I as data message;
Further, in a preferred embodiment of the invention, in step 2) further comprise step: set second period of time T 2 taking time order II as time synchronization information;
Further, in a preferred embodiment of the invention, wherein said very first time cycle T 1 is less than the second period of time T 2.
Further, in a preferred embodiment of the invention, further comprise step in step 3): for the corresponding very first time cycle T 1 of data message compensates a time limit number, to make very first time cycle T 1 equal the second period of time T 2.
Embodiment 2:
With reference to Fig. 2, the present invention further proposes a kind of electricity-selling system of upgrading formula certainly based on embodiment 1, it comprises that server end 2, electricity-selling terminal 3 and several are provided with the electric power acquisition terminal 4 of Client application end 1, electric power acquisition terminal 4 is connected to server end 2, server end 2 is connected to electricity-selling terminal 3, wherein in server end 2, includes:
WEB_SERVICE port 24, described server end 2 is connected to receive and send data message with electric power acquisition terminal 4 and electricity-selling terminal 3 communications respectively by described WEB_SERVICE port 24;
For the storage unit 22 that the data message receiving is stored;
The data encryption control end 23 that these data messages is decrypted and is encrypted in the reception of data message with while sending; And
Processing unit 21, it is of coupled connections that with storage unit 22 and data encryption control end 23 these data messages are processed respectively.
Further, in the first preferred embodiment of the present invention, electric power acquisition terminal 4 can be an electrical measuring device, and it comprises:
Metering units 41, it preferably includes access electric system line of electric force PWR end and picks out the ramp composition to user load LOAD end simultaneously, described ramp is further arranged in an electric power signal sample circuit, obtain current signal I and the voltage signal U of electric system line of electric force by sample circuit, these electric signal converted to digital signal and calculate by a computation chip in metering units 41 (being preferably 6454 class low-cost chips) electrical power P that user consumes:
P=∑ U × I draws data value, and further the integrating circuit of the processor (being preferably a dsp chip) by metering units 41 draws electric power electric energy consumption consumption data value;
Thin customer unit 42, it is connected in the dsp chip of metering units 41 and receives and process these energy data values, data is carried out to assembly simultaneously and calculates such as rate information, active energy, reactive energy or phase information etc.In a preferred embodiment of the invention, these information can utilize separately a MCU cell processing to complete, then be transferred to thin customer unit 42, or these computing functions are directly integrated on the chip of thin customer unit 42, can save like this design cost and space, but can determine according to different technologies personnel's demand;
Display unit 13, described display unit 13 is of coupled connections with thin customer unit 42, in order to show that these data messages are to user or electric system operating personnel, can set and only show customer relationship and understandable data for user, can check full content by output code in the time safeguarding for operating personnel, these means can be realized by prior art, repeat no more herein; And
A PORT COM 43, it is connected in thin customer unit 42 and electric power energy data value after treatment is transferred to server end 2, and wherein said thin customer unit 42 and display unit 13 form Client application end 1.
Further, in the second preferred embodiment of the present invention, electric power acquisition terminal 4 can be an electrical measuring device, with the first embodiment similarly, it comprises:
Metering units 41, it obtains the electric signal of electric system line of electric force by sample circuit, these electric signal are converted to digital signal and calculated data value;
Thin customer unit 42, it is connected in metering units 41 and receives and process these data values;
Display unit 13, described display unit 13 is of coupled connections with thin customer unit 42;
Different is, further comprise a thin client's display unit 14 being of coupled connections with described display unit 13, an and PORT COM 43, it is connected in thin customer unit 42 and data value after treatment is transferred to server end 2, and wherein said thin customer unit 42 and thin client's display unit 14 form Client application end 1.
In a preferred embodiment of the invention, can design a kind of display, the electrical measurement that has wherein been coupled data display unit 13 and thin client's display module 14, when energy data shows, user can check by display unit 14 user's self information, such as electricity price rate information, Priority Service Rate information, balance amount information etc., this part information can calculate by thin customer unit 42 chips separately.
Further, in a preferred embodiment of the invention, described electricity-selling terminal 3 is provided with thin-client 31, and described thin customer unit 42 is to be connected to WEB_SERVICE port 24 by PORT COM 43, and described thin-client 31 is connected to WEB_SERVICE port 24 by a PORT COM 32.
Embodiment 3:
The present invention proposes a kind of automatically updating method from upgrading formula electricity-selling system simultaneously, comprises the following steps:
1) send update request by the thin customer unit 11 of Client application end 1 to server end 2, in a preferred embodiment of the invention, thin customer unit 11 can be set a time cycle, and the node Ts of every time cycle sends to 2 one of server ends to upgrade request of data; Simultaneously, it should be understood that, in order to keep validity and the real-time of the data that electrical measurement draws, in the process of transmitting of data, carry out periodic data monitoring, if there is fluctuation in energy information, for example line voltage is unstable, or in the situation such as the unbalance appearance of three-phase electricity is wrong, should get these information to make judgement timely by terminal 3 by server;
2) processing unit 21 of server end 2 receives and verifies this update request, and sends lastest imformation to a thin-client 31 of electricity-selling terminal 3;
3) thin-client 31 receives update request, and passes through a PORT COM 32 from outside down loading updating data.In a preferred embodiment of the invention, data are to connect external web environment by PORT COM 32, for example INTERNET network or Ethernet downloading data bag or source code information;
4) by thin-client 31, the more new data of downloading is resolved, and set communications protocol order;
5) by thin-client 31, the more new data after setting is sent to server end 2 by PORT COM 32;
6) server end 2 will upgrade data setting in a storage unit 22;
7) processing unit 21 of described server end 2 more new data resolve, and isolate the required more new data of thin customer unit 11, for example, can disassemble new data more, analyze available content wherein, the data of existence have been installed for system and have deleted, then in the data of needs, set protocol command, for example after data name, automatically increase " .soap " order suffix, then again by data formation file;
8) by data encryption control end 23, data are encrypted, the corresponding communications protocol that ciphering process can use system be selected is encrypted, for example, add encrypted frame taking http protocol or File Transfer Protocol as data;
9) described more new data is sent to thin customer unit 11 by the WEB_SERVICE port 24 of described server end 2.
Further, in a preferred embodiment of the invention, described refresh routine is sent with the form of TOKEN code.
These are only some preferred embodiments of the present invention, it is mainly the detailed embodiment to the technology of the present invention feature, and be not the restriction to technical solution of the present invention, those skilled in the art should recognize, apparatus and method of the present invention are applicable to most of public utilities payment systems, such as water meter, gas meter etc.Therefore, the amendment that technical scheme according to the present invention is made, alternative or variation characteristic, all should be covered by the technology category of claims opinion of the present invention.