Data query method, device and electronic device

By sending data packets to electronic devices on the server, the electronic devices edit data by themselves, the problem of high computing resources consumption of servers is solved, server performance and response efficiency are improved, and data editing flexibility is enhanced.

CN114329161BActive Publication Date: 2025-07-11BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111642482.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-07-11
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

In the prior art, the server needs to perform a large amount of calculations when processing data query requests, resulting in high computing resource consumption and affecting performance.

Method used

After receiving the target request in the server, a data packet containing the target data and editing information is sent to the electronic device, so that the electronic device can edit the data by itself, reducing the computing burden of the server.

Benefits of technology

It reduces the computing resource consumption of the server, improves the performance and response efficiency of the server, and enhances the flexibility of electronic devices to edit data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114329161B_ABST
    Figure CN114329161B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data query method, apparatus and electronic device, relating to the technical field of cloud computing, and particularly to the field of Internet of Things. The specific implementation solution is as follows: receiving a target request sent by a first electronic device, where the target request is used to request to obtain target data; sending a data packet to the first electronic device based on the target request, where the data packet includes the target data and editing information, and the editing information is used to enable the first electronic device to edit the target data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of cloud computing technology, and more particularly to the field of Internet of Things, and specifically relates to a data query method, apparatus, and electronic device. Background Art

[0002] With the continuous development of Internet technology, the amount of data generated by electronic devices is also increasing, resulting in higher requirements for servers. Currently, the above data is usually aggregated and stored in the server, and when an electronic device queries data, the server needs to respond to the access request of the electronic device, edit the data, and provide the edited data. Summary of the Invention

[0003] The present disclosure provides a data query method, apparatus, and electronic device.

[0004] According to a first aspect of the present disclosure, there is provided a data query method, including:

[0005] Receiving a target request sent by a first electronic device, the target request being used to request to obtain target data;

[0006] Sending a data packet to the first electronic device based on the target request, the data packet including the target data and editing information, the editing information being used to enable the first electronic device to edit the target data.

[0007] According to a second aspect of the present disclosure, there is provided a data query method, including:

[0008] Sending a target request to a server, the target request being used to request to obtain target data;

[0009] Receiving a data packet sent by the server based on the target request, the data packet including the target data and editing information, the editing information being used to enable a first electronic device to edit the target data.

[0010] According to a third aspect of the present disclosure, there is provided a data query apparatus, including:

[0011] A first receiving module, configured to receive a target request sent by a first electronic device, the target request being used to request to obtain target data;

[0012] A first sending module, configured to send a data packet to the first electronic device based on the target request, the data packet including the target data and editing information, the editing information being used to enable the first electronic device to edit the target data.

[0013] According to a fourth aspect of the present disclosure, there is provided a data query apparatus, including:

[0014] A second sending module, configured to send a target request to a server, where the target request is used to request to obtain target data;

[0015] A third receiving module, configured to receive a data packet sent by the server based on the target request, where the data packet includes the target data and editing information, and the editing information is used to enable a first electronic device to edit the target data.

[0016] According to a fifth aspect of the present disclosure, there is provided an electronic device, including:

[0017] At least one processor; and

[0018] A memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is enabled to execute any one of the methods in the first aspect or the second aspect.

[0020] According to a sixth aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to cause a computer to execute any one of the methods in the first aspect or the second aspect.

[0021] According to a seventh aspect of the present disclosure, there is provided a computer program product, including a computer program, where when the computer program is executed by a processor, any one of the methods in the first aspect or the second aspect is implemented.

[0022] In the embodiments of the present disclosure, the server only needs to send a data packet to the first electronic device based on the target request, so that the first electronic device can edit the target data according to the editing information in the data packet, without the server editing the target data. In this way, the consumption of computing resources on the server is reduced, and the performance of the server is improved.

[0023] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is one of the flowcharts of the data query method provided by the embodiments of the present disclosure;

[0025] Figure 2 is a schematic structural diagram between the server and the electronic device provided by the embodiments of the present disclosure;

[0026] Figure 3It is a schematic diagram of dimension aggregation provided by an embodiment of the present disclosure;

[0027] Figure 4 It is a schematic structural diagram of a server and data packets provided by an embodiment of the present disclosure;

[0028] Figure 5 It is the second flowchart of the data query method provided by an embodiment of the present disclosure;

