CN116821192A - Asset data query method and device and computer equipment - Google Patents

Asset data query method and device and computer equipment Download PDF

Info

Publication number
CN116821192A
CN116821192A CN202311099385.7A CN202311099385A CN116821192A CN 116821192 A CN116821192 A CN 116821192A CN 202311099385 A CN202311099385 A CN 202311099385A CN 116821192 A CN116821192 A CN 116821192A
Authority
CN
China
Prior art keywords
asset
real
time data
database
query
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311099385.7A
Other languages
Chinese (zh)
Other versions
CN116821192B (en
Inventor
李敏
蒋金平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Cicc Wealth Securities Co ltd
Original Assignee
China Cicc Wealth Securities Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Cicc Wealth Securities Co ltd filed Critical China Cicc Wealth Securities Co ltd
Priority to CN202311099385.7A priority Critical patent/CN116821192B/en
Publication of CN116821192A publication Critical patent/CN116821192A/en
Application granted granted Critical
Publication of CN116821192B publication Critical patent/CN116821192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/06Asset management; Financial planning or analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application discloses an asset data query method, an asset data query device and computer equipment, which can return zero asset value or degradation value under the condition that the acquisition of a certain asset is abnormal, so that the real-time data query and feedback of other transaction systems are not influenced under the condition that the accuracy and the reliability of the real-time data are not influenced, and further the user experience is improved. The method may include: responding to a query instruction of real-time data of a first asset, and calling an interface query mode to acquire the real-time data of the first asset from a first transaction system corresponding to the first asset; responsive to not being acquired from the first transaction system and degradation processing being initiated, invoking a database query to acquire real-time data of the first asset from the database; in response to not being obtained from the database, displaying, at the asset display interface, that the query result of the real-time data of the first asset is a zero asset value or a degradation value; alternatively, real-time data for the first asset is displayed on the asset display interface in response to a success of the obtaining from the database.

Description

Asset data query method and device and computer equipment
Technical Field
The present application relates to the field of information processing technologies in the financial industry, and in particular, to a method and apparatus for querying asset data, and a computer device.
Background
The trading system is the core for realizing online trading in the securities industry. A user may use the trading system to enable investment management of the holding assets, such as viewing the holding assets and benefits, etc. Because of the complexity of security products of security dealers (e.g., security companies), there are great differences in the business characteristics of different types of security products, and thus different types of security products need to be interfaced to different trading systems. The relationship between each transaction system is from mutual isolation to data intercommunication, and the asset display for users is also from multi-system isolation to asset data unification, so that the user can check various types of held assets and the total value of the held assets through one transaction platform.
However, with the development of financial science and technology, the types of assets are more and more, the related transaction systems are more and more, and the rules are more and more complex, so when the transaction platform relates to a plurality of transaction systems, how to provide accurate and reliable asset data is a technical problem to be solved.
Disclosure of Invention
The embodiment of the application provides an asset data query method, an asset data query device and computer equipment, which can provide accurate and reliable asset data and are beneficial to improving user experience.
In a first aspect, an embodiment of the present application provides an asset data query method, which may include: responding to a query instruction of real-time data of a first asset, and calling an interface query mode to acquire the real-time data of the first asset from a first transaction system corresponding to the first asset; in response to not obtaining real-time data of the first asset from the first transaction system and the degradation process being initiated, invoking a database query to obtain real-time data of the first asset from the database; in response to not obtaining real-time data of the first asset from the database, displaying, at the asset display interface, a query result of the real-time data of the first asset as a zero asset value or a degradation value; or, in response to obtaining real-time data of the first asset from the database, displaying the real-time data of the first asset on the asset display interface;
wherein the degradation value is used to indicate that the real-time data query of the first asset failed; the first asset is any one of a plurality of assets held by the target object, and the first asset is stock, fund combination, option, two-fuse or cash.
Therefore, when the interface query mode is called and the real-time data of a certain asset is not queried, the database query mode can be called to obtain the real-time data of the asset; when the database query mode is called and real-time data is not queried, zero asset value or degradation value can be displayed to the user so that the user can know the reason of query failure; when the real-time data is queried by calling a database query mode, the specific real-time data of the asset can be displayed to the user. Therefore, under the condition that the transaction system of a certain asset is abnormal and the query of the calling database is not queried, zero asset value or degradation value can be returned, so that the real-time data query and feedback of other transaction systems are not influenced under the condition that the accuracy and the reliability of the real-time data are not influenced, and further the user experience is improved.
In one possible implementation, in response to not obtaining real-time data of the first asset from the first trading system and the degradation process being initiated, invoking the database query to obtain real-time data of the first asset from the database includes: in response to the failure of the first transaction system to obtain real-time data of the first asset due to interface traffic anomalies and degradation is initiated, invoking a database query to obtain real-time data of the first asset from the database; or in response to the reason that the real-time data of the first asset is not acquired from the first transaction system being that the interface service is not abnormal, the interface is degraded abnormally and the degradation process is started, invoking a database query mode to acquire the real-time data of the first asset from the database.
Therefore, under the condition of abnormal interface business or interface degradation, a database query mode can be called to obtain the real-time data of the first asset, so that failure in obtaining the real-time data due to network reasons or system service problems and other reasons is avoided.
In one possible implementation, displaying, at the asset display interface, a query result for the first asset as a zero asset value or a degradation value in response to not obtaining real-time data for the first asset from the database, includes: responding to the reason that the real-time data of the first asset is not acquired from the database to be abnormal in the database business, and displaying the query result of the first asset as a zero asset value on the asset display interface; or, in response to the reason that the real-time data of the first asset is not acquired from the database, displaying a query result of the first asset as a degradation value on the asset display interface.
It can be seen that in the case of abnormal database traffic, zero asset values are presented to the user, and in the case of abnormal database degradation, degradation values are presented to the user, so that the user can obtain the cause of database query failure according to the zero asset values or degradation values.
In one possible implementation, displaying real-time data of a first asset at an asset display interface in response to acquiring real-time data of the first asset from a database, includes: and in response to the system anomaly not occurring and the real-time data of the first asset being acquired from the database, displaying the real-time data of the first asset on the asset display interface.
In one possible implementation manner, the method further includes: in response to the system anomaly not occurring and the real-time data of the first asset being acquired from the first trading system, displaying the real-time data of the first asset on the asset display interface;
in one possible implementation manner, the method further includes: in response to the occurrence of a system anomaly, the asset data query is stopped.
Therefore, under the condition that no system abnormality occurs and real-time data is queried in an interface query mode, the real-time data can be directly displayed to a user; under the condition of system abnormality, the asset data query can be stopped so as to reduce the influence of the system abnormality on the accuracy of the displayed real-time data. That is, the asset data query is stopped once a system anomaly occurs.
In one possible implementation manner, the method further includes: and in response to failure in acquiring the real-time data of the first asset from the first transaction system and non-opening of the degradation process, displaying a query result of the first asset as a zero asset value at the asset display interface. It can be seen that, in the case that the degradation process is not queried and started in the interface query mode, the real-time data of the first asset held by the target object is null, instead of being queried in the database query mode, the zero asset value is directly fed back.
In one possible implementation manner, the method further includes: responding to a query instruction of the historical data of the first asset, and calling a database query mode to acquire the historical data of the first asset from a database; in response to not obtaining the historical data of the first asset from the database, further displaying, at the asset display interface, that the query result of the historical data of the first asset is a zero asset value or a degradation value; alternatively, the historical data of the first asset is also displayed at the asset display interface in response to obtaining the historical data of the first asset from the database.
Therefore, the historical data is queried by directly adopting a database query mode, so that the processing pressure on an independent transaction system can be reduced, and the efficiency of acquiring the historical data is improved.
In one possible implementation, the query instruction for real-time data of the first asset is further configured to query an asset total value of a plurality of assets held by the target object, and the method further includes: responding to the acquired real-time data of the first asset, and calling an interface query mode to acquire the real-time data of a second asset from a second transaction system corresponding to the second asset, wherein the second asset is any asset except the first asset in a plurality of assets held by a target object; and in response to acquiring the real-time data of the second asset, displaying the real-time data of the second asset and the asset total value of the target object on the asset display interface, wherein the asset total value of the target object is the sum of the asset total value of the first asset and the asset total value of at least one second asset. And under the condition that all the assets are inquired, the asset total value of the target object is the real asset total value. In the case that an abnormality exists in the transaction system of a certain asset and the database query is also queried, a zero asset value or a degradation value can be returned, so that the influence on the accuracy and reliability of the total asset value of the target object can be reduced.
In a second aspect, an embodiment of the present application provides an asset data query device, including: the query unit is used for responding to a query instruction of the real-time data of the first asset, and calling an interface query mode to acquire the real-time data of the first asset from a first transaction system corresponding to the first asset; in response to not obtaining real-time data of the first asset from the first transaction system and the degradation process being initiated, invoking a database query to obtain real-time data of the first asset from the database; the display unit is used for responding to the fact that the real-time data of the first asset is not acquired from the database, and displaying the query result of the real-time data of the first asset as a zero asset value or a degradation value on the asset display interface; the degradation value is used to indicate that the real-time data query of the first asset failed; or, in response to obtaining real-time data of the first asset from the database, displaying the real-time data of the first asset on the asset display interface;
The first asset is any one of a plurality of assets held by the target object, and the first asset is stocks, funds, fund combinations, options, two-fuse or cash.
In a third aspect, an embodiment of the present application provides a computer apparatus, including: one or more processors and memory; the memory is coupled to the one or more processors, the memory for storing computer programs or instructions that are invoked by the one or more processors to cause the computer device to perform: responding to a query instruction of real-time data of a first asset, and calling an interface query mode to acquire the real-time data of the first asset from a first transaction system corresponding to the first asset; in response to not obtaining real-time data of the first asset from the first transaction system and the degradation process being initiated, invoking a database query to obtain real-time data of the first asset from the database; in response to not obtaining real-time data of the first asset from the database, displaying, at the asset display interface, a query result of the real-time data of the first asset as a zero asset value or a degradation value; the degradation value is used to indicate that the real-time data query of the first asset failed; or, in response to obtaining real-time data of the first asset from the database, displaying the real-time data of the first asset on the asset display interface;
The first asset is any one of a plurality of assets held by the target object, and the first asset is stocks, funds, fund combinations, options, two-fuse or cash.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium comprising a computer program or instructions which, when run on a computer device, cause the computer device to perform a method as described in the first aspect or any one of the possible implementations of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on a computer device, cause the computer device to perform a method as described in the first aspect or any one of the possible implementations of the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is an exemplary diagram of a data set provided by an embodiment of the present application;
FIG. 2 is an exemplary diagram of a network architecture to which embodiments of the application are applied;
FIG. 3 is a schematic flow chart of an asset data query method according to an embodiment of the present application;
FIG. 4 is a flow chart of another method for querying asset data according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an apparatus for querying asset data according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In the present application, the words "first", "second", etc. are used to distinguish between identical items or similar items that have substantially the same function and effect. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
It should be understood that in the present application, "at least one" means one or more; "plurality" means two or more. In addition, "equal" of the present application may be used in conjunction with "greater than" or "less than". Under the condition of being equal to and being greater than, adopting a technical scheme of being greater than; under the condition of being used together with 'equal to' and 'less than', the technical scheme of 'less than' is adopted.
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
For a better understanding of aspects of embodiments of the present application, related terms and concepts that may be related to embodiments of the present application are described below.
1. Transaction system
The trading system is the core for realizing online trading in the securities industry. In The embodiment of The application, the trading platform can support various trading systems, such as an on-site trading system based on centralized trading, a two-melt trading system, an option trading system, a trading system based on off-site trading market (OTC), a trading system based on off-site fund combination, and The like. Various transaction systems have great differences in business attributes and system implementation.
The transaction platform can be understood as a transaction application program provided by a dealer, a user inputs login information of the user on the transaction platform, the transaction platform verifies the login information, and after verification, the transaction platform can provide services such as inquiry service, transaction service, management service and the like for the user. The services provided by the trading platform are based on asset types, which can be categorized into stocks, funds, fund combinations, options, two-fold, cash, etc. In other words, the trading platform may provide stock services, fund portfolio services, options services, two-tier services, cash services, etc. to users. For example, the assets of the user A managed on the trading platform are stocks and funds, the trading platform can provide stock services and funds services, for example, the user A can know the stock holding details and the total asset values, and the fund holding details and the total asset values through the trading platform in real time; trading of stocks and/or funds may also be performed; the benefits of stocks, funds, etc. can also be known. The trading platform may also provide the user with the asset aggregate value for all of the assets, or the asset aggregate value for the portion of the assets selected by the user. For example, user a holds stocks, funds, and options, the trading platform may provide user a with the total value of the assets for stock + funds + options, i.e., the sum of the total values of the assets for the three assets.
For example, see the exemplary diagram of a data set shown in FIG. 1. Taking a customer asset of a customer as an example in fig. 1, it is assumed that the customer holds stocks, funds, fund combinations, options, two-fusion cash, and accordingly, the asset aggregation service of the customer on the trading platform may include stock service, fund combination service, option service, two-fusion service, and cash service. Different types of assets correspond to different trading systems, which may be understood as systems that provide asset services, such as processing transactions related to the asset and providing corresponding data. For example, a stock corresponding trading system may provide stock services, such as processing the trading of stocks and providing stock holding details, total values of assets, revenue details, etc., and the data provided by the stock corresponding trading system may be referred to as stock data, with other types of asset data being similar.
In one implementation, an asset-corresponding trading system is used to provide real-time data of the asset to a trading platform, such as a stock-corresponding trading system is used to provide stock-holding details and an asset aggregate value to the trading platform. The historical data related to the asset may be provided to the trading platform by a database that may store historical data for various types of assets (i.e., the database includes a historical database), such as daily open and close prices of stocks, daily earnings, and the like. The database can directly provide the historical data for the transaction platform, or can provide the historical data for the corresponding transaction system first and then the transaction system provides the historical data for the transaction platform.
In another implementation, the database stores real-time data and historical data for various types of assets (i.e., the database includes a historical database and a real-time database for various assets), and the database may provide the real-time data and the historical data directly to the trading platform or may provide the real-time data and the historical data to the trading platform via the trading system.
In the two modes, the real-time data and/or the historical data provided by the transaction system to the transaction platform can be data processed by the transaction system. That is, the transaction system performs a series of logic processes on the data to feed back the processed data to the transaction platform. For example, the trading system corresponding to the stocks calculates the data of each stock to obtain the holding amount of each stock, integrates the holding amount of each stock to obtain the total value of the assets of the stock, and further provides the holding amount of each stock and the total value of the assets of the stock for the trading platform. Under the condition that the total value of the assets of each asset is obtained, the transaction platform can calculate and obtain the total value of the assets of the user, namely the sum of the total values of the assets of each asset, namely the total value of the assets of all the assets held by the user.
In the embodiment of the application, the transaction system corresponding to the asset provides real-time data of the asset for the transaction platform, and the database directly provides historical data of the asset for the transaction platform.
2. Query mode
The query modes related to the embodiment of the application are two, namely an interface query mode and a database query mode. Both of these query approaches may be used to query the user for asset data, such as real-time data and/or historical data, etc.
1) Interface inquiry mode
The interface inquiry mode refers to inquiry through a network communication interface between the transaction platform and the transaction system, for example, inquiry of asset data to the transaction system through a hypertext transfer protocol (HyperTextTransfer Protocol, HTTP) interface. An asset service may be associated with a variety of different interfaces, such as a taken-hold interface, a clearing status interface, etc. Illustratively, the trading platform queries the trading system for the inventory holding details of the asset via the inventory holding interface and queries the trading system for the total value of the asset via the clearance status interface.
In this manner, the transaction system corresponding to the asset logically processes the null data (e.g., from a database) to feed back the processed data to the transaction platform through the network communication interface. It can also be understood that the transaction platform sends a data acquisition request to the transaction system through the network communication interface, when the transaction system receives the real-time data acquisition request, the transaction system carries out logic processing on the scattered data to obtain processed data, and feeds back the processed data to the transaction platform through the network communication interface.
2) Database query mode
The database query mode refers to query through a database, and the database can be, for example, a mysql database or an oracle database. The database may store various data for various types of assets, which in turn may be logically processed to feed back corresponding data to the trading platform.
In short, the data is logically processed by the transaction system in the interface query mode, the data is logically processed by the database in the database query mode, and the transaction platform does not need to logically process the data and only needs to convert the data acquired from the transaction system or the database into displayable data.
The real-time data refers to real-time asset data held, and may include, for example, asset inventory details and asset total values. The above-mentioned history data refers to previously held asset data, the history earnings, history interest rates, and the like of the held asset.
For real-time data, if a database query mode is adopted, the load and pressure of a database are increased. Since the database is an infrastructure, it may be called by multiple transaction systems or multiple transaction platforms, but the amount of concurrency that the database can withstand is limited, and excessive database queries can result in excessive database pressure. In particular, databases may be performing complex logic processing on some data, but receiving queries from other transaction systems will affect queries from other more important transaction systems, such as core transaction systems, on the database. Therefore, in the embodiment of the application, an interface query mode is adopted for real-time data query so as to reduce the pressure of a database.
For historical data, if an interface query mode is adopted, the pressure of a transaction system is increased, so that the transaction time and the real-time query performance are affected. Because the historical data generally has the characteristic of large-batch non-real-time performance, if an interface query mode is adopted, on one hand, the storage capacity of the transaction system is required to be large enough to support the characteristic of large-batch historical data, and on the other hand, the logic processing capability of the transaction system is required to be strong enough. Because the historical data has the characteristic of non-real time, when the database carries out logic processing on the historical data, the logic processing can be carried out at the non-transaction time, namely, the database can carry out logic processing on the historical data at the non-transaction time so as to obtain the historical data. Therefore, in the embodiment of the application, a database query mode is adopted for the query of the historical data.
3. Abnormality type
During the process of querying asset data, anomalies may occur, which are the cause of query failure. In order to maximally reduce the influence of anomalies on user query asset data, the embodiment of the application can divide the anomalies into three types, namely system anomalies, business anomalies and degradation anomalies.
1) System anomalies
System abnormality refers to the fact that the system of the transaction platform is not available or an error occurs. System anomalies may include sequence failures, parameter type errors, computational anomalies, and other anomalies that are not downgrade defined. A system anomaly occurs and the trading platform will abort exiting and not return any asset data. That is, once a system anomaly occurs, the trading platform does not provide the user with asset data for any of the assets.
2) Business anomalies
Business abnormality refers to failure of data query under system abnormality not occurring in the transaction platform. The traffic anomalies may be classified into interface traffic anomalies and database traffic anomalies. Traffic anomalies may result in degradation processes or return zero asset values.
Interface traffic anomalies refer to the communication network interface returning data normally, and the returned content is null or anomalous. Interface traffic anomalies are typically an HTTP return state of 200 for a query interface but the content contains anomaly information or the interface returns normally but the returned content is empty, etc. The occurrence of interface service abnormality does not represent the true deficiency of the data queried by adopting the interface query mode, and the database is probably updated during query, but the data query is empty due to network delay between a communication network interface and the data, and the primary degradation processing can be performed at the moment, namely, the database query mode is adopted.
Database traffic anomalies refer to database queries being empty. Database traffic anomalies include a normal state of the data table, but a query for data for an asset is empty (which would be the case if the user did not have the asset). If the database query mode is adopted to generate the abnormal database business, the data of the asset which is not queried from the database, namely, the data of the asset which does not exist in the database is indicated. That is, the data for the asset is not queried in the database and is empty.
3) Degradation anomalies
Degradation anomalies, meaning anomalies in data query failure that occur when errors occur in a transaction system or database, may result in secondary degradation. If all the anomalies which are out of the abnormal non-system are marked as business anomalies, the user's asset details and the total value of the assets are inaccurate, and the application introduces degradation anomalies. For related assets where degradation anomalies occur, degradation values may be returned, with other assets returning normal data. That is, the data of a certain asset is a degradation value and does not affect the querying of the data of other assets. The failure of the data query at this point is not due to the fact that the transaction system or database does not have asset data, but rather is due to an error in the transaction system or database.
The degradation anomalies may be categorized into interface degradation anomalies and database degradation anomalies.
An interface degradation exception may be a query that an interface HTTP return status is not 200, and common reasons may include a connection timeout or connection failure, or other HTTP error. If interface degradation abnormality occurs, the interface abnormality is the same as interface business abnormality, and the communication network interface is possible to be in error, but the database also stores asset data, and if primary degradation processing can be performed at this time, a database query mode is adopted; if the primary degradation processing is not performed, the secondary degradation processing is directly performed, and a degradation value is returned.
Database degradation anomalies include data table state anomalies, database connection anomalies, and the like. Data table state anomalies such as a data table being in a gap of batch updates, the full table data is temporarily empty. Database connection anomalies such as connection timeouts, connection failures, or network problems. If the database degradation abnormality occurs, the query failure caused by the database error is indicated, the secondary degradation processing is carried out, and the degradation value is returned.
The business anomalies and the degradation anomalies depend on the transaction system or database being anomalous, and the system anomalies are the transaction platform itself being unavailable or being erroneous.
One trading platform may manage asset data for various types of assets, and then the trading platform may support interactions with, i.e., involve, a variety of trading systems. At present, in a scenario that one transaction platform relates to multiple transaction systems, if one transaction system is abnormal, the display of asset data corresponding to the transaction system is affected, and the display of asset data corresponding to other transaction systems is also affected. Therefore, how to provide accurate and reliable asset data in such a scenario is a technical problem to be solved.
In view of this, the embodiments of the present application provide a method, an apparatus, and a computer device for querying asset data, which can provide accurate and reliable asset data, and help to improve user experience.
Before describing the asset data query mode provided by the embodiment of the application, the network architecture to which the embodiment of the application is applied is described.
Referring to fig. 2, an exemplary diagram of a network architecture to which embodiments of the present application are applied is shown. The network architecture shown in fig. 2 includes a computer device 201, a first transaction system 202a, a second transaction system 202b, a third transaction system 202c, and a database 203. It should be noted that the configuration and number of the devices shown in fig. 2 are used as examples, and are not limited to the embodiments of the present application.
The computer device 201 may be a mobile phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device (mobile internet device, MID), a wearable device, a Virtual Reality (VR) device, an augmented reality (augmented reality, AR) device, a wireless terminal in industrial control (industrial control), a wireless terminal in unmanned driving (self driving), a wireless terminal in teleoperation (remote medical surgery), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation security (transportation safety), a wireless terminal in smart city, a wireless terminal in smart home (smart home), a personal digital assistant (personal digital assistant, PDA), or the like, which is not limited in this embodiment of the present application. In the embodiment of the present application, the computer device 201 is installed with a trading platform of a dealer, that is, a trading application, and the computer device 201 can normally operate the trading platform.
The transaction system is used for providing real-time data of the assets for the transaction platform. The transaction system may be a server with data logic processing capabilities. One transaction system may correspond to one server, and a plurality of transaction systems may correspond to the same server cluster or may correspond to different server clusters. The server cluster may include cloud computing servers, content delivery network (Content Delivery Network, CDN) servers, network time protocol (Network Time Protocol, NTP), domain name resolution system (Domain Name System, DNS) servers, and the like, where the servers may coordinate with each other to perform functions such as computing, data storage, and communication. The transaction system may also be referred to as a transaction server.
The database is used for providing a data storage medium of historical data or real-time data of assets for a transaction platform. The database may be combined with the transaction server to provide data to the transaction platform, or may be separate from the transaction server's storage device.
In an embodiment of the present application, when the interface query mode is invoked to obtain real-time data of an asset from a transaction system (e.g., the first transaction system 202 a), the computer device 201 may invoke the database query mode to obtain real-time data of an asset from the database 203. When the real-time data is not queried by invoking the database query mode, a zero asset value or a degradation value can be displayed to the user so that the user can know the reason of query failure; when the database query mode is invoked to query successfully, specific real-time data of the asset can be displayed to the user. Therefore, under the condition that the transaction system of a certain asset is abnormal and the call database is not queried, zero asset value or degradation value can be returned, so that the real-time data query and feedback of other transaction systems are not influenced under the condition that the accuracy and the reliability of the real-time data are not influenced, and further the user experience is improved.
In the embodiment of the application, related data such as real-time query data, historical data, total asset values and the like and related data are authorized by a user. When the above embodiments of the present application are applied to a specific product or technology, the data involved in the use needs to be licensed or agreed upon by the user, and the collection, use and processing of the relevant data needs to comply with the relevant laws and regulations and the relevant standards.
The asset data query method provided by the embodiment of the application is explained in detail below.
Referring to fig. 3, a flow chart of an asset data query method according to an embodiment of the present application may include:
s301, receiving a query instruction of real-time data of a first asset.
Wherein the first asset is any one of a plurality of assets held by the target object. The target object may be a user who logs in personal information on the transaction platform of the computer device, or may be a user who is operating the transaction platform. The first asset may be a stock, fund combination, option, two-share or cash asset. The real-time data of the first asset refers to real-time data of the first asset held by the target object, and may include, for example, an asset holding details, an asset total value, and the like.
The current display interface of the computer device is a user interface of the transaction platform, and a plurality of user interfaces of the transaction platform can be provided, and different user interfaces are used for displaying different contents, such as a service option interface, a setting interface, a personal information interface and the like. The service option interface may include a plurality of asset service options, such as stock service, fund service, cash service, and the like, among others. Illustratively, taking stock services as an example, a target object enters a click operation on a service interface in a service option interface, and the computer device jumps to the interface of the stock service in response to the click operation, which may include a real-time data option, a historical data option, a purchase option, a redemption option, and the like. The target object further enters a click operation on the real-time data option, i.e., the computer device receives a query instruction for real-time data of the first asset. Specifically, the transaction platform of the computer device receives a query instruction for real-time data of the first asset.
S302, responding to the query instruction, and calling an interface query mode to acquire real-time data of the first asset from a first transaction system corresponding to the first asset.
And under the condition that the computer equipment receives the query instruction, the interface query mode is called to acquire real-time data of the first asset from the first transaction system corresponding to the first asset in response to the query instruction. For example, the first asset is a stock and the first trading system is a stock trading system. The calling interface query mode obtains real-time data of the first asset from the first transaction system, which may be that the real-time data of the first asset is obtained from the first transaction system through a communication network interface between the transaction platform and the first transaction system. For example, a real-time data acquisition request (which can carry identification information of a target object, such as an account number or an identification card number, etc.) is sent to the first transaction system through the communication network interface, and when the first transaction system receives the request, logic processing is performed on relevant data of the first asset to obtain real-time data of the first asset, and the real-time data of the first asset is fed back to the transaction platform through the communication network interface.
In one implementation, the computer device is capable of acquiring some or all of the real-time data of the first asset from the first transaction system via a communication network interface. For example, the binning details and the total asset value of the first asset can be obtained from the first transaction system via the HTTP interface.
Optionally, when the first transaction system receives the real-time data acquisition request, data related to the first asset may be acquired from the database based on the identification information of the target object, and a series of logic processing may be performed on the data to obtain the real-time data of the first asset.
The computer device may acquire real-time data of the first asset from the first transaction system, and may fail to acquire the real-time data of the first asset.
Alternatively, an interface traffic anomaly or an interface degradation anomaly occurs during the acquisition of real-time data of the first asset from the first transaction system, which would affect the acquisition of real-time data of the first asset from the first transaction system, e.g., the first transaction system does not feed back real-time data to the computer device. The computer device can acquire real-time data of the first asset from the first transaction system, and the real-time data indicates that no system abnormality, no interface business abnormality and no interface degradation abnormality occur in the acquisition process.
In response to the system anomaly not occurring and the real-time data of the first asset being acquired from the first trading system, the computer device displays the real-time data of the first asset on the asset display interface. It may be understood that, on the premise that no system abnormality occurs, in the process of acquiring the real-time data of the first asset from the first transaction system, no interface service abnormality or interface degradation abnormality occurs, and then the computer device may display the real-time data of the first asset on the asset display interface. That is, the computer device provides real-time data of the specific, real, first asset to the target object.
In response to the occurrence of the system anomaly, the computer device halts the asset data query. It will be appreciated that in the course of acquiring the real-time data of the first asset from the first trading system, a system anomaly occurs, indicating that the first trading system cannot feed back the real-time data to the computer device, but the computer device cannot present the real-time data of the first asset to the target object due to an error in the computer device or the unavailability of the system of the trading platform or an error, so that the computer device may stop the asset data query and not provide any asset value to the target object. Even the values of other assets are not shown. That is, in the event of a system anomaly, the computer device may cease the asset data query and not provide any asset values in order to protect the asset data of the target object. Optionally, the computer device may further force closing of the asset query interface, or force closing of the transaction platform.
System anomalies may occur during, before, or after the process of acquiring real-time data of the first asset from the first trading system. That is, whenever a system anomaly occurs, the asset data query is stopped once it occurs.
S303, in response to the fact that the real-time data of the first asset is not acquired from the first transaction system and the degradation process is started, a database query mode is called to acquire the real-time data of the first asset from the database.
Wherein the downgrade process is one configuration option provided by the trading platform of the computer device. The transaction platform may default to the degradation process being turned on. Alternatively, whether the destaging process is initiated by a selection operation entered by the target object, e.g., the target object may enter a selection operation to initiate the destaging process, in response to which the transaction platform may initiate the destaging process.
The degradation processing can comprise primary degradation processing and secondary degradation processing, wherein the primary degradation processing refers to that a database query mode is called for query under the condition that the data is not queried by the interface query mode; the secondary degradation processing refers to providing a degradation value to a target object under the condition that the data is not queried by calling a database query mode, wherein the degradation value does not influence the display of asset data of other assets, so that even if one asset is abnormal in the query process, accurate and reliable asset data of other assets can be provided. The degradation value may be an identifiable symbol, such as "-". Configuration options for the degradation process may include a primary degradation process configuration option and a secondary degradation process configuration option, both of which may be set to on, both of which may be set to off, and either on or off, depending on the selection operation of the target object input.
In one implementation, the computer device invokes a database query to retrieve real-time data of the first asset from the database in response to not retrieving real-time data of the first asset from the first transaction system and the degradation process is initiated. In another implementation, the computer device invokes a database query to retrieve real-time data of the first asset from the database in response to not retrieving real-time data of the first asset from the first transaction system. And when the data is not queried by the interface query mode by default, the database query mode is invoked for query.
Optionally, in response to the failure to obtain real-time data of the first asset from the first transaction system being due to an interface traffic anomaly and the degradation process being initiated, the computer device invokes a database query to obtain real-time data of the first asset from the database. That is, in the process of calling the interface query mode, interface service abnormality occurs, degradation processing is started, and the database query mode is called for query.
Optionally, in response to the reason that the real-time data of the first asset is not acquired from the first transaction system being that the interface service is not abnormal, the interface downgrades abnormally and downgrading is started, the computer device invokes a database query mode to acquire the real-time data of the first asset from the database. That is, in the process of calling the interface query mode, interface business abnormality does not occur, but interface degradation abnormality occurs, and degradation processing is started, and the database query mode is called for query.
The computer device invoking a database query mode to acquire real-time data of the first asset from the database may include the computer device sending a real-time data acquisition request (which may carry identification information of the target object) to the database, when receiving the request, extracting data related to the first asset corresponding to the target object based on the identification information of the target object, performing a series of logic processing on the data to obtain the real-time data of the first asset, and feeding back the real-time data of the first asset to the computer device.
For real-time data is not queried through the interface query mode and degradation processing is started, the computer device can call the database query mode to query. For the real-time data is not queried in the interface query mode and the degradation process is not started, the computer equipment can display the query result of the first asset as a zero asset value on the asset display interface. The zero asset value may be, for example, a digital "0" indicating that the real-time data of the first asset is empty, i.e., there is no value for the target object in the database with respect to the first asset. That is, in response to failure to acquire real-time data of the first asset from the first transaction system and the degradation process not being initiated, the computer device displays a query result for the first asset at the asset display interface as a zero asset value.
The database query mode is the same as the interface query mode, and the query is possible to be successful or the query is possible to be failed.
Alternatively, during the process of acquiring the real-time data of the first asset from the database, an abnormality in the database traffic or an abnormality in the database degradation occurs, which affects the acquisition of the real-time data of the first asset from the database, e.g., the database does not feed back the real-time data to the computer device. The computer device can acquire real-time data of the first asset from the database, and the real-time data indicates that no system abnormality, no database business abnormality and no database degradation abnormality occur in the acquisition process.
S304a, real-time data of the first asset is not acquired from the database, and the query result of the real-time data of the first asset is displayed as a zero asset value or a degradation value on the asset display interface.
In one implementation, in response to a database business anomaly for a reason that real-time data for a first asset was not acquired from a database, a query result for the first asset is displayed at an asset display interface as a zero asset value. That is, in the process of calling the database query mode to perform the query, a database business abnormality occurs, which indicates that no numerical value of the target object about the first asset exists in the database, and then the computer device may display the query result of the first asset as a zero asset value on the asset display interface. The zero asset value does not indicate that there is some error, but rather that the data representing the first asset held by the target object is 0.
In another implementation, the query result of the first asset is displayed as a degradation value at the asset display interface in response to a cause of the real-time data of the first asset not being acquired from the database being abnormal in database degradation. That is, in the process of calling the database query mode to query, no database business abnormality occurs, but a database degradation abnormality occurs, which indicates that an error exists in the database when data is returned to the computer device, so that the computer device can display the query result of the first asset as a degradation value on the asset display interface.
S304b, acquiring real-time data of the first asset from the database, and displaying the real-time data of the first asset on the asset display interface.
The computer acquires the real-time data of the first asset from the database, and the real-time data of the first asset can be displayed, wherein the real-time data indicates that no database business abnormality and no database degradation abnormality occur.
Optionally, in response to acquiring the real-time data of the first asset from the database and the system anomaly not occurring, the computer device displays the real-time data of the first asset on the asset presentation display interface. I.e. real-time data showing a specific, real, first asset.
Optionally, the computer device stops the asset data query in response to acquiring real-time data of the first asset from the database and the occurrence of the system anomaly. The stopped asset data query in this case may refer to the process of acquiring real-time data from the first transaction system and generating a system anomaly, which will not be described herein.
In the embodiment shown in fig. 3, for real-time data of an asset, when the real-time data is not queried by calling the interface query mode, the database query mode can be called for query; when the real-time data is not queried by invoking the database query mode, a zero asset value or a degradation value can be displayed to the user so that the user can know the reason of the non-query; when the database query mode is invoked to query successfully, specific real-time data of the asset can be displayed to the user. Therefore, under the condition that the transaction system of a certain asset is abnormal and the query of the calling database is not queried, zero asset value or degradation value can be returned, so that the real-time data query and feedback of other transaction systems are not influenced under the condition that the accuracy and the reliability of the real-time data are not influenced, and further the user experience is improved.
As an alternative embodiment, the query instruction in step S301 may also be used to query the history data of the first asset, or a query instruction is received again, where the query instruction is used to query the history data of the first asset.
Responding to a query instruction of the historical data of the first asset, and calling a database query mode by the computer equipment to acquire the historical data of the first asset from a database; in response to not obtaining the historical data of the first asset from the database, further displaying, at the asset display interface, that the query result of the historical data of the first asset is a zero asset value or a degradation value; alternatively, the historical data of the first asset is also displayed at the asset display interface in response to obtaining the historical data of the first asset from the database. The historical data of the first asset is not acquired from the database, and the zero asset value or the degradation value is displayed on the asset display interface similarly to step S304a, and the historical data of the first asset is acquired from the database, and the historical data of the first asset is displayed on the asset display interface similarly to step S304b.
As an alternative embodiment, a query instruction for real-time data and historical data of the first asset is received, and in response to the query instruction, an interface query mode is invoked to obtain the real-time data of the first asset from the first transaction system, and a database query mode is invoked to obtain the historical data of the first asset from the database. If the real-time data is not queried by calling the interface query mode, step S303 is executed, and step S304a or step S304b may be executed. If the historical data is not queried by calling a database query mode, displaying zero asset value or degradation value; and if the historical data is queried by calling a database query mode, displaying the specific historical data of the first asset. It should be noted that, for real-time data query, the interface query mode is downgraded to the database query mode, and the database query mode is called to query, which can be performed simultaneously with the database query mode for historical data query, or the database query mode can be called to query real-time data first, and then the database query mode is called to query historical data.
As an alternative embodiment, where the query instructions for real-time data of the first asset are also used to query the total asset value of the plurality of assets held by the target object, the computer device may employ the embodiment shown in fig. 3 to obtain real-time data for each asset. In the case where real-time data of each asset is acquired, the total value of the assets of the target object, that is, the sum of the total values of all the assets held by the target object, may be calculated. If the transaction system of a certain asset is abnormal and the query of the database is not queried, the asset can return zero asset value or degradation value, other assets return normal real-time data, and the computer equipment can calculate the sum of the asset total values of other assets to obtain the asset total value of the target object.
Referring to fig. 4, a flowchart of another method for querying asset data according to an embodiment of the present application may include:
s401, judging whether to call an interface query mode. And step S402 is executed when the interface query mode is called, namely, the interface query mode is called for query, and step S407 is executed when the interface query mode is not called, namely, the database query mode is called for query.
Before judging whether the interface query mode is called, receiving a query instruction, wherein the query instruction is used for requesting to query the asset data of all the assets of the target object, and can only query the real-time data of all the assets, can only query the history data of all the assets, can also query the real-time data and the history data of all the assets, and depends on the selection of the target object. In response to the query instruction, step S401 is performed.
The computer device judges whether to call an interface query mode according to the query purpose, for example, the query purpose is to query real-time data, then call the interface query mode, the query purpose is to query historical data, and then call the database query mode.
When the computer device determines whether to invoke the interface query mode, step S401 may be executed according to the sequence of each asset. For example, assets held by the target object are ordered as: if the computer device performs step S401 on the stock, and after the asset data or the zero asset value or the degradation value of the stock is obtained, the computer device performs step S401 on the foundation, and loops until the asset data or the zero asset value or the degradation value of the cash is obtained, and the inquiry is completed, so that the asset data of the 6 assets can be displayed on the asset display interface.
S402, calling an interface query mode. The computer device invokes the interface query mode to query the real-time data.
S403, judging whether interface business abnormality occurs. Step S406 is executed when the interface service is abnormal, namely whether the primary degradation process is started is further judged; if no interface service abnormality occurs, step S404 is executed, i.e. it is further determined whether an interface degradation abnormality occurs.
And the computer equipment judges whether interface business abnormality occurs in the process of calling an interface query mode to query real-time data from the corresponding transaction system.
Optionally, before step S403, it may be determined whether a system abnormality occurs. When a system abnormality occurs, the system is abnormally ended, namely, the asset data query is stopped, and no asset value is provided. If no system abnormality occurs, step S403 is executed to determine whether an interface service abnormality occurs.
S404, judging whether interface degradation abnormality occurs. Step S406 is executed when the interface degradation abnormality occurs, namely whether to start the primary degradation process is further judged; if no interface degradation abnormality occurs, step S405 is executed to further determine whether a system abnormality occurs.
In the process of calling an interface inquiry mode to inquire real-time data from a corresponding transaction system, the computer equipment judges whether interface degradation abnormality occurs after judging that interface business abnormality does not occur.
Optionally, S405 determines whether a system abnormality occurs. If a system anomaly occurs, the anomaly is over, i.e., the asset data query is stopped and no asset value is provided. If no system abnormality occurs, step S412 is performed, i.e. a normal value to be displayed is generated. Generating normal values to be displayed refers to the computer device converting the asset data obtained from the transaction system or database to obtain the asset data to be displayed so that the computer device displays the asset data.
That is, in the case where an interface degradation abnormality does not occur, it can be further judged whether a system abnormality occurs.
The abnormal system may occur during the process of calling the interface query mode to query, or may occur during the process of calling the database query mode to query, and the abnormal system is ended once the abnormal system occurs whenever the abnormal system occurs. Fig. 4 is an example of performing step S405 after step S404, and is not limited to the embodiment of the present application.
S406, judging whether to start the primary degradation process. Step S407 is executed when the primary degradation process is started, namely, a database query mode is called; step S410 is performed without starting the primary degradation process, i.e., generating a zero asset value. Generating a zero asset value refers to the computer device generating a "0" such that the computer device displays the corresponding asset data as a "0".
S407, calling a database query mode.
In one implementation, a computer device invokes a database query to query real-time data. In another implementation, the computer device invokes a database query to query the historical data.
S408, judging whether the database business is abnormal. Step S410 is executed when the database business is abnormal, namely zero resource value is generated; if no database service abnormality occurs, step S409 is performed, i.e. it is determined whether a database degradation abnormality occurs.
And the computer equipment judges whether the database business abnormality occurs in the process of calling the database query mode to query the asset data from the database.
S409, judging whether the database degradation abnormality occurs. If the database degradation abnormality occurs, step S411 is executed, i.e. a degradation value is generated; if no database degradation abnormality occurs, step S412 is performed, i.e. a normal value to be displayed is generated.
Optionally, in the case of occurrence of a database degradation anomaly, it may be further determined whether to start the secondary degradation process, where the secondary degradation process is started, step S411 is executed, and where the secondary degradation process is not started, step S410 is executed.
Optionally, in the case that no database degradation abnormality occurs, it may be further determined whether a system abnormality occurs, if so, the abnormality is ended, and if not, step S412 is performed.
S410, generating zero resource value.
Generating a zero asset value refers to the computer device generating a "0" such that the computer device displays the corresponding asset data as a "0".
S411, a degradation value "-" is generated.
Generating a degradation value refers to the computer device generating "-" to not affect the presentation of asset data for other assets.
S412, generating a normal value to be displayed.
Generating normal values to be displayed refers to the computer device converting the asset data obtained from the transaction system or database to obtain the asset data to be displayed so that the computer device displays the asset data.
S413, judging whether the inquiry is completed. The query is completed normally and the query results for each asset are displayed on the asset display interface, which may include, but is not limited to, zero asset value, degradation value, and normal value. If the inquiry is not completed, step S401 is executed.
After step S410, step S411, and step S412, step S413 may be performed.
In the embodiment shown in fig. 4, the query on real-time data and/or historical data can be implemented, and in the case that a certain transaction system is abnormal or a database is abnormal, accurate and reliable asset data of other transaction systems can be provided, which is helpful for improving user experience.
Further, please refer to fig. 5, which is a schematic structural diagram of an asset data query device according to an embodiment of the present application. The asset data querying device 500 may include:
a query unit 501, configured to respond to a first query instruction for real-time data of a first asset, and invoke an interface query manner to obtain the real-time data of the first asset from a first transaction system corresponding to the first asset; in response to not obtaining real-time data of the first asset from the first transaction system and the degradation process being initiated, invoking a database query to obtain real-time data of the first asset from the database;
a display unit 502, configured to display, on the asset display interface, a zero asset value or a degradation value as a query result of the real-time data of the first asset in response to the real-time data of the first asset not being acquired from the database; the zero asset value is used for indicating that the real-time data of the first asset is empty, and the degradation value is used for indicating that the real-time data query of the first asset fails; or, in response to obtaining real-time data of the first asset from the database, displaying the real-time data of the first asset on the asset display interface;
the first asset is any one of a plurality of assets held by the target object, and the first asset is stocks, funds, fund combinations, options, two-fuse or cash.
In some embodiments, the query unit 501 is specifically configured to, in response to the reason that the real-time data of the first asset is not acquired from the first transaction system being that the interface service is abnormal and the degradation process is started, invoke a database query mode to acquire the real-time data of the first asset from the database; or in response to the reason that the real-time data of the first asset is not acquired from the first transaction system being that the interface service is not abnormal, the interface is degraded abnormally and the degradation process is started, invoking a database query mode to acquire the real-time data of the first asset from the database.
In some embodiments, the query unit 501 is specifically configured to display, on the asset display interface, that the query result of the first asset is zero asset value in response to a cause of the real-time data of the first asset not being acquired from the database being abnormal in database business; or, in response to the reason that the real-time data of the first asset is not acquired from the database, displaying a query result of the first asset as a degradation value on the asset display interface.
In some embodiments, the display unit 502 is specifically configured to display the real-time data of the first asset on the asset display interface in response to the real-time data of the first asset not occurring a system abnormality and being acquired from the database.
In some embodiments, the display unit 502 is further configured to display the real-time data of the first asset on the asset display interface in response to the system anomaly not occurring and the real-time data of the first asset being obtained from the first transaction system.
In some embodiments, the query unit 501 is further configured to stop the asset data query in response to occurrence of a system anomaly.
In some embodiments, the display unit 502 is further configured to display, on the asset display interface, that the query result of the first asset is a zero asset value in response to the real-time data of the first asset not being acquired from the first transaction system and the degradation process not being started.
In some embodiments, the query unit 501 is further configured to, in response to a query instruction for the historical data of the first asset, invoke a database query mode to obtain the historical data of the first asset from the database;
the display unit 502 is further configured to, in response to failure in acquiring the historical data of the first asset from the database, further display, on the asset display interface, that the query result of the historical data of the first asset is a zero asset value or a degradation value; alternatively, the historical data of the first asset is also displayed at the asset display interface in response to obtaining the historical data of the first asset from the database.
In other possible embodiments, the asset data querying device provided by the embodiments of the present application may also be implemented in combination of software and hardware, and by way of example, the asset data querying device provided by the embodiments of the present application may be a processor in the form of a hardware decoding processor programmed to perform the asset data querying method provided by the embodiments of the present application, for example, the processor in the form of a hardware decoding processor may employ one or more application specific integrated circuits (ASIC, application Specific Integrated Circuit), DSP, programmable logic device (PLD, programmable Logic Device), complex programmable logic device (CPLD, complex Programmable Logic Device), field programmable gate array (FPGA, field-Programmable Gate Array) or other electronic component.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a computer device 201 according to an embodiment of the application. The computer device may include: the communication interface 601, the memory 602 and the processor 603 are connected by one or more communication buses for enabling connected communication between these components. The communication interface 601 may include a standard wired interface, a wireless interface (e.g., WIFI interface). The memory 602 may include volatile memory (RAM), such as random-access memory (RAM); the memory 602 may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a Solid State Drive (SSD), etc.; the memory 602 may also include a combination of the types of memory described above. The processor 603 may be a central processing unit (central processing unit, CPU). The processor 603 may further comprise a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (programmable logic device, PLD), or the like. The PLD may be a field-programmable gate array (FPGA), general-purpose array logic (generic array logic, GAL), or the like.
Optionally, the memory 602 is further configured to store program instructions, which the processor 603 may also call to implement the asset data querying method of the present application.
In some embodiments, the processor 603 invokes program instructions stored in the memory 602 to implement: responding to a first query instruction of real-time data of a first asset, and calling an interface query mode to acquire the real-time data of the first asset from a first transaction system corresponding to the first asset; in response to not obtaining real-time data of the first asset from the first transaction system and the degradation process being initiated, invoking a database query to obtain real-time data of the first asset from the database; in response to not obtaining real-time data of the first asset from the database, displaying, at the asset display interface, a query result of the real-time data of the first asset as a zero asset value or a degradation value; or, in response to obtaining real-time data of the first asset from the database, displaying the real-time data of the first asset on the asset display interface;
wherein the degradation value is used to indicate that the real-time data query of the first asset failed; the first asset is any one of a plurality of assets held by the target object, and the first asset is stock, fund combination, option, two-fuse or cash.
In some embodiments, the processor 603 may call the program instructions, specifically implementing: in response to the failure of the first transaction system to obtain real-time data of the first asset due to interface traffic anomalies and degradation is initiated, invoking a database query to obtain real-time data of the first asset from the database; or in response to the reason that the real-time data of the first asset is not acquired from the first transaction system being an interface business anomaly, the interface downgrading anomaly and the downgrading process being started, invoking a database query mode to acquire the real-time data of the first asset from the database.
In some embodiments, the processor 603 may call the program instructions, specifically implementing: responding to the reason that the real-time data of the first asset is not acquired from the database to be abnormal in the database business, and displaying the query result of the first asset as a zero asset value on the asset display interface; or, in response to the reason that the real-time data of the first asset is not acquired from the database, displaying a query result of the first asset as a degradation value on the asset display interface.
In some embodiments, the processor 603 may call the program instructions, specifically implementing: and in response to the system anomaly not occurring and the real-time data of the first asset being acquired from the database, displaying the real-time data of the first asset on the asset display interface.
In some embodiments, the processor 603 may also call the program instructions to implement: and in response to the system anomaly not occurring and the real-time data of the first asset being acquired from the first trading system, displaying the real-time data of the first asset on the asset display interface.
In some embodiments, the processor 603 may also call the program instructions to implement: in response to the occurrence of a system anomaly, the asset data query is stopped.
In some embodiments, the processor 603 may also call the program instructions to implement: and in response to not acquiring the real-time data of the first asset from the first transaction system and the degradation process not being started, displaying a query result of the first asset as a zero asset value on the asset display interface.
In some embodiments, the processor 603 may also call the program instructions to implement: responding to a query instruction of the historical data of the first asset, and calling a database query mode to acquire the historical data of the first asset from a database; in response to not obtaining the historical data of the first asset from the database, further displaying, at the asset display interface, that the query result of the historical data of the first asset is a zero asset value or a degradation value; alternatively, the historical data of the first asset is also displayed at the asset display interface in response to obtaining the historical data of the first asset from the database.
It should be understood that the principle and advantages of the computer device 201 described in the embodiments of the present application to solve the problems are similar to those of the embodiments of fig. 3-4 of the present application and the foregoing, and are not repeated herein for brevity.
Accordingly, the embodiment of the present application also provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to implement the method in the embodiment of the present application.
Accordingly, embodiments of the present application also provide a computer program product comprising a computer program or computer instructions which, when executed by a processor, implement the methods of embodiments of the present application.
Accordingly, embodiments of the present application provide a computer program comprising computer instructions stored in a computer-readable storage medium, from which computer instructions are read by a processor of a computer device, the processor executing the computer instructions to cause the computer device to perform a method in an embodiment of the present application.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of combinations of actions, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may take other orders or may be performed simultaneously in accordance with the present application. Further, it should be understood by those skilled in the art that the embodiments described in the specification are all preferred embodiments, and the acts and modules involved are not necessarily required for the present application.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored on a computer readable storage medium, which when executed may comprise the steps of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), or the like.
The foregoing disclosure is illustrative of the present application and is not to be construed as limiting the scope of the application, which is defined by the appended claims.

