Method, device, equipment and computer storage medium for data acquisition
By directly authorizing the target application to access database data in the operating system and splitting and re-associating the associated tables, the problem of the target application having to go through cumbersome and time-consuming steps to obtain database data is solved, and the efficiency and timeliness of data acquisition are optimized.
Patent Information
- Application Number
- CN202310077896.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-16
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2043-01-16
AI Technical Summary
In the prior art, the steps for a target application to obtain database data are cumbersome and time-consuming, making it difficult to meet the demand for high timeliness.
After receiving the data request from the target application in the operating system, the system directly sends authorization access information to the target application, allowing the target application to directly access the database data and split and re-associate the associated tables to optimize the data acquisition process.
It simplifies the data acquisition steps, improves the efficiency and timeliness of data acquisition by the target application, and optimizes the operating speed of the operating system.
Smart Images

Figure CN116226811B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of big data databases, and in particular relates to a method, apparatus, device, and computer storage medium for data acquisition. Background Art
[0002] Currently, target applications often need to access data from the operating system's database. Due to limited access, these applications must first copy the data from the database, then load the copied data into the target application for use. After use, the data must be unloaded, making the data acquisition process cumbersome and time-consuming. With the increasing demand for timeliness, optimization of the operating system is needed. Summary of the Invention
[0003] The embodiments of the present application provide a method, apparatus, device, and computer storage medium for data acquisition, which can improve the timeliness of an operating system based on the optimization of the operating system.
[0004] In a first aspect, an embodiment of the present application provides a method for acquiring data, comprising:
[0005] Receive a request message from a target application to obtain target product data;
[0006] According to the request information, querying data corresponding to the request information from a database;
[0007] In the case that the database contains data corresponding to the request information, authorization information for authorizing access to the data is sent to the target application, so that the target application can obtain the data from the database according to the authorization information.
[0008] Optionally, after receiving the request information for obtaining product data sent by the target application, the method further includes:
[0009] Acquire data of an association table corresponding to the target product, the association table including a first association table;
[0010] Performing statistics on the data of the plurality of sub-tables in the first association table to obtain statistical results;
[0011] The statistical results are stored in the database.
[0012] Optionally, performing statistics based on the data in the first association table to obtain statistical results includes:
[0013] Query the number of sub-tables in the first association table;
[0014] If the number of sub-tables in the first association table is found to be less than a preset value, then obtaining data from the first association table;
[0015] If the number of sub-tables in the first association table is greater than or equal to a preset value, splitting the first association table to obtain multiple sub-tables;
[0016] Randomly selecting a preset number of subtables for reassociation to obtain a second association table, wherein the preset number is less than a preset value;
[0017] Obtaining data from the second association table;
[0018] Statistics are performed on the data in the first association table and the data in the second association table to obtain statistical results.
[0019] Optionally, the randomly selecting a preset number of sub-tables for re-association to obtain a second association table includes:
[0020] Querying the character length of each sub-table in the randomly selected preset number of sub-tables;
[0021] At least one sub-table with a smaller character segment length among the preset number is associated with the sub-table with the longest character segment length to obtain a second association table.
[0022] Optionally, the method further includes:
[0023] Counting the first time when the target application obtains the data from the database according to the authorization information;
[0024] a second time for obtaining a statistical result by counting the data in the first association table and the data in the second association table;
[0025] Calculating the sum of the first time and the second time;
[0026] When the sum of the first time and the second time is greater than a preset time, a prompt message for expanding the operating system is generated.
[0027] In a second aspect, an embodiment of the present application provides a data acquisition device, comprising:
[0028] A receiving module, configured to receive a request message from a target application for acquiring target product data;
[0029] A query module, configured to query data corresponding to the request information from a database according to the request information;
[0030] The sending module is used to send authorization information for authorizing access to the data to the target application when the database contains data corresponding to the request information, so that the target application can obtain the data from the database according to the authorization information.
[0031] Optionally, after the receiving module receives the request information for obtaining product data sent by the target application, the device further includes:
[0032] The acquisition module is further configured to acquire data of an association table corresponding to the target product, wherein the association table includes a first association table;
[0033] A statistics module, configured to perform statistics on the data of the plurality of sub-tables in the first association table to obtain statistical results;
[0034] A storage module is used to store the statistical results in the database.
[0035] Optionally, the statistical module performs statistics based on the data in the first association table to obtain statistical results, including:
[0036] The query module is further used to query the number of sub-tables in the first association table;
[0037] The acquisition module is further configured to acquire data from the first association table if the number of sub-tables in the first association table is less than a preset value;
[0038] a splitting module, configured to split the first association table into multiple sub-tables if the number of sub-tables in the first association table is greater than or equal to a preset value;
[0039] an association module, configured to randomly select a preset number of subtables for re-association to obtain a second association table, wherein the preset number is less than a preset value;
[0040] The acquisition module is further used to acquire data of the second association table;
[0041] The statistics module is used to perform statistics on the data in the first association table and the data in the second association table to obtain statistical results.
[0042] Optionally, the association module randomly selects a preset number of sub-tables for re-association to obtain a second association table, including:
[0043] The query module further queries the character length of each sub-table in the randomly selected preset number of sub-tables;
[0044] The associating module is further configured to associate at least one sub-table with a smaller character segment length among the preset number with the sub-table with the longest character segment length to obtain a second associating table.
[0045] Optionally, the device further comprises:
[0046] The statistics module is further configured to count the first time when the target application obtains the data from the database according to the authorization information;
[0047] The statistics module is further configured to count a second time at which a statistical result is obtained based on the data in the first association table and the data in the second association table;
[0048] a calculation module, configured to calculate the sum of the first time and the second time;
[0049] The generating module is configured to generate prompt information for expanding the operating system when the sum of the first time and the second time is greater than a preset time.
[0050] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising:
[0051] a processor and a memory storing computer program instructions;
[0052] When the processor executes the computer program instructions, it is used to perform the data acquisition method described in the first aspect above.
[0053] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the method for data acquisition described in the first aspect above is implemented.
[0054] The data acquisition method, apparatus, device and computer storage medium provided in the embodiments of the present application, after receiving the request information for obtaining data sent by the target application in the database, will directly send authorization information for authorized access to the target application when the corresponding information is found in the database, allowing the target application to directly access the required data based on the authorization information. Through this method, the target application can directly access the data in the database based on the authorization, greatly improving the efficiency of the target application in obtaining data. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0056] Figure 1 A flowchart of a data acquisition method provided in one embodiment of the present application.
[0057] Figure 2A flowchart of a method for collecting statistical association table data is provided in one embodiment of the present application.
[0058] Figure 3 A schematic diagram of a data acquisition device provided in one embodiment of the present application.
[0059] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating the examples of the present application.
[0061] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, the elements defined by the phrase "comprising..." do not exclude the presence of other identical elements in the process, method, article, or device comprising the elements.
[0062] It should be noted that the acquisition, storage, use and processing of data in the embodiments of this application are in compliance with the relevant provisions of national laws and regulations.
[0063] In order to solve the problems of the prior art, the embodiments of the present application provide a method, apparatus, device and computer storage medium for data acquisition. The data acquisition method provided by the embodiments of the present application is first introduced below.
[0064] As competition in the financial market intensifies, the growth model of traditional commercial banks, which relies primarily on interest rate spreads as their primary revenue source, will become unsustainable. To address this, various banks have developed product factories tailored to their specific needs. The core principle of product factory design is to organize various banking products into distinct product lines and groups based on their characteristics and business processes. These products are then deconstructed into standardized, structured applications, product conditions, and product configuration parameters. Using a modular approach, these products can be rapidly designed and developed to meet market needs. Currently, product factories typically configure specific products tailored to the specific business scenarios of different applications. In the era of big data, financial institutions are no exception, establishing operating systems that provide data access, storage, computing, security management, resource management, and other services for big data analytics across various products.
[0065] Therefore, after an application sends a request to the operating system in the product factory to obtain product data, the operating system retrieves the data from the associated table of the corresponding product data for calculation. However, since the associated table may contain multiple associated subtables, the time it takes for the operating system to obtain the data from the associated table will also be longer, which can also result in poor timeliness in obtaining data. After the operating system completes the calculation and stores the data in the database, the application must first copy the data from the operating system database, then load the copied data into the application for use. After use, the data must be unloaded. This step is complex and tedious, and also results in a significant waste of time. Therefore, the embodiments of the present application mainly address the problem of inefficiency in applications obtaining the product data they need from these two aspects.
[0066] Therefore, how to enable the applications built by product factories to efficiently obtain the product data they need has become an urgent problem that needs to be solved.
[0067] Figure 1 A flow chart of a data acquisition method provided in one embodiment of the present application is shown.
[0068] In some embodiments, as Figure 1 As shown, the data acquisition method includes:
[0069] S10: Receive request information sent by the target application to obtain target product data.
[0070] As a credit intermediary, a bank or financial company acts as a transit point for capital inflows and outflows. Therefore, the upstream component of capital flow is the inflow of funds from various institutions, companies, individuals, and social groups into the bank or financial company. The downstream component is the outflow of funds, which is the process of banks or financial companies issuing loans to individuals or institutions. Banks or financial companies often use applications in product factories as outlets for capital outflows, and the applications generated by product factories can be components. For example, an application in a product factory could be an application component for credit or debit card services. The corresponding product data could include the number of credit card users, the amount used, and other related data. This is not detailed here.
[0071] When a bank or financial company wants to obtain relevant data about a product, it will enter the request information it needs to obtain into the product, and then the product will send it to the operating system. For example, if xx Bank in xx wants to inquire about the total number of new users who have registered for a certain type of credit card today, the staff will enter the requirement to count the total number of people today into the credit card application. After receiving the request, the credit card application will send the request to the operating system.
[0072] S11: According to the request information, query data corresponding to the request information from a database.
[0073] After receiving the request from the target application to obtain the target product data, the operating system will query the database to see whether there is data corresponding to the request. It can be imagined that the database in the operating system, as a data center, may cover data related to many products.
[0074] S12: When the database is found to contain data corresponding to the request information, authorization information for authorizing access to the data is sent to the target application, so that the target application can obtain the data from the database according to the authorization information.
[0075] When the operating system finds that the product data corresponding to the request information exists in the database, it will authorize the target application that made the request and allow it to directly access the database to obtain the required data.
[0076] In this embodiment, after the operating system receives the request information sent by the target application to obtain the target product data, when the corresponding product data is found in the database, it directly authorizes the target application to allow it to directly access the database to obtain the required data. This optimizes the cumbersome steps in the traditional method that require the operating system to first extract the information from the database and then the target application to copy the information and install it in the application for use, thereby improving the timeliness of the target application in obtaining data.
[0077] In some embodiments, after receiving the request information for obtaining product data sent by the target application, the method further includes:
[0078] S101: Acquire data of an association table corresponding to the target product, where the association table includes a first association table.
[0079] When the operating system receives a request from the target application to obtain target product data, it may need to collect statistics for that product. Therefore, the operating system must first configure the corresponding job. A job is the most basic configuration unit in the operating system and the smallest executable program. As you can imagine, the operating system will configure different jobs to execute based on different requirements. As the smallest executable program, each job has its own unique association table. Therefore, to obtain the association table corresponding to the target product, you must first obtain the corresponding job.
[0080] It is conceivable that the job configured by the operating system includes a first job, which includes a first association table, and the first association table includes multiple sub-tables with associations. Continuing with the example of the operating system receiving a request from a credit card program to query the total number of new users registered today at xx bank in xx location, the operating system will configure a job for this request that includes information about the credit card program's registered users today. The operating system uses the job to obtain the association table under the job. It is conceivable that the association table includes multiple sub-tables, such as the first sub-table containing the name information of the new user registered today by the credit card program; the second sub-table containing the identity information, contact information, address, and other information of the new user; the third sub-table containing the amount of money the new user applied for the credit card; and the fourth sub-table containing the bank staff member and counter number when the new user processed the registration.
[0081] S102: Counting the data of the multiple sub-tables in the first association table to obtain statistical results.
[0082] Jobs in the job system perform statistics based on their associated table data to generate statistical results. Continuing with the example of counting the total number of new users registered today for the target credit card program, after obtaining the associated table data, the job sums up all users in the first subtable and generates the sum.
[0083] S103: Storing the statistical results in the database.
[0084] After the jobs in the job system calculate the statistical results of the relevant data, they will properly store the results in the database so that the target application can obtain the data later.
[0085] Through the method, the operating system optimizes the step that the target program needs to paste data in the database first and then loads the data into the program in the prior art, adopts the method of authorizing the target program to directly access the database, simplifies the step of obtaining data from the database, and improves the efficiency of obtaining data.
[0086] Figure 2 A flowchart of a statistical association table data method provided by one embodiment of the present application is shown.
[0087] In some embodiments, as shown in Figure 2 The statistics based on the data of the first association table includes:
[0088] S1021: Query the number of sub-tables in the first association table.
[0089] After the operating system determines the first job and the first association table in the first job, the operating system queries the number of sub-tables in the first association table.
[0090] S1022: If the number of sub-tables in the first association table is less than a preset value, obtain the data of the first association table.
[0091] If the number of sub-tables in the first association table is less than a preset value, the data in the first association table is directly obtained for subsequent statistics. It is conceivable that the preset value can be set artificially according to different requirements, which will not be described here. In this embodiment, the preset value can be 5.
[0092] S1023: If the number of sub-tables in the first association table is greater than or equal to the preset value, split the first association table to obtain a plurality of sub-tables.
[0093] If the number of sub-tables in the first association table is greater than or equal to the preset value, the first association table will be split into a plurality of sub-tables.
[0094] Please continue to refer to the example of the operating system in the prior art that statistically obtains the total number of new users registered today by the target credit card program. Based on this example, the number of sub-tables in the first association table is 5, so the first association table needs to be split, and the association relationship between the first sub-table and the fifth sub-table is removed, and the sub-tables are independently split out.
[0095] S1024: Randomly select a preset number of sub-tables for re-association to obtain a second association table, wherein the preset number is less than the preset value.
[0096] After the first association table is split into multiple sub-tables, a preset number of sub-tables less than a preset value are randomly selected for re-association. Continuing with the example of the total number of new users registered by the aforementioned statistical target credit card program today, after being split into 5 sub-tables, 2 sub-tables can be randomly selected for re-association, and then the remaining 3 sub-tables are re-associated again to obtain two second association tables. It is conceivable that the number of sub-tables in the association table can be more than 5, and can be 6, 7, or more, so when re-associating, 2 or 3 or 4 sub-tables can be randomly selected for association. The second association table after re-association is still in the first job.
[0097] S1025: Obtain the data of the second association table.
[0098] After the sub-tables are re-associated to obtain the second association table, the data of the second association table is directly obtained. It is conceivable that when obtaining the data of multiple second association tables, all of them can be obtained, or they can be obtained in a targeted manner according to the request information, which will not be described here.
[0099] S1026: Statistics on the data of the first association table and the data of the second association table are performed to obtain a statistical result.
[0100] The data of the first association table and the second association table in the above two cases are statistically analyzed to obtain a statistical result, and then the statistical result is stored in the database.
[0101] The embodiments of the present application split the first association table with a number of sub-tables greater than or equal to a preset value into multiple sub-tables, and then select a preset number of sub-tables less than a preset value for re-association to obtain a second association table. Since the number of sub-tables in the second association table is less than that in the first association table, the running speed of the job system when obtaining data will also be faster, so the efficiency of obtaining data of the target program can be improved, thereby ultimately improving the efficiency of obtaining data of the entire target program.
[0102] In some embodiments, the random selection of a preset number of sub-tables for re-association to obtain a second association table includes:
[0103] S10241: Query the character length of each sub-table in the randomly selected preset number of sub-tables.
[0104] It is conceivable that when re-associating multiple sub-tables, there is a certain association rule. First, after selecting a preset number of sub-tables, the character length of each preset number of sub-tables is queried, which can be directly obtained from the table.
[0105] S10242: Associate at least one sub-table with a smaller character segment length among the preset number with the sub-table with the longest character segment length to obtain a second association table.
[0106] Secondly, the sub-table with the shorter character length is associated with the sub-table with the longest character length.
[0107] By using the association method in this embodiment, when acquiring data in the second association table, since the subtable with smaller character length is associated with the subtable with longer character length, the operating speed of the system can be increased, thereby improving the efficiency of associating table data.
[0108] In some embodiments, the method further comprises:
[0109] S10261: Counting the first time when the target application obtains the data from the database according to the authorization information.
[0110] Since it takes a process for the target application to obtain data from the database after being authorized, the first time when the target application obtains data from the database according to the authorization information can be counted.
[0111] S10262: Counting a second time of obtaining a statistical result based on the data in the first association table and the data in the second association table.
[0112] Because after obtaining the data in the first association table and the data in the second association table, the process of performing statistics on the data also takes a certain amount of time, the second time for obtaining the statistical results through the association table data can be counted.
[0113] S10263: Calculate the sum of the first time and the second time.
[0114] S10264: When the sum of the first time and the second time is greater than a preset time, generate a prompt message for expanding the operating system.
[0115] After obtaining the sum of the first time and the second time, it is determined whether the sum of the first time and the second time is greater than a preset time. If it is, it indicates that the preset timeliness requirement has not been met after the optimization of the operating system, and therefore a prompt message is generated to expand the capacity of the operating system. It is conceivable that expanding the capacity of the operating system can increase the operating speed of the operating system, thereby improving the timeliness of the operating system.
[0116] As an implementation form, in order to improve the timeliness of the job system, the embodiment of the application optimizes the job system from three aspects, first, the association table in the job system is split and re-associated, and it is necessary to associate the sub-table with smaller characters with the sub-table with longer character length; second, the target program is allowed to directly access the database to obtain data; third, the expansion of the job system is proposed. The three optimization methods respectively optimize from the running speed of the system and the data obtaining time of the target program and other aspects, so as to meet the requirement of timeliness.
[0117] Figure 3 A schematic diagram of a data acquisition device provided by an embodiment of the application is shown.
[0118] In some embodiments, as shown in Figure 3 The embodiment of the application provides a data acquisition device, which comprises:
[0119] The receiving module 100 is configured to receive request information for obtaining target product data sent by a target application;
[0120] The query module 200 is configured to query data corresponding to the request information from a database according to the request information;
[0121] The sending module 300 is configured to send authorization information for authorizing access to the data to the target application in the case that the data corresponding to the request information is included in the database, so that the target application obtains the data from the database according to the authorization information.
[0122] In some embodiments, after the receiving module receives the request information for obtaining product data sent by the target application, the device further comprises:
[0123] The obtaining module is further configured to obtain data of an association table corresponding to the target product, wherein the association table comprises a first association table;
[0124] The statistical module is configured to statistically process data of a plurality of sub-tables in the first association table to obtain a statistical result;
[0125] The storage module is configured to store the statistical result to the database.
[0126] In some embodiments, the statistical module statistically processes the data of the first association table to obtain a statistical result, which comprises:
[0127] The query module is further configured to query the number of sub-tables in the first association table;
[0128] The obtaining module is further configured to obtain the data of the first association table if the number of sub-tables in the first association table is less than a preset value.
[0129] a splitting module, configured to split the first association table into multiple sub-tables if the number of sub-tables in the first association table is greater than or equal to a preset value;
[0130] an association module, configured to randomly select a preset number of subtables for re-association to obtain a second association table, wherein the preset number is less than a preset value;
[0131] The acquisition module is further used to acquire data of the second association table;
[0132] The statistics module is further configured to perform statistics on the data in the first association table and the data in the second association table to obtain statistical results.
[0133] In some embodiments, the association module randomly selects a preset number of sub-tables for re-association to obtain a second association table, including:
[0134] The query module further queries the character length of each sub-table in the randomly selected preset number of sub-tables;
[0135] The associating module is further configured to associate at least one sub-table with a smaller character segment length among the preset number with the sub-table with the longest character segment length to obtain a second associating table.
[0136] In some embodiments, the apparatus further comprises:
[0137] The statistics module is further configured to count the first time when the target application obtains the data from the database according to the authorization information;
[0138] The statistics module is further configured to count a second time at which a statistical result is obtained based on the data in the first association table and the data in the second association table;
[0139] a calculation module, configured to calculate the sum of the first time and the second time;
[0140] The generating module is configured to generate prompt information for expanding the operating system when the sum of the first time and the second time is greater than a preset time.
[0141] The apparatus of the above embodiment is used to implement the corresponding data acquisition method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0142] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the application.
[0143] The electronic device may include a processor 301 and a memory 302 storing computer program instructions.
[0144] Specifically, the processor 301 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0145] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 302 may include removable or non-removable (or fixed) media. Where appropriate, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory.
[0146] In certain embodiments, memory 302 includes read-only memory (ROM). The ROM may be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM), or flash memory, or a combination of two or more thereof, where appropriate.
[0147] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of the present application.
[0148] The processor 301 implements any one of the data acquisition methods in the above embodiments by reading and executing computer program instructions stored in the memory 302 .
[0149] In one example, the electronic device may further include a communication interface 303 and a bus 310. Figure 4 The processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.
[0150] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0151] Bus 310 includes hardware, software or both, and the components of online data flow metering equipment are coupled to each other. For example, but not limitation, bus can include accelerated graphics port (AGP) or other graphics bus, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 310 can include one or more buses. Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.
[0152] The electronic device of the above embodiment is used to implement the corresponding data acquisition method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0153] In addition, in conjunction with the data acquisition method in the above embodiments, embodiments of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any of the data acquisition methods in the above embodiments is implemented.
[0154] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. Within the scope of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0155] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0156] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or devices based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0157] The present invention has been described above with reference to the flowchart and / or block diagram of the method, device (device) and computer program product according to the embodiments of the present application.It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed via the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more boxes of the flowchart and / or block diagram.Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It is also understood that each box in the block diagram and / or the flowchart and the combination of the boxes in the block diagram and / or the flowchart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.
[0158] The above describes only a specific implementation of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device, module and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here. It should be understood that the protection scope of the present application is not limited to this, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements should be covered within the protection scope of the present application.
Claims
1. A method for data acquisition, characterized in that: include: Receive a request message from a target application to obtain target product data; According to the request information, querying data corresponding to the request information from a database; In a case where the database contains data corresponding to the request information, sending authorization information for authorizing access to the data to the target application, so that the target application can obtain the data from the database according to the authorization information; After receiving the request information for obtaining product data sent by the target application, the method further includes: Acquire data of an association table corresponding to the target product, the association table including a first association table; Performing statistics on the data of the plurality of sub-tables in the first association table to obtain statistical results; Storing the statistical results in the database; The performing statistics based on the data in the first association table to obtain statistical results includes: Query the number of sub-tables in the first association table; If the number of sub-tables in the first association table is found to be less than a preset value, then obtaining data from the first association table; If the number of sub-tables in the first association table is greater than or equal to a preset value, splitting the first association table to obtain multiple sub-tables; Randomly selecting a preset number of subtables for reassociation to obtain a second association table, wherein the preset number is less than a preset value; Obtaining data from the second association table; Statistics are performed on the data in the first association table and the data in the second association table to obtain statistical results.
2. The data acquisition method according to claim 1, characterized in that: The randomly selecting a preset number of sub-tables for re-association to obtain a second association table includes: Querying the character length of each sub-table in the randomly selected preset number of sub-tables; At least one sub-table with a smaller character segment length among the preset number is associated with the sub-table with the longest character segment length to obtain a second association table.
3. The data acquisition method according to claim 1, characterized in that: The method further comprises: Counting the first time when the target application obtains the data from the database according to the authorization information; a second time for obtaining a statistical result by counting the data in the first association table and the data in the second association table; Calculating the sum of the first time and the second time; When the sum of the first time and the second time is greater than a preset time, a prompt message for expanding the operating system is generated.
4. A data acquisition device, characterized in that: include: A receiving module, configured to receive a request message from a target application for acquiring target product data; A query module, configured to query data corresponding to the request information from a database according to the request information; a sending module, configured to, when the database contains data corresponding to the request information, send authorization information authorizing access to the data to the target application, so that the target application can obtain the data from the database according to the authorization information; After the receiving module receives the request information for obtaining product data sent by the target application, the device further includes: The acquisition module is further configured to acquire data of an association table corresponding to the target product, wherein the association table includes a first association table; A statistics module, configured to perform statistics on the data of the plurality of sub-tables in the first association table to obtain statistical results; A storage module, configured to store the statistical results in the database; The statistical module performs statistics based on the data in the first association table to obtain statistical results, including: The query module is further used to query the number of sub-tables in the first association table; The acquisition module is further configured to acquire data from the first association table if the number of sub-tables in the first association table is less than a preset value; a splitting module, configured to split the first association table into multiple sub-tables if the number of sub-tables in the first association table is greater than or equal to a preset value; an association module, configured to randomly select a preset number of subtables for re-association to obtain a second association table, wherein the preset number is less than a preset value; The acquisition module is further used to acquire data of the second association table; The statistics module is further configured to perform statistics on the data in the first association table and the data in the second association table to obtain statistical results.
5. An electronic device, characterized in that: The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for acquiring data according to any one of claims 1 to 3 is implemented.
6. A computer storage medium, characterized in that The computer storage medium stores computer program instructions, which, when executed by a processor, implement the data acquisition method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Data query method and device
CN112580065A
Data processing method and device, electronic equipment, system and storage medium
CN112733190A