CN101826035A - Communication method between application programs - Google Patents
Communication method between application programs Download PDFInfo
- Publication number
- CN101826035A CN101826035A CN201010146179A CN201010146179A CN101826035A CN 101826035 A CN101826035 A CN 101826035A CN 201010146179 A CN201010146179 A CN 201010146179A CN 201010146179 A CN201010146179 A CN 201010146179A CN 101826035 A CN101826035 A CN 101826035A
- Authority
- CN
- China
- Prior art keywords
- data
- application program
- shared file
- file
- application programs
- 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.)
- Pending
Links
Images
Abstract
The invention is applicable to the field of computer software, and provides a communication method between application programs. The method comprises the following steps that: a shared file between two application programs is configured, and the file name of the shared file are informed to the two application programs; a write data application program acquires data and writes the data into the shared file; and a read data application program reads the data in the shared files. By establishing a third-party shared file, the communication method uses one application program to write data into the file, uses the other application program to read the data in the shared file by a sharing mode, and realizes mutual communication between the two application programs under the condition of no need of knowing the principles of the two application programs.
Description
Technical field
The invention belongs to computer software fields, relate in particular to the means of communication between a kind of application program.
Background technology
Communicating with one another between the application program is meant that two or more separate application programs are by carrying out exchanges data someway, for example the A program provides data message, B program read data information, set up communication between A program, the B program by certain mode, after the A program is obtained information data are offered the B program, return message is given the A program after the B program reading of data.
In actual applications, common two application programs are different solution supplier's stand-alone developments, and for the reason of technical know-how, the programming principle and the code of general two application programs are all underground.For example at the colour television set production industry, need electronic identity sign indicating number of programming in every televisor, because the electronic identity sign indicating number has enciphered message, its cryptographic algorithm need be solidificated in the application program, can not reveal openly, and this application program is developed voluntarily by manufacturer.After obtaining, the electronic identity sign indicating number need programming in the electronic equipment of every televisor, because the burning link relates to the communications protocol of televisor, this programming application program is generally provided by each television set chip scheme merchant, its communications protocol, principle can not be revealed open, therefore how to realize that two communications between the program are extremely important.
Summary of the invention
The purpose of the embodiment of the invention is to provide the means of communication between a kind of application program, is intended to solve the communication problem between application program.
The embodiment of the invention is achieved in that the means of communication between a kind of application program, and described method comprises the steps:
Dispose the shared file between two application programs, notify two application programs the filename of described shared file;
The write data application program is obtained data, and data are write described shared file;
The read data application program reads the data in the described shared file.
The embodiment of the invention is by setting up third party's shared file, application program write data in this document, the Another application program reads data in the shared file with sharing mode, understand under the situation of two application program principles need not, realized the mutual communication between two application programs.
Description of drawings
Fig. 1 is the realization flow figure of the means of communication between the application program that provides of first embodiment of the invention;
Fig. 2 is the realization flow figure of the means of communication between the application program that provides of second embodiment of the invention.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The embodiment of the invention is set up third party's shared file at hard disc of computer, application program write data in this shared file, the Another application program reads this shared file with sharing mode and carries out the data application, communication between two application programs transforms respectively the communication with third party's shared file, can need not to understand under the situation of two application program principles, realize the communication between two application programs.
The method of embodiment of the invention use file-sharing realizes the communication between two application programs, realizes simply, only need satisfy two all addressable shared files of application program and therefrom read and write data getting final product.
Fig. 1 shows the realization flow of the means of communication between the application program that first embodiment of the invention provides, and details are as follows:
In step S101, dispose the shared file between two application programs, notify two application programs with the filename of shared file;
The purpose of file-sharing is to realize two equal accessible file of application program.In embodiments of the present invention, the file of sharing for need and two application programs are in the situation of same computer, because file all is resource sharings for all programs of this machine, need not to be provided with at this moment the shared attribute of file.As long as in the file of sharing for need and two application programs a situation that is not in same computer is arranged, as long as catalogue then is set to be shared, be mapped to network drive, just can realize of the visit of two application programs this document, thus the communication between the realization program.
In step S102, the write data application program is obtained data, and data are write shared file;
In step S103, the read data application program reads the data in the shared file.
Because third party's shared file is not subjected to the constraint of two application programs, if the write data application program does not in time refresh file, the data that will cause the read data application program to read are legacy data.Misread data problem for what the repeated use that prevents the factor certificate brought, make each data can only be between program communication once, in embodiments of the present invention, write data application program identical file of spanned file name all when each write data, if had this document under the share directory, then covered the original refresh data.
The file that needs only this filename of visit for the read data application program is a readable data, but because the each write data of write data application program all generates the file of same file name, if the not timely refreshing file of write data application program, can exist the read data application program to misread the problem of legacy data, therefore adopt the i.e. mode of deletion that reads, after read data application program success reading of data with file delete, guaranteed each data can only be between program communication once.
Fig. 2 shows the realization flow of the means of communication between the application program that second embodiment of the invention provides, and details are as follows:
In step S201, dispose the shared file between two application programs, notify two application programs with the filename of shared file;
In step S202, the write data application program is obtained data;
In step S203, the write data application program judges whether there are data of the same name under the share directory, is execution in step S204 then, otherwise execution in step S205;
In step S204, the write data application program covers refresh data with the data of the same name under the share directory;
In step S205, the write data application program writes shared file with data;
In step S206, the read data application program reads the data in the shared file;
In step S207, after the data read success, the data in the read data application program deletion shared file.
Below the concrete application of the file-sharing means of communication on televisor between the application program that provides for the embodiment of the invention.
At the colour television set production industry, need be in every televisor electronic identity sign indicating number of burning, because being finished by " the anti-falsifying sign indicating number of electronics generates software " and " HDCP Key/Data Writing Tool software " respectively of burning obtained and read to the data of electronic identity sign indicating number, the embodiment of the invention, set up third party's file by the mode of file-sharing, realize the communication between two programs, thereby realize the burning of electronic identity sign indicating number.
Its concrete implementation is as follows:
(1) file-sharing
Under the D of computer dish catalogue, set up file " BarCode ", because file " BarCode ", " the anti-falsifying sign indicating number of electronics generates software " and " HDCP Key/Data Writing Tool software " are under same the computer, so file " BarCode " has been shared for two programs, need not to be provided with the shared attribute of file.
(2) file of electronic identity sign indicating number generates
The electronic identity sign indicating number is by using the fuselage bar code of every the televisor of barcode scanner scanning that is connected with computer, the method of catching by " the anti-falsifying sign indicating number of electronics generates software " of running background obtains again, the final binary file that generates file Bar.bin. by name under D: BarCode catalogue, the data of this document are the electronic identity sign indicating number of this televisor.
The concrete operations step is as follows: at first the barcode scanner substituting for key is inserted the hard-disk interface of this computer, open operation " the anti-falsifying sign indicating number of electronics generates software " then; In actual production, when a televisor is carried when coming from production line, with barcode scanner scanning television receiver body bar code, " electronics anti-falsifying sign indicating number generate software " can catch the data of sending here from barcode scanner automatically and carry out cryptographic calculation, the final binary file that generates file Bar.bin. by name under D: BarCode catalogue at this moment.If the Bar.bin file exists, then cover refresh process.
(3) file of electronic identity sign indicating number reads
The third party Bar.bin file of charged sub-identity code information is finished it by " HDCP Key/DataWriting Tool software " and is read and use after generating, and deletes the Bar.bin file of this generation after successfully reading immediately.
The concrete operations step is as follows: each parameter (disposable setting) that software at first is set, choose " Extra DataFile " option, in its corresponding input field, import path " D: BarCode BarCode.bin ", " UartSetting " each parameter etc. is set; Then televisor being crossed data line with the computer expert links to each other, turn on televisor and click " Program " button of software, software can read the Bar.bin file automatically and data be write in the respective memory of televisor, and software interface shows that " Pass " then represents to read the burning success.After the data read burning success, software can be with the Bar.bin file delete to prevent repeating to misread data, if burning failure Bar.bin file still keeps.
The embodiment of the invention is by setting up third party's shared file, application program write data in this document, the Another application program reads data in the shared file with sharing mode, understand under the situation of two application program principles need not, realized the mutual communication between two application programs.Simultaneously, by setting up the rule of " writing data of the same name " and " read i.e. deletion ", make the data of each generation can only be between program communication once, prevent to misread data problem because of what repeated use brought.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.
Claims (4)
1. the means of communication between an application program is characterized in that described method comprises the steps:
Dispose the shared file between two application programs, notify two application programs the filename of described shared file;
The write data application program is obtained data, and data are write described shared file; The read data application program reads the data in the described shared file.
2. the method for claim 1 is characterized in that, when the write data application program write described shared file with data, described method further comprised the steps:
The write data application program judges whether there are data of the same name under the share directory, is then the data of the same name under the share directory to be covered, and refresh data, otherwise data are write shared file.
3. the method for claim 1 is characterized in that, after the read data application program successfully read data in the described shared file, described method further comprised the steps:
Data in the read data application program deletion shared file.
4. the method for claim 1 is characterized in that, when having one not to be in same computer in the data of Gong Xianging and two application programs if desired, the step of the shared file between two application programs of described configuration is specially:
Catalogue is set shares, be mapped to network drive;
Described shared file place catalogue is set for sharing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010146179A CN101826035A (en) | 2010-04-07 | 2010-04-07 | Communication method between application programs |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201010146179A CN101826035A (en) | 2010-04-07 | 2010-04-07 | Communication method between application programs |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101826035A true CN101826035A (en) | 2010-09-08 |
Family
ID=42689962
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201010146179A Pending CN101826035A (en) | 2010-04-07 | 2010-04-07 | Communication method between application programs |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101826035A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016192196A1 (en) * | 2015-06-03 | 2016-12-08 | 中兴通讯股份有限公司 | Method and device for transmitting data between application programs |
CN109213103A (en) * | 2018-09-14 | 2019-01-15 | 四川爱联科技有限公司 | automated production control method |
CN114529977A (en) * | 2020-11-02 | 2022-05-24 | 青岛海尔多媒体有限公司 | Gesture control method and device for intelligent equipment and intelligent equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1384436A (en) * | 2001-04-29 | 2002-12-11 | 英业达股份有限公司 | Data exchange system and method for coexisting operation systems |
CN1575455A (en) * | 2001-08-27 | 2005-02-02 | 英特尔公司(特拉华公司) | Distributed read and write caching implementation for optimized input/output applications |
US20050089446A1 (en) * | 2003-10-28 | 2005-04-28 | Biomerieux, Inc. | Transport system for test sample carrier |
CN101094026A (en) * | 2006-06-19 | 2007-12-26 | 上海全成通信技术有限公司 | Method for synchronizing, transmitting mass data, and inputting mass data to database |
CN101667144A (en) * | 2009-09-29 | 2010-03-10 | 北京航空航天大学 | Virtual machine communication method based on shared memory |
-
2010
- 2010-04-07 CN CN201010146179A patent/CN101826035A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1384436A (en) * | 2001-04-29 | 2002-12-11 | 英业达股份有限公司 | Data exchange system and method for coexisting operation systems |
CN1575455A (en) * | 2001-08-27 | 2005-02-02 | 英特尔公司(特拉华公司) | Distributed read and write caching implementation for optimized input/output applications |
US20050089446A1 (en) * | 2003-10-28 | 2005-04-28 | Biomerieux, Inc. | Transport system for test sample carrier |
CN101094026A (en) * | 2006-06-19 | 2007-12-26 | 上海全成通信技术有限公司 | Method for synchronizing, transmitting mass data, and inputting mass data to database |
CN101667144A (en) * | 2009-09-29 | 2010-03-10 | 北京航空航天大学 | Virtual machine communication method based on shared memory |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016192196A1 (en) * | 2015-06-03 | 2016-12-08 | 中兴通讯股份有限公司 | Method and device for transmitting data between application programs |
CN106293956A (en) * | 2015-06-03 | 2017-01-04 | 中兴通讯股份有限公司 | The method and device of data transmission between a kind of application program |
CN109213103A (en) * | 2018-09-14 | 2019-01-15 | 四川爱联科技有限公司 | automated production control method |
CN109213103B (en) * | 2018-09-14 | 2021-03-16 | 四川爱联科技股份有限公司 | Automatic production control method |
CN114529977A (en) * | 2020-11-02 | 2022-05-24 | 青岛海尔多媒体有限公司 | Gesture control method and device for intelligent equipment and intelligent equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103119550B (en) | Store the digital content with time-varying characteristics | |
CN113095749A (en) | Logistics information transmission method, system and device based on block chain | |
CN101404665A (en) | Method and apparatus for processing data | |
CN104063495A (en) | Form extension method and form extension device | |
JP2006222787A (en) | Radio communication system, reader/writer device, key management method, and computer program | |
CN110430121A (en) | Message informing method and device | |
CN103442012B (en) | Method and device that CAMEL-Subscription-Information migrates is realized between internet of things equipment | |
CN102571705A (en) | Information processing method and server | |
CN105913102B (en) | A kind of generation method and device of Quick Response Code | |
CN101826035A (en) | Communication method between application programs | |
CN109858257B (en) | Access control method and device | |
CN101282347B (en) | Method for controlling intelligent storing card | |
JP2020024758A (en) | Maintenance element capable of being restored to factory state | |
KR20120105281A (en) | Method for generating electronic appliance identifier and managing information by using the electronic appliance identifier | |
CN101655865A (en) | Method for providing object information, object platform and application system | |
CN103595573A (en) | Method and device for issuing strategy rules | |
CN116645061A (en) | Customs clearance data processing method based on block chain system and consensus node | |
CN109598137B (en) | Method and system for safely processing data | |
CN103718531A (en) | Capacity acquiring method, device and system | |
CN111324645A (en) | Data processing method and device for block chain | |
CN104239307A (en) | User information storage method and system | |
CN115033853A (en) | Function access authority control method and device based on intelligent contract | |
CN104202166A (en) | Erp(enterprise resource planning) system data encryption method | |
CN105279670B (en) | Application automatic publishing method and system based on trusted service management platform | |
JP5972455B2 (en) | How to delete information |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20100908 |