CN114117187A - Data query method and related device - Google Patents

Data query method and related device Download PDF

Info

Publication number
CN114117187A
CN114117187A CN202210082818.7A CN202210082818A CN114117187A CN 114117187 A CN114117187 A CN 114117187A CN 202210082818 A CN202210082818 A CN 202210082818A CN 114117187 A CN114117187 A CN 114117187A
Authority
CN
China
Prior art keywords
determining
service data
query
data
identifier
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
CN202210082818.7A
Other languages
Chinese (zh)
Other versions
CN114117187B (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.)
Shenzhen Xishima Data Technology Co ltd
Original Assignee
Shenzhen Xishima Data Technology 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 Shenzhen Xishima Data Technology Co ltd filed Critical Shenzhen Xishima Data Technology Co ltd
Priority to CN202210082818.7A priority Critical patent/CN114117187B/en
Publication of CN114117187A publication Critical patent/CN114117187A/en
Application granted granted Critical
Publication of CN114117187B publication Critical patent/CN114117187B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a data query method and a related device, wherein the method comprises the following steps: acquiring a data query request input by a user, wherein the data query request is used for querying service data corresponding to a service object; determining a query identifier corresponding to the data query request; determining a service data state corresponding to the query identifier according to the query identifier and a preset service data state table, wherein the service data state is used for indicating whether the service data exists or not; and under the condition that the service data state indicates that the service data exists, inquiring the service data according to the inquiry identification. By adopting the embodiment of the application, the data query efficiency is improved, and meanwhile, the accuracy of data query is ensured.

Description

