Data processing method and device, equipment and storage medium
By processing the allocation order and operation identification information in the spare parts service of the material management system, the data inconsistency caused by the timeout of the inventory service inlet and exit interface is solved, and the data consistency between the spare parts service and the inventory service is achieved.
Patent Information
- Application Number
- CN202311063220.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-22
- Publication Date
- 2025-02-25
AI Technical Summary
In a material management system based on microservice architecture, inventory services are under great traffic pressure, resulting in timeouts that occur when the business peaks or large-scale inventory is in and out of the warehouse, resulting in inconsistency between the upstream and downstream data between spare parts services and inventory services.
By introducing the generation, sending and processing mechanism of allocation orders and operation identification information in the spare parts service, the spare parts service is controlled to suspend processing of local to-commit transactions and receive in-house and out-of-warehouse result messages sent by the inventory service, and resume processing of local to-commit transactions based on the message.
It effectively solves the data inconsistency caused by the in-store interface timeout, and ensures the consistency of upstream and downstream data between spare parts services and inventory services.
Smart Images

Figure CN119512698A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of Internet of Things, and in particular to a data processing method, device, equipment and storage medium. Background Art
[0002] In a material management system based on a microservice architecture, the spare parts service can generate a transfer order, and then call the inventory service to perform material entry and exit, so as to operate the material circulation between different organizations. With the increasing demand for spare parts and factories for inventory, the material management system often needs to transfer tens of thousands or even hundreds of thousands of inventories between organizations. As the underlying basic service, the inventory service is under great pressure from traffic. The inventory entry and exit interface provided to the upstream (i.e., the spare parts service) is prone to timeout during business peaks or when large orders are entered and exited. In this case, the spare parts service usually rolls back the local pending transaction, but the inventory service continues to execute the entry and exit of the transfer order, and it is possible that the entry and exit will be successful, which will lead to inconsistency of upstream and downstream data between the spare parts service and the inventory service. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the embodiments of the present disclosure provide a data processing method, apparatus, device and storage medium to solve the defects in the related art.
[0004] According to a first aspect of an embodiment of the present disclosure, there is provided a data processing method, which is applied to an electronic device deployed with a spare parts service, the method comprising:
[0005] In response to the spare parts service receiving a transfer request sent by a material transfer requesting party, controlling the spare parts service to generate a transfer order and operation identification information based on the transfer request;
[0006] Control the spare parts service to send the transfer order and the operation identification information to the in-and-out interface of the inventory service, so as to call the inventory service to perform the in-and-out operation for the transfer order, wherein the operation identification information uniquely corresponds to the current call operation of the spare parts service to the inventory service;
[0007] In response to the timeout of the in-and-out interface, control the spare parts service to suspend processing the local pending transaction corresponding to the transfer order, and receive the in-and-out result message sent by the inventory service, where the in-and-out result message is generated by the inventory service based on the operation identification information and the actual in-and-out result of the transfer order;
[0008] In response to the spare parts service receiving the storage-in / out result message, the spare parts service is controlled to resume processing the local transaction to be committed, and processes the local transaction to be committed based on the storage-in / out result message.
[0009] In some embodiments, the method further comprises:
[0010] In response to generating the transfer order, setting the state of the transfer order to a first preset state, wherein the first preset state is used to allow the spare parts service to process the local transaction to be submitted;
[0011] The controlling the spare parts service to suspend processing of the local pending transaction corresponding to the transfer order includes:
[0012] updating the state of the transfer order from the first preset state to a second preset state, wherein the second preset state is used to prohibit the spare parts service from processing the local transaction to be submitted;
[0013] The controlling the spare part service to resume processing the local transaction to be committed includes:
[0014] The status of the transfer order is updated from the second preset status to the first preset status.
[0015] In some embodiments, the method further comprises:
[0016] The spare parts service is controlled to receive the storage and warehousing result message through the message middleware as a message consumer. The storage and warehousing result message is generated by the inventory service as a message generator and sent to the message middleware.
[0017] In some embodiments, the controlling the spare parts service to process the local pending transaction corresponding to the transfer order based on the storage and warehousing result message includes:
[0018] In response to determining that the transfer order is successfully entered or exited based on the entry or exit result message, the spare parts service is controlled to submit the local transaction to be submitted.
[0019] In some embodiments, the controlling the spare parts service to process the local pending transaction corresponding to the transfer order based on the storage and warehousing result message includes:
[0020] In response to determining that the transfer order fails to enter or exit the warehouse based on the entry or exit result message, the spare parts service is controlled to roll back the local transaction to be committed.
[0021] In some embodiments, the method further comprises:
[0022] In response to executing the calling operation, controlling the spare parts service to receive a target storage entry and exit result, wherein the target storage entry and exit result includes a result sent by the storage entry and exit interface and used to reflect whether the transfer order storage entry and exit is successful;
[0023] In response to not receiving the target storage-in / out result within a set time period, it is determined that the storage-in / out interface has timed out, and the set time period is a time period of a set length after the call operation is executed.
[0024] In some embodiments, the method further comprises:
[0025] In response to receiving the target in / out warehouse result within the set time period, determining that the in / out warehouse interface has not timed out, and controlling the spare parts service to process the local transaction to be submitted based on the target in / out warehouse result.
[0026] According to a second aspect of an embodiment of the present disclosure, there is provided a data processing method, which is applied to an electronic device deployed with an inventory service, the method comprising:
[0027] In response to the in-and-out interface of the inventory service receiving the transfer order and operation identification information sent by the spare parts service, executing the in-and-out operation for the transfer order, the transfer order and the operation identification information are generated by the spare parts service based on the transfer request sent by the material request transfer party when calling the inventory service, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service;
[0028] In response to completing the in-and-out operation when the in-and-out interface times out, generating an in-and-out result message based on the operation identification information and the actual in-and-out result of the transfer order;
[0029] The inbound and outbound message is sent to the spare parts service, so that the spare parts service processes the local pending transaction corresponding to the transfer order based on the inbound and outbound message.
[0030] According to a third aspect of an embodiment of the present disclosure, there is provided a data processing device, which is applied to an electronic device deployed with a spare parts service, and the device includes:
[0031] A transfer order generation module, configured to control the spare parts service to generate a transfer order and operation identification information based on the transfer request in response to the spare parts service receiving the transfer request sent by the material requesting transfer party;
[0032] The inventory service calling module is used to control the spare parts service to send the transfer order and the operation identification information to the in-and-out interface of the inventory service, so as to call the inventory service to perform the in-and-out operation for the transfer order, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service;
[0033] A result message receiving module, configured to control the spare parts service to suspend processing of the local pending transaction corresponding to the transfer order in response to the timeout of the in-and-out interface, and receive an in-and-out result message sent by the inventory service, wherein the in-and-out result message is generated by the inventory service based on the operation identification information and the actual in-and-out result of the transfer order;
[0034] The first transaction processing module is used to control the spare parts service to resume processing the local transaction to be committed in response to the spare parts service receiving the storage and warehousing result message, and process the local transaction to be committed based on the storage and warehousing result message.
[0035] In some embodiments, the transfer order generation module is further used to, in response to generating the transfer order, set the state of the transfer order to a first preset state, wherein the first preset state is used to allow the spare parts service to process the local transaction to be submitted;
[0036] The result message receiving module is further used to update the state of the transfer order from the first preset state to a second preset state, where the second preset state is used to prohibit the spare parts service from processing the local transaction to be submitted;
[0037] The first transaction processing module is further used to update the status of the transfer order from the second preset status to the first preset status.
[0038] In some embodiments, the apparatus further comprises:
[0039] The message receiving control module is used to control the spare parts service to receive the in / out result message through the message middleware as a message consumer. The in / out result message is generated by the inventory service as a message generator and sent to the message middleware.
[0040] In some embodiments, the first transaction processing module is further used to control the spare parts service to submit the local transaction to be submitted in response to determining that the transfer order is successfully entered or exited based on the entry or exit result message.
[0041] In some embodiments, the first transaction processing module is further used to control the spare parts service to roll back the local transaction to be committed in response to determining that the transfer order has failed to be loaded or unloaded based on the loading or unloading result message.
[0042] In some embodiments, the apparatus further comprises a timeout determination module;
[0043] The timeout determination module comprises:
[0044] A target result receiving unit, used for controlling the spare parts service to receive a target storage in and out result in response to executing the calling operation, wherein the target storage in and out result includes a result sent by the storage in and out interface and used to reflect whether the transfer order storage in and out is successful;
[0045] A timeout determination unit is used to determine that the in / out interface has timed out in response to not receiving the target in / out result within a set time period, wherein the set time period is a time period of a set length after executing the call operation.
[0046] In some embodiments, the apparatus further comprises:
[0047] The second transaction processing module is used to determine that the in / out interface has not timed out in response to receiving the target in / out result within the set time period, and control the spare parts service to process the local transaction to be submitted based on the target in / out result.
[0048] According to a fourth aspect of an embodiment of the present disclosure, there is provided a data processing device, which is applied to an electronic device deployed with an inventory service, and the device includes:
[0049] an operation execution module, configured to execute an inbound and outbound operation on the transfer order in response to the inbound and outbound interface of the inventory service receiving a transfer order and operation identification information sent by the spare parts service, wherein the transfer order and the operation identification information are generated by the spare parts service based on the transfer request sent by the material request transfer party when calling the inventory service, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service;
[0050] A message generating module, configured to generate an in / out result message based on the operation identification information and the actual in / out result of the transfer order in response to the completion of the in / out operation when the in / out interface times out;
[0051] The message sending module is used to send the inbound and outbound message to the spare parts service, so that the spare parts service can process the local pending transaction corresponding to the transfer order based on the inbound and outbound message.
[0052] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, wherein the device is deployed with a material management system, and the device includes:
[0053] a processor and a memory for storing a computer program;
[0054] Wherein, the processor is configured to implement, when executing the computer program:
[0055] In response to the spare parts service receiving a transfer request sent by a material transfer requesting party, controlling the spare parts service to generate a transfer order and operation identification information based on the transfer request;
[0056] Control the spare parts service to send the transfer order and the operation identification information to the in-and-out interface of the inventory service, so as to call the inventory service to perform the in-and-out operation for the transfer order, wherein the operation identification information uniquely corresponds to the current call operation of the spare parts service to the inventory service;
[0057] In response to the timeout of the in-and-out interface, control the spare parts service to suspend processing the local pending transaction corresponding to the transfer order, and receive the in-and-out result message sent by the inventory service, where the in-and-out result message is generated by the inventory service based on the operation identification information and the actual in-and-out result of the transfer order;
[0058] In response to the spare parts service receiving the storage-in / out result message, the spare parts service is controlled to resume processing the local transaction to be committed, and processes the local transaction to be committed based on the storage-in / out result message.
[0059] According to a sixth aspect of an embodiment of the present disclosure, there is provided an electronic device, which is applied to an electronic device deployed with an inventory service, the device comprising:
[0060] a processor and a memory for storing a computer program;
[0061] Wherein, the processor is configured to implement, when executing the computer program:
[0062] In response to the in-and-out interface of the inventory service receiving the transfer order and operation identification information sent by the spare parts service, executing the in-and-out operation for the transfer order, the transfer order and the operation identification information are generated by the spare parts service based on the transfer request sent by the material request transfer party when calling the inventory service, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service;
[0063] In response to completing the in-and-out operation when the in-and-out interface times out, generating an in-and-out result message based on the operation identification information and the actual in-and-out result of the transfer order;
[0064] The inbound and outbound message is sent to the spare parts service, so that the spare parts service processes the local pending transaction corresponding to the transfer order based on the inbound and outbound message.
[0065] According to a seventh aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the following is implemented:
[0066] In response to the spare parts service receiving a transfer request sent by a material requesting transfer party, generating a transfer order based on the transfer request;
[0067] Control the spare parts service to execute a call operation on the in / out interface of the inventory service, and generate operation identification information uniquely corresponding to the call operation;
[0068] In response to the timeout of the in-and-out interface, control the spare parts service to suspend processing the local pending transaction corresponding to the transfer order, and receive the in-and-out result message sent by the inventory service, where the in-and-out result message is generated by the inventory service based on the operation identification information and the actual in-and-out result of the transfer order;
[0069] In response to the spare parts service receiving the storage-in / out result message, the spare parts service is controlled to resume processing the local transaction to be committed, and processes the local transaction to be committed based on the storage-in / out result message.
[0070] According to an eighth aspect of an embodiment of the present disclosure, there is provided a computer-readable storage medium having a computer program stored thereon, wherein when the program is executed by a processor, the following is implemented:
[0071] In response to the in-and-out interface of the inventory service receiving the transfer order and operation identification information sent by the spare parts service, executing the in-and-out operation for the transfer order, the transfer order and the operation identification information are generated by the spare parts service based on the transfer request sent by the material request transfer party when calling the inventory service, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service;
[0072] In response to completing the in-and-out operation when the in-and-out interface times out, generating an in-and-out result message based on the operation identification information and the actual in-and-out result of the transfer order;
[0073] The inbound and outbound message is sent to the spare parts service, so that the spare parts service processes the local pending transaction corresponding to the transfer order based on the inbound and outbound message.
[0074] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0075] The present disclosure controls the spare parts service to generate a transfer order and operation identification information based on the transfer request in response to the spare parts service receiving the transfer request sent by the material request transfer party, and controls the spare parts service to send the transfer order and the operation identification information to the in-and-out interface of the inventory service, so as to call the inventory service to perform the in-and-out operation for the transfer order, wherein the operation identification information uniquely corresponds to the current call operation of the spare parts service to the inventory service, and then controls the spare parts service to suspend processing the local pending transaction corresponding to the transfer order in response to the timeout of the in-and-out interface, and receives the in-and-out result message sent by the inventory service, wherein the in-and-out result message is sent by the inventory service. The service is generated based on the operation identification information and the actual in-and-out results of the transfer order, and then in response to the spare parts service receiving the in-and-out result message, the spare parts service is controlled to resume processing the local pending transaction, and the local pending transaction is processed based on the in-and-out result message. Since the in-and-out result message is generated by the inventory service based on the operation identification information and the actual in-and-out results of the transfer order, the actual in-and-out result corresponding to the calling operation can be determined based on the actual in-and-out result, and then the local pending transaction corresponding to the transfer order can be accurately processed based on the actual in-and-out result, thereby ensuring the consistency of upstream and downstream data between the spare parts service and the inventory service.
[0076] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0078] Figure 1 is a flow chart of a data processing method according to an exemplary embodiment of the present disclosure;
[0079] Figure 2 is a flowchart showing how to determine the inbound and outbound interface according to an exemplary embodiment of the present disclosure;
[0080] Figure 3 is a flow chart of a data processing method according to another exemplary embodiment of the present disclosure;
[0081] Figure 4 is a flow chart of a data processing method according to another exemplary embodiment of the present disclosure;
[0082] Figure 5 is a block diagram of a data processing device according to an exemplary embodiment of the present disclosure;
[0083] Figure 6 is a block diagram of another data processing device according to an exemplary embodiment of the present disclosure;
[0084] Figure 7 is a block diagram of another data processing device according to an exemplary embodiment of the present disclosure;
[0085] Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0086] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0087] Figure 1 is a flow chart of a data processing method according to an exemplary embodiment; the method of this embodiment can be executed by a data processing device, and the data processing device can be configured in an electronic device deployed with a spare parts service, such as a server, a workstation, a personal computer, a mobile terminal (such as a mobile phone, a tablet computer, etc.), a wearable device (such as glasses, watches, etc.), etc. Specifically, Figure 1 As shown, the method includes the following steps S101-S104:
[0088] In step S101, in response to the spare parts service receiving a transfer request sent by a material transfer requesting party, the spare parts service is controlled to generate a transfer order and operation identification information based on the transfer request.
[0089] In this embodiment, in response to the spare parts service receiving a transfer request sent by the material transfer requesting party, the electronic device may control the spare parts service to generate a transfer order and operation identification information based on the transfer request.
[0090] For example, when spare parts organization A needs to transfer a batch of materials to spare parts organization B, spare parts organization A can act as the material transfer requester and send a transfer request to the spare parts service. In response to receiving the transfer request, the spare parts service can execute the preset business logic to generate a transfer order, which can be used as a document for inventory service entry and exit, and can generate operation identification information.
[0091] It is understandable that the content of the above transfer order can be set based on actual business needs, such as being set to include at least one of the information such as material name, material type, transfer quantity, etc., and this embodiment does not limit this.
[0092] In step S102, the spare parts service is controlled to send the transfer order and the operation identification information to the in-and-out interface of the inventory service, so as to call the inventory service to perform the in-and-out operation for the transfer order. The operation identification information generated in step S101 uniquely corresponds to the current call operation of the spare parts service to the inventory service. Exemplarily, the operation identification information may be a unique code UniqueKey determined for the current call operation.
[0093] In this embodiment, in response to the spare parts service receiving a transfer request sent by the material requesting transfer party, after controlling the spare parts service to generate a transfer order and operation identification information based on the transfer request, the spare parts service can be controlled to send the transfer order and the operation identification information to the inventory service's entry and exit interface to call the inventory service to perform entry and exit operations for the transfer order.
[0094] Exemplarily, the spare parts service may execute a call operation on the inbound and outbound interface of the inventory service based on a remote procedure call (RPC) method.
[0095] In step S103, in response to the timeout of the in-and-out interface, the spare parts service is controlled to suspend processing of the local pending transaction corresponding to the transfer order, and receive the in-and-out result message sent by the inventory service.
[0096] In this embodiment, after the spare parts service generates the above operation identification information, in response to the timeout of the in-and-out interface, the spare parts service can be controlled to suspend processing the local pending transaction corresponding to the transfer order, and receive the in-and-out result message sent by the inventory service. The in-and-out result message can be generated by the inventory service based on the operation identification information and the actual in-and-out result of the transfer order, so that the inventory service can perform in-and-out processing on the transfer order based on the received information.
[0097] For example, after the transfer order is generated, the status of the transfer order can be set to a first preset state. The first preset state is used to allow the spare parts service to process the local pending transactions. Furthermore, when a timeout of the inbound and outbound interface is detected, the spare parts service can be controlled to suspend processing the local pending transactions corresponding to the transfer order, such as updating the status of the transfer order from the first preset state to the second preset state, and the second preset state is used to prohibit the spare parts service from processing the local pending transactions, so as to avoid the spare parts service processing the local pending transactions without obtaining the actual inbound and outbound results of the transfer order, causing the problem of consistency between upstream and downstream data.
[0098] In step S104, in response to the spare parts service receiving the storage-in / out result message, the spare parts service is controlled to resume processing the local transaction to be committed, and processes the local transaction to be committed based on the storage-in / out result message.
[0099] In this embodiment, in response to the timeout of the in / out interface, the spare parts service is controlled to suspend processing the local pending transaction corresponding to the transfer order, and after receiving the in / out result message sent by the inventory service, the spare parts service can be controlled to resume processing the local pending transaction in response to the spare parts service receiving the in / out result message, such as updating the status of the transfer order from the second preset status to the first preset status, and processing the local pending transaction based on the in / out result message.
[0100] For example, after receiving the transfer order and operation identification information, the inventory service can perform inbound and outbound processing on the transfer order based on relevant business logic to obtain the actual inbound and outbound result of the transfer order (such as successful inbound and outbound Success or failed inbound and outbound Failure, etc.), and then generate an inbound and outbound result message based on the actual inbound and outbound result and the operation identification information, such as " <uniquekey:success>"or" <uniquekey:fail>" and returns it to the spare parts service. On this basis, the spare parts service can respond to receiving the storage and out-of-warehouse result message and process the local pending transaction corresponding to the transfer order based on the actual storage and out-of-warehouse result of the transfer order carried in the storage and out-of-warehouse result message.
[0101] In other embodiments, the electronic device can also control the spare parts service to receive the in-and-out warehouse result message through the message middleware as a message consumer, wherein the in-and-out warehouse result message is generated by the inventory service as a message generator and sent to the message middleware. That is to say, in order to send the in-and-out warehouse result message generated by the inventory service to the spare parts service, the message can be forwarded between the two through the message middleware, that is, after the inventory service generates the above-mentioned in-and-out warehouse result message, it sends the message to the message middleware as a message generator, and then the message middleware sends the message to the message consumer who has subscribed to the message in advance, that is, the spare parts service. It is worth noting that the type of the above-mentioned message middleware can be set based on actual business needs, such as being set to any one of RocketMQ middleware, Xiaomi Notify service, RabbitMQ middleware, ActiveMQ middleware, etc., and this embodiment does not limit this.
[0102] It is worth noting that in the related art, the message transmission between the spare parts service and the inventory service is usually called in the form of an application program interface API. However, when the in-and-out interface of the inventory service times out, the spare parts service cannot obtain the actual in-and-out results of the transfer order from the inventory service by calling the above interface. Therefore, this embodiment introduces the above message middleware, and uses the message middleware as a medium to open up the message channel between the spare parts service and the inventory service, so as to ensure that when the in-and-out interface times out, the spare parts service can still obtain the actual in-and-out results of the transfer order from the inventory service.
[0103] It can be understood that since the in-and-out storage result message is generated by the inventory service based on the operation identification information and the actual in-and-out storage result of the transfer order, the actual in-and-out storage result corresponding to the calling operation can be determined based on the actual in-and-out storage result, and then the spare parts service can accurately process the local pending transaction corresponding to the transfer order based on the actual in-and-out storage result, thereby avoiding the problem of upstream and downstream data inconsistency between the spare parts service and the inventory service due to the spare parts service rolling back the local pending transaction when the in-and-out storage interface times out, and the inventory service successfully entering and exiting the transfer order.
[0104] For example, when the spare parts service processes the local pending transaction corresponding to the transfer order based on the in / out result message, in response to determining that the transfer order is successfully in / out based on the in / out result message, the spare parts service can be controlled to submit the local pending transaction, such as submitting relevant information of the material to be transferred locally to the spare parts service based on this transfer order, such as the material name and / or transfer quantity.
[0105] Alternatively, in response to determining that the transfer order fails to be transferred based on the transfer result message, the spare parts service can be controlled to roll back the local transaction to be committed, such as restoring the relevant information of the transferred material to the state before the transfer.
[0106] As can be seen from the above description, the method of this embodiment controls the spare parts service to generate a transfer order and operation identification information based on the transfer request in response to the spare parts service receiving the transfer request sent by the material request transfer party, and controls the spare parts service to send the transfer order and the operation identification information to the in / out interface of the inventory service to call the inventory service to perform the in / out operation for the transfer order, wherein the operation identification information uniquely corresponds to the current call operation of the spare parts service to the inventory service, and then, in response to the timeout of the in / out interface, controls the spare parts service to suspend processing the local pending transaction corresponding to the transfer order, and receives the in / out result message sent by the inventory service. The information is generated by the inventory service based on the operation identification information and the actual in-and-out results of the transfer order, and then in response to the spare parts service receiving the in-and-out result message, the spare parts service is controlled to resume processing the local pending transaction, and the local pending transaction is processed based on the in-and-out result message. Since the in-and-out result message is generated by the inventory service based on the operation identification information and the actual in-and-out results of the transfer order, the actual in-and-out result corresponding to the calling operation can be determined based on the actual in-and-out result, and then the local pending transaction corresponding to the transfer order can be accurately processed based on the actual in-and-out result, thereby ensuring the consistency of upstream and downstream data between the spare parts service and the inventory service.
[0107] Figure 2 It is a flowchart showing how to determine the inlet and outlet interface according to an exemplary embodiment of the present disclosure; based on the above embodiment, this embodiment uses how to determine the inlet and outlet interface as an example to exemplify.
[0108] like Figure 2 As shown, the data processing method of this embodiment may further include determining the inbound and outbound interface based on the following steps S201-S204:
[0109] In step S201, in response to executing the calling operation, the spare parts service is controlled to receive a target in / out warehouse result, wherein the target in / out warehouse result includes a result sent by the in / out warehouse interface to reflect whether the in / out warehouse of the transfer order is successful.
[0110] In this embodiment, after controlling the spare parts service to execute a calling operation on the in / out interface of the inventory service, the spare parts service can be controlled to receive target in / out results in response to executing the calling operation. The target in / out results include the results sent by the in / out interface to reflect whether the in / out of the transfer order is successful.
[0111] The above-mentioned target in-and-out results include the results sent by the in-and-out interface to reflect whether the transfer order is successfully in-and-out, such as " <success>" (reflecting the successful entry and exit of the transfer order) or " <fail>” (reflecting the failure of the transfer order to enter and exit the warehouse) etc.
[0112] In step S202, whether the target storage result is not received within the set time period: if yes, execute step S203; if no, execute step S204;
[0113] In step S203, it is determined that the inbound and outbound interface has timed out;
[0114] In step S204, it is determined that the inbound and outbound interface has not timed out.
[0115] For example, when it is determined that the inbound and outbound interface has timed out, the spare parts service can be controlled to suspend processing the local pending transaction corresponding to the transfer order, and then in response to the spare parts service receiving the inbound and outbound result message, the spare parts service is controlled to resume processing the local pending transaction, and the above Figure 1 The step S104 in the illustrated embodiment controls the spare parts service to process the local pending transaction corresponding to the transfer order based on the storage and warehousing result message.
[0116] When it is determined that the in / out interface has not timed out, the spare parts service can be controlled to process the local pending transaction based on the target in / out result. For example, in response to determining that the transfer order is successfully in / out based on the target in / out result, the spare parts service can be controlled to commit the local pending transaction; or, in response to determining that the transfer order fails in / out based on the target in / out result, the spare parts service can be controlled to roll back the local pending transaction.
[0117] It can be seen from the above description that this embodiment controls the spare parts service to receive the target in / out warehouse result, and then determines whether the target in / out warehouse result has not been received within the set time period, and then determines that the in / out warehouse interface has timed out when the target in / out warehouse result has not been received, and determines that the in / out warehouse interface has not timed out when the target in / out warehouse result is received. This can accurately identify the in / out warehouse interface, and then can realize subsequent processing based on the in / out warehouse interface, using the in / out warehouse result message or the target in / out warehouse result sent by the inventory service to process the local pending transaction corresponding to the transfer order, which can improve the reliability of processing the local pending transaction and ensure the consistency of upstream and downstream data between the spare parts service and the inventory service.
[0118] The data processing method of the present disclosure is described below with a specific embodiment, but is not intended to limit the scope of the present disclosure.
[0119] Figure 3 is a flow chart of a data processing method according to another exemplary embodiment of the present disclosure; Figure 3 As shown, the data processing method of this embodiment includes the following steps S311-S326; wherein, the method steps on the spare parts service side include the following steps S311-S320:
[0120] In step S311, the spare parts service generates a transfer order based on the transfer request sent by the spare parts organization;
[0121] In step S312, after the spare parts service generates the transfer order, the state of the transfer order is set to a first preset state, where the first preset state is used to allow the spare parts service to process the local transaction to be submitted;
[0122] In step S313, the spare parts service executes a call operation on the in / out interface of the inventory service, and generates operation identification information UniqueKey uniquely corresponding to the call operation, so as to send the information and the transfer order to the inventory service, and then receive the call result returned by the inventory service;
[0123] The above-mentioned call result may include the target inventory entry and exit results returned by the inventory service in response to the call based on steps S321-S326.
[0124] In step S314, based on the reception of the target in-and-out results, it is determined whether the in-and-out interface has timed out: if so, step S315 is executed; if not, step S317 is executed;
[0125] For example, if the target in / out result returned by the in / out interface is received within the set time period, it can be determined that the in / out interface has not timed out; conversely, if the target in / out result is not received within the set time period, it can be determined that the in / out interface has timed out. The target in / out result includes the result sent by the in / out interface to reflect whether the transfer order is successfully in / out, such as " <success>"or" <fail>", the above-mentioned set time period can be a time period of a set duration (such as 3 minutes, etc.) after executing the calling operation.
[0126] In step S315, in response to the timeout of the inbound and outbound interface, the state of the transfer order is updated from the first preset state to a second preset state (i.e., an intermediate state—a processing state), and the second preset state is used to prohibit the spare parts service from processing the local pending transaction;
[0127] In step S316, the spare parts service receives the in / out result message through the message middleware as a message consumer;
[0128] The above-mentioned inbound and outbound result message is generated by the inventory service based on the operation identification information UniqueKey and the actual inbound and outbound result (such as success or fail) of the transfer order, for example, " <uniquekey:success>"or" <uniquekey:fail>”;
[0129] In step S317, it is determined whether the transfer order is successfully entered or exited: if so, step S318 is executed; if not, step S320 is executed;
[0130] In step S318, the state of the transfer order is set to a third preset state (eg, final state - processing completed state);
[0131] In step S319, the spare parts service commits the local transaction to be committed;
[0132] In step S320, the spare parts service rolls back the local transaction to be committed;
[0133] On the other hand, the method flow of the inventory service side includes steps S321-S326:
[0134] In step S321, the inventory service performs inventory entry and exit according to the parameters of the transfer order sent by the spare parts service;
[0135] In step S322, determine whether the transfer order is successfully entered or exited: if yes, execute step S323; if not, execute step S325;
[0136] In step S323, the inventory service changes the inventory data and submits the local transaction. For example, based on this transfer order, the inventory service submits the relevant information of the material to be transferred, such as the material name and / or transfer quantity, etc.;
[0137] In step S324, based on the operation identification information of this call operation, a message of successful storage and retrieval is constructed. <uniquekey:success>;
[0138] In step S325, based on the operation identification information of this call operation, a message of storage failure is constructed. <uniquekey:fail>;
[0139] In step S326, as a message producer, the above-mentioned message of failed access is sent to <uniquekey:fail>, sent to the message middleware so that the spare parts service can consume the message based on the pre-subscribed message topic.
[0140] From the above description, it can be seen that the data processing method of this embodiment can realize exception handling for the scenario of timeout of the in-and-out interface, thereby reducing the number of failed transfer requests caused by timeouts, reducing the frequency of service errors, and optimizing the user experience. Since it is not strongly dependent on the target in-and-out results returned by the in-and-out interface of the inventory service, the order of magnitude of material in-and-out can be increased, such as from the original order of thousands to the order of tens of thousands, and the consistency of upstream and downstream data between the spare parts service and the inventory service can be ensured.
[0141] Figure 4 is a flowchart of a data processing method according to another exemplary embodiment of the present disclosure; the method of this embodiment can be executed by a data processing device, and the data processing device can be configured in an electronic device deployed with an inventory service, such as a server, a workstation, a personal computer, a mobile terminal (such as a mobile phone, a tablet computer, etc.), a wearable device (such as glasses, watches, etc.), etc. Specifically, Figure 4 As shown, the method includes the following steps S401-S403:
[0142] In step S401, in response to the in-and-out interface of the inventory service receiving the transfer order and operation identification information sent by the spare parts service, the in-and-out operation for the transfer order is performed.
[0143] In this embodiment, the electronic device may perform the in / out operation on the transfer order in response to the in / out interface of the inventory service receiving the transfer order and the operation identification information sent by the spare parts service.
[0144] The transfer order and the operation identification information are generated by the spare parts service based on the transfer request sent by the material request transfer party when calling the inventory service, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service.
[0145] In step S402, in response to the completion of the inbound and outbound operation when the inbound and outbound interface times out, an inbound and outbound result message is generated based on the operation identification information and the actual inbound and outbound result of the transfer order.
[0146] In this embodiment, when the inventory service's in-and-out interface receives a transfer order and operation identification information sent by the spare parts service and executes an in-and-out operation for the transfer order, the electronic device can complete the in-and-out operation in response to a timeout of the in-and-out interface, and generate an in-and-out result message based on the operation identification information and the actual in-and-out result of the transfer order.
[0147] In step S403, the inbound and outbound message is sent to the spare parts service, so that the spare parts service processes the local pending transaction corresponding to the transfer order based on the inbound and outbound message.
[0148] In this embodiment, in response to completing the in-and-out operation when the in-and-out interface times out, after generating an in-and-out result message based on the operation identification information and the actual in-and-out result of the transfer order, the electronic device can send the in-and-out message to the spare parts service, so that the spare parts service can process the local pending transaction corresponding to the transfer order based on the in-and-out message.
[0149] As can be seen from the above description, the method of this embodiment receives a transfer order and operation identification information sent by the spare parts service in response to the in-and-out interface of the inventory service, and performs in-and-out operations on the transfer order. The transfer order and the operation identification information are generated by the spare parts service when calling the inventory service based on the transfer request sent by the material request transfer party. The operation identification information uniquely corresponds to the current call operation of the spare parts service to the inventory service, and completes the in-and-out operation in response to the timeout of the in-and-out interface. The actual in-and-out operation is based on the operation identification information and the transfer order. The result generates an in-and-out warehouse result message, which is then sent to the spare parts service, so that the spare parts service can process the local pending transactions corresponding to the transfer order based on the in-and-out warehouse message. Since the in-and-out warehouse result message is generated by the inventory service based on the operation identification information and the actual in-and-out warehouse result of the transfer order, the actual in-and-out warehouse result corresponding to the calling operation can be determined based on the actual in-and-out warehouse result, and the local pending transactions corresponding to the transfer order can be accurately processed based on the actual in-and-out warehouse result, thereby ensuring the consistency of upstream and downstream data between the spare parts service and the inventory service.
[0150] Figure 5 It is a block diagram of a data processing device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be configured in an electronic device deployed with a spare parts service, such as a server, a workstation, a personal computer, a mobile terminal (such as a mobile phone, a tablet computer, etc.), a wearable device (such as glasses, a watch, etc.), etc.
[0151] Specifically, Figure 5 As shown, the device may include: a transfer order generating module 110, an inventory service calling module 120, a result message receiving module 130 and a first transaction processing module 140, wherein:
[0152] A transfer order generating module 110, configured to control the spare parts service to generate a transfer order and operation identification information based on the transfer request in response to the spare parts service receiving the transfer request sent by the material requesting transfer party;
[0153] The inventory service calling module 120 is used to control the spare parts service to send the transfer order and the operation identification information to the in-and-out interface of the inventory service, so as to call the inventory service to perform the in-and-out operation for the transfer order, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service;
[0154] A result message receiving module 130 is used to control the spare parts service to suspend processing of the local pending transaction corresponding to the transfer order in response to the timeout of the storage entry and exit interface, and receive the storage entry and exit result message sent by the inventory service, wherein the storage entry and exit result message is generated by the inventory service based on the operation identification information and the actual storage entry and exit result of the transfer order;
[0155] The first transaction processing module 140 is used to control the spare parts service to resume processing the local transaction to be committed in response to the spare parts service receiving the storage and retrieval result message, and process the local transaction to be committed based on the storage and retrieval result message.
[0156] As can be seen from the above description, the device of this embodiment controls the spare parts service to generate a transfer order and operation identification information based on the transfer request in response to the spare parts service receiving the transfer request sent by the material request transfer party, and controls the spare parts service to send the transfer order and the operation identification information to the in-and-out interface of the inventory service to call the inventory service to perform the in-and-out operation for the transfer order, wherein the operation identification information uniquely corresponds to the current call operation of the spare parts service to the inventory service, and then, in response to the timeout of the in-and-out interface, controls the spare parts service to suspend processing the local pending transaction corresponding to the transfer order, and receives the in-and-out result message sent by the inventory service. The information is generated by the inventory service based on the operation identification information and the actual in-and-out results of the transfer order, and then in response to the spare parts service receiving the in-and-out result message, the spare parts service is controlled to resume processing the local pending transaction, and the local pending transaction is processed based on the in-and-out result message. Since the in-and-out result message is generated by the inventory service based on the operation identification information and the actual in-and-out results of the transfer order, the actual in-and-out result corresponding to the calling operation can be determined based on the actual in-and-out result, and then the local pending transaction corresponding to the transfer order can be accurately processed based on the actual in-and-out result, thereby ensuring the consistency of upstream and downstream data between the spare parts service and the inventory service.
[0157] Figure 6 is a block diagram of a data processing device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be configured in an electronic device deployed with spare parts service, such as a server, a workstation, a personal computer, a mobile terminal (such as a mobile phone, a tablet computer, etc.), a wearable device (such as glasses, watches, etc.), etc. Among them, the transfer order generation module 210, the inventory service calling module 220, the result message receiving module 230 and the first transaction processing module 240 are the same as the aforementioned Figure 5 The functions of the transfer order generating module 110, the inventory service calling module 120, the result message receiving module 130 and the first transaction processing module 140 in the illustrated embodiment are the same and will not be described in detail herein.
[0158] like Figure 6 As shown, the transfer order generation module 210 is further used to set the state of the transfer order to a first preset state in response to generating the transfer order, and the first preset state is used to allow the spare parts service to process the local transaction to be submitted;
[0159] Furthermore, the result message receiving module 230 may also be used to update the state of the transfer order from the first preset state to a second preset state, where the second preset state is used to prohibit the spare parts service from processing the local transaction to be submitted;
[0160] The first transaction processing module 240 may also be configured to update the state of the transfer order from the second preset state to the first preset state.
[0161] In some embodiments, the above apparatus may further include:
[0162] The message receiving control module 260 is used to control the spare parts service to receive the storage and warehousing result message through the message middleware as a message consumer. The storage and warehousing result message is generated by the inventory service as a message generator and sent to the message middleware.
[0163] In some embodiments, the first transaction processing module 240 may also be used to control the spare parts service to submit the local transaction to be submitted in response to determining that the transfer order is successfully entered or exited based on the entry or exit result message.
[0164] In some embodiments, the first transaction processing module 240 may also be configured to control the spare parts service to roll back the local transaction to be committed in response to determining that the transfer order fails to be transferred based on the transfer result message.
[0165] In some embodiments, the above apparatus may further include a timeout determination module 270;
[0166] Furthermore, the timeout determination module 270 may include:
[0167] A target result receiving unit 271 is used to control the spare parts service to receive a target storage in and out result in response to executing the calling operation, wherein the target storage in and out result includes a result sent by the storage in and out interface to reflect whether the transfer order storage in and out is successful;
[0168] The timeout determination unit 272 is used to determine that the storage entry and exit interface has timed out in response to not receiving the target storage entry and exit result within a set time period, and the set time period is a time period of a set length after executing the call operation.
[0169] In some embodiments, the above apparatus further comprises:
[0170] The second transaction processing module 250 is used to determine that the in / out interface has not timed out in response to receiving the target in / out result within the set time period, and control the spare parts service to process the local transaction to be submitted based on the target in / out result.
[0171] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0172] Figure 7 It is a block diagram of another data processing device according to an exemplary embodiment of the present disclosure; the device of this embodiment can be configured in an electronic device deployed with inventory services, such as a server, a workstation, a personal computer, a mobile terminal (such as a mobile phone, a tablet computer, etc.), a wearable device (such as glasses, a watch, etc.), etc.
[0173] Specifically, Figure 7 As shown, the device may include: an operation execution module 310, a message generation module 320 and a message sending module 330, wherein:
[0174] The operation execution module 310 is used to execute the inbound and outbound operation for the transfer order in response to the inbound and outbound interface of the inventory service receiving the transfer order and the operation identification information sent by the spare parts service, wherein the transfer order and the operation identification information are generated by the spare parts service based on the transfer request sent by the material request transfer party when calling the inventory service, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service;
[0175] A message generating module 320, configured to generate an in / out result message based on the operation identification information and the actual in / out result of the transfer order in response to the completion of the in / out operation when the in / out interface times out;
[0176] The message sending module 330 is used to send the inbound and outbound message to the spare parts service, so that the spare parts service can process the local pending transaction corresponding to the transfer order based on the inbound and outbound message.
[0177] As can be seen from the above description, the device of this embodiment receives the transfer order and operation identification information sent by the spare parts service in response to the in-and-out interface of the inventory service, and performs in-and-out operations on the transfer order. The transfer order and the operation identification information are generated by the spare parts service based on the transfer request sent by the material request transfer party when calling the inventory service. The operation identification information uniquely corresponds to the current call operation of the spare parts service to the inventory service, and completes the in-and-out operation in response to the timeout of the in-and-out interface. The actual in-and-out operation is based on the operation identification information and the transfer order. The result generates an in-and-out warehouse result message, which is then sent to the spare parts service, so that the spare parts service can process the local pending transactions corresponding to the transfer order based on the in-and-out warehouse message. Since the in-and-out warehouse result message is generated by the inventory service based on the operation identification information and the actual in-and-out warehouse result of the transfer order, the actual in-and-out warehouse result corresponding to the calling operation can be determined based on the actual in-and-out warehouse result, and the local pending transactions corresponding to the transfer order can be accurately processed based on the actual in-and-out warehouse result, thereby ensuring the consistency of upstream and downstream data between the spare parts service and the inventory service.
[0178] Figure 8 900 is a block diagram of an electronic device according to an exemplary embodiment. For example, the device 900 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0179] Reference Figure 8 , device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , and a communication component 916 .
[0180] The processing component 902 generally controls the overall operation of the device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above-mentioned data processing method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.
[0181] The memory 904 is configured to store various types of data to support operations on the device 900. Examples of such data include instructions for any application or method operating on the device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0182] The power supply component 906 provides power to the various components of the device 900. The power supply component 906 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.
[0183] The multimedia component 908 includes a screen that provides an output interface between the device 900 and the user. In some embodiments, the screen may include a liquid crystal display panel and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0184] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the device 900 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.
[0185] I / O interface 912 provides an interface between processing component 902 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0186] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the device 900. For example, the sensor assembly 914 can detect the open / closed state of the device 900, the relative positioning of components, such as the display panel and keypad of the device 900, and the sensor assembly 914 can also detect the position change of the device 900 or a component of the device 900, the presence or absence of user contact with the device 900, the orientation or acceleration / deceleration of the device 900, and the temperature change of the device 900. The sensor assembly 914 can also include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0187] The communication component 916 is configured to facilitate wired or wireless communication between the device 900 and other devices. The device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, 4G or 5G or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0188] In an exemplary embodiment, the device 900 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described data processing methods.
[0189] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the instructions can be executed by the processor 920 of the device 900 to complete the above data processing method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0190] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0191] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.< / uniquekey:fail> < / uniquekey:fail> < / uniquekey:success> < / uniquekey:fail> < / uniquekey:success> < / fail> < / success> < / fail> < / success> < / uniquekey:fail> < / uniquekey:success>
Claims
1. A data processing method, characterized in that: Applied to electronic equipment deployed with spare parts service, the method comprises: In response to the spare parts service receiving a transfer request sent by a material transfer requesting party, controlling the spare parts service to generate a transfer order and operation identification information based on the transfer request; Control the spare parts service to send the transfer order and the operation identification information to the in-and-out interface of the inventory service, so as to call the inventory service to perform the in-and-out operation for the transfer order, wherein the operation identification information uniquely corresponds to the current call operation of the spare parts service to the inventory service; In response to the timeout of the in-and-out interface, control the spare parts service to suspend processing the local pending transaction corresponding to the transfer order, and receive the in-and-out result message sent by the inventory service, where the in-and-out result message is generated by the inventory service based on the operation identification information and the actual in-and-out result of the transfer order; In response to the spare parts service receiving the storage-in / out result message, the spare parts service is controlled to resume processing the local transaction to be committed, and processes the local transaction to be committed based on the storage-in / out result message.
2. The method according to claim 1, characterized in that The method further comprises: In response to generating the transfer order, setting the state of the transfer order to a first preset state, wherein the first preset state is used to allow the spare parts service to process the local transaction to be submitted; The controlling the spare parts service to suspend processing of the local pending transaction corresponding to the transfer order includes: updating the state of the transfer order from the first preset state to a second preset state, wherein the second preset state is used to prohibit the spare parts service from processing the local transaction to be submitted; The controlling the spare part service to resume processing the local transaction to be committed includes: The status of the transfer order is updated from the second preset status to the first preset status.
3. The method according to claim 1, characterized in that The method further comprises: The spare parts service is controlled to receive the storage and warehousing result message through the message middleware as a message consumer. The storage and warehousing result message is generated by the inventory service as a message generator and sent to the message middleware.
4. The method according to claim 1, characterized in that The processing of the local transaction to be submitted based on the storage entry and exit result message includes: In response to determining that the transfer order is successfully entered or exited based on the entry or exit result message, the spare parts service is controlled to submit the local transaction to be submitted.
5. The method according to claim 1, characterized in that The processing of the local transaction to be submitted based on the storage entry and exit result message includes: In response to determining that the transfer order fails to enter or exit the warehouse based on the entry or exit result message, the spare parts service is controlled to roll back the local transaction to be committed.
6. The method according to claim 1, characterized in that The method further comprises: In response to executing the calling operation, controlling the spare parts service to receive a target storage entry and exit result, wherein the target storage entry and exit result includes a result sent by the storage entry and exit interface and used to reflect whether the transfer order storage entry and exit is successful; In response to not receiving the target storage-in / out result within a set time period, it is determined that the storage-in / out interface has timed out, and the set time period is a time period of a set length after the call operation is executed.
7. The method according to claim 6, characterized in that The method further comprises: In response to receiving the target in / out warehouse result within the set time period, determining that the in / out warehouse interface has not timed out, and controlling the spare parts service to process the local transaction to be submitted based on the target in / out warehouse result.
8. A data processing method, characterized in that: Applied to an electronic device deployed with an inventory service, the method comprises: In response to the in-and-out interface of the inventory service receiving the transfer order and operation identification information sent by the spare parts service, executing the in-and-out operation for the transfer order, the transfer order and the operation identification information are generated by the spare parts service based on the transfer request sent by the material request transfer party when calling the inventory service, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service; In response to completing the in-and-out operation when the in-and-out interface times out, generating an in-and-out result message based on the operation identification information and the actual in-and-out result of the transfer order; The inbound and outbound message is sent to the spare parts service, so that the spare parts service processes the local pending transaction corresponding to the transfer order based on the inbound and outbound message.
9. A data processing device, characterized in that: Applicable to electronic equipment deployed with spare parts service, the device comprises: A transfer order generation module, configured to control the spare parts service to generate a transfer order and operation identification information based on the transfer request in response to the spare parts service receiving the transfer request sent by the material requesting transfer party; The inventory service calling module is used to control the spare parts service to send the transfer order and the operation identification information to the in-and-out interface of the inventory service, so as to call the inventory service to perform the in-and-out operation for the transfer order, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service; A result message receiving module, configured to control the spare parts service to suspend processing of the local pending transaction corresponding to the transfer order in response to the timeout of the in-and-out interface, and receive an in-and-out result message sent by the inventory service, wherein the in-and-out result message is generated by the inventory service based on the operation identification information and the actual in-and-out result of the transfer order; The first transaction processing module is used to control the spare parts service to resume processing the local transaction to be committed in response to the spare parts service receiving the storage and warehousing result message, and process the local transaction to be committed based on the storage and warehousing result message.
10. The device according to claim 9, characterized in that The transfer order generation module is further used for setting the state of the transfer order to a first preset state in response to generating the transfer order, wherein the first preset state is used for allowing the spare parts service to process the local transaction to be submitted; The result message receiving module is further used to update the state of the transfer order from the first preset state to a second preset state, where the second preset state is used to prohibit the spare parts service from processing the local transaction to be submitted; The first transaction processing module is further used to update the status of the transfer order from the second preset status to the first preset status.
11. The device according to claim 9, characterized in that The device also includes: The message receiving control module is used to control the spare parts service to receive the in / out result message through the message middleware as a message consumer. The in / out result message is generated by the inventory service as a message generator and sent to the message middleware.
12. The device according to claim 9, characterized in that The first transaction processing module is further configured to control the spare parts service to submit the local transaction to be submitted in response to determining that the transfer order is successfully entered or exited based on the entry or exit result message.
13. The device according to claim 9, characterized in that The first transaction processing module is further configured to control the spare parts service to roll back the local transaction to be committed in response to determining that the transfer order fails to enter or exit the warehouse based on the entry or exit result message.
14. The device according to claim 9, characterized in that The device also includes a timeout determination module; The timeout determination module comprises: A target result receiving unit, used for controlling the spare parts service to receive a target storage in and out result in response to executing the calling operation, wherein the target storage in and out result includes a result sent by the storage in and out interface and used to reflect whether the transfer order storage in and out is successful; A timeout determination unit is used to determine that the in / out interface has timed out in response to not receiving the target in / out result within a set time period, wherein the set time period is a time period of a set length after executing the call operation.
15. The device according to claim 14, characterized in that The device also includes: The second transaction processing module is used to determine that the in / out interface has not timed out in response to receiving the target in / out result within the set time period, and control the spare parts service to process the local transaction to be submitted based on the target in / out result.
16. A data processing device, characterized in that: Applicable to electronic equipment deployed with inventory services, the device comprises: an operation execution module, configured to execute an inbound and outbound operation on the transfer order in response to the inbound and outbound interface of the inventory service receiving a transfer order and operation identification information sent by the spare parts service, wherein the transfer order and the operation identification information are generated by the spare parts service based on the transfer request sent by the material request transfer party when calling the inventory service, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service; A message generating module, configured to generate an in / out result message based on the operation identification information and the actual in / out result of the transfer order in response to the completion of the in / out operation when the in / out interface times out; The message sending module is used to send the inbound and outbound message to the spare parts service, so that the spare parts service can process the local pending transaction corresponding to the transfer order based on the inbound and outbound message.
17. An electronic device, characterized in that: Applicable to electronic equipment deployed with spare parts service, the equipment comprising: a processor and a memory for storing a computer program; Wherein, the processor is configured to implement, when executing the computer program: In response to the spare parts service receiving a transfer request sent by a material transfer requesting party, controlling the spare parts service to generate a transfer order and operation identification information based on the transfer request; Control the spare parts service to send the transfer order and the operation identification information to the in-and-out interface of the inventory service, so as to call the inventory service to perform the in-and-out operation for the transfer order, wherein the operation identification information uniquely corresponds to the current call operation of the spare parts service to the inventory service; In response to the timeout of the in-and-out interface, control the spare parts service to suspend processing the local pending transaction corresponding to the transfer order, and receive the in-and-out result message sent by the inventory service, where the in-and-out result message is generated by the inventory service based on the operation identification information and the actual in-and-out result of the transfer order; In response to the spare parts service receiving the storage-in / out result message, the spare parts service is controlled to resume processing the local transaction to be committed, and processes the local transaction to be committed based on the storage-in / out result message.
18. An electronic device, characterized in that: Applicable to an electronic device deployed with an inventory service, the device comprising: a processor and a memory for storing a computer program; Wherein, the processor is configured to implement, when executing the computer program: In response to the in-and-out interface of the inventory service receiving the transfer order and operation identification information sent by the spare parts service, executing the in-and-out operation for the transfer order, the transfer order and the operation identification information are generated by the spare parts service based on the transfer request sent by the material request transfer party when calling the inventory service, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service; In response to completing the in-and-out operation when the in-and-out interface times out, generating an in-and-out result message based on the operation identification information and the actual in-and-out result of the transfer order; The inbound and outbound message is sent to the spare parts service, so that the spare parts service processes the local pending transaction corresponding to the transfer order based on the inbound and outbound message.
19. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, it realizes: In response to the spare parts service receiving a transfer request sent by a material requesting transfer party, generating a transfer order based on the transfer request; Control the spare parts service to execute a call operation on the in / out interface of the inventory service, and generate operation identification information uniquely corresponding to the call operation; In response to the timeout of the in-and-out interface, control the spare parts service to suspend processing the local pending transaction corresponding to the transfer order, and receive the in-and-out result message sent by the inventory service, where the in-and-out result message is generated by the inventory service based on the operation identification information and the actual in-and-out result of the transfer order; In response to the spare parts service receiving the storage-in / out result message, the spare parts service is controlled to resume processing the local transaction to be committed, and processes the local transaction to be committed based on the storage-in / out result message.
20. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, it realizes: In response to the in-and-out interface of the inventory service receiving the transfer order and operation identification information sent by the spare parts service, executing the in-and-out operation for the transfer order, the transfer order and the operation identification information are generated by the spare parts service based on the transfer request sent by the material request transfer party when calling the inventory service, and the operation identification information uniquely corresponds to the current calling operation of the spare parts service on the inventory service; In response to completing the in-and-out operation when the in-and-out interface times out, generating an in-and-out result message based on the operation identification information and the actual in-and-out result of the transfer order; The inbound and outbound message is sent to the spare parts service, so that the spare parts service processes the local pending transaction corresponding to the transfer order based on the inbound and outbound message.