WO2012113226A1 - 一种机器事务控制方法、装置和系统 - Google Patents

一种机器事务控制方法、装置和系统 Download PDF

Info

Publication number
WO2012113226A1
WO2012113226A1 PCT/CN2011/079535 CN2011079535W WO2012113226A1 WO 2012113226 A1 WO2012113226 A1 WO 2012113226A1 CN 2011079535 W CN2011079535 W CN 2011079535W WO 2012113226 A1 WO2012113226 A1 WO 2012113226A1
Authority
WO
WIPO (PCT)
Prior art keywords
transaction
gateway
platform
response
operation command
Prior art date
Application number
PCT/CN2011/079535
Other languages
English (en)
French (fr)
Inventor
黄成�
牟伦建
卞永刚
张永靖
丁传锁
金雷
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2012113226A1 publication Critical patent/WO2012113226A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a machine transaction control method, apparatus, and system. Background technique
  • transactions In the field of transaction processing, transactions usually have four characteristics, namely atomicity, consistency, isolation, and persistence. Atomicity requires that all operations of a transaction occur or that all operations do not occur. Consistency requires transactions to maintain their operational data. Consistency, isolation requires that the transaction does not read the intermediate results of another transaction, and persistence requires that the outcome of the committed transaction be persistent.
  • distributed systems have utilized two-stage commit protocols and transaction coordinators to ensure operational atomicity and data consistency. The transaction participants provide isolation and persistence. Each participant in the two-phase commit protocol decides whether to succeed or abort the transaction, and sends its voting result to the transaction coordinator. Then, the transaction coordinator is based on participation from each transaction.
  • the final result of the voting result is that the transaction coordinator submits the transaction only when all the participants have voted successfully. As shown in Figure 1 (a), both transaction participants vote successfully, and the transaction coordinator submits the transaction. . Otherwise, the transaction coordinator will abort the transaction, as shown in Figure 1 (b), one of the two transaction participants fails to vote, and the transaction coordinator rolls back.
  • the M2M (machine to machine) system allows M2M devices to be wired and wireless in multiple access modes. Different access modes are different depending on device capabilities. Some M2M devices are directly connected to the platform, and some are connected to the platform via the gateway. M2M The system supports Transaction Handling, which aims to ensure the four functions of operation between several entities in the machine communication system, such as: Allowing the system to roll back from the wrong operation.
  • the M2M platform and gateway in the M2M system have the ability to aggregate transaction responses.
  • the M2M device in the transaction operation can directly connect to the platform or connect to the platform via the gateway.
  • M2M transactions there are multiple aggregation methods. How to issue transaction operation requests in different situations. How the platform and gateway cooperate with the aggregation transaction operation response will affect the execution efficiency of transaction operations, improper transaction aggregation or the inability to judge the final result of the transaction. , or generate a lot of unnecessary information interaction between device platforms, this is a problem that needs to be solved.
  • the transaction coordinator adds additional associated data to the transaction preparation request sent by the transaction participant, including: transaction identifier, transaction execution command, and other participating node identifiers in the transaction, thereby reducing or completely unnecessary transaction coordinator log Force writes to determine the correct transaction status information before the fault by interacting with the participating nodes through the coordinator in the event of a failure.
  • a machine transaction control method characterized in that the method comprises
  • Machine to machine M2M platform receives the transaction request sent by the requester
  • the M2M platform generates and sends a transaction operation command to the transaction participating device or the M2M gateway according to the transaction participation device connection attribute;
  • the M2M platform receives the transaction operation response returned by the transaction participating device or the M2M gateway.
  • the transaction operation response is returned after the transaction participating device or the M2M gateway executes the transaction according to the transaction operation command.
  • a machine transaction control system characterized in that the system includes
  • the machine-to-machine M2M platform is configured to receive a transaction request sent by the requesting party, and generate and issue a transaction operation command according to the transaction participating device connection attribute;
  • the transaction participation device is configured to execute a transaction according to the transaction operation command, and send a transaction operation response to the M2M platform.
  • a machine-to-machine platform characterized in that a machine-to-machine platform includes
  • a receiving unit configured to receive a transaction request sent by the requesting party
  • a generating unit configured to: after the receiving unit receives the transaction request, generate a transaction operation command according to the transaction participating device connection attribute;
  • a machine-to-machine gateway comprising:
  • a receiving unit configured to receive a transaction operation command from the M2M platform, where the transaction operation command includes a transaction execution processing indication indicating that the M2M gateway aggregates the forwarding transaction operation response; and receives a transaction operation response returned by the transaction participating device;
  • An aggregation unit configured to aggregate a transaction operation response received by the receiving unit
  • the sending unit is configured to send a transaction operation command to the connected transaction participating device; and send the transaction operation response obtained by the aggregation unit to the M2M platform.
  • a machine-to-machine gateway comprising:
  • a receiving unit configured to receive a transaction operation command from the M2M platform, where the transaction operation command includes a transaction execution processing instruction indicating that the M2M gateway controls to perform a subsequent transaction update operation, and returns a transaction execution result; and the transaction preparation response returned by the transaction participating device participating in the connection Receiving a transaction update response from a transaction participating device;
  • the aggregation processing unit is configured to generate, according to the transaction execution processing, the aggregated received transaction preparation response, generate a transaction update instruction according to the result of the aggregated transaction preparation response, and display the aggregated received transaction update response according to the transaction execution processing;
  • a sending unit configured to send a transaction preparation instruction to the transaction participating device according to the transaction execution processing instruction; issue a transaction update instruction to the transaction participating device; and return the execution result corresponding to the transaction update response aggregated by the aggregation processing unit to the M2M platform.
  • Figure 1 (a) is a schematic diagram of transaction processing in the prior art
  • Figure 1 (b) is a schematic diagram of transaction processing in the prior art
  • FIG. 2 is a flowchart of a machine transaction control method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of another machine transaction control method according to an embodiment of the present invention.
  • FIG. 4 is a flowchart of a transaction processing command of a gateway processing platform according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a machine transaction control system according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of another machine transaction control system according to an embodiment of the present invention
  • FIG. 7 is a schematic structural diagram of another machine transaction control system according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of another machine transaction control system according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of an M2M platform according to an embodiment of the present invention.
  • FIG. 10 is a flowchart of a specific implementation of a machine transaction control method according to an embodiment of the present invention
  • FIG. 11 is a flowchart of another implementation of a machine transaction control method according to an embodiment of the present invention
  • FIG. 13 is a schematic structural diagram of an M2M gateway according to an embodiment of the present invention
  • FIG. 14 is a schematic structural diagram of another M2M gateway according to an embodiment of the present invention. detailed description
  • FIG. 2 is a schematic flow chart of a method according to a first embodiment of the present invention, including:
  • machine to machine M2M platform receives the transaction request sent by the requester
  • the requesting party here is an authorized entity, that is, an entity that has the right to apply for a transaction to the M2M platform, and may be a personal terminal, a server, etc., where the transaction request contains transaction information to be processed.
  • the M2M platform generates and sends a transaction operation command to the transaction participating device or the gateway according to the transaction participation device connection attribute;
  • the transaction operation command may specifically be a transaction preparation instruction or a transaction update instruction, specifically, according to different transaction updates (transaction update may be divided into transaction commit and transaction rollback), and transaction update refers to
  • the command may further include a transaction commit instruction and a transaction rollback instruction, where the transaction commit instruction is an instruction that instructs the transaction participating device to execute the transaction in the case that the transaction participating device is ready to execute the transaction; the transaction rollback instruction is involved in the transaction. If the device is not ready to execute a transaction, it indicates that the transaction participates in the device to resume the state of the state prior to the preparation.
  • the transaction operation command may also carry different transaction execution processing instructions according to different transaction connection device connection attributes.
  • the transaction participating device or gateway executes a transaction according to the transaction operation command, and returns a transaction operation response to the M2M platform according to the transaction execution processing instruction.
  • the transaction operation response is also different.
  • the corresponding transaction operation response is a transaction preparation response
  • the transaction operation command is a transaction update instruction
  • the corresponding transaction operation response is corresponding.
  • the response is updated for the transaction.
  • the transaction update instruction is a transaction commit instruction
  • the corresponding transaction operation response is a transaction commit response
  • the transaction update instruction is a transaction rollback instruction
  • the corresponding transaction operation response is a transaction rollback response.
  • Embodiment 1 receives, by a machine-to-machine M2M platform, a transaction request sent by a requesting party; the M2M platform generates and issues a transaction operation command to a transaction participating device or a gateway according to a transaction participating device connection attribute, where the transaction operation command carries a transaction Executing a processing indication; the transaction participating device or the gateway executes a transaction according to the transaction operation command, and returns a transaction operation response to the M2M platform according to the transaction execution processing instruction, thereby improving transaction processing efficiency.
  • the processing process of the M2M platform in an embodiment of the present invention is shown in FIG. 3, and the specific steps are as follows: 301: The M2M platform receives a transaction request;
  • the transaction request here is the transaction request in step A1;
  • the M2M platform searches for the M2M device gateway attribution, determines whether the transaction update control process is processed by the home gateway, and adds a transaction execution processing indication to the transaction operation command.
  • the M2M platform retrieves the ownership of the M2M device gateway, which is divided into four cases: A.
  • the transaction participating device directly connects to the M2M platform, and B.
  • a single device in the transaction participating device connects to the M2M platform via the gateway, and C.
  • Devices connect to the M2M platform via the same gateway, D.
  • Transaction Connect to the M2M platform via the same gateway as all devices in the device.
  • the M2M platform adds a corresponding transaction execution processing instruction according to the gateway attribution status of the transaction participating device. Specifically, relative to A, the transaction execution processing indication is empty, and the transaction execution indication indication is empty or indicates that the gateway forwards the transaction operation response.
  • the transaction execution processing instruction is to instruct the M2M gateway to aggregate the forwarding transaction operation response.
  • the transaction execution processing instruction returns the transaction execution result after instructing the M2M gateway to control the subsequent transaction update operation.
  • the M2M platform sends a transaction operation command to the device or the gateway.
  • the M2M platform receives a transaction operation response returned by the device or the gateway, and determines a final execution state of the transaction.
  • the M2M platform determines that the transaction preparation is successful, and sends a transaction commit instruction to the transaction participating device. Otherwise, the judgment is unsuccessful, and the transaction rollback instruction is sent to the transaction participating device.
  • the M2M gateway processing process is as shown in FIG. 4, and the specific steps are as follows: 401: The gateway receives an M2M platform transaction operation command, where the transaction operation command carries a transaction execution processing indication;
  • the gateway sends a transaction operation command to the transaction participating device.
  • the gateway can directly forward the transaction operation command to the transaction participating device; relative to B, when the transaction operation command sent by the M2M platform does not include the transaction execution processing indication, the gateway can directly forward the transaction operation command to the transaction participating device; When the transaction operation command issued by the M2M platform includes the transaction execution processing instruction, the gateway may delete the transaction operation command, and the transaction execution processing instruction is sent to the transaction participating device, and the transaction operation command may be regenerated to the transaction participating device.
  • the gateway can delete the transaction operation command and include the transaction execution processing instruction and then send it to the transaction participating device, or regenerate the transaction operation command and send it to the transaction participating device. 403.
  • the gateway receives a transaction operation response returned by the device.
  • the transaction participating device returns the transaction operation response to the gateway after executing the transaction;
  • the gateway directly forwards the transaction operation response to the M2M platform according to the transaction execution processing instruction, or aggregates the transaction operation response.
  • the gateway After receiving the transaction operation response of the transaction participating device, the gateway executes the processing instruction according to the transaction. If the transaction execution processing indicates that the response is a forwarding response, the gateway forwards the transaction operation response to the M2M platform, such as the transaction execution processing indication is a convergence response or by the M2M gateway. Control execution of the subsequent transaction update operation, then proceeds to step 405;
  • the gateway determines whether the gateway controls the transaction.
  • the gateway first determines whether a full transaction operation response is received, and if so, determines whether the transaction is controlled by the gateway. If the transaction is not controlled by the gateway, then go to step 406; if the transaction is controlled by the gateway, go to step 407 or 408. Specifically, if the transaction operation command sent by the M2M platform received by the gateway includes the transaction execution processing instruction that returns the transaction execution result after the gateway control performs the subsequent transaction update operation, the gateway determines that the transaction is controlled by the gateway.
  • the gateway sends a transaction commit instruction to the transaction participating device.
  • the gateway determines whether all the transaction operation responses are received, and after all the transaction operation responses to be received are successful, the gateway sends a transaction commit request to the transaction participating device, and proceeds to step 408;
  • the gateway sends a transaction rollback instruction to the transaction participating device.
  • the gateway determines whether all the transaction operation responses are received. When at least one of the transaction operation responses to be received is unsuccessful, the gateway sends a transaction rollback instruction to the transaction participating device, and proceeds to step 408;
  • the gateway reports the transaction execution result to the M2M platform.
  • the gateway After receiving the transaction commit response or transaction rollback response returned by all devices, the gateway aggregates the returned transaction commit response or the transaction rollback response, and sends the aggregated transaction commit response or transaction rollback response corresponding transaction execution result to M2M. The platform is reported.
  • FIG. 5 is a schematic structural diagram of a system according to a second embodiment of the present invention, including:
  • the machine-to-machine M2M platform 501 is configured to receive a transaction request sent by the requesting party, and generate and send a transaction operation command according to the transaction participating device connection attribute.
  • the specific description refers to the step A2 and the steps 301 to 305 of the embodiment, where the reference is no longer Narration.
  • the transaction participation device 502 is configured to execute a transaction according to the transaction operation command, and send a transaction operation response to the M2M platform.
  • FIG. 6 is a schematic structural diagram of a system according to a third embodiment of the present invention, wherein a transaction participating device 502 in the transaction participating device is connected to the M2M platform 501 via the first M2M gateway 503, and includes:
  • the M2M platform 501 is configured to receive a transaction request sent by the requesting party, and generate and send a transaction operation command according to the transaction participation device connection attribute.
  • the M2M platform 501 is configured to receive a transaction request sent by the requesting party, and generate and send a transaction operation command according to the transaction participation device connection attribute.
  • the first M2M gateway 503 is configured to send a transaction operation command to the one transaction participating device 502, and send the received transaction operation response to the M2M platform 501.
  • the one transaction participating device 502 is configured to execute a transaction according to a transaction operation command, and send a transaction operation response to the M2M platform 501.
  • the sending the transaction operation response to the M2M platform specifically sends the transaction operation response to the first M2M gateway 503, and the first M2M gateway 503 performs subsequent processing.
  • Figure 7 is a schematic structural diagram of a system according to a fourth embodiment of the present invention, wherein at least two devices 502 in the transaction participating device are connected to the M2M platform 501 via the second M2M gateway 504;
  • the M2M platform 501 is configured to receive a transaction request sent by the requesting party, generate and send a transaction operation command according to the transaction participating device connection attribute, where the transaction operation command includes a transaction execution processing indication indicating that the second M2M gateway aggregates the forwarding transaction operation response; For details, refer to the steps A2 and 301 to 305 of Embodiment 1, and details are not described herein again.
  • the second M2M gateway 504 is configured to send a transaction operation command to the at least two transaction participation devices 502, and aggregate the transaction operation responses returned by the at least two devices according to the transaction operation command, and send the aggregated transaction operation response to the M2M platform 501.
  • the at least two transactions participate in the device 502, configured to execute a transaction according to a transaction operation command, to
  • the M2M platform 501 sends a transaction operation response.
  • the sending the transaction operation response to the M2M platform specifically sends the transaction operation response to the second M2M gateway 504, and the second M2M gateway 504 performs subsequent processing.
  • FIG. 8 is a schematic structural diagram of a system according to a fifth embodiment of the present invention, wherein the number of transaction participating devices 502 is at least two, and the at least two transaction participating devices are connected to the M2M platform 501 via the third M2M gateway 505;
  • the M2M platform 501 is configured to receive a transaction request sent by the requesting party, generate and issue a transaction operation command according to the transaction participating device connection attribute, where the transaction operation command includes instructing the third M2M gateway 505 to control the subsequent transaction update operation, and return the transaction.
  • the transaction execution processing indication of the execution result the specific description refers to the steps of Embodiment A2 and the steps of 301 to 305, and details are not described herein again.
  • a third M2M gateway 505 configured to send a transaction preparation instruction to all connected devices according to the transaction execution processing instruction; after receiving the transaction preparation response from all the devices, according to the transaction execution processing instruction, the aggregated received transaction preparation response, according to the aggregated
  • the result of the transaction preparation response is generated and issued a transaction update instruction to all devices; after receiving the transaction update response from the all devices, according to the transaction execution processing instruction, the aggregated received transaction update response, the aggregated transaction update response
  • the result is returned to the M2M platform 501.
  • the transaction participating device 502 is configured to execute a transaction according to the transaction operation command, and send a transaction operation response to the M2M platform.
  • the sending the transaction operation response to the M2M platform specifically sends the transaction operation response to the third M2M gateway 505, and the third M2M gateway 505 performs subsequent processing.
  • the transaction participation device 501 is configured to execute a transaction and return a transaction operation response to the gateway or platform.
  • the gateway 502 is configured to execute a transaction according to the transaction operation command, and return a transaction operation response to the M2M platform according to the transaction execution processing instruction, where the M2M platform 503 is configured to receive a transaction request sent by the requester, and participate in the device according to the transaction.
  • the connection attribute generates and issues a transaction operation command to the transaction participating device or the gateway, and the transaction operation command carries a transaction execution processing indication, thereby improving transaction processing efficiency.
  • FIG. 9 is a schematic structural diagram of an M2M platform according to a sixth embodiment of the present invention, including: The receiving unit 601 is configured to receive a transaction request sent by the requesting party.
  • the generating unit 602 is configured to: after the receiving unit 601 receives the transaction request, generate a transaction operation command according to the transaction participating device connection attribute;
  • the transaction operation command generated by the generating unit 602 may not carry the transaction execution processing indication
  • the transaction operation command generated by the generating unit 602 may not carry the transaction execution processing indication, and may also carry the transaction execution processing indication;
  • the transaction operation command generated by the generation unit 602 carries a transaction execution processing instruction
  • the sending unit 603 is configured to send the transaction operation command to the transaction participating device or the M2M gateway.
  • the transaction operation command is a transaction preparation instruction; in this case, the receiving unit 601 is further configured to receive a transaction preparation response returned by the transaction participating device or the gateway; the M2M platform further includes
  • the determining unit 604 is configured to aggregate the transaction preparation response received by the receiving unit 601, and determine a transaction preparation state according to the aggregated transaction preparation. If successful, the transaction submission instruction is sent to the transaction participating device, and if the transaction fails, the transaction is submitted to the transaction. The participating device sends a transaction rollback instruction.
  • Embodiment 6 adopts an M2M platform, including: a receiving unit, configured to receive a transaction request sent by a requesting party, receive a transaction operation response returned by a participating device or a gateway, and generate a unit, configured to generate a transaction according to a transaction participating device connection attribute
  • the operation command, the transaction operation command carries a transaction execution processing indication
  • the delivery unit is configured to deliver the transaction operation command to the transaction participating device or the gateway, thereby improving transaction processing efficiency.
  • FIG. 10 is a flowchart of a specific implementation of a machine transaction control method according to a seventh embodiment of the present invention, including: a requesting party, an M2M platform, a gateway, a transaction participating device 1, a transaction participating device 2, and a transaction parameter.
  • the device 1 is directly connected to the M2M platform, and the transaction participating device 2 is connected to the M2M platform via the gateway.
  • the specific steps include:
  • the request direction sends a transaction request to the M2M platform.
  • the purpose of this step is to create a transaction resource.
  • the transaction request includes the application ID, address resource ID, new resource ID, processing content, and access permission ID.
  • the specific implementation is as follows:
  • the M2M platform sends a transaction preparation instruction to the gateway.
  • Process "relay”
  • Commit-Right "false”
  • the M2M platform sends a transaction preparation instruction to the transaction participating device 1;
  • the transaction preparation instruction specifically includes an application ID, an address resource ID, a transaction resource ID, and a processing operation valley.
  • the gateway sends a transaction preparation instruction to the transaction participating device 2;
  • the transaction preparation instruction specifically includes an application ID, an address resource ID, and a transaction resource ID, and processes the operation content.
  • the issued transaction preparation instruction may be generated by the gateway itself, or the transaction preparation instruction from the M2M platform may be directly forwarded by the gateway.
  • the transaction participating device 1 returns a transaction preparation response to the M2M platform.
  • the transaction participating device 2 returns a transaction preparation response to the gateway.
  • the gateway sends a transaction preparation response to the M2M platform.
  • the M2M platform performs transaction submission
  • the M2M platform prepares a response according to the transaction after the aggregation, and judges the current transaction execution state. If both of the returned transaction preparation responses are successful, the commit is performed, and if not, the rollback is performed.
  • the M2M platform sends a transaction commit instruction to the transaction participating device 1;
  • the transaction commit instruction specifically includes an application ID, an address resource ID, a transaction resource ID, and a processing operation content, and includes a commit to indicate that the transaction participating device 1 has the right to commit, that is, the current transaction is completed by the transaction participating device 1 separately. 710.
  • the M2M platform sends a transaction commit instruction to the gateway.
  • the transaction commit instruction specifically includes an application ID, an address resource ID, a transaction resource ID, a processing operation content, and a commit, so that the transaction participating device 2 has the right to commit, that is, the current transaction is completed by the transaction participating device 2 separately.
  • the gateway sends a transaction commit instruction to the transaction participating device 2;
  • the transaction participating device 1 returns a transaction commit response to the M2M platform.
  • the transaction participating device 2 returns a transaction commit response to the gateway.
  • the gateway sends a transaction commit response to the M2M platform.
  • the M2M platform can further return the final result to the transaction requester. Specifically, the M2M platform can directly return the execution result, or wait for the requester to subsequently query the execution result.
  • Embodiment 7 is applicable to a scenario where a transaction participating device and an M2M direct connection, or a single transaction participating device directly contact through a gateway, and the M2M platform adopts aggregation of transaction operation responses to control the manner in which the transaction is submitted, so that the transaction processing efficiency is improved.
  • FIG. 11 is a flowchart of a specific implementation of a machine transaction control method according to an eighth embodiment of the present invention, including: a requesting party, an M2M platform, a gateway, a transaction participating device 1, a transaction participating device 2, other gateways or transaction participating devices, and a transaction.
  • the participating device 1 and the transaction participating device 2 are connected to the gateway, and other gateways or transaction participating devices are connected to the M2M platform.
  • the specific implementation process is as follows:
  • the request direction sends a transaction request to the M2M platform.
  • the purpose of this step is to create a transaction resource, including the application ID, address resource ID, and transaction request.
  • New resource ID, processing content, access permission ID the specific implementation refers to the following program:
  • the 802, M2M platform sends a transaction preparation instruction to the gateway
  • the gateway sends a transaction preparation instruction to the transaction participating device 1;
  • the transaction preparation instruction specifically includes an application ID, an address resource ID, a transaction resource ID, and a processing operation content.
  • the issued transaction preparation instruction may be generated by the gateway itself, or the transaction preparation instruction from the M2M platform may be directly forwarded by the gateway.
  • the gateway sends a transaction preparation instruction to the transaction participating device 2;
  • the transaction preparation instruction specifically includes an application ID, an address resource ID, a transaction resource ID, and a processing operation content.
  • the issued transaction preparation instruction may be generated by the gateway itself, or the transaction preparation instruction from the M2M platform may be directly forwarded by the gateway. 805.
  • the M2M platform sends a transaction preparation instruction to another gateway or a transaction participating device.
  • the transaction preparation instruction specifically includes an application ID, an address resource ID, a transaction resource ID, and a processing operation valley.
  • the transaction participating device 1 returns a transaction preparation response to the gateway.
  • the transaction participating device 2 returns a transaction preparation response to the gateway.
  • the gateway aggregates the transaction preparation response.
  • the transaction preparation device 2 determines that the current transaction is a failure. 809. The gateway returns a failed transaction preparation response to the M2M platform.
  • the other gateway or transaction participating device returns a transaction preparation response to the M2M platform.
  • the M2M platform determines that a rollback is required
  • the M2M platform After the M2M platform aggregates all transaction operation responses, it determines that the current transaction execution status is a failure according to the failed transaction preparation response in step 811, and determines that a rollback is required.
  • the M2M platform sends a transaction rollback instruction to the gateway.
  • the transaction rollback instruction specifically includes an application ID, an address resource ID, a transaction resource ID, and a processing operation content, and carries a transaction rollback indication "Rollback", indicating that the rollback is performed;
  • the gateway sends a transaction rollback instruction to the transaction participating device 1;
  • the gateway sends a transaction rollback instruction to the transaction participating device 2;
  • the M2M platform sends a transaction rollback instruction to another gateway or a transaction participating device.
  • the transaction rollback instruction specifically includes an application ID, an address resource ID, a transaction resource ID, and a processing operation content, and carries a transaction rollback indication “Rollback”, indicating Rollback
  • the transaction participating device 1 returns a transaction rollback response to the gateway.
  • the transaction participating device 2 returns a transaction rollback response to the gateway.
  • the gateway aggregates the transaction rollback response.
  • both the transaction participating device 2 and the transaction participating device 1 are successful, it is determined that the current transaction rollback is successful. Specifically, the transaction participating device 2 and the transaction participating device 1 may return two successful transaction rollback responses, which are aggregated. A rollback response that represents a successful transaction.
  • the gateway returns a transaction rollback response to the M2M platform.
  • the other gateway or transaction participating device returns a transaction rollback response to the M2M platform. If the other gateway or transaction participating device returns a transaction rollback response to the M2M platform, the success is determined, and the current transaction is successfully rolled back.
  • the M2M platform can further return the final result to the transaction requester. Specifically, the M2M platform can directly return the execution result, or wait for the requester to subsequently query the execution result.
  • Embodiment 8 is applicable to a case where a plurality of transaction participating devices are connected to the M2M platform through the same gateway.
  • the M2M platform generates and sends a transaction operation command to the transaction participating device or the gateway according to the transaction participation device connection attribute, where the transaction operation command carries the transaction execution. Processing the indication; instructing the gateway to aggregate the transaction operation responses of the multiple transaction participating devices, thereby improving transaction processing efficiency.
  • FIG. 12 is a flowchart of a specific implementation of a machine transaction control method according to a ninth embodiment of the present invention, including: a requesting party, an M2M platform, a gateway, a transaction participating device 1, a transaction participating device 2, a transaction participating device 1 and a transaction participating device. 2 is connected to the gateway, and the transaction participating device 1 and the transaction participating device 2 participate in one transaction at the same time.
  • the specific implementation process is as follows:
  • the request direction sends a transaction request to the M2M platform.
  • the purpose of this step is to create a transaction resource.
  • the transaction request includes the application ID, address resource ID, new resource ID, processing content, and access permission ID.
  • the specific implementation is as follows:
  • the M2M platform sends a transaction preparation instruction to the gateway.
  • the transaction preparation instruction specifically includes an application ID, an address resource ID, a transaction resource ID, and a processing operation.
  • the specific implementation refers to the following procedure;
  • the gateway sends a transaction preparation instruction to the transaction participating device 1;
  • the transaction preparation instruction specifically includes an application ID, an address resource ID, a transaction resource ID, and a processing operation content.
  • the issued transaction preparation instruction may be generated by the gateway itself, or the transaction preparation instruction from the M2M platform may be directly forwarded by the gateway.
  • the gateway sends a transaction preparation instruction to the transaction participating device 2;
  • the transaction preparation instruction specifically includes an application ID, an address resource ID, a transaction resource ID, and a processing operation content.
  • the issued transaction preparation instruction may be generated by the gateway itself, or the transaction preparation instruction from the M2M platform may be directly forwarded by the gateway.
  • the transaction participating device 1 returns a transaction preparation response to the gateway.
  • the transaction participating device 2 returns a transaction preparation response to the gateway.
  • the gateway aggregates the transaction preparation execution response.
  • the result of the aggregation is the transaction preparation execution failure. If all transaction participating devices return a successful transaction preparation execution response, the result of the aggregation is successful for the transaction preparation.
  • the gateway may determine Transaction submission operations for devices 1 and 2 for transactions under its jurisdiction Work.
  • the gateway sends a transaction rollback instruction to the transaction participating device 1, where the transaction rollback indication “Rollback” indicates that the rollback is performed;
  • the gateway sends a transaction rollback instruction to the transaction participating device 2, where the transaction rollback indication “Rollback” indicates that the rollback is performed;
  • the transaction participating device 1 returns a transaction rollback response to the gateway;
  • the transaction participating device 2 returns a transaction rollback response to the gateway.
  • the gateway returns a transaction execution result to the M2M platform.
  • the M2M platform can further return the final result to the transaction requester. Specifically, the M2M platform can directly return the execution result, or wait for the requester to subsequently query the execution result.
  • Embodiment 9 is applicable to the case where all the transaction participating devices are connected to the M2M platform through the same gateway, and the M2M platform generates and sends a transaction operation command to the transaction participating device or the gateway according to the transaction participation device connection attribute, where the transaction operation
  • the command carries a transaction execution processing indication; instructing the gateway to not only aggregate the transaction preparation response of the multiple transaction participating devices, but also the gateway locally determines the transaction execution state, thereby further processing the transaction commit or rollback operation locally at the gateway, There is no need to return to the M2M platform to judge and execute subsequent transaction operations, which improves transaction processing efficiency.
  • FIG. 13 is a schematic structural diagram of a machine-to-machine gateway according to a tenth embodiment of the present invention, including: a receiving unit 1301, configured to receive a transaction operation command from an M2M platform, where the transaction operation command includes a transaction execution indicating an M2M gateway aggregation forwarding transaction operation response Processing indication; receiving a transaction operation response returned by the transaction participating device;
  • the aggregation unit 1302 is configured to aggregate the transaction operation response received by the receiving unit 1301, and the sending unit 1303 is configured to send a transaction operation command to the connected transaction participating device, and send a transaction operation response obtained by the aggregation unit 1302 to the M2M platform.
  • 14 is a schematic structural diagram of a machine-to-machine gateway according to an eleventh embodiment of the present invention, including: a receiving unit 1401, configured to receive a transaction operation command from an M2M platform, where the transaction operation command includes instructing an M2M gateway to aggregate a transaction operation response and control execution. After the subsequent transaction update operation, returning the transaction execution processing indication of the transaction execution result; receiving the connected transaction participating device returns the transaction preparation response; receiving the transaction update response from the transaction participating device;
  • the convergence processing unit 1402 is configured to generate, according to the transaction preparation processing indicated by the receiving unit 1401, the transaction preparation response of the aggregation, and generate a transaction update instruction according to the result of the aggregated transaction preparation response; and perform the transaction update response according to the transaction execution processing indication ;
  • the sending unit 1403 is configured to send a transaction preparation instruction to the transaction participating device according to the transaction execution processing instruction received by the receiving unit 1401; issue a transaction update instruction to the transaction participating device; and execute the result corresponding to the transaction update response aggregated by the convergence processing unit 1402 Return to the M2M platform.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Description