Data query method and related device
Technical Field
The application relates to the technical field of general data processing in the Internet industry, in particular to a data query method and a related device.
Background
Financial data relates to multiple aspects of the financial field, such as stocks, options, futures, and the like, and data records from opening to closing each trading day. Along with economic development, the data volume of financial data is increasing day by day, and meanwhile, the demand of users for quick and accurate query of mass data is higher and higher.
At present, data query is mainly performed by a way that a server directly accesses a database. However, because the amount of data stored in the database is large, the efficiency of data query in a manner of directly querying data in the database is low, the accuracy of data query is difficult to ensure, and the user experience is poor.
Disclosure of Invention
The embodiment of the application provides a data query method and a related device, which are beneficial to improving the data query efficiency and ensuring the accuracy of data query.
In a first aspect, an embodiment of the present application provides a data query method, including:
acquiring a data query request input by a user, wherein the data query request is used for querying service data corresponding to a service object;
determining a query identifier corresponding to the data query request;
determining a service data state corresponding to the query identifier according to the query identifier and a preset service data state table, wherein the service data state is used for indicating whether the service data exists or not;
and under the condition that the service data state indicates that the service data exists, inquiring the service data according to the inquiry identification.
In a second aspect, an embodiment of the present application provides a data query apparatus, including: an obtaining unit, a determining unit and a querying unit, wherein,
the acquiring unit is used for acquiring a data query request input by a user, wherein the data query request is used for querying service data corresponding to a service object;
the determining unit is used for determining a query identifier corresponding to the data query request;
the determining unit is further configured to determine a service data state corresponding to the query identifier according to the query identifier and a preset service data state table, where the service data state is used to indicate whether the service data exists;
and the query unit is used for querying the service data according to the query identifier under the condition that the service data state indicates that the service data exists.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and the program includes instructions for executing the steps in the first aspect of the embodiment of the present application.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program causes a computer to execute some or all of the steps described in the first aspect of the embodiments of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, where the computer program is operable to cause a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
The embodiment of the application has the following beneficial effects:
it can be seen that the data query method and the related device described in the embodiments of the present application can obtain a data query request input by a user, determine a query identifier corresponding to the data query request, determine a service data state corresponding to the query identifier according to the query identifier and a preset service data state table, and query service data according to the query identifier when the service data state indicates that service data exists; therefore, by inquiring the identifier and the preset service data state table, before inquiring the service data, the service data state is determined, and under the condition that the service data state indicates that the service data exists, the service data is inquired according to the inquiry identifier, so that the data inquiry efficiency is improved, and meanwhile, the accuracy of data inquiry is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1A is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 1B is a schematic flowchart of a data query method provided in an embodiment of the present application;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 3A is a block diagram illustrating functional units of a data query device according to an embodiment of the present disclosure;
FIG. 3B is a block diagram illustrating functional units of a data query device according to an embodiment of the present disclosure;
fig. 3C is a block diagram of functional units of a data query device according to an embodiment of the present application.
Detailed Description
The terms "first," "second," and the like in the description and claims of the present application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions of the present application better understood, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The key concepts and terms referred to in this application include, but are not limited to, the following:
(1) the business object may refer to business corresponding to the financial field such as stock, futures, interest rate, credit, exchange rate, etc.
(2) The service data state table may be used to query a service data state corresponding to the service object. The service data state table may be in the form of an array, a table, a formula, a function, and the like, and is not limited herein.
(3) The electronic device may be a portable electronic device, such as a cell phone, a tablet computer, a wearable electronic device with wireless communication capabilities (e.g., a smart watch), etc., that includes other functionality, such as personal digital assistant and/or music player functionality. Exemplary embodiments of the portable electronic device include, but are not limited to, portable electronic devices that carry an IOS system, an Android system, a Microsoft system, or other operating system. The portable electronic device may also be other portable electronic devices such as a Laptop computer (Laptop) or the like. It should also be understood that in other embodiments, the electronic device may not be a portable electronic device, but may be a desktop computer. The electronic device may further include a server, etc., which is not limited herein.
Currently, financial data relates to multiple aspects of stocks, options, futures, etc. in the financial field, and data records from opening to closing every trading day. Along with economic development, the data volume of financial data is increasing day by day, and meanwhile, the demand of users for quick and accurate query of mass data is higher and higher. Data query is currently mainly performed by means of direct access to the database by the server. However, because the amount of data stored in the database is large, the efficiency of data query in a manner of directly querying data in the database is low, the accuracy of data query is difficult to ensure, and the user experience is poor.
In view of the above problems, the present application provides a data query method and related apparatus, which are described in detail below with reference to the accompanying drawings.
Referring to fig. 1A, fig. 1A is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. The electronic device comprises a processor and a memory, etc. Wherein the memory is connected with the processor. The Processor is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, executes various functions and processes data of the electronic device by running or executing software programs and/or modules stored in the memory and calling the data stored in the memory, thereby performing overall monitoring on the electronic device, and the Processor may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU) or a Network Processing Unit (NPU).
Further, the processor may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor.
The memory is used for storing software programs and/or modules, and the processor executes various functional applications of the electronic device by running the software programs and/or modules stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, a software program required for at least one function, and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
Referring to fig. 1B, fig. 1B is a schematic flowchart of a data query method according to an embodiment of the present application, and as shown in the drawing, the data query method is applied to the electronic device shown in fig. 1A, and includes:
step 101, acquiring a data query request input by a user.
The data query request is used for querying business data corresponding to the business object.
The data query method provided in the embodiment of the present application may be applied to a server, and may also be applied to a user end device, which is not limited herein. In the case that the embodiment of the present application is applied to a server, step 101 may refer to the server receiving a data query request sent by a client device. In the case that the embodiment of the present application is applied to a user end device, step 101 may refer to the user end device determining a data query request according to a user operation.
And 102, determining a query identifier corresponding to the data query request.
The query identifier may be composed of at least one identifier of an arabic numeral, a roman numeral, an english letter, a latin letter, a symbol, a greek letter, and the like, which is not limited herein.
And 103, determining a service data state corresponding to the query identifier according to the query identifier and a preset service data state table.
Wherein, the service data state is used for indicating whether the service data exists. The preset service data state table may be stored in the electronic device in advance, or may be defined by a manager or a user, which is not limited herein. The preset service data state table may be in the form of an array, a table, a formula, a function, and the like, and is not limited herein.
And 104, under the condition that the service data state indicates that the service data exists, inquiring the service data according to the inquiry identification.
In this case, when the embodiment of the present application is applied to a server, step 104 may refer to the server querying the service data according to the query identifier. In the case that the embodiment of the present application is applied to the client device, step 104 may refer to the client device requesting the server to query the service data according to the query identifier.
In a specific implementation, the electronic device may obtain a data query request input by a user, determine a query identifier corresponding to the data query request according to the data query request, and determine a service data state corresponding to the query identifier according to the query identifier and a preset service data state table.
And under the condition that the service data state indicates that the service data exists, inquiring the service data according to the inquiry identifier, and feeding back the inquired service data to the user side equipment. And under the condition that the service data state indicates that no service data exists, feeding back a query result of service data corresponding to the data query request which is not queried to the user end equipment.
Therefore, by inquiring the identifier and the preset service data state table, before inquiring the service data, the service data state is determined, and under the condition that the service data state indicates that the service data exists, the service data is inquired according to the inquiry identifier, so that the data inquiry efficiency is improved, and meanwhile, the accuracy of data inquiry is ensured.
In one possible example, the data query request includes a query date and a business object name, the query identifier includes a first sub identifier and a second sub identifier, and the determining 102 a query identifier corresponding to the data query request may include the following steps:
step 1021, determining the first sub-identifier according to the query date;
step 1022, determining the second sub-identifier according to the business object name;
step 1023, determining the query identity according to the first sub-identity and the second sub-identity.
The query date may be in the form of year, month, day, month, year, month, day, year, etc., or a combination of month and date, which is not limited herein. Illustratively, where the query date is a combination of month and date, the electronic device may default to the query date to the current year.
The business object name may be a specific name of a business object such as stock, futures, interest rate, credit, exchange rate, etc., or a code corresponding to the business object, or a combination of the specific name and the code, which is not limited herein.
The first sub-mark and the second sub-mark may be formed by at least one mark of arabic numerals, roman numerals, english letters, latin letters, symbols, greek letters, and the like, which is not limited herein.
In a specific implementation, the first sub-identifier may be determined as follows: determining a starting date, determining the number of days of the difference between the starting date and the inquiry date, and determining a first sub identifier corresponding to the inquiry date according to the number of days of the difference. The start date may be pre-stored in the electronic device, or may be defined by a manager or a user, which is not limited herein.
For example, if the start date is 1970, month 1 and day 1, and the query date is the day 1, month 1 and day 1970, the first sub-flag corresponding to the day 1, month 1 and day 1970 is determined to be 1, based on the number of days 0 in which the start date and the query date are different. By analogy, the first sub-identifier corresponding to the day of 1/2/1970 is 19000 for 2 … … 2022, for 1/7/2022. In this way, the first sub identifier is determined by calculating the number of days of difference between the starting date and the query date, which is helpful for ensuring the correspondence between the query date and the first sub identifier and is helpful for ensuring the accuracy of determining the service data state according to the query identifier subsequently.
The first sub-identity may also be determined by: determining the year, month and date corresponding to the query date to obtain a target year, a target month and a target date; determining a year difference value of the target year and a preset year, and if the year difference value is a positive number, determining the year difference value as a first part in the first sub-identifier; if the year difference is negative, 0 is used for representing a negative sign, and the absolute value of the difference between 0 and the year is determined as a first part in the first sub-identifier; determining a second part in the first sub-identifier according to the target month; determining a third part in the first sub-identifier according to the target date; a first sub-identity is determined from the first portion, the second portion, and the third portion. The preset year may be pre-stored in the electronic device, or may be defined by a manager or a user, which is not limited herein.
For example, if the query date is 2021 year, 8 month, 11 day, the target year is 2021, the target month is 8, and the target date is 11. If the preset year is 2000, the year difference is 21, the first part of the first sub-identifier is 21, the second part determined according to the target month 8 is 8, and the third part determined according to the target date is 11, and the first sub-identifier is 21811. If the preset year is 2022 years, the year difference is-1, a minus sign is represented by 0 in the first part of the first sub-mark, and the first part is determined to be 01, then the first sub-mark is 01811. Therefore, the first sub-identifier is determined by determining the year difference, the target month and the target date, so that the correspondence between the query date and the first sub-identifier is favorably ensured, and the accuracy of the subsequent determination of the service data state according to the query identifier is favorably ensured.
In addition, if the year in the query date is later than the current year, or the month value in the query date is greater than 12, or the date value in the query date is greater than the maximum date number corresponding to the month in the query date, a result that the query date is wrong is fed back to the user end device. Therefore, when the query date input by the user is wrong, the error is fed back to the user, the user can correct the error in time, and the user experience can be improved.
The second sub-identity may be determined by: determining a code corresponding to the business object according to the business object name to obtain a code number; intercepting the number in a preset range from the code number as a second sub-identifier, wherein the preset range is as follows: starting from the first digit of the code number which is not 0, and ending with the last digit of the code number.
For example, the stock code of stock a is 0080780, the code number is 0080780, and the range from the first digit of the code number that is not 0 to the last digit is: 80780, the second sub-symbol corresponding to the A stock is 80780. Therefore, the second sub-identifier is determined through the code corresponding to the business object, which is beneficial to ensuring the correspondence between the business object name and the second sub-identifier and is beneficial to ensuring the accuracy of the subsequent determination of the business data state according to the query identifier.
The second sub-identity may also be determined by: the electronic device may store a corresponding relationship between the business object name and the second sub-identifier in advance, for example, the second sub-identifier corresponding to the business object a is 1, the second sub-identifier corresponding to the business object b is 2 … …, and so on.
For example, a user may input a corresponding query date and stock name to query the market data of the japanese beetle stock, i.e., japanese beetle stock, japanese beetle, n.1.7.1.2022. The electronic device may determine 19000 as a first sub-identifier corresponding to the query date according to the query date and the start date input by the user, determine 10 as a second sub-identifier corresponding to the stock name according to the stock name input by the user, and determine 1900010 as the query identifier according to the first sub-identifier 19000 and the second sub-identifier 10.
It can be seen that, in the embodiment of the present application, the electronic device may determine the first sub identifier according to the query date, determine the second sub identifier according to the name of the business object, and determine the query identifier according to the first sub identifier and the second sub identifier. Therefore, the first sub-identifier and the second sub-identifier are respectively determined according to the query date and the business object name, and the query identifier is determined according to the first sub-identifier and the second sub-identifier, so that the correspondence between the query identifier and the data query request is favorably ensured, and the accuracy of subsequently determining the business data state according to the query identifier is favorably ensured.
In a possible example, the step 103 of determining the service data state corresponding to the query identifier according to the query identifier and the preset service data state table may include the following steps:
step 1031, determining a column corresponding to the first sub-identifier in the two-dimensional array to obtain a target column;
step 1032, determining a first target unit according to the first row and the target column of the two-dimensional array;
step 1033, querying a first target state value corresponding to the first target unit;
step 1034, determining a row corresponding to the second sub identifier in the two-dimensional array to obtain a target row when the first target state value is the first numerical value;
step 1035, determining a second target unit according to the target row and the target column;
step 1036, querying a second target state value corresponding to the second target unit;
step 1037, determining that the service data state indicates that the service data exists, if the second target state value is the first value.
The first target state value is used for indicating whether the inquiry date is a transaction date. The second target state value is used for indicating the business data state of the business object at the query date.
The first numerical value may be any one or more of arabic numerals, roman numerals, english letters, latin letters, symbols, greek letters, and other symbols, such as 0, 1, a1, and is not limited herein. It will be appreciated that representing the first value as an arabic numeral helps to reduce memory footprint.
In a specific implementation, the electronic device may determine the service data state corresponding to the query identifier by querying the two-dimensional array. The two-dimensional array is shown in table 1.
TABLE 1A two-dimensional array
1 1 1
1 1 1
0 1 0
0 0 1
1 1 1
For example, the first sub-identifier determined by the query date is 19000, the second sub-identifier determined by the stock name is 10, and the query identifier is 1900010. And finding a 19000 th column in the two-dimensional array according to the first sub-identifier to obtain a target column, wherein the unit determined according to the 1 st row and the 19000 th column of the two-dimensional array is the first target unit. And inquiring a first target state value stored in the first target unit, finding an 11 th row in the two-dimensional array according to the second sub-identifier 10 under the condition that the first target state value is 1 to obtain a target row, determining a second target unit according to the 11 th row and the 19000 th column of the two-dimensional array, and inquiring a second target state value corresponding to the second target unit. And under the condition that the second target state value is 1, determining that the service data corresponding to the service data state indication query identifier exists.
It can be seen that, in the embodiment of the present application, the electronic device may determine a column corresponding to the first sub-identifier in the two-dimensional array, so as to obtain a target column; determining a first target unit according to a first row and a target column of the two-dimensional array; inquiring a first target state value corresponding to the first target unit; determining a row corresponding to the second sub-identifier in the two-dimensional array under the condition that the first target state value is the first numerical value to obtain a target row; determining a second target cell according to the target row and the target column; inquiring a second target state value corresponding to a second target unit; and under the condition that the second target state value is the first value, determining that the service data state indicates that the service data exists. Therefore, before the business data is inquired, the business data state is determined through the inquiry identifier and the two-dimensional array, and under the condition that the business data state indicates that the business data exists, the business data is inquired according to the inquiry identifier, so that the data inquiry efficiency is improved, and meanwhile, the accuracy of data inquiry is ensured.
In a possible example, in step 103, the determining, according to the query identifier and a preset service data state table, a service data state corresponding to the query identifier may further include the following steps:
step 1038, determining that the service data status indicates that the service data does not exist when the first target status value is a second numerical value or the second target status value is the second numerical value.
The second numerical value may be any one or more of arabic numerals, roman numerals, english letters, latin letters, symbols, greek letters, and other symbols, such as 0, 1, a1, and is not limited herein. It will be appreciated that representing the second value as an arabic number helps to reduce memory footprint.
For example, referring to table 1 again, if the first target state value is 0 in the first target unit determined according to the 1 st row and the 19000 th column of the two-dimensional array, it may be determined that the service data corresponding to the query identifier is not present in the service data state indication.
For another example, if the first target state value stored in the first target unit is 1, but the second target state value is 0 in the second target unit determined according to the 11 th row and the 19000 th column of the two-dimensional array, it may be determined that the service data state indicates that the service data corresponding to the query identifier does not exist.
Therefore, before business data is inquired, the business data state is determined firstly through the inquiry identifier and the two-dimensional array, under the condition that the business data state indicates that no business data exists, the electronic equipment can directly feed back the inquiry result of the business data corresponding to the data inquiry request to the user side equipment, the inquiry data are prevented from being directly polled in the database, the phenomenon that the data inquiry waiting time is long is avoided, the performance of the database is improved, the stability of data inquiry service is ensured, the two-dimensional array can quickly realize accurate inquiry through the inquiry identifier, and the accuracy and the high efficiency of the data inquiry are ensured.
In one possible example, before determining the first target cell according to the first row and the target column of the two-dimensional array in step 1032, the method further includes:
step 10311, judging whether the business data state is associated with a date type, wherein the date type comprises a transaction date and a non-transaction date;
step 10312, if the business data state is associated with the date type, executing the step of determining a first target unit according to the first row and the target column of the two-dimensional array.
For example, if the date type of financial data such as stock market data and futures market data is a non-trading date, the business data states corresponding to the stock market data and the futures market data are both non-existent business data. If the date type is a transaction date, corresponding business data may exist. Therefore, the business data state of financial data such as stock market data, futures market data, etc. is associated with the date type.
In the case that the business data status is associated with the date type, as mentioned above, a first target status value corresponding to the first target unit may be determined. And if the first target state value is the second value, determining that no service data exists. And if the first target state value is the first numerical value, determining a second target state value. And if the second target state value is the first value, determining that the service data exists. And if the second target state value is the second numerical value, determining that no service data exists.
It can be seen that in the embodiment of the application, whether the business data state is associated with the date type is judged, wherein the date type comprises a transaction date and a non-transaction date; and if the business data state is associated with the date type, determining a first target unit according to a first row and a target column of the two-dimensional array. Therefore, when the service data state is associated with the date type, the first target state value corresponding to the first target unit is determined, and under the condition that the first target state value indicates that the query date is a non-transaction date, the electronic device can directly feed back a query result of service data corresponding to the data query request which is not queried to the user end device, so that query data are prevented from being directly queried in the database, the phenomenon of long data query waiting time is avoided, the performance of the database is improved, and the stability of data query service is ensured.
In a possible example, if the service data status is not associated with the date type, in step 1031, the column corresponding to the first sub identifier is determined in the two-dimensional array, and after a target column is obtained, the method further includes:
step 10321, determining a row corresponding to the second sub identifier in the two-dimensional array to obtain a target row;
step 10322, determining the second target cell according to the target row and the target column;
step 10323, querying a second target status value corresponding to the second target unit, where the second target status value is used to indicate the status of the business data of the business object on the querying date;
step 10324, determining that the service data status indicates that the service data exists, if the second target status value is the first value.
For example, financial data such as interest rate quotation data, credit quotation data, exchange rate quotation data, and the like, whether the date type is a transaction date or a non-transaction date, and the service data state corresponding to the interest rate quotation data, the credit quotation data, and the exchange rate quotation data may or may not be the corresponding service data. Therefore, the business data state of financial data such as interest rate quotation data, credit quotation data, exchange rate quotation data and the like is not related to the date type.
And under the condition that the business data state is not associated with the date type, determining a second target unit according to the target row and the target column, and inquiring a second target state value corresponding to the second target unit. And if the second target state value is the first value, determining that the service data exists. And if the second target state value is the second numerical value, determining that no service data exists.
It can be seen that, in the embodiment of the present application, a column corresponding to the first sub-identifier is determined in the two-dimensional array, and a target column is obtained; determining a row corresponding to the second sub-identifier in the two-dimensional array to obtain a target row; determining a second target cell according to the target row and the target column; inquiring a second target state value corresponding to the second target unit, wherein the second target state value is used for indicating the service data state of the service object on the inquiry date; and under the condition that the second target state value is the first value, determining that the service data state indicates that the service data exists. Therefore, when the service data state is not associated with the date type, the target column is directly determined according to the first sub-identifier, the target row is determined according to the second sub-identifier, the second target unit is determined according to the target column and the target row, the service data state is determined according to the second target state value corresponding to the second target unit, and under the condition that the second target state value indicates that no service data exists, the electronic equipment can directly feed back the query result of the service data corresponding to the data query request which is not queried to the user end equipment, so that the query data is prevented from being directly queried in the database, the phenomenon of long data query waiting time is avoided, the database performance is improved, and the stability of the data query service is ensured.
In one possible example, the two-dimensional array may be constructed by:
step 01, determining a column corresponding to the current date in the first row of the two-dimensional array to obtain a current date column;
step 02, determining a first unit according to the first row and the current date column;
step 03, if the current date is a transaction date, determining a first state value corresponding to the first unit as the first numerical value;
step 04, if the current date is a non-transaction date, determining the first state value as the second numerical value;
step 05, determining the number of rows of the two-dimensional array from the second row of the two-dimensional array according to the number of the business objects, wherein each business object corresponds to one row of the two-dimensional array;
step 06, if the current business object has the business data on the current date, determining a second unit according to the current business object row and the current date column corresponding to the current business object, and determining a second state value corresponding to the second unit as the first numerical value;
step 07, if the current business object does not have the business data in the current date, determining the second unit according to the current business object line and the current date column, and determining the second state value as the second numerical value.
The first state value may be used to indicate whether the current date is a transaction date, and the second state value may be used to indicate whether the current business object has business data on the current date.
In a specific implementation, referring again to table 1, in the first row of the two-dimensional array, each column represents each natural day. If the natural day corresponding to the pth column (p is a positive integer greater than 0) is a trading day, for example, monday of a non-legal holiday, the corresponding first unit is determined according to the pth column in the first row, and the first state value corresponding to the first unit is determined as the first numerical value. And if the natural day corresponding to the pth column is a non-trading day, such as a legal holiday, determining a corresponding first unit according to the pth column in the first row, and determining a first state value corresponding to the first unit as a second value. In addition, if the two-dimensional array stores a plurality of business data of natural days, a plurality of first cells are located in the first row of the two-dimensional array.
And determining the row number of the two-dimensional array from the second row of the two-dimensional array according to the number of the business objects.
For example, when 4794 stocks in 11284 days are counted, the number of rows in the two-dimensional array is 4794+1= 4795. 4794 the 1 st stock on the 1 st date corresponds to the 1 st column, 2 nd row of the two-dimensional array, the 2 nd stock on the 1 st date corresponds to the 1 st column, 3 rd row of the two-dimensional array, the 1 st stock on the 2 nd date corresponds to the 2 nd column, 1 st row … … of the two-dimensional array, and so on, and the 11284 th stock on the 11284 th date, 4794 th column, 11284 th column, 4795 th row of the two-dimensional array.
If the stock corresponding to the q-th row (q is a positive integer greater than 1) has business data at the current date, determining a second unit according to the q-th row (the current business object row) and the current date column, and determining a second state value corresponding to the second unit as a first numerical value. If the stock corresponding to the q-th row does not have business data at the current date, determining a second unit according to the q-th row (the current business object row) and the current date column, and determining a second state value corresponding to the second unit as a second numerical value. In addition, if the two-dimensional array stores the business data of the business objects of the current date, the current date column of the two-dimensional array has a plurality of second cells.
In this way, the first unit and the second unit are constructed in the two-dimensional array, the first state value is determined according to whether the current date is the transaction date, and the second state value is determined according to the business data state, so that the accuracy of determining the business data state according to the two-dimensional array is guaranteed. And because concrete business data are not stored in the two-dimensional array, the memory occupied by the two-dimensional array is small, so that the time for inquiring data in the two-dimensional array is short, and the data inquiry service is stable.
Optionally, if there is a new business object, the method may further include the following steps:
105, establishing a new row corresponding to the new service object in the two-dimensional array to obtain a new established row;
step 106, if the new service object has the service data in the current date, determining a new unit according to the new line and the current date column, and determining a new state value corresponding to the new unit as the first numerical value;
and 107, if the new service object does not have the service data in the current date, determining the new unit according to the new line and the current date column, and determining the new state value as the second numerical value.
In a specific implementation, if a new business object is generated, for example, a newly released first stock needs to be added to the database, the first stock also needs to be correspondingly added to the two-dimensional array. At this time, a row corresponding to the first stock can be newly built in the two-dimensional array to obtain a newly built row. It is understood that the new row may be any row other than the first row.
And determining a new state value corresponding to the current date column of the A stock according to the business data state of the A stock at the current date. And if the first stock generates service data on the current date, determining a new unit according to the new row and the current date column, and determining a new state value corresponding to the new unit as a first numerical value. And if the A stock does not generate service data on the current date, determining a new state value corresponding to the new unit as a second numerical value.
Therefore, when a new service object is generated, a new row corresponding to the new service object is correspondingly added in the two-dimensional array, and a new state value in the new unit is determined according to the service data state of the new service object, so that a user can be helped to quickly inquire the service data state corresponding to the new service object through the two-dimensional array subsequently, the data inquiry efficiency is helped to be improved, and meanwhile, the accuracy of data inquiry is helped to be ensured.
In one possible example, the method is applied to a server; the querying the service data according to the query identifier may include the following steps:
step 1041, acquiring a preset database;
step 1042, inquiring the service data in the preset database according to the inquiry identification.
The preset database may be a database stored in the server, or may be a database stored in another device communicatively connected to the server, which is not limited herein. And the data in the preset database corresponds to the query identifier. For example, if the first sub-identifier is 1 and the second sub-identifier is 10, the query identifier is 110, and the data in the database corresponding to the query identifier is business data of the stock of 1 st a 1970; the first sub-identifier is 19000, the second sub-identifier is 11, the query identifier is 1900011, and the data in the database corresponding to the query identifier is business data of the second stock of 1 month and 7 days 2022.
It can be seen that, in the embodiment of the present application, since the data in the database corresponds to the query identifier, the service data can be queried in the preset database according to the query identifier, thereby avoiding directly querying the query data in the database, avoiding a phenomenon of long data query waiting time, facilitating to improve the performance of the database, and facilitating to ensure the stability of the data query service.
Referring to fig. 2 in keeping with the above embodiments, fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in the drawing, the electronic device includes a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and in an embodiment of the present application, the programs include instructions for performing the following steps:
acquiring a data query request input by a user, wherein the data query request is used for querying service data corresponding to a service object;
determining a query identifier corresponding to the data query request;
determining a service data state corresponding to the query identifier according to the query identifier and a preset service data state table, wherein the service data state is used for indicating whether the service data exists or not;
and under the condition that the service data state indicates that the service data exists, inquiring the service data according to the inquiry identification.
It can be seen that the electronic device described in the embodiment of the present application may obtain a data query request input by a user, determine a query identifier corresponding to the data query request, determine a service data state corresponding to the query identifier according to the query identifier and a preset service data state table, and query service data according to the query identifier when the service data state indicates that service data exists; therefore, by inquiring the identifier and the preset service data state table, before inquiring the service data, the service data state is determined, and under the condition that the service data state indicates that the service data exists, the service data is inquired according to the inquiry identifier, so that the data inquiry efficiency is improved, and meanwhile, the accuracy of data inquiry is ensured.
In one possible example, the data query request includes a query date and a business object name, the query identifier includes a first sub identifier and a second sub identifier, and in the determining the query identifier corresponding to the data query request, the program includes instructions for:
determining the first sub-identifier according to the query date;
determining the second sub-identifier according to the business object name;
and determining the query identifier according to the first sub identifier and the second sub identifier.
In one possible example, the preset service data state table includes a two-dimensional array, and in the aspect of determining the service data state corresponding to the query identifier according to the query identifier and the preset service data state table, the program includes instructions for executing the following steps:
determining a column corresponding to the first sub-identifier in the two-dimensional array to obtain a target column;
determining a first target unit according to the first row and the target column of the two-dimensional array;
inquiring a first target state value corresponding to the first target unit, wherein the first target state value is used for indicating whether the inquiry date is a transaction date;
determining a row corresponding to the second sub-identifier in the two-dimensional array under the condition that the first target state value is a first numerical value to obtain a target row;
determining a second target unit according to the target row and the target column;
querying a second target state value corresponding to the second target unit, where the second target state value is used to indicate the service data state of the service object on the query date;
and determining that the service data state indicates that the service data exists under the condition that the second target state value is the first numerical value.
In one possible example, in the aspect of determining the service data state corresponding to the query identifier according to the query identifier and a preset service data state table, the program further includes instructions for performing the following steps:
and determining that the service data state indicates that the service data does not exist under the condition that the first target state value is a second numerical value or the second target state value is the second numerical value.
In one possible example, in constructing the two-dimensional array, the program includes instructions for:
determining a column corresponding to the current date in the first row of the two-dimensional array to obtain a current date column;
determining a first cell based on the first row and the current date column;
if the current date is a transaction date, determining a first state value corresponding to the first unit as the first numerical value;
if the current date is a non-transaction date, determining the first state value as the second numerical value;
determining the number of rows of the two-dimensional array according to the number of the business objects from the second row of the two-dimensional array, wherein each business object corresponds to one row in the two-dimensional array;
if the current business object has the business data on the current date, determining a second unit according to the current business object line and the current date column corresponding to the current business object, and determining a second state value corresponding to the second unit as the first numerical value;
and if the current business object does not have the business data on the current date, determining the second unit according to the current business object line and the current date column, and determining the second state value as the second numerical value.
In one possible example, if a new business object exists, the program further includes instructions for performing the steps of:
a row corresponding to the new service object is newly built in the two-dimensional array to obtain a newly built row;
if the new service object has the service data on the current date, determining a new unit according to the new line and the current date column, and determining a new state value corresponding to the new unit as the first numerical value;
and if the new service object does not have the service data on the current date, determining the new unit according to the new line and the current date column, and determining the new state value as the second numerical value.
In one possible example, in said querying said service data according to said query identity, the above program comprises instructions for performing the steps of:
acquiring a preset database, wherein data in the preset database corresponds to the query identifier;
and inquiring the service data in the preset database according to the inquiry identification.
The above description has introduced the solution of the embodiment of the present application mainly from the perspective of the method-side implementation process. It is understood that in order to implement the above functions, it includes corresponding hardware structures and/or software modules for performing the respective functions. Those of skill in the art will readily appreciate that the present application is capable of hardware or a combination of hardware and computer software implementing the various illustrative elements and algorithm steps described in connection with the embodiments provided herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, the functional units may be divided according to the examples in the method, for example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. It should be noted that the division of the unit in the embodiment of the present application is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Referring to fig. 3A, fig. 3A is a block diagram of functional units of a data query apparatus 300 according to an embodiment of the present application, where the apparatus 300 includes: an obtaining unit 301, a determining unit 302 and an inquiring unit 303, wherein,
the acquiring unit 301 is configured to acquire a data query request input by a user, where the data query request is used to query service data corresponding to a service object;
the determining unit 302 is configured to determine a query identifier corresponding to the data query request;
the determining unit 302 is further configured to determine, according to the query identifier and a preset service data state table, a service data state corresponding to the query identifier, where the service data state is used to indicate whether the service data exists;
the querying unit 303 is configured to query the service data according to the query identifier when the service data state indicates that the service data exists.
It can be seen that the data query device described in the embodiment of the present application can obtain a data query request input by a user, determine a query identifier corresponding to the data query request, determine a service data state corresponding to the query identifier according to the query identifier and a preset service data state table, and query service data according to the query identifier when the service data state indicates that service data exists; therefore, by inquiring the identifier and the preset service data state table, before inquiring the service data, the service data state is determined, and under the condition that the service data state indicates that the service data exists, the service data is inquired according to the inquiry identifier, so that the data inquiry efficiency is improved, and meanwhile, the accuracy of data inquiry is ensured.
In a possible example, the data query request includes a query date and a business object name, the query identifier includes a first sub identifier and a second sub identifier, and in the aspect of determining the query identifier corresponding to the data query request, the determining unit 302 is specifically configured to:
determining the first sub-identifier according to the query date;
determining the second sub-identifier according to the business object name;
and determining the query identifier according to the first sub identifier and the second sub identifier.
In a possible example, the preset service data state table includes a two-dimensional array, and in the aspect of determining the service data state corresponding to the query identifier according to the query identifier and the preset service data state table, the determining unit 302 is specifically configured to:
determining a column corresponding to the first sub-identifier in the two-dimensional array to obtain a target column;
determining a first target unit according to the first row and the target column of the two-dimensional array;
inquiring a first target state value corresponding to the first target unit, wherein the first target state value is used for indicating whether the inquiry date is a transaction date;
determining a row corresponding to the second sub-identifier in the two-dimensional array under the condition that the first target state value is a first numerical value to obtain a target row;
determining a second target unit according to the target row and the target column;
querying a second target state value corresponding to the second target unit, where the second target state value is used to indicate the service data state of the service object on the query date;
and determining that the service data state indicates that the service data exists under the condition that the second target state value is the first numerical value.
In a possible example, in the aspect that the service data state corresponding to the query identifier is determined according to the query identifier and a preset service data state table, the determining unit 302 is further specifically configured to:
and determining that the service data state indicates that the service data does not exist under the condition that the first target state value is a second numerical value or the second target state value is the second numerical value.
In a possible example, in the aspect of querying the service data according to the query identifier, the querying unit 303 is specifically configured to:
acquiring a preset database, wherein data in the preset database corresponds to the query identifier;
and inquiring the service data in the preset database according to the inquiry identification.
In one possible example, as shown in fig. 3B, the apparatus 300 may further include, as compared to fig. 3A described above: a construction unit 304, wherein the construction unit 304 is specifically configured to:
determining a column corresponding to the current date in the first row of the two-dimensional array to obtain a current date column;
determining a first cell based on the first row and the current date column;
if the current date is a transaction date, determining a first state value corresponding to the first unit as the first numerical value;
if the current date is a non-transaction date, determining the first state value as the second numerical value;
determining the number of rows of the two-dimensional array according to the number of the business objects from the second row of the two-dimensional array, wherein each business object corresponds to one row in the two-dimensional array;
if the current business object has the business data on the current date, determining a second unit according to the current business object line and the current date column corresponding to the current business object, and determining a second state value corresponding to the second unit as the first numerical value;
and if the current business object does not have the business data on the current date, determining the second unit according to the current business object line and the current date column, and determining the second state value as the second numerical value.
It can be seen that, the data query apparatus provided in the embodiment of the present application can determine a column corresponding to a current date in a first row of a two-dimensional array, and obtain a current date column; determining a first cell based on the first row and the current date column; if the current date is the transaction date, determining a first state value corresponding to the first unit as a first numerical value; if the current date is a non-trading date, determining the first state value as a second numerical value; determining the number of rows of the two-dimensional array from the second row of the two-dimensional array according to the number of the business objects, wherein each business object corresponds to one row in the two-dimensional array; if the current business object has business data on the current date, determining a second unit according to the current business object row and the current date column corresponding to the current business object, and determining a second state value corresponding to the second unit as a first numerical value; and if the current business object does not have business data on the current date, determining a second unit according to the current business object row and the current date column, and determining a second state value as a second numerical value. In this way, the first unit and the second unit are constructed in the two-dimensional array, the first state value is determined according to whether the current date is the transaction date, and the second state value is determined according to the business data state, so that the accuracy of determining the business data state according to the two-dimensional array is guaranteed. And because concrete business data are not stored in the two-dimensional array, the memory occupied by the two-dimensional array is small, so that the time for inquiring data in the two-dimensional array is short, and the data inquiry service is stable.
In one possible example, as shown in fig. 3C, the apparatus 300 may further include, as compared to fig. 3B described above: a new unit 305 is created in which, among other things,
the new creating unit 305 is configured to create a new row corresponding to the new service object in the two-dimensional array, so as to obtain a new created row;
the determining unit 302 is further configured to determine a new unit according to the new line and the current date column when the new service object has the service data on the current date, and determine a new state value corresponding to the new unit as the first numerical value;
the determining unit 302 is further configured to determine the new unit according to the new line and the current date column and determine the new state value as the second numerical value when the new service object does not have the service data on the current date.
Therefore, the data query device provided by the embodiment of the application can create a new row corresponding to a new service object in the two-dimensional array to obtain a new created row; if the new service object has service data on the current date, determining a new unit according to the new line and the current date column, and determining a new state value corresponding to the new unit as a first numerical value; and if the new service object does not have service data on the current date, determining a new unit according to the new row and the current date column, and determining a new state value as a second numerical value. Therefore, when a new service object is generated, a new row corresponding to the new service object is correspondingly added in the two-dimensional array, and a new state value in the new unit is determined according to the service data state of the new service object, so that a user can be helped to quickly inquire the service data state corresponding to the new service object through the two-dimensional array subsequently, the data inquiry efficiency is helped to be improved, and meanwhile, the accuracy of data inquiry is helped to be ensured.
It can be understood that the functions of each program module of the data query apparatus in this embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the relevant description of the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, the computer program enables a computer to execute part or all of the steps of any one of the methods as described in the above method embodiments, and the computer includes a control platform.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any of the methods as described in the above method embodiments. The computer program product may be a software installation package, the computer comprising the control platform.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the above-described division of the units is only one type of division of logical functions, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit may be stored in a computer readable memory if it is implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the above-mentioned method of the embodiments of the present application. And the aforementioned memory comprises: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by associated hardware instructed by a program, which may be stored in a computer-readable memory, which may include: flash Memory disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The foregoing detailed description of the embodiments of the present application has been presented to illustrate the principles and implementations of the present application, and the above description of the embodiments is only provided to help understand the method and the core concept of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for querying data, comprising:
acquiring a data query request input by a user, wherein the data query request is used for querying service data corresponding to a service object;
determining a query identifier corresponding to the data query request;
determining a service data state corresponding to the query identifier according to the query identifier and a preset service data state table, wherein the service data state is used for indicating whether the service data exists or not;
and under the condition that the service data state indicates that the service data exists, inquiring the service data according to the inquiry identification.
2. The method of claim 1, wherein the data query request includes a query date and a business object name, the query identifier includes a first sub identifier and a second sub identifier, and the determining the query identifier corresponding to the data query request includes:
determining the first sub-identifier according to the query date;
determining the second sub-identifier according to the business object name;
and determining the query identifier according to the first sub identifier and the second sub identifier.
3. The method according to claim 2, wherein the preset service data state table includes a two-dimensional array, and the determining the service data state corresponding to the query identifier according to the query identifier and the preset service data state table includes:
determining a column corresponding to the first sub-identifier in the two-dimensional array to obtain a target column;
determining a first target unit according to the first row and the target column of the two-dimensional array;
inquiring a first target state value corresponding to the first target unit, wherein the first target state value is used for indicating whether the inquiry date is a transaction date;
determining a row corresponding to the second sub-identifier in the two-dimensional array under the condition that the first target state value is a first numerical value to obtain a target row;
determining a second target unit according to the target row and the target column;
querying a second target state value corresponding to the second target unit, where the second target state value is used to indicate the service data state of the service object on the query date;
and determining that the service data state indicates that the service data exists under the condition that the second target state value is the first numerical value.
4. The method according to claim 3, wherein the determining the service data state corresponding to the query identifier according to the query identifier and a preset service data state table further comprises:
and determining that the service data state indicates that the service data does not exist under the condition that the first target state value is a second numerical value or the second target state value is the second numerical value.
5. The method according to claim 3 or 4, wherein the two-dimensional array is constructed by:
determining a column corresponding to the current date in the first row of the two-dimensional array to obtain a current date column;
determining a first cell based on the first row and the current date column;
if the current date is a transaction date, determining a first state value corresponding to the first unit as the first numerical value;
if the current date is a non-transaction date, determining the first state value as a second numerical value;
determining the number of rows of the two-dimensional array according to the number of the business objects from the second row of the two-dimensional array, wherein each business object corresponds to one row in the two-dimensional array;
if the current business object has the business data on the current date, determining a second unit according to the current business object line and the current date column corresponding to the current business object, and determining a second state value corresponding to the second unit as the first numerical value;
and if the current business object does not have the business data on the current date, determining the second unit according to the current business object line and the current date column, and determining the second state value as the second numerical value.
6. The method of claim 5, wherein if a new business object exists, the method further comprises:
a row corresponding to the new service object is newly built in the two-dimensional array to obtain a newly built row;
if the new service object has the service data on the current date, determining a new unit according to the new line and the current date column, and determining a new state value corresponding to the new unit as the first numerical value;
and if the new service object does not have the service data on the current date, determining the new unit according to the new line and the current date column, and determining the new state value as the second numerical value.
7. The method according to any one of claims 1-4, wherein the method is applied to a server; the querying the service data according to the query identifier includes:
acquiring a preset database, wherein data in the preset database corresponds to the query identifier;
and inquiring the service data in the preset database according to the inquiry identification.
8. A data query apparatus, comprising: an obtaining unit, a determining unit and a querying unit, wherein,
the acquiring unit is used for acquiring a data query request input by a user, wherein the data query request is used for querying service data corresponding to a service object;
the determining unit is used for determining a query identifier corresponding to the data query request;
the determining unit is further configured to determine a service data state corresponding to the query identifier according to the query identifier and a preset service data state table, where the service data state is used to indicate whether the service data exists;
and the query unit is used for querying the service data according to the query identifier under the condition that the service data state indicates that the service data exists.
9. An electronic device comprising a processor, a memory for storing one or more programs and configured for execution by the processor, the programs comprising instructions for performing the steps of the method of any of claims 1-7.
10. A computer-readable storage medium, characterized by storing a computer program for electronic data exchange, wherein the computer program causes a computer to execute instructions of the steps in the method according to any one of claims 1-7.
CN202210082818.7A 2022-01-25 2022-01-25 Data query method and related device Active CN114117187B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210082818.7A CN114117187B (en) 2022-01-25 2022-01-25 Data query method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210082818.7A CN114117187B (en) 2022-01-25 2022-01-25 Data query method and related device