[0029] Figure 6 It is the first schematic structural diagram of a data query device provided by an embodiment of the present disclosure;

[0030] Figure 7 It is the second schematic structural diagram of a data query device provided by an embodiment of the present disclosure;

[0031] Figure 8 It is a schematic block diagram of an exemplary electronic device for implementing an embodiment of the present disclosure. Detailed implementation manners

[0032] The following describes exemplary embodiments of the present disclosure with reference to the accompanying drawings. Various details of the embodiments of the present disclosure are included to facilitate understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted below.

[0033] See Figure 1 , Figure 1 is a flowchart of a data query method provided by an embodiment of the present disclosure. Each step provided by the embodiment of this method can be executed in a server, as Figure 1 shown, a data query method includes the following steps:

[0034] Step S101, receive a target request sent by a first electronic device, where the target request is used to request to obtain target data.

[0035] Among them, the target data is data stored in the server, and the manner in which the server obtains the target data is not limited herein. For example: As an alternative implementation manner, the target data can be generated by the server and pre-stored on the server.

[0036] As another alternative implementation manner, before receiving the target request sent by the first electronic device, the method further includes:

[0037] Receive the target data sent by the second electronic device, where the target data is the data after the second electronic device performs target processing on the initial data, and the target processing includes at least one of dimensional aggregation, serialization processing, adding an index, and compression processing.

[0038] Here, the specific type of the second electronic device is not limited herein. For example, the second electronic device can be a mobile phone, a tablet personal computer, a laptop computer, a personal digital assistant (PDA), a mobile internet device (MID), or a wearable device, etc. Additionally, the second electronic device can also be other servers.

[0039] Here, the target data can be the data after the second electronic device performs target processing on the initial data, or the target data can also be the data sent by other electronic devices (such as a third electronic device) to the second electronic device and then forwarded by the second electronic device to the server. The specific method is not limited herein.

[0040] Here, the type of the above target processing is not limited herein. The target processing can include at least one of dimensional aggregation, serialization processing, adding an index, and compression processing. Dimensional aggregation can refer to aggregating the initial data according to various dimensions and finally abstracting and aggregating it into a field (i.e., one dimension) as much as possible, and the target data can be the data sorted according to this field. In this way, when querying the target data, only the above field needs to be queried instead of querying according to the above various dimensions, thereby improving the query efficiency of the target data.

[0041] Here, the specific type of the above various dimensions is not limited herein. For example, the above various dimensions can include at least one of the identity document number (ID) and the uniform resource locator (URL).

[0042] Here, serializing the initial data and compressing the initial data can both reduce the transmission volume of the target data, and further reduce the computing resources consumed when the server sends the target data to the first electronic device.

[0043] Here, adding an index is to be able to find the storage location of the target data according to the index when searching for the target data, thereby improving the query efficiency of the target data.

[0044] It should be noted that when aggregating according to the above various dimensions, it can be obtained in the way of hierarchical aggregation in sequence, that is, cumulative in sequence in the dimension hierarchy. For example: Refer to Figure 3 The user identity number 301 can be aggregated into the first abstract dimension 302 first. For example, it is aggregated with dimensions such as the user's identity information into the first abstract dimension 302, and then the first abstract dimension 302 is aggregated into the second abstract dimension 303. The above dimension aggregation can also be understood as dimension generalization, that is, the range of the second abstract dimension 303 is larger than that of the first abstract dimension 302, and the range of the first abstract dimension 302 is larger than that of the user identity number 301.

[0045] In the implementation manner of the present disclosure, the second electronic device performs target processing on the initial data to obtain target data, and sends the target data to the server. In this way, the server only needs to receive the above target data, so there is no need to perform target processing on the target data, further reducing the consumption of the server's computing resources and further improving the performance of the server.

[0046] It should be noted that the type of the target data is not limited here, and the target processing can be associated with the type of the target data.

[0047] As an optional implementation manner, when the target data is conditional data, the target processing includes dimension aggregation, serialization processing, adding an index, and compression processing; when the target data is non-conditional data, the target processing includes dimension aggregation and serialization processing.

[0048] In this way, when the target data is conditional data, the conditional data can be compressed and serialized, thereby reducing the volume of the conditional data, and further reducing the query latency. At the same time, an index and dimension aggregation can also be added, which is convenient for querying the conditional data; when the target data is non-conditional data, the non-conditional data can be dimensionally aggregated, which is convenient for querying the non-conditional data, and the non-conditional data can also be serialized, thereby reducing the volume of the non-conditional data and further reducing the query latency.

