Electronic device configured to return latest snapshot and control method thereof
The electronic device and serverless system efficiently manage storage server snapshots by updating and storing only the latest snapshot with query data, addressing inefficiencies in conventional systems and reducing delay times.
Patent Information
- Application Number
- PCT/KR2024/021481
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-24
- Filing Date
- 2024-12-30
- Publication Date
- 2025-07-17
AI Technical Summary
Conventional technologies face inefficiencies in managing large numbers of snapshots in storage servers, leading to increased overhead and delays in accessing relevant query data due to asynchronous structures and unnecessary processing of snapshots that do not contain query data.
An electronic device and serverless system that efficiently manages a storage server's key space by updating snapshots, storing only the latest snapshot that includes query data, and returning error values or latest snapshots based on query states to reduce unnecessary processing.
This approach reduces delay times and overhead by ensuring only the latest snapshot containing query data is accessed, thereby improving query data retrieval efficiency and minimizing redundant processing.
Smart Images

Figure KR2024021481_17072025_PF_FP_ABST
Abstract
Description
Electronic device set to return the latest snapshot and method of controlling the same
[0001] The present disclosure relates to an electronic device configured to return the latest snapshot and a method of controlling the same.
[0002] There is a growing demand for technologies that effectively process and utilize large amounts of data using electronic devices (e.g., servers). To enhance the utility of these devices and satisfy the diverse needs of users, telecommunications service providers and electronic device manufacturers are competitively developing electronic devices that offer diverse features and differentiate themselves from competitors. Consequently, the various functions offered through these devices are also becoming increasingly sophisticated. Serverless, a cloud computing model, refers to an architecture that eliminates the need for developers to directly manage servers.
[0003] According to conventional techniques, snapshots generated from the trino server can be directly transmitted to user clients. Accordingly, if the number of user requests increases or if a user submits a query that takes a very long time, the number of snapshots stored in the storage server (e.g., Redis) may increase proportionally. According to conventional techniques, as the number of snapshots increases, the number of keys stored in the storage server that stores them also increases, which may increase the overhead for managing the corresponding keyspace. In addition, due to the nature of the asynchronous structure, there are frequent cases where the user client's request precedes the actual operation status (e.g., query status) in the trino server, and since snapshots are generated in the order in which the query progresses, in order for the user client or the server (e.g., communication server) to access the actually generated snapshot according to the current query progress status, all snapshots generated before the currently generated snapshot must be traversed. According to the conventional technology, the overhead for the user client to obtain the query result may increase because the server (e.g., a communication server) must go through at least one snapshot that it does not need to access in order to obtain the query data (e.g., a snapshot that does not contain the query data).
[0004] According to one embodiment of the present disclosure, an electronic device and serverless system can be provided that can efficiently manage a key space of a server (e.g., a storage server) by updating a snapshot (e.g., overwriting an existing snapshot with a new snapshot) to store only the latest snapshot in the server (e.g., a storage server) for at least one snapshot (e.g., a snapshot that does not include query data) that a server (e.g., a communication server) does not need to access to obtain query data.
[0005] An electronic device (e.g., a communication server) according to one embodiment of the present disclosure includes a communication module, at least one processor, and a memory, wherein the processor, when executed, causes the electronic device to obtain a data provision request for a query from a user client through the communication module, identify URI information included in the data provision request of the user based on the obtaining of the data provision request, the URI information including status information of the query and number information of the query, and access a first snapshot or a second snapshot stored in a storage server based on the identification of the URI information, wherein the first snapshot may be updated with another snapshot that does not include result data for the query as the query progresses, and the second snapshot may include a snapshot including first result data for the query.
[0006] A method according to one embodiment of the present disclosure includes an operation of obtaining a data provision request for a query from a user client, an operation of identifying URI information included in the user's data provision request based on obtaining the data provision request, the URI information including status information of the query and number information of the query, and an operation of accessing a first snapshot or a second snapshot stored in a storage server based on the identification of the URI information, wherein the first snapshot may be updated with another snapshot that does not include result data for the query as the query progresses, and the second snapshot may include a snapshot including first result data for the query.
[0007] FIG. 1 is a block diagram of an electronic device within a network environment according to various embodiments of the present disclosure.
[0008] FIG. 2 is an exemplary diagram illustrating a serverless system according to one embodiment of the present disclosure.
[0009] FIG. 3 is an exemplary diagram illustrating a function or operation of an electronic device (e.g., a communication server) according to one embodiment of the present disclosure to access query data using a latest snapshot.
[0010] FIG. 4 is an exemplary diagram for explaining the types of snapshots according to one embodiment of the present disclosure and the types of snapshots that can be managed as the latest snapshots.
[0011] FIG. 5 is an exemplary diagram for explaining a function or operation of returning an error value to a user client when a query status requested by a user client is higher than a status of a snapshot stored in a storage server, by an electronic device according to one embodiment of the present disclosure.
[0012] FIG. 6 is an exemplary diagram for explaining a function or operation of returning an error value or the latest snapshot to a user client by an electronic device according to an embodiment of the present disclosure based on the state of a snapshot stored in a storage server being a standby state when a query state requested by a user client is the same as or lower than the state of a snapshot stored in a storage server.
[0013] FIGS. 7A and 7B are exemplary drawings for explaining a function or operation of returning information on one of an error value, a latest snapshot, or a snapshot including query data to a user client by an electronic device according to an embodiment of the present disclosure based on the state of a snapshot stored in a storage server being in a running state when the query state requested by the user client is the same as or lower than the state of a snapshot stored in a storage server.
[0014] FIG. 8 is an exemplary diagram illustrating a function or operation of a server (e.g., a work server) according to one embodiment of the present disclosure to overwrite an existing snapshot with a current snapshot and store only the latest snapshot in a server (e.g., a storage server).
[0015] FIG. 9 is an exemplary diagram illustrating a function or operation of an electronic device (e.g., a communication server) according to one embodiment of the present disclosure accessing a snapshot containing query data through a latest snapshot.
[0016] FIG. 1 is a block diagram of an electronic device (101) within a network environment (100) according to various embodiments.
[0017] Referring to FIG. 1, in a network environment (100), an electronic device (101) may communicate with an electronic device (102) via a first network (198) (e.g., a short-range wireless communication network), or may communicate with at least one of an electronic device (104) or a server (108) via a second network (199) (e.g., a long-range wireless communication network). In one embodiment, the electronic device (101) may communicate with the electronic device (104) via the server (108). According to one embodiment, the electronic device (101) may include a processor (120), a memory (130), an input module (150), an audio output module (155), a display module (160), an audio module (170), a sensor module (176), an interface (177), a connection terminal (178), a haptic module (179), a camera module (180), a power management module (188), a battery (189), a communication module (190), a subscriber identification module (196), or an antenna module (197). In some embodiments, the electronic device (101) may omit at least one of these components (e.g., the connection terminal (178)), or may have one or more other components added. In some embodiments, some of these components (e.g., the sensor module (176), the camera module (180), or the antenna module (197)) may be integrated into one component (e.g., the display module (160)).
[0018] The processor (120) may, for example, execute software (e.g., a program (140)) to control at least one other component (e.g., a hardware or software component) of the electronic device (101) connected to the processor (120) and perform various data processing or operations. According to one embodiment, as at least a part of the data processing or operations, the processor (120) may store commands or data received from other components (e.g., a sensor module (176) or a communication module (190)) in a volatile memory (132), process the commands or data stored in the volatile memory (132), and store result data in a non-volatile memory (134). According to one embodiment, the processor (120) may include a main processor (121) (e.g., a central processing unit or an application processor) or an auxiliary processor (123) (e.g., a graphics processing unit, a neural processing unit (NPU), an image signal processor, a sensor hub processor, or a communication processor) that can operate independently or together with the main processor (121). For example, when the electronic device (101) includes the main processor (121) and the auxiliary processor (123), the auxiliary processor (123) may be configured to use less power than the main processor (121) or to be specialized for a given function. The auxiliary processor (123) may be implemented separately from the main processor (121) or as a part thereof.
[0019] The auxiliary processor (123) may control at least a portion of functions or states associated with at least one component (e.g., a display module (160), a sensor module (176), or a communication module (190)) of the electronic device (101), for example, on behalf of the main processor (121) while the main processor (121) is in an inactive (e.g., sleep) state, or together with the main processor (121) while the main processor (121) is in an active (e.g., application execution) state. In one embodiment, the auxiliary processor (123) (e.g., an image signal processor or a communication processor) may be implemented as a part of another functionally related component (e.g., a camera module (180) or a communication module (190)). In one embodiment, the auxiliary processor (123) (e.g., a neural network processing unit) may include a hardware structure specialized for processing artificial intelligence models. The artificial intelligence models may be generated through machine learning. This learning can be performed, for example, on the electronic device (101) itself where the artificial intelligence model is executed, or can be performed through a separate server (e.g., server (108)). The learning algorithm can include, for example, supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but is not limited to the examples described above. The artificial intelligence model can include multiple artificial neural network layers.The artificial neural network may be one of a deep neural network (DNN), a convolutional neural network (CNN), a recurrent neural network (RNN), a restricted Boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), a deep Q-network, or a combination of two or more of the above, but is not limited to the examples described above. In addition to, or alternatively to, a hardware structure, an artificial intelligence model may include a software structure.
[0020] The memory (130) can store various data used by at least one component (e.g., processor (120) or sensor module (176)) of the electronic device (101). The data can include, for example, software (e.g., program (140)) and input data or output data for commands related thereto. The memory (130) can include volatile memory (132) or non-volatile memory (134).
[0021] The program (140) may be stored as software in the memory (130) and may include, for example, an operating system (142), middleware (144), or an application (146).
[0022] The input module (150) can receive commands or data to be used in a component of the electronic device (101) (e.g., a processor (120)) from an external source (e.g., a user) of the electronic device (101). The input module (150) can include, for example, a microphone, a mouse, a keyboard, a key (e.g., a button), or a digital pen (e.g., a stylus pen).
[0023] The audio output module (155) can output audio signals to the outside of the electronic device (101). The audio output module (155) can include, for example, a speaker or a receiver. The speaker can be used for general purposes, such as multimedia playback or recording playback. The receiver can be used to receive incoming calls. In one embodiment, the receiver can be implemented separately from the speaker or as part of the speaker.
[0024] The display module (160) can visually provide information to an external party (e.g., a user) of the electronic device (101). The display module (160) may include, for example, a display, a holographic device, or a projector and a control circuit for controlling the device. According to one embodiment, the display module (160) may include a touch sensor configured to detect a touch, or a pressure sensor configured to measure the intensity of a force generated by the touch.
[0025] The audio module (170) can convert sound into an electrical signal, or vice versa, convert an electrical signal into sound. According to one embodiment, the audio module (170) can acquire sound through the input module (150), output sound through the sound output module (155), or an external electronic device (e.g., electronic device (102)) (e.g., speaker or headphone) directly or wirelessly connected to the electronic device (101).
[0026] The sensor module (176) can detect the operating status (e.g., power or temperature) of the electronic device (101) or the external environmental status (e.g., user status) and generate an electrical signal or data value corresponding to the detected status. According to one embodiment, the sensor module (176) can include, for example, a gesture sensor, a gyro sensor, a barometric pressure sensor, a magnetic sensor, an acceleration sensor, a grip sensor, a proximity sensor, a color sensor, an IR (infrared) sensor, a biometric sensor, a temperature sensor, a humidity sensor, or an illuminance sensor.
[0027] The interface (177) may support one or more designated protocols that may be used to directly or wirelessly connect the electronic device (101) with an external electronic device (e.g., the electronic device (102)). In one embodiment, the interface (177) may include, for example, a high definition multimedia interface (HDMI), a universal serial bus (USB) interface, an SD card interface, or an audio interface.
[0028] The connection terminal (178) may include a connector through which the electronic device (101) may be physically connected to an external electronic device (e.g., electronic device (102)). According to one embodiment, the connection terminal (178) may include, for example, an HDMI connector, a USB connector, an SD card connector, or an audio connector (e.g., a headphone connector).
[0029] The haptic module (179) can convert electrical signals into mechanical stimuli (e.g., vibration or movement) or electrical stimuli that a user can perceive through tactile or kinesthetic sensations. According to one embodiment, the haptic module (179) can include, for example, a motor, a piezoelectric element, or an electrical stimulation device.
[0030] The camera module (180) can capture still images and videos. According to one embodiment, the camera module (180) may include one or more lenses, image sensors, image signal processors, or flashes.
[0031] The power management module (188) can manage power supplied to the electronic device (101). According to one embodiment, the power management module (188) can be implemented as, for example, at least a part of a power management integrated circuit (PMIC).
[0032] A battery (189) may power at least one component of the electronic device (101). In one embodiment, the battery (189) may include, for example, a non-rechargeable primary battery, a rechargeable secondary battery, or a fuel cell.
[0033] The communication module (190) may support the establishment of a direct (e.g., wired) communication channel or a wireless communication channel between the electronic device (101) and an external electronic device (e.g., electronic device (102), electronic device (104), or server (108)), and the performance of communication through the established communication channel. The communication module (190) may operate independently from the processor (120) (e.g., application processor) and may include one or more communication processors that support direct (e.g., wired) communication or wireless communication. According to one embodiment, the communication module (190) may include a wireless communication module (192) (e.g., a cellular communication module, a short-range wireless communication module, or a global navigation satellite system (GNSS) communication module) or a wired communication module (194) (e.g., a local area network (LAN) communication module, or a power line communication module). Among these communication modules, the corresponding communication module can communicate with an external electronic device (104) via a first network (198) (e.g., a short-range communication network such as Bluetooth, wireless fidelity (WiFi) direct, or infrared data association (IrDA)) or a second network (199) (e.g., a long-range communication network such as a legacy cellular network, a 5G network, a next-generation communication network, the Internet, or a computer network (e.g., a LAN or WAN)). These various types of communication modules can be integrated into a single component (e.g., a single chip) or implemented as multiple separate components (e.g., multiple chips). The wireless communication module (192) can verify or authenticate the electronic device (101) within a communication network such as the first network (198) or the second network (199) by using subscriber information (e.g., an international mobile subscriber identity (IMSI)) stored in the subscriber identification module (196).
[0034] The wireless communication module (192) can support 5G networks and next-generation communication technologies following the 4G network, such as NR access technology (new radio access technology). The NR access technology can support high-speed transmission of high-capacity data (eMBB (enhanced mobile broadband)), minimization of terminal power and connection of multiple terminals (mMTC (massive machine type communications)), or high reliability and low latency (URLLC (ultra-reliable and low-latency communications)). The wireless communication module (192) can support, for example, a high-frequency band (e.g., mmWave band) to achieve a high data transmission rate. The wireless communication module (192) can support various technologies for securing performance in a high-frequency band, such as beamforming, massive multiple-input and multiple-output (MIMO), full dimensional MIMO (FD-MIMO), array antenna, analog beam-forming, or large scale antenna. The wireless communication module (192) can support various requirements specified in the electronic device (101), an external electronic device (e.g., the electronic device (104)), or a network system (e.g., the second network (199)). According to one embodiment, the wireless communication module (192) can support a peak data rate (e.g., 20 Gbps or more) for eMBB realization, a loss coverage (e.g., 164 dB or less) for mMTC realization, or a U-plane latency (e.g., 0.5 ms or less for downlink (DL) and uplink (UL), or 1 ms or less for round trip) for URLLC realization.
[0035] The antenna module (197) can transmit or receive signals or power to or from an external device (e.g., an external electronic device). In one embodiment, the antenna module (197) may include an antenna including a radiator formed of a conductor or a conductive pattern formed on a substrate (e.g., a PCB). In one embodiment, the antenna module (197) may include a plurality of antennas (e.g., an array antenna). In this case, at least one antenna suitable for a communication method used in a communication network, such as the first network (198) or the second network (199), may be selected from the plurality of antennas, for example, by the communication module (190). A signal or power may be transmitted or received between the communication module (190) and an external electronic device via the at least one selected antenna. In some embodiments, in addition to the radiator, another component (e.g., a radio frequency integrated circuit (RFIC)) may be additionally formed as a part of the antenna module (197).
[0036] According to various embodiments, the antenna module (197) may form a mmWave antenna module. In one embodiment, the mmWave antenna module may include a printed circuit board, an RFIC disposed on or adjacent a first side (e.g., a bottom side) of the printed circuit board and capable of supporting a designated high-frequency band (e.g., a mmWave band), and a plurality of antennas (e.g., an array antenna) disposed on or adjacent a second side (e.g., a top side or a side side) of the printed circuit board and capable of transmitting or receiving signals in the designated high-frequency band.
[0037] At least some of the above components can be interconnected and exchange signals (e.g., commands or data) with each other via a communication method between peripheral devices (e.g., a bus, GPIO (general purpose input and output), SPI (serial peripheral interface), or MIPI (mobile industry processor interface)).
[0038] According to one embodiment, commands or data may be transmitted or received between the electronic device (101) and an external electronic device (104) via a server (108) connected to a second network (199). Each of the external electronic devices (102 or 104) may be the same or a different type of device as the electronic device (101). According to one embodiment, all or part of the operations executed in the electronic device (101) may be executed in one or more of the external electronic devices (102, 104, or 108). For example, when the electronic device (101) is to perform a certain function or service automatically or in response to a request from a user or another device, the electronic device (101) may, instead of or in addition to executing the function or service itself, request one or more external electronic devices to perform the function or at least a part of the service. One or more external electronic devices that receive the request may execute at least a portion of the requested function or service, or an additional function or service related to the request, and transmit the result of the execution to the electronic device (101). The electronic device (101) may process the result as is or additionally and provide it as at least a portion of a response to the request. For this purpose, cloud computing, distributed computing, mobile edge computing (MEC), or client-server computing technology may be used, for example. The electronic device (101) may provide an ultra-low latency service by using distributed computing or mobile edge computing, for example. In another embodiment, the external electronic device (104) may include an Internet of Things (IoT) device. The server (108) may be an intelligent server utilizing machine learning and / or a neural network. According to one embodiment, the external electronic device (104) or the server (108) may be included in the second network (199).The electronic device (101) can be applied to intelligent services (e.g., smart home, smart city, smart car, or healthcare) based on 5G communication technology and IoT-related technology.
[0039] FIG. 2 is an exemplary drawing for explaining a serverless system (200) according to one embodiment of the present disclosure.
[0040] Referring to FIG. 2, a serverless system (200) according to one embodiment of the present disclosure may include at least one of a user client (210), a communication server (220), a queue server (230), a storage server (240), a task server (250), and / or a trino server (260).
[0041] A user client (210) according to one embodiment of the present disclosure may transmit a query to a communication server (220). A user client (210) according to one embodiment of the present disclosure may transmit a POST request and / or a GET request including nextURI information to the communication server (220). The nextURI information according to one embodiment of the present disclosure may be included in an initial snapshot transmitted from the communication server (220) or a snapshot stored in a storage server (240). Since the user client (210) according to one embodiment of the present disclosure cannot directly access the Trino server (260), a storage server (240) may be required in a serverless system (200) according to one embodiment of the present disclosure. A snapshot according to one embodiment of the present disclosure may refer to data existing at an address indicated by the nextURI information. A snapshot according to one embodiment of the present disclosure may be defined and stored in a key-value relationship in the storage server (240). For example, according to one embodiment of the present disclosure, a key (e.g., path) of an initial snapshot generated by a communication server (220) may be expressed as “userID / queryID / latest”, and a value may be expressed as snapshot(“id”:”xxx”, “NextURI”: “communicationserveraddress / userID / queryID / QUEUED / 0”, “QueryStat”: “xxx”). The key and value according to one embodiment of the present disclosure may be defined and stored in the storage server (240) as a relationship such as “userID / queryID / latest”: snapshot(“id”: “xxx”, “NextURI”: “communicationserveraddress / userID / queryID / QUEUED / 0”, “QueryStat”: “xxx”). The NextURI information according to one embodiment of the present disclosure may mean a URL used to retrieve the next query status. NextURI information according to one embodiment of the present disclosure may be included in a GET request of a user client (210) and transmitted to a communication server (220).A user client (210) according to one embodiment of the present disclosure can obtain query data by repeatedly transmitting a GET request to a communication server (220) until NextURI information no longer exists.
[0042] A communication server (220) according to one embodiment of the present disclosure may obtain a POST request for query submission from a user client (210). The communication server (220) according to one embodiment of the present disclosure may extract a query from the POST request and submit it to a queue server (230). The communication server (220) according to one embodiment of the present disclosure may generate an initial snapshot (e.g., the initial snapshot (410a) of FIG. 8) and store it in a storage server (240) to asynchronously execute a query. According to one embodiment of the present disclosure, since an actual query has not yet been transmitted to the Trino server (260), a snapshot has not been generated from the Trino server (260), and the time taken for the Trino server (260) to generate the initial snapshot may act as a delay for the user client (210). Therefore, in order to reduce this delay, the initial snapshot may be generated by the communication server (220). An initial snapshot according to an embodiment of the present disclosure (e.g., an initial snapshot (410a) of FIG. 8) may be stored in a storage server (240). In this case, a path to be stored (e.g., a key of the storage server (240)) may be expressed as “userID / queryID / latest,” and a value to be stored (e.g., a value of the storage server (240)) may include information such as ID, nextURI, and query status. Here, nextURI may be expressed as “communication server address / queryID / userID / QUEUED / 0.” If an initial snapshot according to an embodiment of the present disclosure is expressed in a key-value representation, it may be expressed as shown in Table 1 below. A communication server (220) according to an embodiment of the present disclosure may return a value (e.g., an initial snapshot) to a user client (210) in the key-value representation below.
[0043] "User ID / Query ID / latest": snapshot("id": "xxx", "NextURI": "Communication server address / User ID / Query ID / QUEUED / 0", "QueryStat": "xxx"}
[0044] A communication server (220) according to one embodiment of the present disclosure may transmit the generated initial snapshot to a user client (210) by adding it to a POST response. A user client (210) according to one embodiment of the present disclosure may identify a NextURI in the initial snapshot transmitted from the communication server (220) and transmit a GET request including the identified NextURI information to the communication server (220). A communication server (220) according to one embodiment of the present disclosure may retrieve a snapshot corresponding to the NextURI from a storage server (240) and transmit it to the user client (210) by adding it to a POST response. This process may be repeatedly performed until the NextURI information does not exist in the snapshot. Snapshots according to one embodiment of the present disclosure may be generated by a Trino server (260) based on the time at which a request is received by the Trino server (260). A snapshot according to an embodiment of the present disclosure includes information such as a query progress rate (%), the size of data read to perform a query, and a query time, so that snapshots created in the past and snapshots created currently based on the current point in time may be different snapshots. A job server (250) according to an embodiment of the present disclosure may load a job when a job exists in the queue server (230) and submit the job to a Trino server (260) to perform a query. A process of performing a query between a job server (250) and a Trino server (260) according to an embodiment of the present disclosure may be substantially the same as a query processing process between a user client (210) and a communication server (220). For example, a job server (250) according to an embodiment of the present disclosure may transmit a POST request to a Trino server (260). When a Trino server (260) according to an embodiment of the present disclosure receives a POST request from a job server (250), it may create a snapshot and return it to the job server (250).For example, the nextURI information returned by the Trino server (260) to the job server (250) according to one embodiment of the present disclosure may be expressed as “Trino address / Trino query ID / status / number.” The job server (250) according to one embodiment of the present disclosure may determine whether query data exists in the data field of the snapshot obtained from the Trino server (260), update the nextURI information of the snapshot to “communication server address / query ID / user ID / status / number,” and store the updated nextURI information in the storage server (240). For example, if the query data does not exist in the data field of the snapshot, the key may be expressed as “user ID / query ID / latest,” and the value may be expressed as the contents of the modified snapshot (e.g., “communication server address / query ID / user ID / status / number”). A GET request may be repeatedly performed between the job server (250) and the Trino server (260) according to one embodiment of the present disclosure. According to one embodiment of the present disclosure, the job server (250) may overwrite a value in "userID / queryID / latest" (in other words, a key) if query data does not exist in the snapshot, based on whether query data exists in the snapshot. According to one embodiment of the present disclosure, when a value is overwritten in "userID / queryID / latest", the nextURI number of the snapshot may continuously increase. FIG. 4 is an exemplary diagram for explaining the types of snapshots according to one embodiment of the present disclosure and the types of snapshots that can be managed as the latest snapshots. Referring to FIG. 4, according to one embodiment of the present disclosure, the latest snapshot (e.g., the first snapshot (410)) may be maintained only in a snapshot in a queue in which no query data exists (e.g., the 1-1 snapshot (410a)) and in an executing state that does not include query data (e.g., the 1-2 snapshot (410b)).The job server (250) according to one embodiment of the present disclosure can store all snapshots (e.g., snapshots including query result data) generated by the tree server (260) in the storage server (240) when the query result data exists in the snapshot (executing_with_data). The job server (250) according to one embodiment of the present disclosure can determine whether query data exists in a specified snapshot.
[0045] According to one embodiment of the present disclosure, if query data exists in the data field of a snapshot obtained from a Trino server (260), the job server (250) may store a key expressed as "user ID / query ID / status / number" in the storage server (240). According to one embodiment of the present disclosure, if query data (e.g., query result data) exists in the data field of a snapshot obtained from a Trino server (260), all snapshots may be stored in the storage server (240), unlike the case where query data does not exist in the data field of a snapshot obtained from a Trino server (260). For example, assuming that data is included starting from a designated snapshot expressed as Executing-2 and that query processing is terminated in Executing-5, the key-value relationship of the snapshots stored in the storage server (240) may be stored as shown in Table 2 below. In Table 2 below, for convenience of explanation, only the query status and snapshot number among the information included in nextURI as values are displayed.
[0046] "UserID / QueryID / latest": [EXECUTING / 2] "UserID / QueryID / EXECUTING / 2" : "EXECUTING / 3" "UserID / QueryID / EXECUTING / 3" : "EXECUTING / 4" "UserID / QueryID / EXECUTING / 4" : "EXECUTING / 5" "UserID / QueryID / EXECUTING / 5" : ""
[0047] In this way, the job server (250) according to one embodiment of the present disclosure updates the snapshots stored in the storage server (240) so that only the latest snapshot (e.g., “userID / queryID / latest”: [EXECUTING / 2]) is stored in the storage server (240), thereby enabling the communication server (220) and / or the user client (210) to access the snapshot containing the query data (e.g., the second snapshot (420)) through at least two GET requests. According to this feature of the present invention, a relatively shorter delay time can be ensured compared to a case in which snapshots not containing the query data are sequentially accessed and then the snapshot containing the query data (e.g., the second snapshot (420)) is accessed, as in the conventional art. According to one embodiment of the present disclosure, snapshots in which query data does not exist are simply information recording the progress of a query, and thus do not affect the actual query result, so there may be no problem even if duplicate snapshots are continuously returned to the user client (210). FIG. 3 is an exemplary diagram for explaining a function or operation in which an electronic device (101) (e.g., a communication server (220)) according to one embodiment of the present disclosure accesses query data using a latest snapshot.
[0048] An electronic device (101) (e.g., a communication server (220)) according to an embodiment of the present disclosure may obtain a request for providing data for a query (e.g., a GET request) from a user client in operation 310. The user client (210) according to an embodiment of the present disclosure may transmit a POST request and / or a GET request including nextURI information to the communication server (220). The NextURI information according to an embodiment of the present disclosure may be included in the GET request of the user client (210) and transmitted to the communication server (220). The communication server (220) according to an embodiment of the present disclosure may extract a query statement from the POST request and submit it to the queue server (230). The communication server (220) according to an embodiment of the present disclosure may generate an initial snapshot (e.g., an initial snapshot (410a) of FIG. 8) and store it in the storage server (240) in order to asynchronously execute a query.
[0049] An electronic device (101) (e.g., a communication server (220)) according to an embodiment of the present disclosure may, in operation 320, identify URI information included in a data provision request of a user client (210) based on acquisition of a data provision request. The URI information according to an embodiment of the present disclosure may be nextURI. The nextURI information according to an embodiment of the present disclosure may be included in an initial snapshot transmitted from the communication server (220) or a snapshot stored in a storage server (240).
[0050] According to an embodiment of the present disclosure, an electronic device (101) (e.g., a communication server (220)) may, at operation 330, access (e.g., acquire) a first snapshot (e.g., a latest snapshot (410)) or a second snapshot (e.g., a snapshot including query data (910)) stored in a storage server (240) based on identification of URI information. According to an embodiment of the present disclosure, an electronic device (101) (e.g., a communication server (220)) may, at operation 340, return the acquired first snapshot or second snapshot to a user client (210). According to an embodiment of the present disclosure, a user client (210) may transmit a GET request including a nextURI (e.g., "communication server address / query ID / user ID / QUEUED / 0") among the snapshots (e.g., initial snapshot (410a)) transmitted from the communication server (220) to the communication server (220). In other words, the user client (210) can send a GET request to nextURI. The communication server (220) according to one embodiment of the present disclosure can parse the nextURI to identify a query status (e.g., QUEUED) and a number (e.g., 0). The communication server (220) according to one embodiment of the present disclosure can use the query status and the number to determine which snapshot (e.g., the first snapshot (410) of FIG. 9 as the latest snapshot or the snapshot containing query data (e.g., the second snapshot (420))) to return. The function or operation of the communication server (220) according to one embodiment of the present disclosure to determine which snapshot (e.g., the first snapshot (410) of FIG. 9 as the latest snapshot or the snapshot containing query data (e.g., the second snapshot (420))) to return is described in more detail with respect to FIGS. 5 to 7B below.According to one embodiment of the present disclosure, if it is determined that the latest snapshot should be returned, the communication server (220) may access “user ID / query ID / latest” of the storage server (240) to obtain and / or load a snapshot (e.g., the latest snapshot) corresponding to “user ID / query ID / latest.” Alternatively, if the job server (250) performs a process for a query and a second snapshot (420) including query data is stored in the storage server (240), the communication server (220) according to one embodiment of the present disclosure may obtain a second snapshot (420) including query data from the storage server (240) and return the second snapshot (420) including query data to the user client (210).
[0051] The communication server (220) according to one embodiment of the present disclosure may repeatedly perform operations 310 to 340, thereby terminating the query. For example, when the communication server (220) according to one embodiment of the present disclosure returns a second snapshot (420) (e.g., executing-1) including query data to the user client (210), the second snapshot (420) (e.g., executing-1) including the query data may include “communication server address / user ID / query ID / EXECUTING / 2” as the nextURI. The user client (210) according to one embodiment of the present disclosure may transmit a GET request to “communication server address / user ID / query ID / EXECUTING / 2”. In this case, assuming that the trino server (260) and the job server (250) according to one embodiment of the present disclosure have completed up to EXECUTING-5 (e.g., when the third snapshot (910) and the fourth snapshot (920) are stored as snapshots containing query data in the storage server (240), since EXECUTING-2 has data, the communication server (220) according to one embodiment of the present disclosure can access “userID / queryID / EXECUTING / 2” of the storage server (240) and return (e.g., transmit) the snapshot containing the data to the user client (210). For example, the communication server (220) according to one embodiment of the present disclosure can determine which snapshot (e.g., “userID / queryID / EXECUTING / 2”) to return to the user client (210) based on the functions or operations illustrated in FIGS. 5 to 7b. A user client (210) according to one embodiment of the present disclosure may obtain an EXECUTING-2 snapshot (e.g., a third snapshot (910)) and transmit a GET request to “communication server address / user ID / query ID / EXECUTING / 3”, which is a nextURI included in the EXECUTING-2 snapshot (e.g., a third snapshot (910)).According to one embodiment of the present disclosure, when such a process is repeatedly performed so that the user client (210) obtains “communication server address / user ID / query ID / EXECUTING / 5” (e.g., the fourth snapshot (920)), the query may be terminated because “communication server address / user ID / query ID / EXECUTING / 5” (e.g., the fourth snapshot (920)) is a snapshot with an empty nextURI field. In this way, in the serverless system (200) according to one embodiment of the present disclosure, all snapshots including query data may be stored in the storage server (240).
[0052] FIG. 5 is an exemplary drawing for explaining a function or operation of returning an error value to a user client (210) when a query status requested by a user client (210) is higher than a status of a snapshot stored in a storage server (240) by an electronic device (101) (e.g., a communication server (220)) according to one embodiment of the present disclosure.
[0053] Referring to FIG. 5, the communication server (220) according to one embodiment of the present disclosure can identify the state (qState) and number (qCount) of the snapshot stored in the storage server (240) when a GET request is obtained from the user client (210) in operation 510. The communication server (220) according to one embodiment of the present disclosure can identify the state (State) and number (Count) of the query requested by the user client (210) in operation 520. The communication server (220) according to one embodiment of the present disclosure can identify the state (State) and number (Count) of the query requested by the user client (210) using nextURI information included in the user's request. According to one embodiment of the present disclosure, the communication server (220) may determine, in operation 530, whether the state (State) of the query requested by the user client (210) is a later state than the state (qState) of the snapshot stored in the storage server (240). The “state” according to one embodiment of the present disclosure may include a standby state, a running state that does not include data, and a running state that includes data, and the standby state may be a state earlier than the running state that does not include data, and the running state that includes data may be a state later than the running state that does not include data. According to one embodiment of the present disclosure, when the state (State) of the query requested by the user client (210) is a running state and the state (qState) of the snapshot stored in the storage server (240) is a standby state, the communication server (220) may determine that the state (State) of the query requested by the user client (210) is a higher state than the state (qState) of the snapshot stored in the storage server (240).According to one embodiment of the present disclosure, in operation 540, if the state (State) of the query requested by the user client (210) is an executing state and the state (qState) of the snapshot stored in the storage server (240) is a waiting state (operation 530 - Yes), the communication server (220) may determine that a snapshot after the actual query execution time has been requested and may process the GET request of the user client (210) as an abnormal request and return an error value to the user client (210). According to one embodiment of the present disclosure, in operation 550, if the state (State) of the query requested by the user client (210) is a waiting state and the state (qState) of the snapshot stored in the storage server (240) is a waiting state or a running state (operation 530 - No), the communication server (220) may check the state (qState) of the snapshot stored in the storage server (240). According to one embodiment of the document, the communication server (220) can determine, at operation 560, whether the state (qState) of the snapshot stored in the storage server (240) is in a standby state. Operations subsequent to operation 560 according to one embodiment of the present disclosure are described in more detail in FIGS. 6, 7A, and 7B.
[0054] FIG. 6 is an exemplary drawing for explaining a function or operation of returning an error value or the latest snapshot to a user client (210) by an electronic device (101) (e.g., a communication server (220)) according to one embodiment of the present disclosure based on the state of a snapshot stored in a storage server (240) being a standby state when the query state requested by the user client (210) is the same as or a previous state of the state of a snapshot stored in the storage server (operation 560-yes).
[0055] Referring to FIG. 6, the communication server (220) according to one embodiment of the present disclosure may, in operation 610, compare the number (qCount) of snapshots stored in the storage server (240) with the number (Count) of queries requested by the user client (210). In operation 620, the communication server (220) according to one embodiment of the present disclosure may determine whether the number (Count) of queries requested by the user client (210) has a larger value than a value obtained by adding 1 to the number (qCount) of snapshots stored in the storage server (240). According to one embodiment of the present disclosure, if the communication server (220) determines in operation 630 that the number (Count) of the query requested by the user client (210) has a value greater than the value obtained by adding 1 to the number (qCount) of the snapshots stored in the storage server (240) (operation 620 - Yes), since the user client (210) has requested a snapshot that has not yet been created, the communication server (220) may return an error value to the user client (210). According to one embodiment of the present disclosure, if the communication server (220) determines in operation 640 that the number (Count) of the query requested by the user client (210) does not have a value greater than the value obtained by adding 1 to the number (qCount) of the snapshots stored in the storage server (240) (operation 620-No), since a request has been made for a snapshot of the past or a snapshot of a currently executing query based on the current point in time, the communication server (220) may return to the user client the latest snapshot (e.g., the first snapshot (410)) stored in the storage server (240).
[0056] FIG. 7A and FIG. 7B are exemplary drawings for explaining a function or operation of returning information about an error value, a latest snapshot, or a snapshot including query data to a user client (210) by an electronic device (101) (e.g., a communication server (220)) according to one embodiment of the present disclosure based on the state of a snapshot stored in a storage server (240) being a running state (e.g., operation 560-No) when a query state requested by a user client (210) is the same as or a previous state of a snapshot stored in a storage server (240).
[0057] Referring to FIGS. 7A and 7B , the communication server (220) according to one embodiment of the present disclosure can, in operation 705, check the state (State) of the query requested by the user client (210). In operation 710, the communication server (220) according to one embodiment of the present disclosure can determine whether the state (State) of the query requested by the user client (210) is a waiting state. In operations 715 and 720, if the state (State) of the query requested by the user client (210) is a waiting state (e.g., operation 710 - Yes), the communication server (220) according to one embodiment of the present disclosure can compare the size of the number (qCount) of the snapshot stored in the last storage server (240) when the state (qState) of the snapshot stored in the storage server (240) is a waiting state with the number (Count) of the query requested by the user client (210). According to one embodiment of the present disclosure, if the communication server (220) determines in operation 725 that the size of the number (Count) of the query requested by the user client (210) is greater than the number (qCount) of the snapshot stored in the last storage server (240) when the state (qState) of the snapshot stored in the storage server (240) is in a standby state (e.g., operation 720-Yes), the communication server (220) may return an error value to the user client (210) because the user client (210) requested a non-existent snapshot. According to one embodiment of the present disclosure, in operation 730, if it is determined that the size of the number (Count) of the query requested by the user client (210) is equal to or less than the number (qCount) of the snapshot stored in the last storage server (240) when the state (qState) of the snapshot stored in the storage server (240) is in a standby state (e.g., operation 720-No), the communication server (220) may return the latest snapshot (e.g., the first snapshot (410)) stored in the storage server (240) to the user client.
[0058] According to one embodiment of the present disclosure, in operation 735, if the state (State) of the query requested by the user client (210) is an execution state (e.g., operation 710-No), the communication server (220) may compare the size of the number (Count) of the query requested by the user client (210) and the number (dataCount) of the first snapshot (e.g., the most recently created / stored snapshot) containing query data among at least one snapshot of the execution state stored in the storage server (240). According to one embodiment of the present disclosure, in operation 745, if it is determined that the number (Count) of the query requested by the user client (210) and the number (dataCount) of the first snapshot (e.g., the most recently created / saved snapshot) containing query data among at least one snapshot of the execution state stored in the storage server (240) are the same size (e.g., operation 740-Yes), the communication server (220) may return to the user client (210) a snapshot that matches the number (Count) of the query requested by the user client (210). According to one embodiment of the present disclosure, if it is determined in operation 750 that the size of the number (Count) of the query requested by the user client (210) and the number (dataCount) of the earliest snapshot (e.g., the latest created / saved snapshot) containing query data among at least one snapshot of the running state stored in the storage server (240) are not the same (e.g., operation 740-No), the communication server (220) may determine whether the number (Count) of the query requested by the user client (210) is the same as a value obtained by adding 1 to the number (dataCount) of the earliest snapshot (e.g., the latest created / saved snapshot as the second snapshot (420)) containing query data among at least one snapshot of the running state stored in the storage server (240).According to one embodiment of the present disclosure, if the communication server (220) determines in operation 755 that the number (Count) of the query requested by the user client (210) is equal to the value obtained by adding 1 to the number (dataCount) of the earliest snapshot (e.g., the latest generated / stored snapshot) containing query data among at least one snapshot of a running state stored in the storage server (240) (e.g., operation 750-Yes), since this is a request for a snapshot that is currently being processed, the communication server (220) may wait for a specified time until the processing of the query is completed and then return the newly generated snapshot to the user client (210). In this case, according to one embodiment of the present disclosure, if the specified time has elapsed or the number of retries for obtaining the newly generated snapshot has exceeded a specified number, the communication server (220) may return a 503 code, which is a request re-request code, to the user client (210) to allow the user client (210) to access the snapshot again. According to one embodiment of the present disclosure, the communication server (220), in operation 760, if it is determined that the number (Count) of the query requested by the user client (210) is different from the value obtained by adding 1 to the number (dataCount) of the first snapshot (e.g., the most recently created / stored snapshot) containing query data among at least one snapshot of the execution state stored in the storage server (240), the communication server (220) may return an error value to the user client (210) (e.g., operation 750 - Yes).
[0059] FIG. 8 is an exemplary diagram illustrating a function or operation of a server (e.g., a work server) according to one embodiment of the present disclosure to overwrite an existing snapshot with a current snapshot and store only the latest snapshot in a server (e.g., a storage server).
[0060] Referring to FIG. 8, the job server (250) according to one embodiment of the present disclosure may overwrite a value in “userID / queryID / latest” (in other words, a key) if query data does not exist in the snapshot based on whether query data exists in the snapshot. According to one embodiment of the present disclosure, when a value in “userID / queryID / latest” is overwritten, the nextURI number of the snapshot may continuously increase. The job server (250) according to one embodiment of the present disclosure may store an initial snapshot (410a) stored in a storage server (240) by a communication server (220) as a latest snapshot (e.g., the first snapshot (410)). The job server (250) according to one embodiment of the present disclosure may overwrite a snapshot (e.g., the 1-1 snapshot (410b)) that does not include query data to the first snapshot (410). Repeatedly, the job server (250) according to one embodiment of the present disclosure can overwrite the first snapshot (410) with a snapshot that does not include query data (e.g., the 1-10th snapshot (410c)). In this way, the job server (250) according to one embodiment of the present disclosure updates the snapshots stored in the storage server (240) so that only the latest snapshot (e.g., the first snapshot (410)) is stored in the storage server (240), thereby enabling the communication server (220) and / or the user client (210) to access the snapshot that includes query data (e.g., the second snapshot (420)) through at least one GET request. According to this feature of the present invention, a relatively shorter delay time can be ensured compared to a case in which snapshots that do not include query data are sequentially accessed and then a snapshot that includes query data (e.g., the second snapshot (420)), as in the conventional art.According to one embodiment of the present disclosure, snapshots in which query data does not exist are simply information that records the progress of a query, and thus do not affect the actual query result, so there may be no problem even if duplicate snapshots are continuously returned to the user client (210).
[0061] FIG. 9 is an exemplary diagram for explaining a function or operation of an electronic device (101) (e.g., a communication server (220)) according to one embodiment of the present disclosure accessing a snapshot containing query data through a latest snapshot.
[0062] When a communication server (220) according to one embodiment of the present disclosure returns a first snapshot (410) that does not include query data to a user client (210), the first snapshot (410) that does not include query data (e.g., the latest snapshot) may include “communication server address / user ID / query ID / EXECUTING / 1” as a nextURI. The user client (210) according to one embodiment of the present disclosure may transmit a GET request to “communication server address / user ID / query ID / EXECUTING / 1”. In this case, assuming that the trino server (260) and the job server (250) according to one embodiment of the present disclosure have completed up to EXECUTING-5 (e.g., when the third snapshot (910) and the fourth snapshot (920) are stored as snapshots including query data in the storage server (240), the communication server (220) according to one embodiment of the present disclosure can access “user ID / query ID / EXECUTING / 1” of the storage server (240) and return (e.g., transmit) the snapshot including data to the user client (210). The user client (210) according to one embodiment of the present disclosure can obtain the EXECUTING-1 snapshot (e.g., the second snapshot (420)) and transmit a GET request to “communication server address / user ID / query ID / EXECUTING / 2” which is the nextURI included in the EXECUTING-1 snapshot (e.g., the second snapshot (420)). According to one embodiment of the present disclosure, such a process is repeatedly performed so that when the user client (210) according to one embodiment of the present disclosure obtains “communication server address / user ID / query ID / EXECUTING / 5” (e.g., the fourth snapshot (920)), the query can be terminated because “communication server address / user ID / query ID / EXECUTING / 5” (e.g., the fourth snapshot (920)) is a snapshot with an empty nextURI field.In this way, in a serverless system (200) according to one embodiment of the present disclosure, all snapshots including query data can be stored in a storage server (240).
[0063] An electronic device (101) (e.g., a communication server (220) of FIG. 2) according to one embodiment of the present disclosure includes a communication module (e.g., a communication module (190) of FIG. 1), at least one processor (e.g., a processor (120) of FIG. 1), and a memory (e.g., a memory (130) of FIG. 1), wherein the memory includes instructions that, when executed, cause the electronic device to obtain a data provision request for a query from a user client through the communication module, identify URI information included in the data provision request of the user based on the obtaining of the data provision request, the URI information including status information of the query and number information of the query, and access a first snapshot or a second snapshot stored in a storage server based on the identification of the URI information, wherein the first snapshot may be updated with another snapshot that does not include result data for the query as the query progresses, and the second snapshot may include a snapshot including first result data for the query.
[0064] According to one embodiment of the present disclosure, the instructions may further include an instruction that, when executed, causes the electronic device to return an error value to the user client if the query status included in the URI information is higher than the query status stored in the storage server.
[0065] According to one embodiment of the present disclosure, the instructions may further include instructions that, when executed, cause the electronic device to compare a query number included in the URI information with a snapshot number of the first snapshot when the status of the query is identified as the query waiting state, and return the first snapshot to the user client based on a result of the comparison.
[0066] According to one embodiment of the present disclosure, the instructions may further include instructions that, when executed, cause the electronic device to compare a query number included in the URI information with a snapshot number of the second snapshot when the status of the query is identified as the query execution status, and return the second snapshot to the user client based on a result of the comparison.
[0067] According to one embodiment of the present disclosure, the instructions may further include instructions that, when executed, cause the electronic device to compare a query number included in the URI information with a snapshot number of the second snapshot when the status of the query is identified as the query execution status, and return the second snapshot to the user client after waiting for a specified time based on a result of the comparison.
[0068] According to one embodiment of the present disclosure, the storage server may be configured to store a third snapshot, different from the second snapshot, that includes second result data for the query.
[0069] According to one embodiment of the present disclosure, the instructions may further include instructions that, when executed, cause the electronic device to compare a query number included in URI information included in the returned second snapshot with a snapshot number of the third snapshot when the status of the query is identified as the query execution status, and return the third snapshot to the user client based on a result of the comparison.
[0070] Electronic devices according to various embodiments disclosed in the present disclosure may take various forms. Electronic devices may include, for example, portable communication devices (e.g., smartphones), computer devices, portable multimedia devices, portable medical devices, cameras, wearable devices, or home appliances. Electronic devices according to embodiments of the present disclosure are not limited to the aforementioned devices.
[0071] The various embodiments of the present disclosure and the terminology used therein are not intended to limit the technical features described in the present disclosure to specific embodiments, but should be understood to include various modifications, equivalents, or substitutes of the embodiments. In connection with the description of the drawings, similar reference numerals may be used for similar or related components. The singular form of a noun corresponding to an item may include one or more of the items, unless the context clearly indicates otherwise. In the present disclosure, each of the phrases "A or B," "at least one of A and B," "at least one of A or B," "A, B, or C," "at least one of A, B, and C," and "at least one of A, B, or C" can include any one of the items listed together in the corresponding phrase, or all possible combinations thereof. Terms such as "first," "second," or "first" or "second" may be used merely to distinguish one component from another, and do not limit the components in any other respect (e.g., importance or order). When a component (e.g., a first component) is referred to as "coupled" or "connected" to another (e.g., a second component), with or without the terms "functionally" or "communicatively," it means that the component can be connected to the other component directly (e.g., wired), wirelessly, or through a third component.
[0072] The term "module" used in various embodiments of the present disclosure may include a unit implemented in hardware, software, or firmware, and may be used interchangeably with terms such as logic, logic block, component, or circuit. A module may be an integral component, or a minimum unit or part of such a component that performs one or more functions. For example, according to one embodiment, a module may be implemented in the form of an application-specific integrated circuit (ASIC).
[0073] Various embodiments of the present disclosure may be implemented as software (e.g., a program (2540)) including one or more instructions stored in a storage medium (e.g., an internal memory (2536) or an external memory (2538)) readable by a machine (e.g., an electronic device (2501)). For example, a processor of the machine (e.g., the electronic device (2501)) may call at least one instruction among the one or more instructions stored from the storage medium and execute it. This enables the machine to operate to perform at least one function according to the at least one called instruction. The one or more instructions may include code generated by a compiler or code executable by an interpreter. The machine-readable storage medium may be provided in the form of a non-transitory storage medium. Here, "non-transitory" simply means that the storage medium is a tangible device and does not contain signals (e.g., electromagnetic waves), and the term does not distinguish between cases where data is stored semi-permanently or temporarily on the storage medium.
[0074] According to one embodiment, the method according to various embodiments disclosed in the present disclosure may be provided as included in a computer program product. The computer program product may be traded as a commodity between a seller and a buyer. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., compact disc read-only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) via an application store (e.g., Play Store™) or directly between two user devices (e.g., smart phones). In the case of online distribution, at least a portion of the computer program product may be temporarily stored or temporarily generated in a machine-readable storage medium, such as the memory of a manufacturer's server, an application store's server, or a relay server.
[0075] According to one embodiment of the present disclosure, each component (e.g., a module or a program) of the above-described components may include one or more entities, and some of the entities may be separately arranged in other components. According to one embodiment of the present disclosure, one or more components or operations of the aforementioned components may be omitted, or one or more other components or operations may be added. Alternatively or additionally, a plurality of components (e.g., a module or a program) may be integrated into a single component. In this case, the integrated component may perform one or more functions of each of the plurality of components identically or similarly to those performed by the corresponding component among the plurality of components prior to the integration. According to one embodiment of the present disclosure, operations performed by a module, program, or other component may be executed sequentially, in parallel, iteratively, or heuristically, or one or more of the operations may be executed in a different order, omitted, or one or more other operations may be added.
Claims
1. In electronic devices, Communication module, At least one processor, and A memory storing instructions, said instructions, when executed by said at least one processor, causing said electronic device to: Through the above communication module, a request for data provision for a query is obtained from a user client, Based on the acquisition of the above data provision request, URI information included in the user's data provision request is identified, wherein the URI information includes status information of the query and number information of the query, and Based on the identification of the above URI information, access the first snapshot or the second snapshot stored in the storage server, Containing instructions set to return the first snapshot or the second snapshot to the user client, The above first snapshot is updated with another snapshot that does not include result data for the above query generated according to processing of the above query, An electronic device, characterized in that the second snapshot comprises a snapshot including first result data for the query.
2. In paragraph 1, An electronic device characterized in that the instructions further include instructions that, when executed by the at least one processor, cause the electronic device to return an error value to the user client if the query status included in the URI information is higher than the query status stored in the storage server.
3. In paragraph 1 or 2, An electronic device characterized in that the instructions, when executed by the at least one processor, further include instructions that cause the electronic device to compare a query number included in the URI information with a snapshot number of the first snapshot when the state of the query is identified as the query waiting state, and to return the first snapshot to the user client based on a result of the comparison.
4. In any one of paragraphs 1 to 3, An electronic device characterized in that the instructions, when executed by the at least one processor, further include instructions that cause the electronic device to compare a query number included in the URI information with a snapshot number of the second snapshot when the state of the query is identified as the query execution state, and to return the second snapshot to the user client based on a result of the comparison.
5. In any one of paragraphs 1 to 4, An electronic device characterized in that the instructions, when executed by the at least one processor, further include instructions that cause the electronic device to compare a query number included in the URI information with a snapshot number of the second snapshot when the state of the query is identified as the query execution state, and to return the second snapshot to the user client after waiting for a specified period of time based on a result of the comparison.
6. In any one of paragraphs 1 to 5, An electronic device, characterized in that the storage server is set to store a third snapshot, different from the second snapshot, including second result data for the query.
7. In any one of paragraphs 1 to 6, An electronic device characterized in that the instructions, when executed by the at least one processor, further include instructions that cause the electronic device to compare a query number included in URI information included in the returned second snapshot with a snapshot number of the third snapshot, if the state of the query is identified as the query execution state, and to return the third snapshot to the user client based on a result of the comparison.
8. In a non-transitory storage medium, the storage medium is configured to store computer-readable instructions, which, when executed by a processor of an electronic device, cause the electronic device to: Through the communication module of the above electronic device, a request for providing data for a query is obtained from a user client, Based on the acquisition of the above data provision request, URI information included in the user's data provision request is identified, wherein the URI information includes status information of the query and number information of the query, and Based on the identification of the above URI information, instructions are included to access the first snapshot or the second snapshot stored in the storage server, The above first snapshot is updated with another snapshot that does not contain result data for the above query as the above query progresses. A non-transitory recording medium, characterized in that the second snapshot comprises a snapshot including first result data for the query.
9. In paragraph 8, A non-transitory storage medium characterized in that the instructions further include instructions that, when executed by a processor of the electronic device, cause the electronic device to return an error value to the user client if the query status included in the URI information is higher than the query status stored in the storage server.
10. In clause 8 or 9, A non-transitory recording medium characterized in that the instructions, when executed by a processor of the electronic device, further include instructions that cause the electronic device to compare a query number included in the URI information with a snapshot number of the first snapshot when the state of the query is identified as the query waiting state, and to return the first snapshot to the user client based on a result of the comparison.
11. In any one of paragraphs 8 to 10, A non-transitory recording medium characterized in that the instructions, when executed by a processor of the electronic device, further include instructions that cause the electronic device to compare a query number included in the URI information with a snapshot number of the second snapshot when the state of the query is identified as the query execution state, and to return the second snapshot to the user client based on a result of the comparison.
12. In any one of paragraphs 8 to 11, A non-transitory recording medium characterized in that the instructions, when executed by a processor of the electronic device, further include instructions that cause the electronic device to compare a query number included in the URI information with a snapshot number of the second snapshot when the state of the query is identified as the query execution state, and to return the second snapshot to the user client after waiting for a specified period of time based on a result of the comparison.
13. In any one of paragraphs 8 to 12, A non-transitory recording medium, characterized in that the storage server is set to store a third snapshot different from the second snapshot, the third snapshot including second result data for the query.
14. In any one of paragraphs 8 to 13, A non-transitory recording medium characterized in that the instructions, when executed by a processor of the electronic device, further include instructions that cause the electronic device to compare a query number included in URI information included in the returned second snapshot with a snapshot number of the third snapshot when the state of the query is identified as the query execution state, and to return the third snapshot to the user client based on a result of the comparison.
15. A method for controlling an electronic device, An operation of obtaining a request for providing data for a query from a user client through a communication module of the above electronic device, Based on the acquisition of the above data provision request, an operation of identifying URI information included in the user's data provision request, wherein the URI information includes status information of the query and number information of the query, and Based on the identification of the above URI information, an action of accessing the first snapshot or the second snapshot stored in the storage server, and comprising an action of returning the first snapshot or the second snapshot to the user client; The above first snapshot is updated with another snapshot that does not include result data for the above query generated according to processing of the above query, A method for controlling an electronic device, characterized in that the second snapshot comprises a snapshot including first result data for the query.
Citation Information
Patent Citations
Validating Query Results During Asynchronous Database Replication
US20180336258A1
Dynamic snapshot isolation protocol selection
US20180349418A1
Physical size API for snapshots backed up to object store
US20230350760A1
Method for using data from a data query cache
US6519592B1
Method to improve caching accuracy by using snapshot technology
US9021087B1