Publications (2)

Publication Number Publication Date
CN114117187A true CN114117187A (en) 2022-03-01
CN114117187B CN114117187B (en) 2022-06-21

Family

ID=80361287

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210082818.7A Active CN114117187B (en) 2022-01-25 2022-01-25 Data query method and related device

Country Status (1)

Country Link
CN (1) CN114117187B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015195726A1 (en) * 2014-06-19 2015-12-23 Microsoft Technology Licensing, Llc Efficient storage of related sparse data in a search index
CN105718455A (en) * 2014-12-01 2016-06-29 阿里巴巴集团控股有限公司 Data query method and apparatus
CN108984723A (en) * 2018-07-10 2018-12-11 阿里巴巴集团控股有限公司 Creation index, data query method, apparatus and computer equipment
CN110413634A (en) * 2019-06-27 2019-11-05 北京奇艺世纪科技有限公司 Data query method, system, device and computer readable storage medium
WO2021164487A1 (en) * 2020-02-20 2021-08-26 京东数字科技控股股份有限公司 Data query method and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015195726A1 (en) * 2014-06-19 2015-12-23 Microsoft Technology Licensing, Llc Efficient storage of related sparse data in a search index
CN105718455A (en) * 2014-12-01 2016-06-29 阿里巴巴集团控股有限公司 Data query method and apparatus
CN108984723A (en) * 2018-07-10 2018-12-11 阿里巴巴集团控股有限公司 Creation index, data query method, apparatus and computer equipment
CN110413634A (en) * 2019-06-27 2019-11-05 北京奇艺世纪科技有限公司 Data query method, system, device and computer readable storage medium
WO2021164487A1 (en) * 2020-02-20 2021-08-26 京东数字科技控股股份有限公司 Data query method and apparatus

