Asset quotation method, device and equipment and storage medium
Through heterogeneous quotation acquisition system, combined with event-driven and microservice architecture, the real-time and stability of asset quotation information in cross-border transactions is solved, ensuring the accuracy and security of user asset quotations.
Patent Information
- Application Number
- CN202410031190.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-08
- Publication Date
- 2025-07-08
AI Technical Summary
In the prior art, third-party payment institutions are unable to provide effective asset quotation information in time in cross-border transactions, resulting in user asset losses.
A heterogeneous quotation acquisition system is adopted, combining event-driven architecture and microservice architecture, real-time quotation information is obtained through event-driven architecture and validation is carried out. If it is invalid, switch to the microservice architecture to obtain stable quotation information.
Ensure the real-time and stability of quotation information, avoid user asset losses, and provide accurate asset quotations.
Smart Images

Figure CN120278776A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of computer technology, etc., and in particular to an asset quotation method, device, equipment, and storage medium. Background Art
[0002] With the increasing development of computer technology, the use of third-party payment is becoming more and more frequent. When a third-party payment institution guarantees to provide users with cross-border transaction functions, it needs to provide users with asset quotation information. It is found in practice that since the quotation information of assets changes relatively quickly, if effective quotation information cannot be provided to users, it will cause asset losses to users. Based on this, how to provide users with effective quotation information is an urgent problem to be solved currently. Summary of the Invention
[0003] The embodiments of the present application provide an asset quotation method, device, equipment, and storage medium, which can provide users with effective asset quotation information and avoid causing asset losses to users.
[0004] On the one hand, the embodiments of the present application provide an asset quotation method, including:
[0005] Receiving a query request for an asset sent by a terminal, and obtaining first asset quotation information associated with the asset from an event-driven architecture according to the query request; the first asset quotation information is pushed to the event-driven architecture by an asset device corresponding to an asset institution when it detects that the quotation information of the asset has been updated, and the asset institution is subordinate to an asset management institution;
[0006] Performing validity verification on the first asset quotation information to obtain a validity verification result;
[0007] If the validity verification result indicates that the first asset quotation information is not valid, obtaining second asset quotation information of the asset from a microservice architecture according to the query request, and returning the second asset quotation information to the terminal; the second asset quotation information is obtained by the microservice architecture regularly from the asset management device corresponding to the asset management institution.
[0008] On the one hand, the embodiments of the present application provide an asset quotation device, including:
[0009] A first processing module, configured to receive a query request for an asset sent by a terminal, and obtain first asset quotation information associated with the asset from an event-driven architecture according to the query request; the first asset quotation information is pushed to the event-driven architecture by an asset device corresponding to an asset institution when it detects that the quotation information of the asset has been updated, and the asset institution is subordinate to an asset management institution;
[0010] A verification module for validating the effectiveness of the above-mentioned first asset quotation information to obtain an effectiveness verification result;
[0011] A second processing module, if the above-mentioned effectiveness verification result indicates that the above-mentioned first asset quotation information is not effective, then obtains the second asset quotation information of the above-mentioned asset from the microservice architecture according to the above-mentioned query request, and returns the above-mentioned second asset quotation information to the above-mentioned terminal; the above-mentioned second asset quotation information is obtained by the above-mentioned microservice architecture regularly from the asset management device corresponding to the above-mentioned asset management institution.
[0012] In a possible implementation manner, the above-mentioned first processing module is used to perform the following operations:
[0013] Send the above-mentioned query request to the quotation service component in the above-mentioned event-driven architecture; the above-mentioned quotation service component is used to subscribe to the quotation information of the above-mentioned asset from the message component in the above-mentioned event-driven architecture according to the above-mentioned query request;
[0014] Receive the quotation information in the message queue returned by the above-mentioned message component according to the subscribed quotation information of the above-mentioned asset; the quotation information in the above-mentioned message queue is pushed by the above-mentioned asset device to the front-end component in the above-mentioned event-driven architecture when it detects that the quotation information of the above-mentioned asset has been updated, and is pushed by the above-mentioned front-end component to the above-mentioned message component;
[0015] Determine the quotation information in the above-mentioned message queue as the first asset quotation information of the above-mentioned asset.
[0016] In a possible implementation manner, the above-mentioned second processing module is used to perform the following operations:
[0017] Send the above-mentioned query request to the background service component in the above-mentioned microservice architecture; the above-mentioned background service component is used to obtain the quotation information of the above-mentioned asset from the database in the above-mentioned microservice architecture; the quotation information in the above-mentioned database is obtained by the timing component in the above-mentioned microservice institution regularly from the asset management device corresponding to the above-mentioned asset management institution;
[0018] Receive the quotation information returned by the above-mentioned background service component, and determine the received quotation information as the second asset quotation information of the above-mentioned asset.
[0019] In a possible implementation manner, the above-mentioned first processing module is further used to perform the following operations:
[0020] When receiving the service error message sent by the above-mentioned message component, perform the step of obtaining the second asset quotation information of the above-mentioned asset from the microservice architecture according to the above-mentioned query request.
[0021] In a possible implementation, the above first asset quotation information includes a quoted value and the generation time of the quoted value; the verification module is used to perform the following operations:
[0022] Perform validity verification on the above first asset quotation information to obtain a validity verification result, including:
[0023] Determine the time interval between the generation time of the quoted value in the above first asset quotation information and the current time;
[0024] When the above time interval is greater than the time interval threshold, determine that the above first asset quotation information is not valid, and generate a validity verification result for indicating that the above first asset quotation information is not valid.
[0025] In a possible implementation, the above second processing module is further used to perform the following operations:
[0026] Query the quotation markup value of the asset institution corresponding to the above terminal from the quotation markup table;
[0027] Perform a summation process on the above quotation markup value and the quoted value indicated by the above second asset quotation information to obtain the target quoted value of the above asset;
[0028] Send the target quoted value of the above asset to the above terminal.
[0029] On the one hand, an embodiment of the present application provides a computer device, including a memory and a processor. The above memory stores a computer program, and when the above processor executes the computer program, the steps of the above method are implemented.
[0030] On the one hand, an embodiment of the present application provides a computer storage medium. The above computer storage medium stores a computer program, and when the above computer program is executed by a processor, the steps of the above method are executed.
[0031] In this application, a heterogeneous quotation acquisition system is provided. The heterogeneous quotation acquisition system includes an event-driven architecture and a microservice architecture. The event-driven architecture is used to receive the quotation information pushed by the asset institution when the quotation information of the corresponding asset device detects that the quotation information of the asset has been updated; the microservice architecture is used to regularly obtain the quotation information from the asset management device corresponding to the asset management institution. In other words, the real-time performance of the quotation information obtained by the event-driven architecture is relatively strong (i.e., high sensitivity), and the stability of the quotation information obtained by the microservice architecture is relatively high. Therefore, in practical applications, first obtain the quotation information of the asset (i.e., the first asset quotation information) from the event-driven architecture. When the obtained quotation information is not valid, then switch to obtain the quotation information of the asset (i.e., the second asset quotation information) from the microservice architecture. This is beneficial to ensuring the real-time performance and stability of the quotation information, being able to obtain valid quotation information, and avoiding asset losses to users. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the following will describe the drawings required to be used in the embodiments of the present application or the background technology.
[0033] Figure 1 It is a schematic structural diagram of an event-driven architecture provided by an embodiment of the present application;
[0034] Figure 2 It is a schematic structural diagram of a microservice architecture provided by an embodiment of the present application;
[0035] Figure 3 It is a schematic structural diagram of a heterogeneous quotation acquisition system provided by an embodiment of the present application;
[0036] Figure 4 It is a schematic flowchart of an asset quotation method provided by the present application;
[0037] Figure 5 It is a schematic flowchart of another asset quotation method provided by the present application;
[0038] Figure 6 It is a schematic structural diagram of an asset quotation device provided by the present application;
[0039] Figure 7 It is a schematic structural diagram of a computer device provided by the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0040] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of the present application.
[0041] In the present application, it mainly relates to the basic technologies of artificial intelligence included in artificial intelligence technology. Artificial Intelligence (AI) is to use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results of theory, methods, technologies, and application systems. In other words, artificial intelligence is a comprehensive technology in computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines, enabling the machines to have the functions of perception, reasoning, and decision-making.
[0042] Artificial intelligence technology is an interdisciplinary subject, involving a wide range of fields, including both hardware-level technologies and software-level technologies. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, pre-trained model technology, operation / interaction systems, and mechatronics. Among them, the pre-trained model, also known as the large model or the basic model, can be widely applied to downstream tasks in major directions of artificial intelligence after fine-tuning. The artificial intelligence software technology mainly includes several major directions such as computer vision technology, speech technology, natural language processing technology, and machine learning / deep learning.
[0043] In the present application, it also relates to third-party payment technology. Third-party payment technology refers to a third-party payment institution with a certain strength and reputation guarantee, which provides third-party payment functions for users by signing contracts with major asset institutions. In the mode of the third-party payment function, after the buyer selects and purchases goods, the buyer uses the account provided by the transaction payment platform to pay the purchase price (pay to the third-party payment institution), and the third-party payment institution notifies the seller that the purchase price has arrived and requests the seller to ship the goods; after the buyer receives the goods, inspects the goods, and confirms, the buyer then notifies the third-party payment institution to make the payment; the third-party payment institution then transfers the funds to the seller's account.
[0044] Therefore, when using the account provided by the transaction payment platform for payment of goods, if it involves cross-border transactions, that is, the types of assets paid by the buyer are different from the types of assets received by the seller, asset quotation information about the assets needs to be provided to the user (i.e., the buyer) so that the user can make the payment for the goods based on the asset quotation information. This application provides an asset quotation method, which provides real-time asset quotation information to the user of the terminal through an event-driven architecture and provides stable and accurate asset quotation information to the user of the terminal through a microservices architecture, avoiding the problem of asset loss of the user.
[0045] First, an asset quotation system provided by an embodiment of this application can be used to implement the asset quotation method in this application. The asset quotation system may include a microservices architecture, an event-driven architecture, and a unified external device.
[0046] It should be noted that the event-driven architecture refers to an event-based architecture pattern; in the event-driven architecture, each functional component can publish events, and other functional components can subscribe to the events and perform corresponding functional operations. The above events may refer to user operations, scheduled tasks, and so on. Therefore, when using the event-driven architecture to obtain asset quotations, the quotation information obtained from the asset devices corresponding to the asset institutions can be obtained by subscribing to the events. However, in the case of poor network quality, problems such as transmission errors and transmission failures are likely to occur in the transmission process of the quotation information obtained by subscription, which will make the overall quotation function unavailable. Therefore, the real-time nature of the quotation information provided by the event-driven architecture is relatively strong, but the stability is not high.
[0047] It should be noted that the above microservice architecture is a software architecture pattern. This architecture pattern divides the system into a series of small, loosely coupled functional modules or functional components. Each functional module or functional component runs in its own process and communicates with each other through a lightweight communication mechanism, thus combining into a complete application system. The above lightweight communication mechanism can include the Message Queuing Telemetry Transport (MQTT) protocol, the Representational State Transfer (REST) architecture, and so on. Therefore, when using the microservice architecture to obtain asset quotes, the quote information of the assets in the asset management equipment corresponding to the asset management institution can be obtained through a stable and lightweight communication mechanism. However, due to the low tightness between each service module or service component and the high independence of each service module or service component, the complexity of communication between each service module or service component is relatively high; when the change speed of the quote information is too fast, the microservice architecture cannot obtain quote information with high real-time performance. Therefore, the stability of the quote information provided by the microservice architecture is relatively strong, but the real-time performance is not high.
[0048] Please refer to Figure 1 , Figure 1 is a schematic structural diagram of an event-driven architecture provided by an embodiment of the present application. The event-driven architecture may include one or more front-end components, a message component, and one or more quote service components;
[0049] It should be noted that the front-end components, the message component, and the quote service components may be deployed in the same device or may be respectively deployed in different devices. Among them, separately deploying the front-end components, the message component, and the quote service components in different devices can improve the disaster tolerance ability of the event-driven architecture. The above disaster tolerance ability may refer to the ability of the event-driven architecture to restore various functions on a standby device when the main device fails.
[0050] That is to say, when the front-end components, the message component, and the quote service components are separately deployed in different devices, when a device to which any front-end component belongs fails, the devices to which the remaining front-end components belong can still run normally, and the event-driven architecture can still normally provide asset quote information.
[0051] In the present application, the number of front-end components can be set according to requirements. Figure 1 Taking 3 front-end components as an example for illustration, it includes front-end component 111, front-end component 112, and front-end component 113. The number of quote service components can also be set according to requirements. Figure 1Taking three quotation service components as an example for illustration, including quotation service component 115, quotation service component 116, and quotation service component 117. Among them, front-end components 111, 112, and 113 can all use the asset institution account provided by asset institution 130 to establish a connection with asset device 120; this connection can refer to a connection based on the Financial Information Exchange (FIX) protocol. During the process of obtaining quotation information, the front-end components and quotation service components can be scheduled through a task balancing mechanism according to the task volume of the tasks to be processed by the front-end components and quotation service components; or, the front-end components and quotation service components can be scheduled according to the network quality, performance, etc. of the devices where the front-end components and quotation service components are located. The above-mentioned asset institution account is provided by the asset institution and is recorded in the account form, and this account form is stored in the front-end component; an asset institution can have one or more asset institution accounts, and any front-end component can use one or more asset institution accounts corresponding to one or more asset institutions respectively.
[0052] It can be understood that taking front-end component 111 and quotation service component 115 as an example, as Figure 1 shown, front-end component 111 can use the asset institution account provided by asset institution 130 to establish a connection with asset device 120 corresponding to asset institution 130. When asset device 120 detects that the quotation information of the asset has been updated, it will push the quotation information of this asset to front-end component 111 through this connection; at the same time, after front-end component 111 receives the quotation information of this asset, it will push the quotation information of this asset to message component 114. After message component 114 receives the quotation information of this asset, it will store the quotation information of this asset into the message queue in message component 114. If quotation service component 115 subscribes to the quotation information of this asset from message component 114, then message component 114 will push the quotation information of this asset to quotation service component 115. If quotation service component 115 does not subscribe to the quotation information of this asset from message component 114, then message component 114 will not push the quotation information of this asset to quotation service component 115.
[0053] Among them, this message queue can have the following functions: (1) Store the quotation information of the asset pushed by the front-end component received in the form of a queue. (2) Send the quotation information of the asset stored in the message queue to the subscribed quotation service components in a first-in, first-out manner, that is, the quotation information of the asset that is stored in the message queue first is sent to the subscribed quotation service components first; the subscribed quotation service components refer to the quotation service components that have subscribed to the quotation information of this asset from message component 114.
[0054] Please refer to Figure 2 ,Figure 2 It is a schematic structural diagram of a microservice architecture provided by an embodiment of the present application. The microservice architecture may include one or more timing components, a database, and one or more background service components; the database may include a primary database and a standby database.
[0055] It should be noted that the timing components, the primary database, the standby database, and the background service components may be deployed in the same device or separately in different devices. Among them, deploying the timing components, the primary database, the standby database, and the background service components separately in different devices can improve the disaster tolerance ability of the microservice architecture. The above-mentioned disaster tolerance ability may refer to the ability of the microservice architecture to restore various functions on the standby device when the primary device fails.
[0056] That is to say, when the above-mentioned timing components, the primary database, the standby database, and the background service components are separately deployed in different devices, when a device where any timing component is located fails, the devices where the remaining timing components are located can still operate normally, and the microservice architecture can still normally provide the quotation information of assets.
[0057] In the present application, the number of timing components can be set according to requirements. Figure 2 Taking 3 timing components as an example for illustration, it includes timing component 211, timing component 212, and timing component 213. The number of background service components can also be set according to requirements. Figure 2 Taking 3 background service components as an example for illustration, it includes background service component 215, background service component 216, and background service component 217. The number of standby databases can also be set according to requirements. Figure 2 Taking 2 standby databases as an example for illustration, it includes standby database 218 and standby database 219.
[0058] Among them, the above-mentioned timing component 211, timing component 212, and timing component 213 can all obtain the quotation information about assets from the asset management device 230 at fixed time intervals through the interface of the asset management device 230 provided by the asset management institution 240.
[0059] It can be understood that taking timing component 211 and background service component 215 as an example, as Figure 2As shown in the figure, the timing component 211 obtains the quotation information about the assets from the asset management device 230 at fixed time intervals through the interface of the asset management device 230 provided by the asset management institution 240. After receiving the quotation information of the assets, the timing component 211 stores the quotation information of the assets in the main database 214. At the same time, in order to avoid abnormal situations in the main database 214, resulting in the inability to provide the quotation information of the assets in the main database 214 to users. Therefore, after receiving the quotation information of the assets, the main database 214 synchronizes the quotation information of the assets to the standby database 218 and the standby database 219, that is, the standby database 218 and the standby database 219 include the quotation information of the assets synchronized from the main database 214 to the standby database 218 and the standby database 219. When the main database 214 is in a normal state, the background service component 215 can obtain the quotation information of the assets from the main database 214; when the main database 214 is in an abnormal state, the background service component 215 can obtain the quotation information of the assets from the standby database 218 or the standby database 219.
[0060] Further, please refer to Figure 3 , Figure 3 which is a schematic structural diagram of a heterogeneous quotation acquisition system provided by an embodiment of the present application. The heterogeneous quotation acquisition system may include a microservice architecture 340, an event-driven architecture 330, a unified external device 310, and a terminal 320.
[0061] Among them, there is a communication connection between the unified external device 310 and the quotation service component in the event-driven architecture 330, so that the unified external device 310 can obtain quotation information from the event-driven architecture 330 according to this communication connection. The number of quotation service components in the event-driven architecture 330 can also be set according to requirements. Figure 3 Taking 3 quotation service components as an example for illustration, including a quotation service component 331, a quotation service component 332, and a quotation service component 333. The quotation service component may refer to Figure 1 the quotation service component in
[0062] Similarly, there is a communication connection between the unified external device 310 and the background service component in the microservice architecture 340, so that the unified external device 310 can obtain quotation information from the microservice architecture 340 according to this communication connection. The number of background service components in the microservice architecture 340 can also be set according to requirements. Figure 3 Taking 3 background service components as an example for illustration, including a background service component 341, a background service component 342, and a background service component 343. The background service component may refer to Figure 2The background service component in []. It should be noted that the terminal 320 may include in-vehicle terminals, smart phones, tablet computers, laptop computers, desktop computers, smart speakers, screen speakers, smart TVs, smart watches, etc., but is not limited thereto.
[0063] It should be noted that a quotation switching component is deployed in the unified external device 310; the quotation switching component is used to determine which quotation acquisition mode to use. The quotation acquisition modes include an acquisition mode based on an event-driven architecture and an acquisition mode based on a microservices architecture. The acquisition mode based on the event-driven architecture may refer to obtaining quotation information from the event-driven architecture, and the acquisition mode based on the microservices architecture may refer to obtaining quotation information from the microservices architecture.
[0064] In one embodiment, the quotation switching component may determine which quotation acquisition mode to use in the following manner: (1) Manual adjustment, that is, the system administrator sets the switching rule. After the unified external device receives the query request sent by the terminal, according to the switching rule, it obtains the asset quotation information from at least one of the microservices architecture and the event-driven architecture. The system administrator may refer to system developers, system maintenance personnel, etc. (2) Automatic adjustment mode, that is, after the query request for the asset sent by the terminal reaches the unified external device, the unified external device will preferentially adopt the acquisition mode based on the event-driven architecture, that is, obtain the quotation information from the event-driven architecture; when the obtained quotation information is not valid, it switches to the acquisition mode based on the microservices architecture, that is, obtains the quotation information from the microservices architecture.
[0065] Further, as Figure 3As shown, when the user corresponding to the terminal 320 needs to provide asset quotation information about the assets to the user for third-party payment, the terminal 320 can generate a query request for the assets in response to the query trigger operation of the user on the terminal page, and send the query request to the unified external device 310. The query request may include asset attribute information, the Internet Protocol (IP) address of the terminal, and the Media Access Control (MAC) address of the terminal; the user may refer to the buyer in the above text, and the asset attribute information may include the type name of the user's payment asset and the type name of the seller's received asset. When the adjustment method of the switching component in the unified external device 310 is the automatic adjustment method, the unified external device 310 first obtains the first asset quotation information for the asset from any quotation service component of the event-driven architecture 330 according to the asset attribute information carried in the query request. The first asset quotation information may include the type name of the user's payment asset, the type information of the seller's received asset, the quotation value between the two assets, and the generation time of the quotation value, etc. Furthermore, the unified external device 310 can perform validity verification on the obtained first asset quotation information; when the first asset quotation information is verified to be valid, the unified external device 310 returns the first asset quotation information to the terminal; when the first asset quotation information is verified to be invalid, the unified external device 310 obtains the second asset quotation information for the asset from any background service component of the microservice architecture 340 according to the asset attribute information carried in the query request. The second asset quotation information may include the type name of the user's payment asset, the type information of the seller's received asset, the quotation value between the two assets, and the generation time of the quotation value, etc.; and returns the second asset quotation information to the terminal 320. Therefore, the user corresponding to the terminal 320 can query the asset quotation information for the asset and perform payment behavior according to the asset quotation information.
[0066] It should be noted that the unified external device 310 can select any quotation service component of the event-driven architecture 330 through a random routing algorithm to obtain the first asset quotation information for the asset; the unified external device 310 can also select any background service component of the microservice architecture 340 through a random routing algorithm to obtain the second asset quotation information for the asset. The unified external device 310 may refer to a terminal or a server, and the server may refer to a computer device in the network that can provide certain services to other devices.
[0067] Please refer to Figure 4 , which is a schematic flow diagram of an asset quotation method provided by an embodiment of the present application. The present application can be executed by a computer device, and the computer device can be the above Figure 3The unified external device 310 therein, or it can also be other devices connected to the unified external device 310. Among them, the method may include the following steps:
[0068] S401. Receive a query request for an asset sent by a terminal, and obtain first asset quotation information associated with the asset from the event-driven architecture according to the query request.
[0069] It should be noted that the above-mentioned asset can refer to stocks, legal tender, vouchers, digital collections, etc.; the above-mentioned query request may carry asset attribute information about the asset, the IP address of the terminal, and the MAC address of the terminal; the asset attribute information may include the type name of the asset for which the user pays and the type name of the asset for which the seller receives payment.
[0070] It should be noted that the above-mentioned first asset quotation information includes the type name of the asset for which the user pays, the type name of the asset for which the seller receives payment, and the quotation value for the exchange of the two assets, etc. The first asset quotation information is pushed to the event-driven architecture by the asset device corresponding to the asset institution when it detects that the quotation information of the asset has been updated. The asset institution is subordinate to the asset management institution; the above-mentioned asset device can be the background device of the above-mentioned asset institution.
[0071] It should be noted that the above-mentioned asset institution can refer to a financial institution, such as a bank, and the above-mentioned asset management institution can refer to a financial management institution, such as the inter-bank market. The above-mentioned asset institution is subordinate to the asset management institution to indicate that the asset management institution can manage the asset institution; the above-mentioned "updated" can refer to a change in the quotation value of the above-mentioned asset.
[0072] It can be understood that when the asset device corresponding to the asset institution detects a change in the quotation value in the quotation information of the asset, the asset device can push the quotation information of the asset to the event-driven architecture. Therefore, when the user corresponding to the terminal conducts third-party payment and needs to provide asset quotation information about the asset to the user, the terminal can generate a query request for the asset in response to the query trigger operation of the user on the terminal page and send the query request to the computer device. The computer device can obtain the quotation information associated with the asset from the event-driven architecture according to the asset attribute information carried in the query request and determine the quotation information associated with the asset as the first asset quotation information. By the asset device pushing the quotation information of the asset to the event-driven architecture in real time, the computer device can obtain quotation information with relatively high real-time performance from the event-driven architecture, improving the real-time performance of the quotation information.
[0073] S402. Perform validity verification on the first asset quotation information to obtain a validity verification result.
[0074] It should be noted that the validity verification may include verifying the timeliness of the first asset quotation information, verifying the accuracy of the first asset quotation information, etc.; the above validity verification results may include that the first asset quotation information is valid and the first asset quotation information is not valid. The fact that the first asset quotation information is valid is used to reflect that the first asset quotation information can provide the user with real-time and accurate asset quotation information for the above-mentioned asset; the fact that the first asset quotation information is not valid is used to reflect that the first asset quotation information cannot provide the user with real-time and accurate asset quotation information for the above-mentioned asset and may cause asset losses to the user.
[0075] It can be understood that after obtaining the first asset quotation information about the asset, the computer device can perform validity verification on the timeliness or accuracy of the first asset quotation information and obtain the validity verification result that the first asset quotation information is valid or not valid. Through the validity verification, it is possible to avoid the situation where the user corresponding to the terminal obtains incorrect asset quotation information due to incorrect or untimely first asset quotation information, which may cause huge asset losses to the user, thereby improving the accuracy and timeliness of the asset quotation information.
[0076] S403. If the validity verification result indicates that the first asset quotation information is not valid, then obtain the second asset quotation information of the asset from the microservice architecture according to the query request, and return the second asset quotation information to the terminal.
[0077] It should be noted that the above-mentioned second asset quotation information includes the type name of the asset paid by the user, the type name of the asset received by the seller, and the quotation value for the exchange of the two assets, etc. The second asset quotation information is obtained by the microservice architecture regularly from the asset management device corresponding to the asset management institution; the above-mentioned asset management device may be the back-end device of the asset management institution. The above-mentioned "regularly" means that the microservice architecture obtains the asset quotation information from the asset management device at fixed time intervals; this time interval can be set in the microservice architecture.
[0078] It can be understood that when the above validity verification result indicates that the first asset quotation information is valid, it means that the first asset quotation information can provide the user with real-time and accurate asset quotation information for the above-mentioned asset. The computer device can return the first asset quotation information to the terminal. When the above validity verification result indicates that the first asset quotation information is not valid, it means that the first asset quotation information cannot provide the user with real-time and accurate asset quotation information for the above-mentioned asset and may cause asset losses to the user. Therefore, in order to provide the user with accurate asset quotation information for the above-mentioned asset, the computer device obtains the second asset quotation information of the asset from the microservice architecture according to the query request and returns the second asset quotation information to the terminal. Since the second asset quotation information is obtained by the microservice architecture from the asset management device corresponding to the asset management institution at fixed time intervals, it can provide relatively stable quotation information for the user corresponding to the terminal.
[0079] In this application, when the terminal needs to provide asset quotation information, by obtaining the query request sent by the terminal, the first asset quotation information associated with the asset is obtained from the event-driven architecture according to the query request; the first asset quotation information is obtained by real-time pushing from the asset device corresponding to the asset institution. This ensures the real-time nature of the first asset quotation information sent to the terminal and provides the user with effective asset quotation information. At the same time, before sending the first asset quotation information to the terminal, the validity of the first asset quotation information is verified. This avoids the event-driven architecture providing incorrect first asset quotation information and avoids causing asset losses to the user. Furthermore, if the first asset quotation information is not valid, the second asset quotation information associated with the asset is obtained from the microservice architecture according to the query request; the second asset quotation information is obtained by the microservice architecture regularly from the asset management device corresponding to the asset management institution. This ensures the stability of the second asset quotation information sent to the terminal and provides the user with stable asset quotation information.
[0080] Please refer to Figure 5 , which is a schematic flowchart of another asset quotation method provided by an embodiment of this application. This application can be executed by a computer device, and the computer device can be the Figure 3 unified external device 310 mentioned above, or other devices connected to the unified external device 310. Among them, the method may include the following steps:
[0081] S501. Receive a query request for an asset sent by the terminal;
[0082] S502. Send the query request to the quotation service component in the event-driven architecture.
[0083] It should be noted that the event-driven architecture includes a front-end component, a message component, and a quotation service component; the above quotation service component is used to subscribe to the quotation information of the asset from the message component according to the query request. The above front-end component receives and pushes the quotation information of the asset when the quotation information of the asset device of the asset has been updated. The above message component is used to receive the quotation information pushed by the front-end component.
[0084] It should be noted that the asset device can detect the update status of the quotation information of the asset. When the quotation information of the asset has been updated, the asset device can push the quotation information to the above front-end component.
[0085] It can be understood that after the computer device receives the query request sent by the terminal, the unified external device can send the query request to the quotation service component in the event-driven architecture. The quotation service component can generate a subscription request for the asset according to the asset attribute information carried in the query request, and send a subscription request for the asset to the message component in the message subscription device; the subscription request may include the IP address of the subscription device, the name of the subscribed asset, the subscription time, etc. After receiving the subscription request, the message component performs the registration of the subscription service.
[0086] S503. Receive the quotation information in the message queue returned by the message component according to the quotation information of the subscribed asset.
[0087] It should be noted that the above message queue is used to store the quotation information pushed by the front-end component to the information component in a queue form, and send the quotation information of the asset to the first quotation server in a first-in, first-out form.
[0088] It can be understood that after the front-end component receives the quotation information pushed by the asset device, it sends the quotation information to the message component, and the message component stores the quotation information in a queue form to obtain a message queue for storing the quotation information. After the message component completes the registration of the subscription service, the information component can send the quotation information stored in the information queue to the computer device in a first-in, first-out manner according to the registration information of the subscription service.
[0089] Optionally, when receiving the service error message sent by the above message component, perform the step of obtaining the second asset quotation information of the above asset from the microservice architecture according to the above query request.
[0090] It should be noted that the above service error message is used to indicate that a service error has occurred in the message component currently; the service error may be caused by reasons such as a message component operation failure or a message component being attacked.
[0091] It can be understood that when a service error occurs in the message component, the message component sends a service error message to the computer device. After receiving the service error message, the computer device determines that the message component is currently unable to provide quotation information. Therefore, the computer device directly obtains the second asset quotation information of the above asset from the microservice architecture according to the query request.
[0092] S504. Determine the quotation information in the message queue as the first asset quotation information of the asset.
[0093] It can be understood that after the computer device receives the quotation information in the message queue returned by the message component according to the registration information of the subscription service, it can determine that the quotation information in the message queue is the first asset quotation information of the asset.
[0094] S505. Perform validity verification on the first asset quotation information to obtain a validity verification result.
[0095] Optionally, the above first asset quotation information includes a quoted value and the generation time of the above quoted value; the above performing validity verification on the above first asset quotation information to obtain a validity verification result includes: determining the time interval between the generation time of the quoted value in the above first asset quotation information and the current time; when the time interval is greater than the time interval threshold, determining that the above first asset quotation information is not valid, and generating a validity verification result for indicating that the above first asset quotation information is not valid.
[0096] It should be noted that the above time interval threshold can be configured for external devices uniformly.
[0097] It can be understood that the first asset quotation information includes a quoted value and the generation time of the quoted value. The computer device subtracts the generation time of the quoted value from the current time to obtain a time interval; when the time interval is greater than the time interval threshold, it means that the first asset quotation information provided by the above event-driven architecture may not be real-time and the timeliness of the first asset quotation information is not high. Providing the first asset quotation information to the user may cause damage to the user's assets. Therefore, when the time interval is greater than the time interval threshold, it is determined that the above first asset quotation information is not valid, and a validity verification result for indicating that the above first asset quotation information is not valid is generated. When the time interval is less than or equal to the time interval threshold, it means that the accuracy and timeliness of the above first asset quotation information are high, and the computer device can directly send the first asset quotation information to the terminal.
[0098] S506. If the validity verification result indicates that the first asset quotation information is not valid, obtain the second asset quotation information of the asset from the microservice architecture according to the query request, and return the second asset quotation information to the terminal.
[0099] Optionally, obtain second asset quotation information of the above asset from the microservice architecture according to the above query request, including: sending the above query request to the background service component in the above microservice architecture; the above background service component is used to obtain the quotation information of the above asset from the database in the above microservice architecture; the quotation information in the above database is regularly obtained by the timing component in the above microservice institution from the asset management device corresponding to the above asset management institution; receive the quotation information returned by the above background service component, and determine the received quotation information as the second asset quotation information of the above asset.
[0100] It should be noted that the above microservice architecture includes a timing component, a database, and a background service component. The above timing component is used to regularly obtain the quotation information of the asset from the asset management device corresponding to the above asset management institution, and send the quotation information of the asset to the above database. The database is used to store the quotation information of the above asset. The above background service component is used to obtain the quotation information of the asset from this database.
[0101] It can be understood that the above timing component obtains the quotation information of the asset from the asset management device at fixed time intervals, and stores the quotation information of the asset in the database. Therefore, when the computer device needs to obtain the quotation information of the asset from the microservice architecture, the computer device sends a query request to the background service component, and the background service component obtains the quotation information of the asset from the above database according to the asset attribute information carried in the query request, and returns the quotation information to the computer device. After receiving the quotation information, the computer device determines the quotation information as the second asset quotation information. By obtaining the quotation information from the database, the stability of the quotation information can be improved.
[0102] Optionally, the database in the above microservice architecture includes a primary database and a standby database. The above background service component is further used to obtain the quotation information of the above asset from the above primary database when the primary database in the above microservice architecture is in a normal state; the quotation information in the above primary database is regularly obtained by the timing component in the above microservice institution from the asset management device corresponding to the above asset management institution; the above background service component is further used to obtain the quotation information of the above asset from the above standby database when the primary database in the above microservice architecture is in an abnormal state, and the quotation information in the above standby database is obtained by synchronizing the quotation information in the above primary database.
[0103] It should be noted that in a microservices architecture, the database can include a primary database and a standby database. The above-mentioned timing component is also used to obtain the quotation information of assets from the asset management device at fixed time intervals and store the quotation information of the assets in the primary database. The above-mentioned primary database is used to synchronize the quotation information to the standby database after receiving the quotation information sent by the timing component.
[0104] It should be noted that the above-mentioned primary database being in a normal state can mean that the above-mentioned primary database is running normally, not attacked, and the network environment where the primary database is located is normal, etc.
[0105] It can be understood that in any of the following situations where the above-mentioned primary database is attacked, has a running error, or the network environment is abnormal, the above-mentioned primary database will be in an abnormal state. In this abnormal state, the primary quotation device cannot provide stable quotation information. On the contrary, when the above-mentioned primary database is not attacked, is running normally, and the network environment is normal, the above-mentioned primary database is in a normal state. In this normal state, the primary quotation device can provide stable quotation information. Therefore, before the background service component obtains the quotation information from the primary database, it can first detect whether the primary database is in a normal state. When the primary database is in a normal state, the background service component obtains the quotation information of the above-mentioned assets from the above-mentioned primary database; when the primary database is in an abnormal state, the background service component can obtain the quotation information of the above-mentioned assets from the above-mentioned standby database. By detecting whether the primary database is in a normal state, it is judged whether the primary database can provide stable quotation information, and then when the primary database is in an abnormal state, stable quotation information is obtained through the standby database, improving the stability of the quotation information.
[0106] Optionally, the above-mentioned returning the second asset quotation information to the above-mentioned terminal includes: querying the quotation increment value of the asset institution corresponding to the above-mentioned terminal from the quotation increment table; performing a summation process on the above-mentioned quotation increment value and the reported value indicated by the above-mentioned second asset quotation information to obtain the target reported value of the above-mentioned asset; and sending the target reported value of the above-mentioned asset to the above-mentioned terminal.
[0107] It should be noted that the quotation increment table is used to record the price increment rules of asset institutions for assets; the quotation increment table includes the asset institution name, asset name, and the price increment information of the asset institution for the asset. The quotation increment table can be stored in the quotation service component of the event-driven architecture, or in the background service component of the microservices architecture, or in a computer device.
[0108] It can be understood that for each type of asset, different asset institutions may have different price markup rules. For example, for the reported value of asset B by asset institution A, there is currently a rule of reducing the reported value; for the reported value of asset A by asset institution B, there is currently a rule of increasing the reported value. Therefore, when providing the reported value of the asset to the corresponding user of the terminal, it is necessary to sum up the second asset quotation information according to the quotation price markup table. Specifically, when the quotation price markup table is stored in a computer device, after the computer device receives the second asset quotation information returned in the microservice architecture, it obtains the price markup value of the asset from the quotation price markup table according to the second asset quotation information, sums up the price markup value and the reported value indicated by the second asset quotation information to obtain the target reported value of the asset, and sends the target reported value to the terminal. The corresponding user of the terminal can carry out third-party payment activities according to the target reported value.
[0109] In this application, when the terminal needs to provide the quotation information of an asset, it obtains the first asset quotation information associated with the asset from the event-driven architecture according to the query request sent by the terminal; the first asset quotation information is obtained by real-time pushing from the asset device corresponding to the asset institution. This ensures the real-time nature of the first asset quotation information sent to the terminal and provides effective asset quotation information to the user. At the same time, before sending the first asset quotation information to the terminal, the validity of the first asset quotation information is verified. This avoids the event-driven architecture providing incorrect first asset quotation information and avoids causing asset losses to the user. Furthermore, if the first asset quotation information is not valid, the second asset quotation information associated with the asset is obtained from the microservice architecture according to the query request; the second asset quotation information is obtained by the microservice architecture regularly from the asset management device corresponding to the asset management institution. This ensures the stability of the second asset quotation information sent to the terminal and provides stable asset quotation information to the user.
[0110] Please refer to Figure 6 , which is a schematic structural diagram of an asset quotation device provided by an embodiment of this application. As Figure 6 shown, the asset quotation device may include:
[0111] A first processing module 611, configured to receive a query request for an asset sent by the terminal, and obtain the first asset quotation information associated with the asset from the event-driven architecture according to the query request; the first asset quotation information is pushed to the event-driven architecture by the asset device corresponding to the asset institution when it detects that the quotation information of the asset has been updated, and the asset institution belongs to the asset management institution;
[0112] A verification module 612, configured to verify the validity of the first asset quotation information to obtain a validity verification result;
[0113] A second processing module 613, configured to, if the above-mentioned validity verification result indicates that the above-mentioned first asset quotation information is not valid, obtain the second asset quotation information of the above-mentioned asset from the microservice architecture according to the above-mentioned query request, and return the above-mentioned second asset quotation information to the above-mentioned terminal; the above-mentioned second asset quotation information is obtained by the microservice architecture regularly from the asset management device corresponding to the above-mentioned asset management institution.
[0114] In a possible implementation manner, the above-mentioned first processing module 611 is configured to perform the following operations:
[0115] Send the above-mentioned query request to a quotation service component in the above-mentioned event-driven architecture; the above-mentioned quotation service component is configured to subscribe to the quotation information of the above-mentioned asset from a message component in the above-mentioned event-driven architecture according to the above-mentioned query request;
[0116] Receive the quotation information in the message queue returned by the above-mentioned message component according to the subscribed quotation information of the above-mentioned asset; the quotation information in the above-mentioned message queue is pushed to a front-end component in the above-mentioned event-driven architecture when the above-mentioned asset device detects that the quotation information of the above-mentioned asset has been updated, and is pushed to the above-mentioned message component by the above-mentioned front-end component;
[0117] Determine the quotation information in the above-mentioned message queue as the first asset quotation information of the above-mentioned asset.
[0118] In a possible implementation manner, the above-mentioned second processing module 613 is configured to perform the following operations:
[0119] Send the above-mentioned query request to a background service component in the above-mentioned microservice architecture; the above-mentioned background service component is configured to obtain the quotation information of the above-mentioned asset from a database in the above-mentioned microservice architecture; the quotation information in the above-mentioned database is obtained by a timing component in the above-mentioned microservice institution regularly from the asset management device corresponding to the above-mentioned asset management institution;
[0120] Receive the quotation information returned by the above-mentioned background service component, and determine the received quotation information as the second asset quotation information of the above-mentioned asset.
[0121] In a possible implementation manner, the above-mentioned first processing module 611 is further configured to perform the following operations:
[0122] When receiving a service error message sent by the above-mentioned message component, perform the step of obtaining the second asset quotation information of the above-mentioned asset from the microservice architecture according to the above-mentioned query request.
[0123] In a possible implementation manner, the above-mentioned first asset quotation information includes a quoted value and the generation time of the above-mentioned quoted value; the verification module 612 is configured to perform the following operations:
[0124] Perform validity verification on the above-mentioned first asset quotation information to obtain a validity verification result, including:
[0125] Determine the time interval between the generation time of the quoted value in the above-mentioned first asset quotation information and the current time;
[0126] When the above time interval is greater than the time interval threshold, determine that the above-mentioned first asset quotation information is not valid, and generate a validity verification result for indicating that the above-mentioned first asset quotation information is not valid.
[0127] In a possible implementation manner, the above-mentioned second processing module 613 is further configured to perform the following operations:
[0128] Query the quotation increment value of the asset institution corresponding to the above-mentioned terminal from the quotation increment table;
[0129] Perform a summation process on the above-mentioned quotation increment value and the quoted value indicated by the above-mentioned second asset quotation information to obtain the target quoted value of the above-mentioned asset;
[0130] Send the target quoted value of the above-mentioned asset to the above-mentioned terminal.
[0131] In the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the function of the module or unit.
[0132] In this application, when the terminal needs to provide the quotation information of an asset, by obtaining the query request sent by the terminal, the first asset quotation information associated with the asset is obtained from the event-driven architecture according to the query request; the first asset quotation information is obtained by real-time pushing of the asset device corresponding to the asset institution. This ensures the real-time nature of the first asset quotation information sent to the terminal and provides effective asset quotation information to the user. At the same time, before sending the first asset quotation information to the terminal, the validity of the first asset quotation information is verified. This avoids the first quotation server from providing incorrect first asset quotation information and prevents asset losses to the user. Furthermore, if the first asset quotation information is not valid, the second asset quotation information associated with the asset is obtained from the microservice architecture according to the query request; the second asset quotation information is obtained by the microservice architecture regularly obtaining from the asset management device corresponding to the asset management institution. This ensures the stability of the second asset quotation information sent to the terminal and provides stable asset quotation information to the user.
[0133] Please refer to Figure 7 , which is a schematic structural diagram of a computer device provided by an embodiment of this application. As Figure 7 shown, the above computer device 700 may refer to a server or a terminal, including: a processor 701, a network interface 704, and a memory 705. In addition, the above computer device 700 may further include: a user interface 703 and at least one communication bus 702. Among them, the communication bus 702 is used to realize the connection and communication between these components. Among them, in some embodiments, the user interface 703 may include a display screen (Display) and a keyboard (Keyboard). Optionally, the user interface 703 may further include a standard wired interface and a wireless interface. The network interface 704 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 705 may be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. Optionally, the memory 705 may also be at least one storage device far from the aforementioned processor 701. As Figure 7 shown, the memory 705 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a computer program.
[0134] In Figure 7 the computer device 700 shown, the network interface 704 can provide network communication functions; while the user interface 703 is mainly used to provide an input interface; and the processor 701 can be used to call the computer program stored in the memory 705 to execute:
[0135] Receive a query request for an asset from a receiving terminal, and obtain first asset quotation information associated with the asset from an event-driven architecture; the first asset quotation information is pushed to the event-driven architecture by an asset institution corresponding to an asset device when it detects that the quotation information of the asset has been updated, and the asset institution is subordinate to an asset management institution;
[0136] Perform validity verification on the first asset quotation information to obtain a validity verification result;
[0137] If the validity verification result indicates that the first asset quotation information is not valid, obtain second asset quotation information of the asset from a microservice architecture according to the query request, and return the second asset quotation information to the terminal; the second asset quotation information is periodically obtained by the microservice architecture from an asset management device corresponding to the asset management institution.
[0138] In a possible implementation manner, the above-mentioned processor 701 may be used to call a computer program stored in the memory 705 to execute:
[0139] Send the query request to a quotation service component in the event-driven architecture; the quotation service component is used to subscribe to the quotation information of the asset from a message component in the event-driven architecture according to the query request;
[0140] Receive the quotation information in the message queue returned by the message component according to the subscribed quotation information of the asset; the quotation information in the message queue is pushed to a front-end component in the event-driven architecture by the asset device when it detects that the quotation information of the asset has been updated, and is pushed to the message component by the front-end component;
[0141] Determine the quotation information in the message queue as the first asset quotation information of the asset.
[0142] In a possible implementation manner, the above-mentioned processor 701 may be used to call a computer program stored in the memory 705 to execute:
[0143] Send the query request to a background service component in the microservice architecture; the background service component is used to obtain the quotation information of the asset from a database in the microservice architecture; the quotation information in the database is periodically obtained by a timing component in the microservice institution from an asset management device corresponding to the asset management institution;
[0144] Receive the quotation information returned by the background service component, and determine the received quotation information as the second asset quotation information of the asset.
[0145] In a possible implementation, the database in the above microservice architecture includes a primary database and a standby database. The above background service component is further configured to obtain the quotation information of the above assets from the above primary database when the primary database in the above microservice architecture is in a normal state; the quotation information in the above primary database is regularly obtained by the timing component in the above microservice mechanism from the asset management device corresponding to the above asset management institution;
[0146] The above background service component is further configured to obtain the quotation information of the above assets from the above standby database when the primary database in the above microservice architecture is in an abnormal state. The quotation information in the above standby database is obtained by synchronizing the quotation information in the above primary database.
[0147] In a possible implementation, the above processor 701 may be configured to call a computer program stored in the memory 705 to execute:
[0148] When receiving the service error message sent by the above message component, execute the above step of obtaining the second asset quotation information of the above assets from the microservice architecture according to the above query request.
[0149] In a possible implementation, the above first asset quotation information includes a quoted value and the generation time of the above quoted value. The above processor 701 may be configured to call a computer program stored in the memory 705 to execute:
[0150] Determine the time interval between the generation time of the quoted value in the above first asset quotation information and the current time;
[0151] When the above time interval is greater than the time interval threshold, determine that the above first asset quotation information is not valid, and generate a validity verification result for indicating that the above first asset quotation information is not valid.
[0152] In a possible implementation, the above processor 701 may be configured to call a computer program stored in the memory 705 to execute the above step of returning the above second asset quotation information to the above terminal, including:
[0153] Query the quotation increment value of the asset institution corresponding to the above terminal from the quotation increment table;
[0154] Sum the above quotation increment value and the quoted value indicated by the above second asset quotation information to obtain the target quoted value of the above assets;
[0155] Send the target quoted value of the above assets to the above terminal.
[0156] In this application, when the terminal needs to provide the quotation information of an asset, a query request sent by the terminal is obtained, and the first asset quotation information associated with the asset is obtained from the event-driven architecture according to the query request; the first asset quotation information is obtained by real-time pushing of the asset device corresponding to the asset institution. This ensures the real-time nature of the first asset quotation information sent to the terminal and provides effective asset quotation information to the user. At the same time, before sending the first asset quotation information to the terminal, the validity of the first asset quotation information is verified. This avoids the first quotation server providing incorrect first asset quotation information and avoids causing asset losses to the user. Furthermore, if the first asset quotation information is not valid, the second asset quotation information associated with the asset is obtained from the microservice architecture according to the query request; the second asset quotation information is obtained by the microservice architecture regularly obtaining from the asset management device corresponding to the asset management institution. This ensures the stability of the second asset quotation information sent to the terminal and provides stable asset quotation information to the user.
[0157] In addition, it should be noted here that: The embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the data processing device mentioned above, and the computer program includes program instructions. When the above-mentioned processor executes the above-mentioned program instructions, it can execute the description of the above-mentioned data processing method in the corresponding embodiment above. Therefore, it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated either. For the technical details not disclosed in the embodiment of the computer-readable storage medium involved in the present application, please refer to the description of the method embodiment of the present application.
[0158] As an example, the above-mentioned program instructions can be deployed to be executed on a computer device, or deployed to be executed on at least two computer devices at one location, or, executed on at least two computer devices distributed at least two locations and interconnected by a communication network. The at least two computer devices distributed at least two locations and interconnected by a communication network can form a blockchain network.
[0159] The above computer-readable storage medium may be the data processing device provided in any of the foregoing embodiments or the middle storage unit of the above computer device, such as the hard disk or the middle memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the middle storage unit and the external storage device of the computer device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store the data that has been output or is to be output.
[0160] The terms "first", "second", etc. in the description, claims and drawings of the embodiments of the present application are used to distinguish different contents in different media, rather than to describe a specific order. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units is not limited to the listed steps or modules, but may optionally further include steps or modules that are not listed, or may optionally further include other step units inherent to these processes, methods, devices, products or equipment.
[0161] In the actual application of the relevant data collection and processing in this application, the informed consent or separate consent of the personal information subject should be obtained strictly in accordance with the requirements of relevant laws and regulations, and subsequent data use and processing behaviors should be carried out within the scope authorized by laws and regulations and the personal information subject.
[0162] The embodiments of the present application also provide a computer program product, including a computer program. When the above computer program is executed by a processor, it realizes the descriptions of the above data processing method and decoding method in the corresponding foregoing embodiments. Therefore, details will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated either. For the technical details not disclosed in the embodiments of the computer program product involved in the present application, please refer to the description of the method embodiments of the present application.
[0163] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in connection with the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0164] The methods and related devices provided in the embodiments of this application are described with reference to the method flowcharts and / or structural schematic diagrams provided in the embodiments of this application. Specifically, each process and / or block of the method flowchart and / or structural schematic diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable network-connected devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable network-connected devices generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or structural schematic Figure 1 one block or multiple blocks. These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable network-connected devices to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device that implements the functions specified in Figure 1 one process or multiple processes and / or structural schematic Figure 1 one block or multiple blocks. These computer program instructions can also be loaded onto a computer or other programmable network-connected devices, such that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in Figure 1 one process or multiple processes and / or structural schematic one block or multiple blocks.
[0165] The foregoing disclosure is only for the preferred embodiments of this application, and of course, it cannot be used to limit the scope of rights of this application. Therefore, equivalent changes made in accordance with the claims of this application are still within the scope covered by this application.
Claims
1. An asset quotation method, characterized in that, Including: Receiving a query request for an asset sent by a receiving terminal, and obtaining first asset quotation information associated with the asset from an event-driven architecture according to the query request; The first asset quotation information is pushed to the event-driven architecture by an asset institution corresponding to an asset device when it detects that the quotation information of the asset has been updated, and the asset institution is subordinate to an asset management institution; Performing validity verification on the first asset quotation information to obtain a validity verification result; If the validity verification result indicates that the first asset quotation information is not valid, obtaining second asset quotation information of the asset from a microservice architecture according to the query request, and returning the second asset quotation information to the terminal; the second asset quotation information is obtained by the microservice architecture regularly from an asset management device corresponding to the asset management institution.
2. The method according to claim 1, characterized in that The obtaining the first asset quotation information associated with the asset from the event-driven architecture according to the query request includes: Sending the query request to a quotation service component in the event-driven architecture; the quotation service component is used to subscribe to the quotation information of the asset from a message component in the event-driven architecture according to the query request; Receiving the quotation information in a message queue returned by the message component according to the subscribed quotation information of the asset; the quotation information in the message queue is pushed to a front-end component in the event-driven architecture by the asset device when it detects that the quotation information of the asset has been updated, and is pushed to the message component by the front-end component; Determining the quotation information in the message queue as the first asset quotation information of the asset.
3. The method according to claim 1, characterized in that, The obtaining the second asset quotation information of the asset from the microservice architecture according to the query request includes: Sending the query request to a background service component in the microservice architecture; the background service component is used to obtain the quotation information of the asset from a database in the microservice architecture; the quotation information in the database is obtained by a timing component in the microservice institution regularly from an asset management device corresponding to the asset management institution; Receiving the quotation information returned by the background service component, and determining the received quotation information as the second asset quotation information of the asset.
4. The method according to claim 3, wherein The database in the microservice architecture includes a primary database and a standby database, and the background service component is further used to obtain the quotation information of the asset from the primary database when the primary database in the microservice architecture is in a normal state; the quotation information in the primary database is obtained by a timing component in the microservice institution regularly from an asset management device corresponding to the asset management institution; The background service component is further used to obtain the quotation information of the asset from the standby database when the primary database in the microservice architecture is in an abnormal state, and the quotation information in the standby database is obtained by synchronizing the quotation information in the primary database.
5. The method according to claim 2, characterized in that, The method further includes: When receiving the service error message sent by the message component, execute the step of obtaining the second asset quotation information of the asset from the microservice architecture according to the query request.
6. The method according to claim 1, characterized in that, The first asset quotation information includes a quoted price and the generation time of the quoted price. The performing validity verification on the first asset quotation information to obtain a validity verification result includes: Determining the time interval between the generation time of the quoted price in the first asset quotation information and the current time. When the time interval is greater than the time interval threshold, determining that the first asset quotation information is not valid, and generating a validity verification result for indicating that the first asset quotation information is not valid.
7. The method according to claim 1, wherein The returning the second asset quotation information to the terminal includes: Querying the price increase value of the asset institution corresponding to the terminal from the price increase table for quotations. Performing a summation process on the price increase value and the quoted price indicated by the second asset quotation information to obtain the target quoted price of the asset. Sending the target quoted price of the asset to the terminal.
8. An asset quotation device, characterized in that, including: A first processing module, configured to receive a query request for an asset sent by a terminal, and obtain first asset quotation information associated with the asset from an event-driven architecture according to the query request. The first asset quotation information is pushed to the event-driven architecture by an asset institution corresponding to an asset device when it detects that the quotation information of the asset has been updated, and the asset institution is subordinate to an asset management institution. A verification module, configured to perform validity verification on the first asset quotation information to obtain a validity verification result. A second processing module, configured to, if the validity verification result indicates that the first asset quotation information is not valid, obtain second asset quotation information of the asset from the microservice architecture according to the query request, and return the second asset quotation information to the terminal; the second asset quotation information is obtained by the microservice architecture regularly from the asset management device corresponding to the asset management institution.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer storage medium, characterized in that, The computer storage medium stores a computer program, and when the computer program is executed by a processor, it executes the steps of the method according to any one of claims 1 to 7.