Claims (10)

1. A method of querying asset data, comprising:
responding to a query instruction of real-time data of a first asset, and calling an interface query mode to acquire the real-time data of the first asset from a first transaction system corresponding to the first asset;
in response to not obtaining real-time data of the first asset from the first transaction system and degradation processing being initiated, invoking a database query to obtain real-time data of the first asset from a database;
in response to not obtaining real-time data of the first asset from the database, displaying, at an asset display interface, that a query result of the real-time data of the first asset is a zero asset value or a degradation value; the degradation value is used to indicate that the real-time data query of the first asset failed;
or, in response to obtaining real-time data of the first asset from the database, displaying the real-time data of the first asset on an asset display interface;
the first asset is any one of a plurality of assets held by a target object, and the first asset is stocks, funds, fund combinations, options, two-fuse or cash.
2. The method of claim 1, wherein invoking the database query to retrieve real-time data of the first asset from a database in response to not retrieving real-time data of the first asset from the first transaction system and degradation processing being initiated comprises:
In response to the reason that the real-time data of the first asset is not acquired from the first transaction system being interface business abnormality and degradation processing being started, invoking a database query mode to acquire the real-time data of the first asset from a database;
or in response to the reason that the real-time data of the first asset is not acquired from the first transaction system being that the interface service is not abnormal, the interface is degraded abnormally and the degradation process is started, a database query mode is called to acquire the real-time data of the first asset from a database.
3. The method of claim 1, wherein the displaying, at an asset display interface, the query result for the first asset as a zero asset value or a degradation value in response to not obtaining real-time data for the first asset from the database comprises:
responding to the reason that the real-time data of the first asset is not acquired from the database to be abnormal in database business, and displaying the query result of the first asset as a zero asset value on an asset display interface;
or, in response to a database degradation anomaly due to the real-time data of the first asset not being acquired from the database, displaying a query result of the first asset as a degradation value on an asset display interface.
4. The method of claim 1, wherein displaying the real-time data of the first asset at an asset display interface in response to acquiring the real-time data of the first asset from the database comprises:
and in response to the system abnormality not occurring and the real-time data of the first asset being acquired from the database, displaying the real-time data of the first asset on an asset display interface.
5. The method according to any one of claims 1-4, further comprising:
displaying real-time data of the first asset on the asset display interface in response to the system anomaly not occurring and the real-time data of the first asset being acquired from the first trading system;
alternatively, the asset data query is stopped in response to the occurrence of a system anomaly.
6. The method according to any one of claims 1-4, further comprising:
and in response to the first transaction system not acquiring the real-time data of the first asset and the degradation process not being started, displaying a query result of the first asset as the zero asset value on the asset display interface.
7. The method according to any one of claims 1-4, further comprising:
Responding to a query instruction of the historical data of the first asset, and calling the database query mode to acquire the historical data of the first asset from the database;
in response to not obtaining the historical data of the first asset from the database, further displaying, at the asset display interface, a query result of the historical data of the first asset as the zero asset value or the degradation value;
alternatively, in response to obtaining the historical data of the first asset from the database, the historical data of the first asset is also displayed on the asset display interface.
8. An asset data querying device, comprising:
the query unit is used for responding to a query instruction of real-time data of a first asset, and calling an interface query mode to acquire the real-time data of the first asset from a first transaction system corresponding to the first asset; in response to not obtaining real-time data of the first asset from the first transaction system and degradation processing being initiated, invoking a database query to obtain real-time data of the first asset from a database;
the display unit is used for responding to the fact that the real-time data of the first asset is not acquired from the database, and displaying that the query result of the real-time data of the first asset is zero asset value or degradation value on an asset display interface; the degradation value is used to indicate that the real-time data query of the first asset failed; or, in response to obtaining real-time data of the first asset from the database, displaying the real-time data of the first asset on an asset display interface;
The first asset is any one of a plurality of assets held by a target object, and the first asset is stocks, funds, fund combinations, options, two-fuse or cash.
9. A computer device comprising a processor, a memory and a computer program or instructions stored on the memory, wherein the processor executes the computer program or instructions to implement the steps of the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that it stores a computer program or instructions which, when executed, implement the steps of the method of any one of claims 1-7.
CN202311099385.7A 2023-08-30 2023-08-30 Asset data query method and device and computer equipment Active CN116821192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311099385.7A CN116821192B (en) 2023-08-30 2023-08-30 Asset data query method and device and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311099385.7A CN116821192B (en) 2023-08-30 2023-08-30 Asset data query method and device and computer equipment