种机器事务控制方法、 装置和系统 本申请要求于 2011 年 2 月 24 日提交中国专利局、 申请号为 201110044771. 7 , 发明名称为 "一种机器事务控制方法、 装置和系统" 的中国 专利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术领域,尤其涉及一种机器事务控制方法、装置和系统。 背景技术
在事务处理领域中, 事务通常具有四性, 即原子性、 一致性、 隔离性和持 久性,原子性要求对事务的所有操作都发生或者所有操作都不发生,一致性要 求事务保持其操作数据的一致性, 隔离性要求事务不读取另一事务的中间结 果, 持久性要求承诺事务的结果是持久的。 传统地, 分布式系统已经利用两阶 段提交协议和事务协调器来保证操作原子性、数据一致性。 事务参与者则提供 隔离性和持久性, 两阶段提交协议中的每个参与者投票决定成功还是中止事 务, 并将其投票结果发送到事务协调器, 然后, 事务协调器基于来自每个事务 参与者的投票结果做出最终决定,仅在所有参与者都投票成功时, 事务协调器 才提交事务, 如图 1 ( a )所示, 两个事务参与者都投票成功, 事务协调器则 提交事务。 否则, 事务协调器将中止事务, 如图 1 ( b )所示, 两个事务参与 者中的一个投票失败, 事务协调器则回滚。
M2M ( machine to machine, 机器到机器 )系统允许 M2M设备有线、 无线 多种接入方式, 不同接入方式下根据设备能力不同, 有的 M2M设备直接连接 平台,有的经由网关接入平台, M2M系统支持事务处理( Transaction Handling ), 目的是保证机器通信系统若干实体间操作的四性, 如: 允许系统从错误操作回 滚, M2M系统中 M2M平台、 网关都具备汇聚事务响应的能力。
事务操作中的 M2M设备可以直接连接平台也可以经由网关连接平台,相 应的, M2M事务存在多种汇聚方式, 不同情况如何下发事务操作请求, 平台、 网关如何配合汇聚事务操作响应将会影响事务操作的执行效率,不恰当的事务 汇聚或者导致无法判断事务最终结果,或者在设备平台间产生大量不必要的信 息交互, 这都是需要解决的问题。
现有技术中事务协调器向事务参与者发送的事务准备请求中添加额外关 联数据, 包括: 事务标识符、 事务执行命令、 事务中其他参与节点标识, 从而 减少或完全不必要事务协调器的日志强制写入,在发生故障时通过协调器与参 与节点交互查询来确定故障前的正确事务状态信息。
发明内容
一种机器事务控制方法, 其特征在于, 方法包括,
机器到机器 M2M平台接收请求方发送的事务处理请求;
M2M平台根据事务参与设备连接属性, 生成并下发事务操作命令至事务 参与设备或 M2M网关;
M2M平台接收事务参与设备或 M2M网关返回的事务操作响应, 事务操 作响应是事务参与设备或 M2M网关根据事务操作命令执行事务后, 返回的。
一种机器事务控制系统, 其特征在于, 系统包括,
机器到机器 M2M平台, 用于接收请求方发送的事务处理请求, 根据事务 参与设备连接属性, 生成并下发事务操作命令;
事务参与设备, 用于根据事务操作命令执行事务, 向 M2M平台发送事务 操作响应。
一种机器到机器平台, 其特征在于, 机器到机器平台包括,
接收单元, 用于接收请求方发送的事务处理请求;
生成单元, 用于在接收单元接收事务处理请求后, 根据事务参与设备连接 属性, 生成事务操作命令;
下发单元, 用于向事务参与设备或 M2M网关发送生成单元生成的事务操 作命令。 一种机器到机器网关, 其特征在于, 包括:
接收单元, 用于接收来自 M2M平台的事务操作命令, 事务操作命令包括 指示 M2M网关汇聚转发事务操作响应的事务执行处理指示; 接收事务参与设 备返回的事务操作响应;
汇聚单元, 用于将接收单元接收的事务操作响应进行汇聚;
发送单元, 用于给连接的事务参与设备下发事务操作命令; 将汇聚单元汇 聚得到的事务操作响应发送给 M2M平台。
一种机器到机器网关, 其特征在于, 包括:
接收单元, 用于接收来自 M2M平台的事务操作命令, 事务操作命令包括 指示 M2M网关控制执行后续事务更新操作后,返回事务执行结果的事务执行 处理指示; 接收连接的事务参与设备返回的事务准备响应;接收来自事务参与 设备的事务更新响应;
汇聚处理单元, 用于根据事务执行处理指示汇聚接收的事务准备响应,根 据汇聚的事务准备响应的结果生成事务更新指令;根据事务执行处理指示汇聚 接收的事务更新响应;
发送单元, 用于根据事务执行处理指示向事务参与设备下发事务准备指 令; 向事务参与设备下发事务更新指令; 将汇聚处理单元汇聚的事务更新响应 对应的执行结果返回给 M2M平台。 附图说明
图 1 ( a )为现有技术中事务处理示意图;
图 1 ( b )为现有技术中事务处理示意图;
图 2为本发明实施例一种机器事务控制方法的流程图;
图 3为本发明实施例另一种机器事务控制方法的流程图;;
图 4为本发明实施例网关处理平台事务操作命令流程图;
图 5为本发明实施例机器事务控制系统结构示意图; 图 6为本发明实施例另一种机器事务控制系统结构示意图;
图 7为本发明实施例另一种机器事务控制系统结构示意图;
图 8为本发明实施例另一种机器事务控制系统结构示意图;
图 9为本发明实施例 M2M平台结构示意图;
图 10为本发明实施例一种机器事务控制方法的具体实现流程图; 图 11为本发明实施例另一种机器事务控制方法的具体实现流程图; 图 12为本发明实施例另一种机器事务控制方法的具体实现流程图; 图 13为本发明实施例一种 M2M网关结构示意图;
图 14为本发明实施例另一种 M2M网关结构示意图。 具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚, 下面将结合本发明 实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然, 所描述的实施例是本发明一部分实施例, 而不是全部的实施例。基于本发明中 的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其 他实施例, 都属于本发明保护的范围。 图 2为本发明第一实施例的方法流程示意图, 包括:
Al、 机器到机器 M2M平台接收请求方发送的事务处理请求;
这里的请求方为授权实体, 即有权向 M2M平台申请事务处理的实体, 可以是个人终端,服务器等设备, 这里的事务处理请求中包含需要处理的事务 信息。
A2、所述 M2M平台根据事务参与设备连接属性, 生成并下发事务操作命 令至事务参与设备或网关;
其中, 事务操作命令具体可以是事务准备指令或事务更新指令, 具体地, 根据事务更新的不同 (事务更新可以分为事务提交和事务回滚), 事务更新指 令又可以包括事务提交指令和事务回滚指令两种, 其中, 事务提交指令是在事 务参与设备准备好执行事务的情况下, 指示事务参与设备执行事务的指令; 事 务回滚指令是在事务参与设备没有准备好执行事务的情况下,指示事务参与设 备恢复进行准备工作之前的状态的指令。
其中,根据事务参与设备连接属性的不同, 事务操作命令还可以携带不同 的事务执行处理指示。
A3、 所述事务参与设备或网关根据所述事务操作命令执行事务, 并根据 所述事务执行处理指示将事务操作响应返回给 M2M平台。
相应的, 根据事务操作命令的不同, 事务操作响应也对应不同, 在事务操 作命令为事务准备指令时对应的事务操作响应为事务准备响应,在事务操作命 令为事务更新指令时对应的事务操作响应为事务更新响应, 具体地,在事务更 新指令为事务提交指令时对应的事务操作响应为事务提交响应,在事务更新指 令为事务回滚指令时对应的事务操作响应为事务回滚响应。
实施例 1通过机器到机器 M2M平台接收请求方发送的事务处理请求;所述 M2M平台根据事务参与设备连接属性, 生成并下发事务操作命令至事务参与 设备或网关, 所述事务操作命令携带事务执行处理指示; 所述事务参与设备或 网关根据所述事务操作命令执行事务,并根据所述事务执行处理指示将事务操 作响应返回给 M2M平台, 提高了事务处理效率。
其中,本发明一个实施例中 M2M平台处理过程如图 3所示,具体步骤为: 301、 M2M平台接收事务处理请求;
这里的事务处理请求为步骤 A1中的事务处理请求;
302、 M2M平台检索 M2M设备网关归属, 判断是否将事务更新控制过程 交由归属网关处理, 并在事务操作命令中添加事务执行处理指示;
M2M平台检索 M2M设备网关归属情况, 具体分四种情况: A.事务参与 设备直连 M2M平台, B.事务参与设备中的某一单个设备经由网关连接 M2M 平台, C.事务参与设备中的多个设备经由同一网关连接 M2M平台, D.事务参 与设备中所有设备经由同一网关连接 M2M平台。 M2M平台根据事务参与设 备的网关归属情况, 添加相应的事务执行处理指示, 具体的, 相对 A, 事务执 行处理指示为空, 相对 B, 事务执行处理指示为空或指示网关转发事务操作响 应, 相对 C, 事务执行处理指示为指示 M2M网关汇聚转发事务操作响应, 相 对 D, 事务执行处理指示为指示 M2M网关控制执行后续事务更新操作后, 返 回事务执行结果。
且, 只有情况 D时, 将事务更新控制过程交由归属网关处理。
303、 M2M平台下发事务操作命令至设备或网关;。
304、 M2M平台接收设备或网关返回的事务操作响应, 并判断事务最终执 行状态;
其中, 在所有的事务准备响应都为准备成功时, M2M平台判断事务准备 成功, 向事物参与设备发送事务提交指令否则, 判断不成功, 向事务参与设备 发送事务回滚指令。
在本发明的一个实施例中, M2M网关处理过程如图 4所示,具体步骤为: 401、 网关接收 M2M平台事务操作命令, 所述事务操作命令中携带事务 执行处理指示;
这里只针对步骤 A2中的情况 B , C, D;
402、 网关下发事务操作命令至事务参与设备;
其中, 相对 A, 网关可以直接转发事务操作命令至事务参与设备; 相对 B, 在 M2M平台下发的事务操作命令不包含事务执行处理指示时, 网关可以直接转发事务操作命令至事务参与设备; 在 M2M平台下发的事务操 作命令包含事务执行处理指示时,网关可以删除事务操作命令包含事务执行处 理指示后下发给事务参与设备,也可以重新生成事务操作命令下发给事务参与 设备;
相对 C和 D, 网关可以删除事务操作命令包含事务执行处理指示后下发 给事务参与设备, 也可以重新生成事务操作命令下发给事务参与设备。 403、 网关接收设备返回的事务操作响应;
事务参与设备在执行完事务后, 将事务操作响应返回给网关;
404、 网关根据事务执行处理指示直接转发事务操作响应至 M2M平台, 或汇聚事务操作响应;
网关在收到事务参与设备的事务操作响应后,根据事务执行处理指示,如 事务执行处理指示为转发响应, 则网关转发事务操作响应至 M2M平台, 如事 务执行处理指示为汇聚响应或由 M2M网关控制执行后续事务更新操作, 则转 步骤 405;
405、 网关判断是否由网关控制事务;
网关首先判断是否收到全部的事务操作响应,如果是,再确定是否由网关 控制事务, 如不是由网关控制事务, 则转到步骤 406; 如果由网关控制事务, 则转到步骤 407或 408。 具体地, 如果网关接收的 M2M平台下发的事务操作 命令包括指示网关控制执行后续事务更新操作后,返回事务执行结果的事务执 行处理指示, 则网关判断由网关控制事务。
406、 发送汇聚后的事务操作响应至 M2M平台
407、 网关向事务参与设备发送事务提交指令;
网关判断是否收到全部的事务操作响应,待接收的全部事务操作响应都为 成功后, 网关向事务参与设备发送事务提交请求, 并转步骤 408;
408、 网关向事务参与设备发送事务回滚指令;
网关判断是否收到全部的事务操作响应,待接收的全部事务操作响应至少 有一个不成功时, 网关向事务参与设备发送事务回滚指令, 并转步骤 408;
409、 网关向 M2M平台上报事务执行结果。
网关在接收到所有设备返回的事务提交响应或事务回滚响应后,汇聚返回 的事务提交响应或事务回滚响应,并将汇聚得到的事务提交响应或事务回滚响 应对应的事务执行结果向 M2M平台上报。
流程结束。 图 5为本发明第二实施例的系统结构示意图, 包括:
机器到机器 M2M平台 501 , 用于接收请求方发送的事务处理请求, 根据 事务参与设备连接属性, 生成并下发事务操作命令; 具体描述参考实施例一 A2步骤以及 301~305步骤, 这里不再赘述。
事务参与设备 502, 用于根据事务操作命令执行事务, 向所述 M2M平台 发送事务操作响应。
图 6为本发明第三实施例的系统结构示意图, 其中, 事务参与设备中的一 个事务参与设备 502经由第一 M2M网关 503连接 M2M平台 501 , 包括:
M2M平台 501 , 用于接收请求方发送的事务处理请求, 根据事务参与设 备连接属性, 生成并下发事务操作命令; 具体描述参考实施例一 A2步骤以及 301~305步骤, 这里不再赘述。
第一 M2M网关 503 , 用于给所述一个事务参与设备 502下发事务操作命 令, 将接收的事务操作响应发送给 M2M平台 501。
所述一个事务参与设备 502, 用于根据事务操作命令执行事务, 向 M2M 平台 501发送事务操作响应。 其中, 向 M2M平台发送事务操作响应具体是将 事务操作响应发送给第一 M2M网关 503 , 由第一 M2M网关 503作后续处理。
图 7为本发明第四实施例的系统结构示意图, 其中, 事务参与设备中的至 少两个设备 502经由第二 M2M网关 504连接 M2M平台 501;
M2M平台 501 , 用于接收请求方发送的事务处理请求, 根据事务参与设 备连接属性, 生成并下发事务操作命令, 事务操作命令包括指示第二 M2M网 关汇聚转发事务操作响应的事务执行处理指示; 具体描述参考实施例一 A2步 骤以及 301~305步骤, 这里不再赘述。
第二 M2M网关 504, 用于给所述至少两个事务参与设备 502下发事务操 作命令,根据事务操作命令将至少两个设备返回的事务操作响应进行汇聚,将 汇聚后的事务操作响应发送给 M2M平台 501。
所述至少两个事务参与设备 502 , 用于根据事务操作命令执行事务, 向 M2M平台 501发送事务操作响应。 其中, 向 M2M平台发送事务操作响应具 体是将事务操作响应发送给第二 M2M网关 504, 由第二 M2M网关 504作后 续处理。
图 8 为本发明第五实施例的系统结构示意图, 其中, 事务参与设备 502 的数量为至少两个, 该至少两个事务参与设备经由第三 M2M 网关 505 连接 M2M平台 501 ;
M2M平台 501 , 用于接收请求方发送的事务处理请求, 根据事务参与设 备连接属性, 生成并下发事务操作命令, 事务操作命令包括指示第三 M2M网 关 505 控制执行后续事务更新操作后, 返回事务执行结果的事务执行处理指 示; 具体描述参考实施例一 A2步骤以及 301~305步骤, 这里不再赘述。
第三 M2M网关 505 , 用于根据事务执行处理指示向连接的所有设备下发 事务准备指令;接收到来自所有设备的事务准备响应后,根据事务执行处理指 示汇聚接收的事务准备响应,根据汇聚的事务准备响应的结果生成并向所有设 备下发事务更新指令;接收到来自所述所有设备的事务更新响应后,根据所述 事务执行处理指示汇聚接收的事务更新响应,将汇聚的事务更新响应的结果返 回给 M2M平台 501。
事务参与设备 502, 用于根据事务操作命令执行事务, 向 M2M平台发送 事务操作响应。 其中, 向 M2M平台发送事务操作响应具体是将事务操作响应 发送给第三 M2M网关 505 , 由第三 M2M网关 505作后续处理。
通过事务参与设备 501 , 用于执行事务, 并返回事务操作响应至网关或平 台。 网关 502, 用于根据所述事务操作命令执行事务, 并根据所述事务执行处 理指示将事务操作响应返回给 M2M平台, M2M平台 503 , 用于接收请求方 发送的事务处理请求,根据事务参与设备连接属性, 生成并下发事务操作命令 至事务参与设备或网关, 所述事务操作命令携带事务执行处理指示,提高了事 务处理效率。
图 9为本发明第六实施例的 M2M平台结构示意图, 包括: 接收单元 601 , 用于接收请求方发送的事务处理请求。
生成单元 602, 用于在接收单元 601接收所述事务处理请求后, 根据事务 参与设备连接属性, 生成事务操作命令;
其中, 在相对于上述的情况 Α时, 生成单元 602生成的事务操作命令可 以不携带事务执行处理指示;
在相对于上述的情况 B时, 生成单元 602生成的事务操作命令可以不携 带事务执行处理指示, 也可以携带事务执行处理指示;
相对于上述的情况 C和 D时, 生成单元 602生成的事务操作命令携带事 务执行处理指示;
下发单元 603 , 用于向事务参与设备或 M2M网关发送发送所述事务操作 命令。
可选的, 事务操作命令是事务准备指令; 该情况下, 接收单元 601 , 还可 以用于接收事务参与设备或网关返回的事务准备响应; 该 M2M平台进一步包 括,
判断单元 604, 用于汇聚所述接收单元 601接收的事务准备响应, 根据汇 聚后的事务准备相应判断事务准备状态,如成功则将向事物参与设备发送事务 提交指令, 如失败则向所述事务参与设备发送事务回滚指令。
以上各单元的详细描述参考实施例一的 A2步骤以及 301~305步骤, 这里 不在赘述。
实施例六通过一种 M2M平台, 包括, 接收单元, 用于接收请求方发送的 事务处理请求, 接收参与设备或网关返回的事务操作响应, 生成单元, 用于根 据事务参与设备连接属性, 生成事务操作命令, 所述事务操作命令携带事务执 行处理指示; 下发单元, 用于下发所述事务操作命令至事务参与设备或网关, 提高了事务处理效率。
图 10为本发明第七实施例的一种机器事务控制方法的具体实现流程图, 包括, 请求方, M2M平台, 网关, 事务参与设备 1 , 事务参与设备 2, 事务参 与设备 1直接和 M2M平台相连, 事务参与设备 2经网关和 M2M平台相连, 具体步骤包括:
701、 请求方向 M2M平台发送事务处理请求;
此步骤目的是创建事务资源, 事务处理请求中包括申请 ID,地址资源 ID, 新资源 ID, 处理内容, 访问权限 ID,具体实现参考如下程序:
POST .../{ apiVersion }/m2mResource/transaction/platformCoordinator?resFor mat=XML HTTP/ 1.1
Content- Type: application/xml; charset=UTF-8
Host: example. com:80
<?xml version=" 1.0" encoding= "UTF-8 " ?>
<m2m:transactionResource xmlns:ts=''urn:m2m:xml:rest:transaction: 1 "> <indicator>
<m2m:process> "aggregation" </m2m:process>
<m2m:commit-right> true </m2m:commit-right>
</indicator>
<participant-lists>
participant name=" smart metering A">
<entry uri="http:〃 example.org/m2mResource/devl "></entry> <operations type="prepare">
<m2m:turn-on> true </m2m:turn-on >
</operations>
</participant>
participant name=" smart metering B">
<entry
uri=" htt : //exam le. o:rg/m2mResource/ga,tevyay/(iev2''></entry> <operations type="prepare">
<m2m:turn-on> true </m2m:turn-on >
</operations>
</participant>
</participant-lists>
</m2m: transactionResource >
702、 M2M平台向网关发送事务准备指令;
事务准备指令中具体包括申请 ID,地址资源 ID,事务资源 ID, 处理操作内 容, 同时特别指出 Process = "relay", Commit-Right = "false", 以表示转发事务 操作响应, 没有提交权限, 具体实现参考如下程序:
POST ..7{apiVersion}/m2mResource/transaction/gatewayCoordinator?resFor mat=XML HTTP/ 1.1
Content- Type: application/xml; charset=UTF-8
Host: example. com:80
<?xml version="1.0" encoding= "UTF-8 " ?>
<m2m:transactionOperationResource
xmlns:ts=''urn:m2m:xml:rest:transaction: '>
<m2m: transactionResource id = "1234" />
<indicator>
<m2m:process> "relay" </m2m:process>
<m2m:commit-right> false </m2m:commit-right>
</indicator>
participant name=" smart metering A"> <entry uri="htt : //exairijple. or g/ni2mRe s o ur ce/ dev 1 "></entry>
<operations type="prepare">
<m2m:turn-on> true </m2m:turn-on >
</operations>
</participant>
</m2m:transactionOperationResource>
703、 M2M平台向事务参与设备 1发送事务准备指令;
事务准备指令中具体包括申请 ID,地址资源 ID, 事务资源 ID,处理操作内 谷。
704、 网关向事务参与设备 2下发事务准备指令;
事务准备指令中具体包括申请 ID,地址资源 ID, 事务资源 ID,处理操作内 容。该下发的事务准备指令可以由网关自己生成, 也可以由网关直接转发来自 M2M平台的事务准备指令。
705、 事务参与设备 1向 M2M平台返回事务准备响应;
包括事务资源 ID和事务操作 ID。
706、 事务参与设备 2向网关返回事务准备响应;
包括事务资源 ID和事务操作 ID。
707、 网关向 M2M平台发送事务准备响应;
包括事务资源 ID和事务操作 ID。
708、 M2M平台进行事务提交;
M2M平台根据汇聚后的事务准备响应, 判断当前事务执行状态, 如返回 的两个事务准备响应全部为成功, 则进行提交, 如不是, 则回滚。
709、 M2M平台向事务参与设备 1发送事务提交指令;
事务提交指令中具体包括申请 ID,地址资源 ID, 事务资源 ID,处理操作内 容, 且包含 commit, 以表示事务参与设备 1有权进行提交, 即当前事务由事 务参与设备 1单独完成。 710、 M2M平台向网关发送事务提交指令;
事务提交指令中具体包括申请 ID,地址资源 ID, 事务资源 ID ,处理操作内 容, 且包含 commit, 以表示事务参与设备 2有权进行提交, 即当前事务由事 务参与设备 2单独完成。
711、 网关向事务参与设备 2下发事务提交指令;
712、 事务参与设备 1向 M2M平台返回事务提交响应;
包括事务资源 ID和事务操作 ID, 且包含 comfirm, 以表示由 M2M平台 进行确认。
713、 事务参与设备 2向网关返回事务提交响应;
包括事务资源 ID和事务操作 ID, 且包含 comfirm, 以表示由 M2M平台 进行确认。
714、 网关向 M2M平台发送事务提交响应;
包括事务资源 ID和事务操作 ID, 且包含 comfirm, 以表示由 M2M平台 进行确认。
其中, 在本发明的一个实施例中, M2M平台可以进一步向事务请求者返 回最终结果。 具体地, M2M平台可直接返回执行结果, 或等待请求者后续查 询执行结果。
实施例 7适用于事务参与设备和 M2M直接连接, 或单个事务参与设备通 过网关直接联系的场景, 由 M2M平台采用进行事务操作响应的汇聚, 控制事 务提交的方式, 使得事务处理的效率提高。
图 11为本发明第八实施例的一种机器事务控制方法的具体实现流程图, 包括, 请求方, M2M平台, 网关, 事务参与设备 1 , 事务参与设备 2, 其它网 关或事务参与设备, 事务参与设备 1和事务参与设备 2连在网关上, 其它网关 或事务参与设备与 M2M平台相连, 具体实现流程如下所示:
801、 请求方向 M2M平台发送事务处理请求;
此步骤目的是创建事务资源, 事务处理请求中包括申请 ID,地址资源 ID, 新资源 ID, 处理内容, 访问权限 ID,具体实现参考如下程序:
POST .../{ apiVersion }/m2mResource/transaction/platformCoordinator?resFor mat=XML HTTP/ 1.1
Content- Type: application/xml; charset=UTF-8
Host: example. com:80
<?xml version="1.0" encoding= "UTF-8 " ?>
<m2m:transactionResource xmlns:ts=''urn:m2m:xml:rest:transaction: 1 ">
<indicator>
<m2m:process> "aggregation" </m2m:process>
<m2m:commit-right> true </m2m:commit-right>
</indicator>
<participant-lists>
participant name=" smart metering A">
<entry
uri="http://example.org/m2mResource/gateway/dev '></entry> <operations type="prepare">
<m2m:turn-on> true </m2m:turn-on >
</operations>
</participant>
participant name=" smart metering B">
<entry
uri=" http://example.org/m2mResource/gateway/dev2"x/entry> <operations type="prepare">
<m2m:turn-on> true </m2m:turn-on >
</operations> </participant>
participant name=" smart metering C">
<entry uri="http: //example. org/iij2mResource/dev3"></entry> <operations type="prepare">
<m2m:turn-on> true </m2m:turn-on >
</operations>
</participant>
</participant-lists>
</m2m: transactionResource >
802、 M2M平台向网关发送事务准备指令;
事务准备指令中具体包括申请 ID,地址资源 ID,事务资源 ID, 处理操作内 容, 同时特别指出 Process = "aggregation", Commit-Right = "false" , 以表示汇 聚事务操作响应, 没有提交权限, 具体实现参考如下程序;
POST ..7{apiVersion}/m2mResource/transaction/gatewayCoordinator?resFor mat=XML HTTP/ 1.1
Content- Type: application/xml; charset=UTF-8
Host: example. com:80
<?xml version=" 1.0" encoding= "UTF-8 " ?>
<m2m:transactionOperationResource
xmlns:ts=''urn:m2m:xml:rest:transaction: '>
<m2m: transactionResource id = "1234" />
<indicator>
<m2m:process> "aggregation" </m2m:process>
<m2m:commit-right> false </m2m:commit-right>
</indicator> <participant-list>
participant name=" smart metering A">
<entry
uri="http://example.org/m2mResource/gateway/dev '></entry>
<operations type="prepare">
<m2m:turn-on> true </m2m:turn-on >
</operations>
</participant>
participant name=" smart metering B">
<entry
uri=" http://example.org/m2mResource/gateway/dev2"x/entry> <operations type="prepare">
<m2m:turn-on> true </m2m:turn-on >
</operations>
</participant>
</participant-list>
</m2m:transactionOperationResource>
803、 网关向事务参与设备 1下发事务准备指令;
事务准备指令中具体包括申请 ID,地址资源 ID,事务资源 ID, 处理操作内 容。该下发的事务准备指令可以由网关自己生成, 也可以由网关直接转发来自 M2M平台的事务准备指令。
804、 网关向事务参与设备 2下发事务准备指令;
事务准备指令中具体包括申请 ID,地址资源 ID,事务资源 ID, 处理操作内 容。该下发的事务准备指令可以由网关自己生成, 也可以由网关直接转发来自 M2M平台的事务准备指令。 805、 M2M平台向其它网关或事务参与设备发送事务准备指令; 事务准备指令中具体包括申请 ID,地址资源 ID,事务资源 ID, 处理操作内 谷。
806、 事务参与设备 1向网关返回事务准备响应;
包括事务资源 ID。
807、 事务参与设备 2向网关返回事务准备响应;
包括事务资源 Π
808、 网关对事务准备响应进行汇聚;
其中事务参与设备 2的事务准备响应为失败, 则确定当前事务为失败。 809、 网关向 M2M平台返回失败的事务准备响应;
810、 其它网关或事务参与设备向 M2M平台返回事务准备响应;
811、 M2M平台确定需要回滚;
M2M平台汇聚了所有事务操作响应后, 根据至少步骤 811中的失败的事 务准备响应确定当前事务执行状态为失败, 确定需要进行回滚。
812、 M2M平台向网关发送事务回滚指令;
事务回滚指令中具体包括申请 ID,地址资源 ID,事务资源 ID, 处理操作内 容, 同时携带事务回滚指示" Rollback", 表示回滚;
813、 网关向事务参与设备 1下发事务回滚指令;
814、 网关向事务参与设备 2下发事务回滚指令;
815、 M2M平台向其它网关或事务参与设备发送事务回滚指令; 事务回滚指令中具体包括申请 ID,地址资源 ID,事务资源 ID, 处理操作内 容, 同时携带事务回滚指示" Rollback", 表示回滚;
816、 事务参与设备 1向网关返回事务回滚响应;
包括事务资源 Π
817、 事务参与设备 2向网关返回事务回滚响应;
包括事务资源 Π 818、 网关对事务回滚响应进行汇聚;
其中事务参与设备 2和事务参与设备 1都为成功,则确定当前事务回滚为 成功, 具体地, 可以将事务参与设备 2和事务参与设备 1返回的两个表示成功 的事务回滚响应, 汇聚成一个表示成功的事务回滚响应。
819、 网关向 M2M平台返回事务回滚响应;
820、 其它网关或事务参与设备向 M2M平台返回事务回滚响应; 其它网关或事务参与设备向 M2M平台返回事务回滚响应也为成功, 则确 定当前事务回滚成功。
其中, 在本发明的一个实施例中, M2M平台可以进一步向事务请求者返 回最终结果。 具体地, M2M平台可直接返回执行结果, 或等待请求者后续查 询执行结果。
实施例 8适用于多个事务参与设备通过同一网关连接 M2M平台的情况, M2M平台根据事务参与设备连接属性, 生成并下发事务操作命令至事务参与 设备或网关, 所述事务操作命令携带事务执行处理指示; 指示所述网关对所述 多个事务参与设备的事务操作响应进行汇聚, 提高了事务处理效率。
图 12为本发明第九实施例的一种机器事务控制方法的具体实现流程图, 包括, 请求方, M2M平台, 网关, 事务参与设备 1 , 事务参与设备 2, 事务参 与设备 1和事务参与设备 2连在网关上, 且事务参与设备 1和事务参与设备 2 同时参与一个事务, 具体实现流程如下所示:
901、 请求方向 M2M平台发送事务处理请求;
此步骤目的是创建事务资源, 事务处理请求中包括申请 ID,地址资源 ID, 新资源 ID, 处理内容, 访问权限 ID,具体实现参考如下程序:
POST .../{ apiVersion }/m2mResource/transaction/platformCoordinator?resFor mat=XML HTTP/ 1.1
Content- Type: application/xml; charset=UTF-8
Host: example. com:80 <?xml version="1.0" encoding= "UTF-8 " ?>
<m2m:transactionResource xmlns:ts=''urn:m2m:xml:rest:transaction: 1 ">
<indicator>
<m2m:process> "aggregation" </m2m:process>
<m2m:commit-right> true </m2m:commit-right>
</indicator>
<participant-lists>
participant name=" smart metering A">
<entry
uri="http://example.org/m2mResource/gateway/dev '></entry>
<operations type="prepare">
<m2m:turn-on> true </m2m:turn-on >
</operations>
</participant>
participant name=" smart metering B">
<entry
uri=" http://example.org/m2mResource/gateway/dev2"x/entry>
<operations type="prepare">
<m2m:turn-on> true </m2m:turn-on >
</operations>
</participant>
</participant-lists>
</m2m: transactionResource >
902、 M2M平台向网关发送事务准备指令;
事务准备指令中具体包括申请 ID,地址资源 ID,事务资源 ID, 处理操作内 容, 同时特别指出 Process = "aggregation", Commit-Right = "true", 以指示网关 汇聚事务操作响应, 且网关有提交权限, 具体实现参考如下程序;
POST ..7{apiVersion}/m2mResource/transaction/gatewayCoordinator?resFor mat=XML HTTP/ 1.1
Content- Type: application/xml; charset=UTF-8
Host: example. com:80
<?xml version="1.0" encoding= "UTF-8 " ?>
<m2m:transactionOperationResource
xmlns:ts=''urn:m2m:xml:rest:transaction: '>
<m2m: transactionResource id = "1234" />
<indicator>
<m2m:process> "aggregation" </m2m:process>
<m2m:commit-right> true </m2m:commit-right>
</indicator>
<participant-list>
participant name=" smart metering A">
<entry
uri="http://example.org/m2mResource/gateway/dev '></entry> <operations type="prepare">
<m2m:turn-on> true </m2m:turn-on >
</operations>
</participant>
participant name=" smart metering B">
<entry
uri=" http://example.org/m2mResource/gateway/dev2"x/entry> <operations type="prepare">
<m2m:turn-on> true </m2m:turn-on >
</operations>
</participant>
</participant-list>
</m2m:transactionOperationResource>
903、 网关向事务参与设备 1下发事务准备指令;
事务准备指令中具体包括申请 ID,地址资源 ID,事务资源 ID, 处理操作内 容。该下发的事务准备指令可以由网关自己生成, 也可以由网关直接转发来自 M2M平台的事务准备指令。
904、 网关向事务参与设备 2下发事务准备指令;
事务准备指令中具体包括申请 ID,地址资源 ID,事务资源 ID, 处理操作内 容。该下发的事务准备指令可以由网关自己生成, 也可以由网关直接转发来自 M2M平台的事务准备指令。
905、 事务参与设备 1向网关返回事务准备响应;
包括事务资源 Π
906、 事务参与设备 2向网关返回事务准备响应;
包括事务资源 Π
907、 网关对事务准备执行响应进行汇聚
其中事务参与设备 2事务准备响应为失败,则汇聚后的结果为事务准备执 行失败。若所有事务参与设备均返回成功的事务准备执行响应, 则汇聚后的结 果为事务准备执行成功。
908、 由于当前事务准备执行结果为失败, 且网关具有事务提交决定权, 则决定对其管辖的事务参与设备 1和 2进行事务回滚操作;若事务准备执行结 果为成功,则网关将可以决定对其管辖的事务参与设备 1和 2进行事务提交操 作。
909、 网关向事务参与设备 1 下发事务回滚指令, 其中携带事务回滚指 示" Rollback", 表示回滚;
910、 网关向事务参与设备 2 下发事务回滚指令, 其中携带事务回滚指 示" Rollback" , 表示回滚;
911、 事务参与设备 1向网关返回事务回滚响应;
包括事务资源 Π
912、 事务参与设备 2向网关返回事务回滚响应;
包括事务资源 Π
913、 网关向 M2M平台返回事务执行结果;
其中, 在本发明的一个实施例中, M2M平台可以进一步向事务请求者返 回最终结果。 具体地, M2M平台可直接返回执行结果, 或等待请求者后续查 询执行结果。
实施例 9适用于所有事务参与设备均通过同一个网关连接到 M2M平台的 情况, 所述 M2M平台根据事务参与设备连接属性, 生成并下发事务操作命令 至事务参与设备或网关, 所述事务操作命令携带事务执行处理指示; 指示所述 网关不仅对所述多个事务参与设备的事务准备响应进行汇聚,并且由网关本地 判断事务执行状态,从而在网关本地进一步处理事务的提交或回滚操作, 而无 需返回到 M2M平台来判断和执行后续的事务操作, 提高了事务处理效率。
图 13为本发明第十实施例的机器到机器网关的结构示意图, 包括: 接收单元 1301 ,用于接收来自 M2M平台的事务操作命令, 事务操作命令 包括指示 M2M网关汇聚转发事务操作响应的事务执行处理指示; 接收事务参 与设备返回的事务操作响应;
汇聚单元 1302, 用于将接收单元 1301接收的事务操作响应进行汇聚; 发送单元 1303 , 用于给连接的事务参与设备下发事务操作命令; 将汇聚 单元 1302汇聚得到的事务操作响应发送给所述 M2M平台。 图 14为本发明第十一实施例的机器到机器网关的结构示意图, 包括: 接收单元 1401 ,用于接收来自 M2M平台的事务操作命令, 事务操作命令 包括指示 M2M网关汇聚事务操作响应并控制执行后续事务更新操作后, 返回 事务执行结果的事务执行处理指示;接收连接的事务参与设备返回的事务准备 响应; 接收来自所述事务参与设备的事务更新响应;
汇聚处理单元 1402, 用于根据接收单元 1401接收的事务执行处理指示汇 聚接收的事务准备响应, 根据汇聚的事务准备响应的结果生成事务更新指令; 根据所述事务执行处理指示汇聚接收的事务更新响应;
发送单元 1403 , 用于根据接收单元 1401接收的事务执行处理指示向事务 参与设备下发事务准备指令; 向事务参与设备下发事务更新指令; 将汇聚处理 单元 1402汇聚的事务更新响应对应的执行结果返回给 M2M平台。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算 机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。 其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM )或随机存储记忆体 ( Random Access Memory, RAM )等。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于 此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到 变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应 以所述权利要求的保护范围为准。