Also Published As

Publication number Publication date
CN114117187B (en) 2022-06-21

Similar Documents

Publication Publication Date Title
KR102079860B1 (en) Text address processing method and device
CN108768929B (en) Electronic device, credit investigation feedback message analysis method and storage medium
WO2019024496A1 (en) Enterprise recommendation method and application server
CN111274045A (en) Multi-platform docking method and device, computer equipment and readable storage medium
CN107871277B (en) Server, client relationship mining method and computer readable storage medium
CN115495496A (en) Data export method, device, electronic equipment, storage medium and program product
CN112150305A (en) Enterprise power user information verification method and system, computer equipment and medium
CN115391439A (en) Document data export method, device, electronic equipment and storage medium
CN111475494A (en) Mass data processing method, system, terminal and storage medium
CN114117187B (en) Data query method and related device
WO2019080419A1 (en) Method for building standard knowledge base, electronic device, and storage medium
CN111723210A (en) Method and device for storing data table, computer equipment and readable storage medium
CN109446217A (en) Data method, electronic device and computer readable storage medium
CN114169306A (en) Method, device and equipment for generating electronic receipt and readable storage medium
CN114265740A (en) Error information processing method, device, equipment and storage medium
US8577861B2 (en) Apparatus and method for searching information
CN110851446B (en) Data table generation method and device, computer equipment and storage medium
CN113190381A (en) Data backup method, system, device and storage medium
CN113468037A (en) Data quality evaluation method, device, medium and electronic equipment
CN110796548B (en) Asset transaction method and device
CN110377269B (en) Service approval system collocation method, device and storage medium
CN113761858A (en) Form data processing method and device, computer equipment and storage medium
CN111986006A (en) Product recommendation method and device based on knowledge graph, computer equipment and storage medium
CN108776674B (en) Electronic certificate storage method and device and server
CN109409922A (en) Data aggregate modeling method, device, computer equipment and storage medium

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