[0049] In addition, since the types of the target data are different, the target processing is also different, thereby enhancing the flexibility and intelligence of the way of processing the target data.

[0050] It should be noted that the server may include a database for storing data, and the number of databases included in the server is not limited here.

[0051] As an optional implementation manner, the server may only include one database, and all the data received by the server can be stored in this database.

[0052] In addition, the server may further include a plurality of databases. For example, as another alternative implementation, after receiving the target data sent by the second electronic device, the method further includes:

[0053] Determine whether the target data meets a preset condition;

[0054] If the target data meets the preset condition, store the target data in the first database;

[0055] If the target data does not meet the preset condition, store the target data in the second database;

[0056] Wherein, the first database is used to store data that meets the preset condition, and the second database is used to store data that does not meet the preset condition.

[0057] In this implementation, the server includes a first database and a second database. The first database is used to store data that meets the preset condition, and the second database is used to store data that does not meet the preset condition.

[0058] The specific content of the above preset condition is not limited herein. For example, the above preset condition may include at least one of the following conditions: the data reading speed is greater than a first preset value, the data access volume is greater than a second preset value, and the data reading response value is less than a third preset value. That is, the data that meets the preset condition can be referred to as data with high real-time requirements for reading and large access volumes.

[0059] In the embodiment of the present disclosure, the server includes a first database and a second database. When the target data meets the preset condition, it can be stored in the first database. When the target data does not meet the preset condition, it can be stored in the second database. In this way, by storing the data that meets the preset condition and the data that does not meet the preset condition in different databases respectively, the data can be managed by category, improving the management effect of the data.

[0060] In addition, the access delays of the first database and the second database are different. The access delay of the first database is less than that of the second database. In this way, the first database can store data with high real-time requirements for access and large access volumes, thereby improving the response speed when querying data. The second database can store data with low real-time requirements for access and small access volumes, thereby reducing the response speed when querying data, and further reducing the consumption of computing resources of the server.

[0061] For example, the first database can use a Remote Dictionary Server (Redis) database, and the second database can use a My Structured Query Language (Mysql) database. In this way, the access latency of the first database can be less than 100 milliseconds, while the access latency of the second database is 500 to 800 milliseconds.

[0062] See Figure 2 , Figure 2 which shows a schematic structural diagram between the server and the first electronic device. As Figure 2 shown, the server 201 includes a first database 2011 and a second database 2012. The first database 2011 can be referred to as an in-memory database, and the second database 2012 can be referred to as a relational database. The server 201 can also be referred to as a storage layer. Multiple electronic devices 2021 connected to the server 201 can form a service layer 202, and each electronic device 2021 can be referred to as a service instance in the service layer 202. The first electronic device is a service instance.

[0063] Step S102: Send a data packet to the first electronic device based on the target request. The data packet includes the target data and editing information, and the editing information is used to enable the first electronic device to edit the target data.

[0064] Among them, the type of the above editing information is not limited here. For example, see Figure 4 , the data packet 402 includes editing information, and the above editing information can include at least one of information such as data decompression information 4021, data deserialization information 4022, data interception information 4023, and other editing information 4024. In this way, the server only needs to provide the data packet 402 based on the target request without editing the target data, thereby reducing the consumption of the server's computing resources and improving the server's performance.

[0065] As an optional implementation, see Figure 4 , the method is applied to a server 400. A target interface 401 is set on the server 400. The first electronic device accesses the server 400 through the target interface 401, and both the target request and the data packet are transmitted through the target interface 401.

[0066] In this way, since the first electronic device accesses the server 400 through the target interface 401, and all data transmissions between the first electronic device and the server 400 need to be carried out through the target interface 401, compared with the method of setting multiple interfaces, the maintenance cost is reduced; at the same time, the target interface 401 is only responsible for transmitting the target requests of the first electronic device and the data packets sent by the server 400, without transmitting other data, thereby reducing the consumption of computing resources of the target interface 401, that is, reducing the consumption of computing resources of the server 400 and improving the performance of the server 400.

[0067] Among them, the type of the target interface 401 is not limited here. For example: the above-mentioned target interface 401 can adopt an Application Programming Interface (API), so the data packets transmitted through the above API can also be referred to as API data packets, and the above API data packets can include target data and editing information, and the editing information is used to instruct the first electronic device to edit the target data.