Claims

权 利 要 求
1、 一种机器事务控制方法, 其特征在于, 所述方法包括,
机器到机器 M2M平台接收请求方发送的事务处理请求;
所述 M2M平台根据事务参与设备连接属性, 生成并下发事务操作命令至 事务参与设备或 M2M网关;
M2M平台接收所述事务参与设备或 M2M网关返回的事务操作响应, 所 述事务操作响应是所述事务参与设备或 M2M网关根据所述事务操作命令执行 事务后, 返回的。
2、 如权利要求 1所述的方法, 其特征在于, 事务参与设备直连 M2M平 台;
所述 M2M平台根据事务参与设备连接属性, 生成并下发事务操作命令至 事务参与设备或 M2M网关包括:
所述 M2M平台生成并下发事务操作命令至事务参与设备, 所述事务操作 命令为事务准备指令或事务更新指令;
所述事务参与设备或 M2M网关根据所述事务操作命令执行事务, 并根据 所述事务执行处理指示将事务操作响应返回包括:
事务参与设备执行事务准备指令并返回事务准备响应至 M2M平台, 事务 参与设备执行事务更新指令并返回事务更新响应至 M2M平台。
3、 如权利要求 1所述的方法, 其特征在于, 事务参与设备中单个设备经 由 M2M网关连接 M2M平台;
所述 M2M平台根据事务参与设备连接属性, 生成并下发事务操作命令至 事务参与设备或 M2M网关包括: 所述 M2M平台生成并下发事务操作命令至 M2M网关, 所述 M2M网关下发事务操作命令至所述单个设备;
所述事务参与设备或 M2M网关根据所述事务操作命令执行事务, 并根据 所述事务执行处理指示将事务操作响应返回包括: 所述 M2M网关接收来自所 述单个设备的事务操作响应后, 根据 所述 M2M 平台下发的事务操作命令 将所述事务操作响应转发给所述 M2M平台。
4、 如权利要求 3所述的方法, 其特征在于, 所述 M2M平台下发的事务 操作命令包括指示网关发送事务操作响应的事务执行处理指示。
5、 如权利要求 1所述的方法, 其特征在于, 事务参与设备中至少两个设 备经由同一 M2M网关连接 M2M平台;
所述 M2M平台根据事务参与设备连接属性, 生成并下发事务操作命令至 事务参与设备或 M2M网关包括: 所述 M2M平台生成并下发事务操作命令至 事务 M2M网关, 所述 M2M网关下发事务操作命令至所述至少两个设备, 所 述事务操作命令包括指示 M2M网关汇聚转发事务操作响应的事务执行处理指 示;
所述事务参与设备或 M2M网关根据所述事务操作命令执行事务, 并根据 所述事务执行处理指示将事务操作响应返回包括: 所述 M2M网关接收来自所 述至少两个设备的事务操作响应后,根据所述事务执行处理指示将接收的事务 操作响应进行汇聚, 并将汇聚获得的事务操作响应发送给所述 M2M平台。
6、 如权利要求 1所述的方法, 其特征在于, 事务参与设备中所有设备经 由同一 M2M网关连接 M2M平台;
所述 M2M平台根据事务参与设备连接属性, 生成并下发事务操作命令至 事务参与设备或 M2M网关包括: 所述 M2M平台生成并下发事务操作命令至 事务 M2M网关, 所述事务操作命令包括指示 M2M网关控制执行后续事务更 新操作后, 返回事务执行结果的事务执行处理指示; 所述 M2M网关根据所述 事务执行处理指示向所述所有设备下发事务准备指令;
所述事务参与设备或 M2M网关根据所述事务操作命令执行事务, 并根据 所述事务执行处理指示将事务操作响应返回包括:
所述 M2M网关根据 M2M平台下发的事务操作命令向 M2M平台返回事 务执行结果。
7、如权利要求 6所述的方法, 其特征在于, 所述 M2M网关根据 M2M平 台下发的事务操作命令向 M2M平台返回事务执行结果包括:
所述 M2M网关根据所述事务执行处理指示汇聚接收到的来自所述所有设 备的事务准备响应,根据汇聚的事务准备响应的结果生成并向所述所有设备下 发事务更新指令;根据所述事务执行处理指示汇聚接收到的来自所述所有设备 的事务更新响应, 将汇聚的事务更新响应对应的执行结果返回给所述 M2M平
8、 如权利要求 7所述的方法, 其特征在于, 在所述汇聚的事务准备响应 的结果为准备成功时, 所述事务更新指令为事务提交指令;
在所述汇聚的事务准备响应的结果为准备失败时,所述事务更新指令为事 务回滚指令。
9、 一种机器事务控制系统, 其特征在于, 所述系统包括,
机器到机器 M2M平台, 用于接收请求方发送的事务处理请求, 根据事务 参与设备连接属性, 生成并下发事务操作命令;
事务参与设备, 用于根据所述事务操作命令执行事务, 向所述 M2M平台 发送事务操作响应。
10、 如权利要求 9所述的机器事务控制系统, 其特征在于, 所述事务参与 设备中的一个事务参与设备经由第一 M2M网关连接所述 M2M平台, 所述第 一 M2M网关, 用于给所述一个事务参与设备下发事务操作命令, 将接收的所 述事务操作响应发送给所述 M2M平台。
11、 如权利要求 9所述的机器事务控制系统, 其特征在于, 所述事务参与 设备中的至少两个设备经由第二 M2M网关连接所述 M2M平台, 所述事务操 作命令包括指示第二 M2M网关汇聚转发事务操作响应的事务执行处理指示; 所述第二 M2M网关, 用于给所述至少两个事务参与设备下发事务操作命 令, 根据所述事务操作命令将所述至少两个设备返回的事务操作响应进行汇 聚, 将汇聚后的事务操作响应发送给所述 M2M平台。
12、 如权利要求 9所述的机器事务控制系统, 其特征在于, 所述事务参与 设备的数量为至少两个, 该至少两个事务参与设备经由第三 M2M网关连接所 述 M2M平台, 所述事务操作命令包括指示第三 M2M网关控制执行后续事务 更新操作后, 返回事务执行结果的事务执行处理指示;
所述第三 M2M网关, 用于根据所述事务执行处理指示向所述所有设备下 发事务准备指令; 接收到来自所述所有设备的事务准备响应后,根据所述事务 执行处理指示汇聚接收的事务准备响应,根据汇聚的事务准备响应的结果生成 并向所述所有设备下发事务更新指令;接收到来自所述所有设备的事务更新响 应后,根据所述事务执行处理指示汇聚接收的事务更新响应,将汇聚的事务更 新响应的结果返回给所述 M2M平台。
13、 一种机器到机器平台, 其特征在于, 所述机器到机器平台包括, 接收单元, 用于接收请求方发送的事务处理请求;
生成单元, 用于在所述接收单元接收所述事务处理请求后,根据事务参与 设备连接属性, 生成事务操作命令;
下发单元, 用于向事务参与设备或 M2M网关发送所述生成单元生成的事 务操作命令。
14、 如权利要求 13所述的机器到机器平台, 其特征在于, 所述事务操作 命令是事务准备指令;
所述接收单元, 还用于接收事务参与设备或网关返回的事务准备响应; 所述机器到机器平台进一步包括,
判断单元, 用于汇聚所述接收单元接收的事务准备响应,根据汇聚后的事 务准备相应判断事务准备状态, 如成功则将向事物参与设备发送事务提交指 令, 如失败则向所述事务参与设备发送事务回滚指令。
15、 一种机器到机器网关, 其特征在于, 包括:
接收单元, 用于接收来自 M2M平台的事务操作命令, 所述事务操作命令 包括指示 M2M网关汇聚转发事务操作响应的事务执行处理指示; 接收事务参 与设备返回的事务操作响应;
汇聚单元, 用于将所述接收单元接收的事务操作响应进行汇聚; 发送单元, 用于给连接的事务参与设备下发事务操作命令; 将所述汇聚单 元汇聚得到的事务操作响应发送给所述 M2M平台。
16、 一种机器到机器网关, 其特征在于, 包括:
接收单元, 用于接收来自 M2M平台的事务操作命令, 所述事务操作命令 包括指示 M2M网关控制执行后续事务更新操作后, 返回事务执行结果的事务 执行处理指示;接收连接的事务参与设备返回的事务准备响应; 接收来自所述 事务参与设备的事务更新响应;
汇聚处理单元, 用于根据所述事务执行处理指示汇聚接收的事务准备响 应,根据汇聚的事务准备响应的结果生成事务更新指令; 根据所述事务执行处 理指示汇聚接收的事务更新响应;
发送单元,用于根据所述事务执行处理指示向所述事务参与设备下发事务 准备指令; 向所述事务参与设备下发事务更新指令; 将所述汇聚处理单元汇聚 的事务更新响应对应的执行结果返回给所述 M2M平台。
PCT/CN2011/079535 2011-02-24 2011-09-09 一种机器事务控制方法、装置和系统 WO2012113226A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110044771.7A CN102136976B (zh) 2011-02-24 2011-02-24 一种机器事务控制方法、装置和系统
CN201110044771.7 2011-02-24

