Embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that, in order to
Be easy to description, illustrate only in accompanying drawing to about the related part of invention.
It should be noted that in the case where not conflicting, the feature in embodiment and embodiment in the application can phase
Mutually combination.Describe the application in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 shows the exemplary system of the embodiment of the information prompting method that can apply the application or information reminding device
System framework 100.
As shown in figure 1, system architecture 100 can include first server 101, network 102 and second server 103.Net
Medium of the network 102 to provide communication link between first server 101 and second server 103.Network 102 can include
Various connection types, such as wired, wireless communication link or fiber optic cables etc..
First server 101 can be to provide the server of various services, for example, run a kind of server of simulation model.
Second server 103 can be to provide the server of various services, for example, run the service of another simulation model
Device.Can be by net between the simulation model run on the simulation model and second server 103 run in first server 101
Network 102 carries out data interaction.
It should be noted that the method for information transfer between simulation model that the embodiment of the present application is provided typically may be used
To be performed by first server 101, it can also be performed by second server 103, correspondingly, for information transfer between simulation model
Device can be arranged in first server 101, can also be arranged in second server 103.
It should be understood that the number of the network and server in Fig. 1 is only schematical.According to needs are realized, can have
There are any number of network and server.
With continued reference to Fig. 2, it illustrates one for the method for information transfer between simulation model according to the application
The flow 200 of embodiment.This is used for the method for information transfer between simulation model, comprises the following steps:
Step 201, in response to listening to the first connection request that the second main frame of the second simulation model of operation is sent, first
Main frame and the second main frame set up the first communication connection.
In the present embodiment, analogue system according to pre-defined rule can be split into multiple simulation models.For example, with to certain
Exemplified by the analogue system that one virtual production base is emulated, can the analogue system split into raw material warehouse district model
With producing section model etc..Further, can also according to production process by produce section model be further split into multiple production works
Sequence model.
Each simulation model split out from a simulation model can be with isolated operation in a server.
Two simulation models (the first simulation model and the second simulation model) are split into an analogue system herein
Exemplified by illustrate.
In the present embodiment, for information transfer between simulation model method operation the first main frame thereon (for example
Server 101 shown in Fig. 1) on can run the first simulation model.On second main frame (such as the server 103 shown in Fig. 1)
The second simulation model can be run.
First main frame can carry out information exchange by cable network or wireless network and the second main frame.For the first main frame
And second the cable network connected between main frame or wireless network can use communication protocol such as transmission control protocol
(Transmission Control Protocol, TCP) carries out information transfer.
In the present embodiment, the first simulation model can include the component of multiple types, and the second simulation model can also be wrapped
Include the component of multiple types.Further, can be between the component in the component and the second simulation model in the first simulation model
With certain logical relation.For example, the first simulation model can be the raw material warehouse district model of production base.Mould is emulated first
Can be stored with a variety of components for representing raw material in type.Second simulation model can be the production section model of production base.
The component that raw material component when production emulation is carried out in the second simulation model is stored in the first simulation model.Namely
Say, the group provided to the second simulation model needed for its operation can be provided after the first simulation model of operation in the first simulation model
Part.
In the present embodiment, as above, can be between the component in the component and the second simulation model in the first simulation model
With certain logical relation.Need to receive from the first simulation model when running the second simulation model and be stored in the first emulation mould
Module information in type.
First main frame is after the first simulation model has been run, and the first main frame can distribute port for the first simulation model
Number.First main frame is in the state monitored and whether have the connection request from other main frames.
Second main frame is after the second simulation model is run, or the second simulation model assignment of port numbers.
In communication protocol (such as Transmission Control Protocol), any one application program run in a network can be by running
The Internet protocol address of the main frame of the application program and the port numbers of the application program uniquely specify the application program.
In the present embodiment, the second main frame can send the first connection request to the first main frame.Above-mentioned first connection request
The Internet protocol address that can for example the first main frame be included, the corresponding port of the first simulation model run on the first main frame
Number, the Internet protocol address of the second main frame, the corresponding port numbers of the second simulation model.
First main frame is received after the first connection request that the second main frame is sent, in response to receiving the first connection request, the
One main frame sets up a new thread, and the description as described in the first simulation model in the first main frame is sent to the second main frame.And pass through
After the description of second host acknowledgement, first simulation model, the first communication connection is set up.
Step 202, the module information needed for the simulation model of operation second that the second main frame is sent is received.
In the present embodiment, above-mentioned first main frame can receive second after the first communication connection is set up with the second main frame
Module information needed for the simulation model of operation second that main frame is sent.Said modules information can for example include component type information
And the quantity information of all types of components.
Said modules information can for example be generated by the second simulation model according to preset parameter.In application scenes,
Above-mentioned preset parameter for example can be the quantity of product to be produced in order.
Step 203, all types of components matched with module information are taken out from the first simulation model designated storage location,
And generate feedback information.
In the present embodiment, can be stored with multiple module informations in the first simulation model, can also pass through operation the
One simulation model obtains multiple components.Above-mentioned multiple components can be divided into the component of multiple types.The component of each type can
To be positioned at certain storage location.
First main frame can take out all types of components matched with module information from the first simulation model specified location,
And generate feedback information.Above-mentioned specified location for example can be in the said modules information obtained after running the first simulation model
All types of components correspondence storage location.Above-mentioned feedback information can for example include taking out from the first simulation model specified location
Give second with all types of module informations of said modules information match and by above-mentioned all types of module information directive sendings
The identification information of simulation model.
Step 204, to the second simulation model send feedback information.
The method that above-described embodiment of the application is provided is by running the first response of host of the first simulation model in monitoring
The first connection request sent to the second main frame, sets up the first communication connection.The operation second for receiving the transmission of the second main frame is emulated
Module information needed for model, then from the first simulation model designated storage location take out with module information match it is all kinds of
Type component, and feedback information is generated, then to the second simulation model send feedback information, realize the information between simulation model
Transmission, is conducive to the method and apparatus of information transfer between the simulation model provided by the application to enter simulation model to realize
Row is split, and realizes the Multi computer cooperation of simulation model, is conducive to improving the operational efficiency of simulation model.
In some optional implementations of the present embodiment, the step 204 of the present embodiment may further include:Run on
The first simulation model on first main frame is communicated to connect to the second simulation model by first sends above-mentioned feedback information.
In some optional implementations of the present embodiment, the above method, which is additionally included in, receives the operation that the second main frame is sent
After module information needed for second simulation model, taken out and module information phase from the first simulation model designated storage location
Before all types of components of matching, above-mentioned first communication connection is disconnected.
In some optional implementations of the present embodiment, Fig. 3 is refer to, it illustrates one of step 204 shown in Fig. 2
Exemplary decomposition process Figure 30 0.
As shown in figure 3, step 204 shown in Fig. 2 is to the second simulation model send feedback information, following sub-step can be included
Suddenly:
Sub-step 2041, the second connection request is sent to the second main frame.
In the present embodiment, method operation the first main frame thereon for information transfer between simulation model is to second
Main frame sends the second connection request.Second connection request includes the Internet protocol address of the first main frame, the first simulation model pair
Port numbers, the Internet protocol address of the second main frame, the corresponding port numbers of the second simulation model answered.
Sub-step 2042, in response to the second main frame according to the second communication connection for listening to the second connection request and setting up,
Communicated to connect by second to the second main frame send feedback information.
Second main frame listens to the second connection request of the first main frame transmission, and the description information of the second simulation model is sent
To the first main frame, after the first host acknowledgement, the second communication connection is set up between the second main frame and the first main frame.On first main frame
First simulation model is sent above-mentioned feedback information to the second simulation model by the above-mentioned second communication connection, for operating in the
The second simulation model on two main frames is emulated.
So, the first simulation model operated on the first main frame and the second emulation mould operated on the second main frame
Information transfer each time between type, which is all set up, once to be communicated to connect, it is possible to reduce once communicate to connect the time of holding, favorably
In saving Internet resources.
In some optional implementations of the present embodiment, the module information that the second main frame is sent can be pressed by the second main frame
According to predictive encoding rule to running the component type needed for the second analogue system and the quantity of all types of components on the second main frame
Generated after coding.In all types of components taken out from the first simulation model designated storage location and module information matches, and
Generate before feedback information, the method for information transfer between simulation model can also include:First main frame is according to predetermined solution
Parsed in the module information that is received from the second main frame of code rule component type information needed for the second analogue system of operation and
The quantity information of each component type.
Fig. 4 is refer to, it illustrates the applied field for the method for information transfer between simulation model of the application
The schematic diagram of scape.
In application scenarios shown in Fig. 4, the simulation model 400 for generating base is split into the raw material storage He of section model 41
Produce section model 42.
Above-mentioned raw material storage section model 41 and production section model 42 can be separately operable to be taken in first server and second
It is engaged in device.Cable network or wireless communication can be passed through between first server and second server.
The raw material storage section model run in first server can be according to the stocks of the raw material in actual production base
Situation carries out initial inventory and sets 411.Initial inventory is carried out in raw material storage section model to set after 411, first server
Port before closing, initiating port is that raw material storage section model 412 sets port numbers.Then first server is in
Listening state 413.
It can be ordered in second server or the production section model operated in second server according to the production received
Finished product quantity in single 420, which is calculated, is produced component type and all types of components needed for (namely operation production section model)
The quantity of required component type and all types of components (is referred to as module information) by quantity 421 here.
After component type needed for calculating operation production district model and the quantity of all types of components 421, second service
Port before device closing, and initiating port 422, namely be production district model assignment of port numbers.Second server is to first
Server sends the first connection request.First server is listened to after the first communication connection request of second server transmission, is built
The first communication connection between vertical raw material storage section model and production section model.The can be included in first communication connection request
One server internet protocol address, former material feed bin section model port numbers, second server Internet protocol address, production district mould
Type port numbers.
Second server can be communicated to connect to first server sending assembly information 424 according to the first of foundation, above-mentioned
Module information can include the component type needed for completion production (namely operation production section model) and the quantity of all types of components.
Second server is to after first server sending assembly information, and close port reinitializes port, for generation section model
Reset port numbers 425.Then, second server is in listening state 426.
First server receives the module information 414 that second server is sent, and is then specified from raw material storage section model
The all types of components matched with module information are taken out in storage location.The quantity of all types of components taken out is believed with said modules
Component count in breath is consistent.Then update the data stored in warehouse district in designated storage location.
First server generates feedback information according to the quantity of all types of components taken out at designated storage location
416.Afterwards, first server can close above-mentioned port.And initiating port 417 again.
After first server initiating port 417, the second communication connection request 418 is sent to second server, the
Two communication connection requests can include:The Internet protocol address of first server, raw material storage section model port numbers, second
The Internet protocol address and production section model port numbers of server.
Second server sets up the second communication connection after the second communication connection of first server transmission is listened to.The
Above-mentioned feedback information is sent to production section model 419 by one server by the second communication connection.Produce section model and receive above-mentioned
Feedback information 427.
Section model is produced according to feedback information formation component figure 428.Then production section model carries out production emulation 429.
With further reference to Fig. 5, as the realization to method shown in above-mentioned Fig. 2, it is used to emulate mould this application provides one kind
One embodiment of the device of information transfer between type, the device embodiment is corresponding with the embodiment of the method shown in Fig. 2, the dress
Put and specifically can apply in various electronic equipments.
Enter so that an analogue system is split into two simulation models (the first simulation model and the second simulation model) as an example
Row explanation.
In the present embodiment, can be run on the first main frame can be run on the first simulation model, the second main frame second imitate
True mode.
As shown in figure 5, the device 500 for information transfer between simulation model of the present embodiment includes:First communication link
Connect and set up unit 501, receiving unit 502, feedback information generation unit 503 and transmitting element 504.Wherein, the first communication connection
Unit 501 is set up to be configured in response to listening to the first connection request that the second main frame of the second simulation model of operation is sent,
First main frame and the second main frame set up the first communication connection, wherein, the first connection request includes the Internet protocol of the first main frame
Address, the corresponding port numbers of the first simulation model run on the first main frame, the Internet protocol address of the second main frame, second
The corresponding port numbers of simulation model.Receiving unit 502 is configured to receive the second simulation model of operation institute that the second main frame is sent
The module information needed, module information includes the quantity information of component type information and all types of components, wherein, module information is by the
Two simulation models are generated according to preset parameter.Feedback unit 503 is configured to take from the first simulation model designated storage location
Go out all types of components matched with module information, and generate feedback information;The quantity of any type of component wherein taken out
It is consistent with the quantity information of the type component in configured information.Transmitting element 504 is configured to send anti-to the second simulation model
Feedforward information.
In some optional implementations of the present embodiment, above-mentioned transmitting element 504 is further configured to first
Communicate to connect to the second simulation model send feedback information.
In some optional implementations of the present embodiment, transmitting element 504 is further configured to send out to the second main frame
The second connection request is sent, the second connection request includes the Internet protocol address of the first main frame, the corresponding end of the first simulation model
Slogan, the Internet protocol address of the second main frame, the corresponding port numbers of the second simulation model;In response to the second main frame according to monitoring
To the second connection request and set up second communication connection;Communicated to connect by second to the second main frame send feedback information.
In some optional implementations of the present embodiment, the device for information transfer between simulation model also includes disconnected
Open unit (not shown).Switching units are configured to, and the operation second for receiving the transmission of the second main frame in receiving unit is emulated
After module information needed for model, taken out and group from the first simulation model designated storage location in feedback information generation unit
Before all types of components of part information match, disconnect first and communicate to connect.
In some optional implementations of the present embodiment, module information is right according to predictive encoding rule by the second main frame
Generated after the component type needed for the second analogue system and quantity coding are run on the second main frame.For believing between simulation model
Ceasing the device of transmission also includes decoding unit (not shown), and decoding unit is configured in feedback information generation unit from the
Take out all types of components matched with module information in one simulation model designated storage location, and before generating feedback information,
To module information according to predetermined decoding rule parsed from module information operation the second analogue system needed for component type and
Quantity.
It is understood that the above-mentioned device 500 for information transfer between simulation model can be arranged at the first main frame
In, or in the second main frame.
Below with reference to Fig. 6, it illustrates suitable for the computer system 600 for the server of realizing the embodiment of the present application
Structural representation.Server shown in Fig. 6 is only an example, to the function of the embodiment of the present application and should not use range band
Carry out any limitation.
As shown in fig. 6, computer system 600 includes CPU (CPU) 601, it can be read-only according to being stored in
Program in memory (ROM) 602 or be loaded into program in random access storage device (RAM) 603 from storage part 608 and
Perform various appropriate actions and processing.In RAM 603, the system that is also stored with 600 operates required various programs and data.
CPU601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always
Line 604.
I/O interfaces 605 are connected to lower component:Importation 606 including keyboard, mouse etc.;Including such as liquid crystal
Show the output par, c 607 of device (LCD) and loudspeaker etc.;Storage part 608 including hard disk etc.;And including such as LAN card,
The communications portion 609 of the NIC of modem etc..Communications portion 609 performs communication via the network of such as internet
Processing.Driver 610 is also according to needing to be connected to I/O interfaces 605.Detachable media 611, such as disk, CD, magneto-optic disk,
Semiconductor memory etc., is arranged on driver 610 as needed, in order to which the computer program that reads from it is according to need
It is mounted into storage part 608.
Especially, in accordance with an embodiment of the present disclosure, the process described above with reference to flow chart may be implemented as computer
Software program.For example, embodiment of the disclosure includes a kind of computer program product, it includes being carried on computer-readable medium
On computer program, the computer program include be used for execution flow chart shown in method program code.In such reality
Apply in example, the computer program can be downloaded and installed by communications portion 609 from network, and/or from detachable media
611 are mounted.When the computer program is performed by CPU (CPU) 601, perform what is limited in the present processes
Above-mentioned functions.
Present invention also provides a kind of non-volatile computer-readable medium, the computer-readable medium can be above-mentioned reality
Apply what the server described in example was included;Can also be individualism, and without be incorporated the device in.Above computer is readable
Medium carries one or more program, when said one or multiple programs are performed by the server so that the service
Device:In response to listening to the first connection request that the second main frame of the second simulation model of operation is sent, the first main frame and the second master
Machine sets up the first communication connection, wherein, the first connection request includes the Internet protocol address of the first main frame, runs on the first master
The corresponding port numbers of the first simulation model, the Internet protocol address of the second main frame on machine, the corresponding end of the second simulation model
Slogan;The module information needed for the simulation model of operation second of the second main frame transmission is received, module information is believed including component type
The quantity information of breath and all types of components, module information is generated by the second simulation model according to preset parameter;From the first emulation mould
The all types of components matched with module information are taken out in type designated storage location, and generate feedback information;That wherein takes out appoints
The quantity of the component for type of anticipating is consistent with the quantity information of the type component in configured information;Send and feed back to the second simulation model
Information.
It should be noted that above-mentioned non-volatile computer-readable medium can be computer-readable signal media or meter
Calculation machine readable storage medium storing program for executing either the two any combination.Computer-readable recording medium for example can be --- but not
Be limited to --- electricity, magnetic, optical, electromagnetic, system, device or the device of infrared ray or semiconductor, or it is any more than combination.Meter
The more specifically example of calculation machine readable storage medium storing program for executing can include but is not limited to:Electrical connection with one or more wires, just
Take formula computer disk, hard disk, random access storage device (RAM), read-only storage (ROM), erasable type and may be programmed read-only storage
Device (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD-ROM), light storage device, magnetic memory device,
Or above-mentioned any appropriate combination.In this application, computer-readable recording medium can any include or store journey
The tangible medium of sequence, the program can be commanded execution system, device or device and use or in connection.And at this
In application, computer-readable signal media can be included in a base band or as the data-signal of carrier wave part propagation,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but not limit
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium beyond storage medium is read, the computer-readable medium, which can send, propagates or transmit, to be used for
Used by instruction execution system, device or device or program in connection.Included on computer-readable medium
Program code can be transmitted with any appropriate medium, be included but is not limited to:Wirelessly, electric wire, optical cable, RF etc., or above-mentioned
Any appropriate combination.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the application, method and computer journey
Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation
The part of one module of table, program segment or code, the part of the module, program segment or code is used comprising one or more
In the executable instruction for realizing defined logic function.It should also be noted that in some realizations as replacement, being marked in square frame
The function of note can also be with different from the order marked in accompanying drawing generation.For example, two square frames succeedingly represented are actually
It can perform substantially in parallel, they can also be performed in the opposite order sometimes, this is depending on involved function.Also to note
Meaning, the combination of each square frame in block diagram and/or flow chart and the square frame in block diagram and/or flow chart can be with holding
The special hardware based system of function or operation as defined in row is realized, or can use specialized hardware and computer instruction
Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard
The mode of part is realized.Described unit can also be set within a processor, for example, can be described as:A kind of processor bag
Include the first communication connection and set up unit, receiving unit, feedback information generation unit and transmitting element.Wherein, the name of these units
Claim not constituting the restriction to the unit in itself under certain conditions, for example, receiving unit is also described as " receiving second
The unit of module information needed for the simulation model of operation second that main frame is sent ".
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.People in the art
Member should be appreciated that invention scope involved in the application, however it is not limited to the technology of the particular combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from foregoing invention design, is carried out by above-mentioned technical characteristic or its equivalent feature
Other technical schemes formed by any combination.Such as features described above has similar work(with (but not limited to) disclosed herein
The technical characteristic of energy carries out technical scheme formed by replacement mutually.