[0068] It should be noted that, as an optional implementation manner, an order layer can also be set between the target interface 401 and the first electronic device, which is used to perform serialization processing on the data packets. In this way, the transmission volume of the data packets can be further reduced, thereby reducing the network load between the server and the first electronic device and increasing the throughput.

[0069] As another optional implementation manner, the target interface 401 can also perform compression processing and serialization processing on the data packets, which can also further reduce the transmission volume of the data packets, thereby reducing the network load between the server and the first electronic device and increasing the throughput.

[0070] As an optional implementation manner, sending the first data packet to the first electronic device based on the target request includes:

[0071] In the case where no preset situation occurs, sending the first data packet to the first electronic device based on the target request;

[0072] The method further includes:

[0073] In the case where the preset situation occurs, performing a target operation and sending a warning message to the first electronic device;

[0074] Among them, the target operation includes one of the following:

[0075] Sending a second data packet to the first electronic device, and the second data packet is a null value;

[0076] Cutting off the access of the first electronic device;

[0077] Enable the standby server.

[0078] Among them, the specific content of the above preset conditions is not limited here. For example, the preset conditions include at least one of the following: the data throughput is greater than a preset value, at least part of the database of the server is in an unavailable state, and the server is in a down state.

[0079] Among them, the preset conditions can correspond one-to-one with the target operations, that is, different preset conditions result in different target operations. For example: when the preset state is that the data throughput is greater than the preset value, the target operation can be to send a second data packet to the first electronic device, and the second data packet is a null value; when the preset state is that at least part of the database of the server is in an unavailable state, the target operation can be to cut off the access of the first electronic device; when the preset condition is that the server is in a down state, the target operation can be to enable the standby server.

[0080] Among them, when the preset condition does not occur, it means that the computing resources of the server can afford the consumption of the computing resources by the first electronic device. At this time, the first data packet can be sent to the first electronic device based on the target request; when the preset condition occurs, it means that the computing resources of the server are not enough to afford the consumption of the computing resources by the first electronic device. At this time, the target operation can be executed, so as to prevent the services of the server or other electronic devices from being dragged down, and a warning message can be sent to the first electronic device, so as to achieve the effect of prompting the first electronic device.

[0081] Among them, the second data packet is a null value, that is, the server does not perform the action of querying based on the target request of the first electronic device, but directly sends the second data packet to the first electronic device. The second data packet is a null value, that is, it does not include the target data and editing information. In this way, the consumption of the computing resources of the server can be reduced.

[0082] Among them, cutting off the access of the first electronic device means cutting off the access of the first electronic device to the database of the server. Enabling the standby server means establishing a connection between the first electronic device and the standby server, and enabling the standby server to provide data packets based on the target request sent by the first electronic device. The data and architecture stored in the standby server and the above server can be exactly the same.

[0083] In the embodiments of the present disclosure, the actions of the server can be determined according to whether the preset condition appears. When the preset condition appears, the target operation can be executed, and a warning message can be sent to the first electronic device, so as to ensure the normal realization of the functions of the server, reduce the phenomenon that the services of the server and other electronic devices are dragged down by the first electronic device, and improve the security of the server.

[0084] In the embodiments of the present disclosure, through steps S101 to S102, the server only needs to send a data packet to the first electronic device based on the target request, so that the first electronic device can edit the target data according to the editing information in the data packet, without the server editing the target data. In this way, the consumption of computing resources on the server is reduced, the response efficiency to the target request is improved, the return duration of the data packet is reduced, and the performance of the server is improved.

[0085] See Figure 5 , Figure 5 which is a flowchart of another data query method provided by the embodiments of the present disclosure. This embodiment is applied to the first electronic device. As Figure 5 shown, it includes the following steps:

[0086] Step S501: Send a target request to the server, where the target request is used to request to obtain target data.

[0087] Step S502: Receive the data packet sent by the server based on the target request. The data packet includes the target data and editing information, and the editing information is used to enable the first electronic device to edit the target data.

[0088] Among them, the difference between the embodiments of the present disclosure and the above embodiments lies in the different application sides. The above embodiments are applied to the server side, while the embodiments of the present disclosure are applied to the first electronic device side. Therefore, each feature of the embodiments of the present disclosure can refer to the corresponding expressions in the above embodiments and has the same beneficial technical effects.