Publications (1)

Publication Number Publication Date
WO2012113226A1 true WO2012113226A1 (zh) 2012-08-30

Family

ID=44296636

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/079535 WO2012113226A1 (zh) 2011-02-24 2011-09-09 一种机器事务控制方法、装置和系统

Country Status (2)

Country Link
CN (1) CN102136976B (zh)
WO (1) WO2012113226A1 (zh)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102136976B (zh) * 2011-02-24 2014-12-31 华为技术有限公司 一种机器事务控制方法、装置和系统
US20140351903A1 (en) * 2011-09-13 2014-11-27 Nokia Solutions And Networks Oy Authentication mechanism
CN103686769A (zh) * 2012-09-12 2014-03-26 中兴通讯股份有限公司 终端设备的业务控制方法及装置
CN103731870B (zh) 2012-10-12 2019-09-10 中兴通讯股份有限公司 监控任务的管理方法及装置
CN105245395B (zh) * 2014-07-09 2018-12-04 中兴通讯股份有限公司 一种基于策略的m2m终端设备监测控制方法和装置
KR101792331B1 (ko) * 2015-07-10 2017-11-01 전자부품연구원 M2M/IoT 플랫폼에서 트랜잭션 방법 및 시스템
CN106412116A (zh) * 2016-11-17 2017-02-15 上海斐讯数据通信技术有限公司 一种云接入控制器分布式处理用户登录的方法和装置
WO2018170391A1 (en) * 2017-03-17 2018-09-20 Convida Wireless, Llc Distributed transaction management in a network service layer

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5938722A (en) * 1997-10-15 1999-08-17 Mci Communications Corporation Method of executing programs in a network
CN101212481A (zh) * 2007-12-21 2008-07-02 华为技术有限公司 一种事务控制方法、系统和装置
CN101371229A (zh) * 2005-10-06 2009-02-18 雷特泽远程管理有限公司 资源命令消息和方法
CN101860572A (zh) * 2010-06-23 2010-10-13 中兴通讯股份有限公司 基于m2m的车载网关、网元、汽车远程控制系统和方法
CN102136976A (zh) * 2011-02-24 2011-07-27 华为技术有限公司 一种机器事务控制方法、装置和系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101959192A (zh) * 2009-07-17 2011-01-26 华为技术有限公司 业务处理方法及通信设备
CN101990192A (zh) * 2009-07-30 2011-03-23 中兴通讯股份有限公司 本地ip访问连接属性的通知方法与装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5938722A (en) * 1997-10-15 1999-08-17 Mci Communications Corporation Method of executing programs in a network
CN101371229A (zh) * 2005-10-06 2009-02-18 雷特泽远程管理有限公司 资源命令消息和方法
CN101212481A (zh) * 2007-12-21 2008-07-02 华为技术有限公司 一种事务控制方法、系统和装置
CN101860572A (zh) * 2010-06-23 2010-10-13 中兴通讯股份有限公司 基于m2m的车载网关、网元、汽车远程控制系统和方法
CN102136976A (zh) * 2011-02-24 2011-07-27 华为技术有限公司 一种机器事务控制方法、装置和系统