Publications (2)

Publication Number Publication Date
CN116821192A true CN116821192A (en) 2023-09-29
CN116821192B CN116821192B (en) 2023-11-24

Family

ID=88122501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311099385.7A Active CN116821192B (en) 2023-08-30 2023-08-30 Asset data query method and device and computer equipment

Country Status (1)

Country Link
CN (1) CN116821192B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009245370A (en) * 2008-03-31 2009-10-22 Dainippon Printing Co Ltd Search mediation system
CN111190950A (en) * 2019-10-31 2020-05-22 腾讯科技(深圳)有限公司 Asset retrieval method and device
CN111800434A (en) * 2020-07-22 2020-10-20 睿智合创(北京)科技有限公司 Multi-channel asset docking platform and working method thereof
CN112561708A (en) * 2020-12-07 2021-03-26 泰康保险集团股份有限公司 Method, device, equipment and computer readable medium for processing data
CN112597202A (en) * 2020-12-28 2021-04-02 江苏苏宁物流有限公司 Data query method and device, computer equipment and storage medium
US11334950B1 (en) * 2019-07-15 2022-05-17 Innovator Capital Management, LLC System and method for managing data for delivering a pre-calculated defined investment outcome in an exchange-traded fund
CN115936880A (en) * 2023-01-05 2023-04-07 深圳市荣亿达科技发展有限公司 Real-time stock information transaction data processing system
CN116414854A (en) * 2023-02-28 2023-07-11 杭州小电科技股份有限公司 Data asset query method, device, computer equipment and storage medium
CN116467352A (en) * 2023-04-27 2023-07-21 中国银行股份有限公司 Transaction inquiry system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009245370A (en) * 2008-03-31 2009-10-22 Dainippon Printing Co Ltd Search mediation system
US11334950B1 (en) * 2019-07-15 2022-05-17 Innovator Capital Management, LLC System and method for managing data for delivering a pre-calculated defined investment outcome in an exchange-traded fund
CN111190950A (en) * 2019-10-31 2020-05-22 腾讯科技(深圳)有限公司 Asset retrieval method and device
CN111800434A (en) * 2020-07-22 2020-10-20 睿智合创(北京)科技有限公司 Multi-channel asset docking platform and working method thereof
CN112561708A (en) * 2020-12-07 2021-03-26 泰康保险集团股份有限公司 Method, device, equipment and computer readable medium for processing data
CN112597202A (en) * 2020-12-28 2021-04-02 江苏苏宁物流有限公司 Data query method and device, computer equipment and storage medium
CN115936880A (en) * 2023-01-05 2023-04-07 深圳市荣亿达科技发展有限公司 Real-time stock information transaction data processing system
CN116414854A (en) * 2023-02-28 2023-07-11 杭州小电科技股份有限公司 Data asset query method, device, computer equipment and storage medium
CN116467352A (en) * 2023-04-27 2023-07-21 中国银行股份有限公司 Transaction inquiry system