[0089] In the embodiments of the present disclosure, the server only needs to send a data packet to the first electronic device based on the target request, so that the first electronic device can edit the target data according to the editing information in the data packet, without the server editing the target data. In this way, the consumption of computing resources on the server is reduced, and the performance of the server is improved. In addition, since the first electronic device can edit the target data according to the editing information, the first electronic device can flexibly edit the target data as needed, thereby improving the flexibility of the first electronic device to edit the target data.

[0090] See Figure 6 , Figure 6 which is a schematic structural diagram of a data query device provided by the embodiments of the present disclosure. As Figure 6 shown, the data query device 600 includes:

[0091] A first receiving module 601, configured to receive a target request sent by the first electronic device, where the target request is used to request to obtain target data;

[0092] The first sending module 602 is configured to send a data packet to the first electronic device based on the target request. The data packet includes the target data and editing information, and the editing information is used to enable the first electronic device to edit the target data.

[0093] Optionally, the data query device 600 further includes:

[0094] The second receiving module is configured to receive the target data sent by the second electronic device. The target data is the data after the second electronic device performs target processing on the initial data, and the target processing includes at least one of dimension aggregation, serialization processing, adding an index, and compression processing.

[0095] Optionally, the data query device 600 further includes:

[0096] The determination module is configured to determine whether the target data meets a preset condition;

[0097] The first storage module is configured to store the target data in the first database when the target data meets the preset condition;

[0098] The second storage module is configured to store the target data in the second database when the target data does not meet the preset condition;

[0099] Wherein, the first database is used to store data that meets the preset condition, and the second database is used to store data that does not meet the preset condition.

[0100] Optionally, when the target data is conditional data, the target processing includes dimension aggregation, serialization processing, adding an index, and compression processing; when the target data is non-conditional data, the target processing includes dimension aggregation and serialization processing.

[0101] Optionally, the data query device 600 is applied to a server, a target interface is set on the server, the first electronic device accesses the server through the target interface, and both the target request and the data packet are transmitted through the target interface.

[0102] Optionally, the first sending module 602 is further configured to send the first data packet to the first electronic device based on the target request when no preset situation occurs;

[0103] The data query device 600 further includes:

[0104] The execution module is configured to perform a target operation and send a warning message to the first electronic device when the preset situation occurs;

[0105] Among them, the target operation includes one of the following:

[0106] Sending a second data packet to the first electronic device, where the second data packet is a null value;

[0107] Cutting off the access of the first electronic device;

[0108] Enabling a backup server.

[0109] The data query device 600 provided by the present disclosure can implement Figure 1 each process implemented by the method embodiment shown, and can achieve the same beneficial effects. To avoid repetition, it will not be elaborated here.

[0110] See Figure 7 , Figure 7 which is a schematic structural diagram of another data query device provided by an embodiment of the present disclosure. As shown in Figure 7 , the data query device 700 includes:

[0111] A second sending module 701, configured to send a target request to a server, where the target request is used to request to obtain target data;

[0112] A third receiving module 702, configured to receive a data packet sent by the server based on the target request, where the data packet includes the target data and editing information, and the editing information is used to enable a first electronic device to edit the target data.

[0113] The data query device 700 provided by the present disclosure can implement Figure 5 each process implemented by the method embodiment shown, and can achieve the same beneficial effects. To avoid repetition, it will not be elaborated here.

[0114] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0115] Figure 8 shows a schematic block diagram of an exemplary electronic device 800 that can be used to implement embodiments of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as, for example, a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, for example, a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely exemplary and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0116] As shown inFigure 8 As shown, device 800 includes a computing unit 801 which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of device 800 can also be stored. The computing unit 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0117] Multiple components in device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, optical disc, etc.; and a communication unit 809, such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows device 800 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0118] The computing unit 801 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 801 executes the various methods and processes described above, such as Figure 1 or Figure 5 the embodiments shown. For example, in some embodiments, Figure 1 or Figure 5 the method shown can be implemented as a computer software program which is tangibly contained in a machine-readable medium, such as the storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed onto device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the method described above can be executed. Alternatively, in other embodiments, the computing unit 801 can be configured to execute Figure 1 or Figure 5 the method shown by any other appropriate means (e.g., by means of firmware). Figure 1 or Figure 5 the method shown.

[0119] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.

[0120] The program code for implementing the methods of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.