Also Published As

Publication number Publication date
CN102136976A (zh) 2011-07-27
CN102136976B (zh) 2014-12-31

Similar Documents

Publication Publication Date Title
WO2012113226A1 (zh) 一种机器事务控制方法、装置和系统
EP3726806B1 (en) Method for remotely controlling vehicle on the basis of smart apparatus
US10701177B2 (en) Automatic data request recovery after session failure
CN110521188B (zh) 网络服务层中的分布式事务管理
CN112118315A (zh) 数据处理系统、方法、装置、电子设备和存储介质
US11108837B2 (en) Media downlink transmission control method and related device
CN108259618B (zh) 一种同步的数据交互处理方法及装置
CN107528891B (zh) 一种基于WebSocket的自动集群方法及其系统
CN111770172A (zh) 消息中间件消费代理方法、装置、代理服务器及存储介质
US10142422B2 (en) Clustering websocket communications with configurable master-slave servers
CN107517227A (zh) 用于分布式一致性系统的会话实现方法以及装置
CN108182121A (zh) 一种Android中控大屏系统模块间通信方法及系统
WO2023165429A1 (zh) 一种会话状态管理方法、系统、装置、设备及存储介质
CN111200622A (zh) 一种资源传输方法及装置、存储介质
WO2023093641A1 (zh) 用户关系链存储方法、装置、系统、电子设备及存储介质
US20170347246A1 (en) Communication method in terminal and terminal suitable for the same
US20090093231A1 (en) METHOD, SYSTEM AND DEVICE FOR CHARGING IN PoC SYSTEM
CN113992740B (zh) 一种基于自主可控的中间件及数据传输方法
US11580093B2 (en) Asynchronous database session update
CN115396479A (zh) 机器人与云平台命令交互的方法、系统及存储介质
CN106921619B (zh) 一种关联事件处理方法及装置
JP2017167845A (ja) 通信装置、通信システム、通信方法およびプログラム
WO2024139015A1 (zh) 基于代理和备份技术的多人协同任务保障方法
US20240146782A1 (en) Service switching method, electronic device, and storage medium
CN1332309C (zh) Web服务环境下的事务处理系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11859053

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11859053

Country of ref document: EP

Kind code of ref document: A1