Also Published As

Publication number Publication date
CN116821192B (en) 2023-11-24

Similar Documents

Publication Publication Date Title
US11734759B2 (en) System and method for a risk check
US20170293980A1 (en) System and method for managing processing resources of a computing system
US10963888B2 (en) Payment complaint method, device, server and readable storage medium
CN110310170A (en) Order processing method, apparatus, electronic equipment and storage medium
US9613378B2 (en) Distributed ranking and matching of messages
CA2930158C (en) Data conversion and distribution systems
CN111026367A (en) Micro-service arranging method and device, terminal equipment and storage medium
CN112381645A (en) Information processing method and device for bill transaction
US11094011B2 (en) Actionable contextualized alerts within an order management system
CN112181628B (en) Resource transfer method, device, system and electronic equipment
US20110106712A1 (en) Cost-Aware Service Aggregation
CN108230149B (en) System and method for accelerating financial transaction based on SOC FPGA
CN116821192B (en) Asset data query method and device and computer equipment
US20220012807A1 (en) Dynamic Format Electronic Confirmations
CN116051106A (en) Abnormal order processing method and device
CN114637592A (en) Data sorting method, device and system, electronic equipment and storage medium
CN112463338A (en) Accumulation fund service processing method and device, electronic equipment and medium
CN111506340A (en) Business rule information processing method, device and system
CN112036898B (en) Payment mode determining method and device, electronic equipment and storage medium
CN115496583A (en) Asynchronous accounting data processing method, device, equipment and storage medium
CN117611180A (en) Service processing system, method, device and storage medium
CN112365346A (en) Method, device and storage medium for determining and displaying stock trading entrustment order
CN115775148A (en) Hospital information system payment processing method, device and equipment based on message machine
EP4150551A1 (en) Systems and processes for peer-to-peer financial instrument transactions
CN115409624A (en) Virtual resource transaction processing method based on block chain and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant