This invention relates to the field of microservice architecture technology and discloses a method, apparatus, device, and medium for cross-
domain interface collaborative invocation, comprising: receiving a request and generating a request identifier and an initialized
processing status; initiating a synchronous interface call and starting asynchronous message listening based on the identifier; if a synchronous result is received within a preset threshold, acquiring a distributed lock,
parsing the result and returning it to the upstream, and updating the
processing status to complete; if synchronization times out, returning a waiting prompt and recording the status as
timeout waiting; when an asynchronous result is detected, acquiring a distributed lock and, if the query status is
timeout or unprocessed, performing persistent recording based on the asynchronous result and updating the status to complete. This invention can be applied to business scenarios such as fintech and healthcare, using request identifiers and distributed locks to uniformly control synchronous and
asynchronous processing flows, ensuring timely response while avoiding duplicate result
processing and status conflicts, and improving the consistency and reliability of cross-domain calls.