[0121] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0122] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (e.g., a mouse or a trackball), by which the user can provide input to the computer. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, speech input, or tactile input).

[0123] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.

[0124] A computer system can include a client and a server. The client and the server are generally far from each other and usually interact through a communication network. The client-server relationship is generated by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, a server of a distributed system, or a server incorporating blockchain.

[0125] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in this disclosure can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and no limitation is made herein.

[0126] The above specific implementation manners do not constitute a limitation on the protection scope of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the protection scope of this disclosure.

Claims

1. A data query method, comprising: Receiving a target request sent by a first electronic device, the target request being used to request to obtain target data; Sending a data packet to the first electronic device based on the target request, the data packet including the target data and editing information, the editing information being used to enable the first electronic device to edit the target data, and the editing information including data deserialization information and data truncation information; Before receiving the target request sent by the first electronic device, the method further includes: Receiving the target data sent by a second electronic device, the target data being data after the second electronic device performs target processing on initial data, and the target processing including at least one of dimension aggregation, serialization processing, adding an index, and compression processing.

2. The method according to claim 1, wherein, After receiving the target data sent by the second electronic device, the method further includes: Determining whether the target data meets a preset condition; When the target data meets the preset condition, storing the target data in a first database; When the target data does not meet the preset condition, storing the target data in a second database; Wherein, the first database is used to store data that meets the preset condition, and the second database is used to store data that does not meet the preset condition.

3. The method according to claim 1, wherein When the target data is conditional data, the target processing includes dimension aggregation, serialization processing, adding an index, and compression processing; When the target data is non-conditional data, the target processing includes dimension aggregation and serialization processing.

4. The method according to any one of claims 1 to 3, wherein, The method is applied to a server, a target interface is set on the server, the first electronic device accesses the server through the target interface, and both the target request and the data packet are transmitted through the target interface.

5. The method according to any one of claims 1 to 3, wherein The sending the data packet to the first electronic device based on the target request includes: When no preset situation occurs, sending a first data packet to the first electronic device based on the target request; The method further includes: When the preset situation occurs, performing a target operation and sending a warning message to the first electronic device; Wherein, the target operation includes one of the following: Sending a second data packet to the first electronic device, the second data packet being a null value; Cutting off the access of the first electronic device; Enabling a standby server.

6. A data query device, comprising: A first receiving module, configured to receive a target request sent by a first electronic device, the target request being used to request to obtain target data; A first sending module, configured to send a data packet to the first electronic device based on the target request, the data packet including the target data and editing information, the editing information being used to enable the first electronic device to edit the target data, and the editing information including data deserialization information and data truncation information; Further comprising: A second receiving module, configured to receive the target data sent by a second electronic device, where the target data is data obtained after the second electronic device performs target processing on initial data, and the target processing includes at least one of dimension aggregation, serialization processing, index addition, and compression processing.

7. The apparatus according to claim 6, wherein It further includes: A determination module, configured to determine whether the target data meets a preset condition; A first storage module, configured to store the target data in a first database when the target data meets the preset condition; A second storage module, configured to store the target data in a second database when the target data does not meet the preset condition; Wherein, the first database is used to store data that meets the preset condition, and the second database is used to store data that does not meet the preset condition.

8. The apparatus according to claim 6, wherein When the target data is conditional data, the target processing includes dimension aggregation, serialization processing, index addition, and compression processing; When the target data is non-conditional data, the target processing includes dimension aggregation and serialization processing.

9. The device according to any one of claims 6 to 8, wherein The apparatus is applied to a server, a target interface is provided on the server, the first electronic device accesses the server through the target interface, and both the target request and the data packet are transmitted through the target interface.

10. The device according to any one of claims 6 to 8, wherein The first sending module is further configured to send a first data packet to the first electronic device based on the target request when no preset situation occurs; The apparatus further includes: An execution module, configured to perform a target operation and send a warning message to the first electronic device when the preset situation occurs; Wherein, the target operation includes one of the following: Sending a second data packet to the first electronic device, where the second data packet is a null value; Cutting off the access of the first electronic device; Enabling a standby server.

11. An electronic device, including: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-5.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5.

13. A computer program product, including a computer program, where the computer program, when executed by a processor, implements the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Image transmission processing method and device, terminal and storage medium

    CN110990613A

  • Data storage method and device, electronic equipment and storage medium

    CN112631517A