You are reading the article What Is Android Architecture And Libraries? updated in February 2024 on the website Flu.edu.vn. We hope that the information we have shared is helpful to you. If you find the content interesting and meaningful, please share it with your friends and continue to follow and support us for the latest updates. Suggested March 2024 What Is Android Architecture And Libraries?Introduction to Android Architecture
Android is an operating system for Mobile devices (Smartphones and Tablets) and an open-source platform built on Linux OS. A conglomerate of Handset companies like Sony, Samsung, and Intel developed it. The Open Handset Alliance (OHA), led by Google, releases versions of the Android operating system (OS) for deployment on mobile devices.
Start Your Free Software Development Course
Android Architecture provides an integrated approach for developers to develop mobile applications that can run on any device with Android OS installed in it, and it allows the applications component to be reused and obviate the need for redevelopment. Android source codes are offered under the category of open-source license on multiple websites. Google hosts most of it under Apache License 2.0 and kernel under General public license 2.0. It also provides a robust run-time environment for the execution of apps with a powerful interaction with peripheral devices and other apps.What is Android Architecture?
Before studying Architecture, let us go through some of the features of the Android Operating system.
Android OS can be customized as needed, and hence we can notice many avatars of this OS are deployed in different mobile devices with multiple unique features.
It supports all mobile connectivity technologies, viz., Wi-Fi, CDMA, GSM, NFC, Bluetooth, etc., and basic functionalities like telephony, SMS, and data transfer. With this connectivity, data can be transferred back and forth between devices thru various apps.
It provides Interfaces (APIs) that support location-dependent services such as GPS.
SQLite database provides storage functionalities needed by Android. Being a lightweight database, it enables simpler storage and quicker data retrieval.
It supports all versions of multimedia files (Audio/Video) and integrates a Microphone, Camera, Accelerometer, and speaker for effective management of recording and playback operations.
Developers can use HTML5 and CSS3 to create an intuitive and impressive front-end screen.
It allows multiple windows to be active simultaneously, performing different tasks.
Graphics 2D/3D are supported.
Supports NFC technology that connects two NFC-enabled devices by touching each other.
Other features include multi-language support, User-adjustable widgets, and Google Cloud messaging.Architecture:
It consists of several software modules to support the functioning of mobile devices. These software modules mainly contain the kernel and set of Libraries that facilitate mobile application development, and they form part of the runtime, application framework, and the actual application.
The application modules are grouped into five sections under four different layers.
Android runtime layer has two sections, namely DVM and Libraries, and all the layers have only one section each.1. Application Layer
The application layer is the topmost layer in the architecture, and it is the front end for the users. Native applications developed using Android architecture and third-party applications are installed in this layer. Applications from this layer get executed with the help of the run time layer using the classes and services provided by the framework layer. Example of Application is Email, Contacts, Calendar, Camera, Time, Music, Gallery, Phone, SMS, Alarm, Home, and Clock.2. Applications Framework Layer
The applications Framework layer holds the classes needed to develop applications in the Android platform. It enables access to hardware, handles the user interface, and manages resources for an application. The services provided by this layer are made available to the application layer for development as a class. Some of the components in the framework layer are NFC service, Notification Manager, Activity Manager, Telephony service, Package Manager, and view system, and used in application development as needed.3. Android Runtime Layer
Android Runtime layer is vital to this OS, containing sections like Dalvik Virtual Machine (DVM) and Core libraries. This environment provides basic power to the applications with the help of libraries. Dalvik virtual machine exploits the basic inherent power of Java language in managing memory and multi-threading options to provide multiple instances to Android OS and ensure that it runs effectively. It leans on Kernel for threading and OS-level functionalities. This layer provides the services of Zygote to handle the forking of the new process, Android debug bridge, etc. Core Libraries provide features of Java language for the development of applications in Android OS.4. Kernel Layer Framework of Android Architecture
The application framework provides Java classes for application development. Developers use these Java classes during coding. This component provides the following services.
Activity Manager: Manages the application’s lifecycle and tracks all the activities.
Content Provider: Facilitates sharing data with external applications.
Resource Manager: Enables applications to use other resources like color settings, user interactions and strings.
Notification Manager: Manages alerts and notifications to users on the status of application execution.
View system: Provides various view options for creating user interaction.Android Architecture Libraries
Some of the components in this library are:
1. Media framework to manage Audio and video recording and playing.
2. Surface Manager to monitor display functionalities and text manipulation during display.
3. SQLite for Database management.
5. Freetype supports the front end.
6. Web-Kit supports browser functionalities.
7. Readily available Widgets such as buttons, layouts, radio buttons, and lists.
8. SSL provides internal security.
9. Interfaces and other services:
Access to OS services for communication across processes.
Access to App model templates for easy development
Enables content access and interactions across applications.Conclusion
In summary, Android Architecture provides a robust framework, interfaces, and libraries for developing and executing superior applications on mobile devices. It fully uses unique features of Android, such as Open source, Community support, Effective marketing, Low cost of development, a Rich environment for app development, and Solid inter-app and intra-app interfaces.Recommended Articles
This is a guide to Android Architecture. Here we discuss the introduction, architecture, framework, and Android architecture libraries. You can also go through our other suggested articles to learn more –
You're reading What Is Android Architecture And Libraries?
This article was published as a part of the Data Science Blogathon.Introduction
Working on a Project on image recognition or Object Detection but didn’t have the basics to build an architecture?
In this article, we will see what are convolutional neural network architectures right from basic and we will take a basic architecture as a case study to apply our learnings, The only pre-requisite is you just need to know how convolution works But don’t worry it is very simple !!
Let us take a simple Convolutional neural network,
We will go layer-wise to get deep insights about this CNN.
First, there a few things to learn from layer 1 that is striding and padding, we will see each of them in brief with examples
Let us suppose this in the input matrix of 5×5 and a filter of matrix 3X3, for those who don’t know what a filter is a set of weights in a matrix applied on an image or a matrix to obtain the required features, please search on convolution if this is your first time!
Note: We always take the sum or average of all the values while doing a convolution.
A filter can be of any depth, if a filter is having a depth d it can go to a depth of d layers and convolute i.e sum all the (weights x inputs) of d layers
Here the input is of size 5×5 after applying a 3×3 kernel or filters you obtain a 3×3 output feature map so let us try to formulate this
So the output height is formulated and the same with o/p width also…
While applying convolutions we will not obtain the output dimensions the same as input we will lose data over borders so we append a border of zeros and recalculate the convolution covering all the input values.
We will try to formulate this,
Here 2 is for two columns of zeros along with height and width, and formulate the same for width also
Some times we do not want to capture all the data or information available so we skip some neighboring cells let us visualize it,
Here the input matrix or image is of dimensions 5×5 with a filter of 3×3 and a stride of 2 so every time we skip two columns and convolute, let us formulate this
If the dimensions are in float you can take ceil() on the output i.e (next close integer)
Here H refers to height, so the output height is formulated and the same with o/p width also and here 2 is the stride value so you can make it as S in the formulae.
In general terms pooling refers to a small portion, so here we take a small portion of the input and try to take the average value referred to as average pooling or take a maximum value termed as max pooling, so by doing pooling on an image we are not taking out all the values we are taking a summarized value over all the values present !!!
here this is an example of max pooling so here taking a stride of two we are taking the maximum value present in the matrix
The activation function is a node that is put at the end of or in between Neural Networks. They help to decide if the neuron would fire or not. We have different types of activation functions just as in the figure above, but for this post, my focus will be on Rectified Linear Unit (ReLU)
Don’t drop your jaws, this is not that complex this function simply returns 0 if your value is negative else it returns the same value you gave, nothing but eliminates negative outputs and maintains values between 0 to +infinity
Now, that we have learned all the basics needed let us study a basic neural net called LeNet.LeNet-5
Before starting we will see what are the architectures designed to date. These models were tested on ImageNet data where we have over a million images and 1000 classes to predict
What are the inputs and outputs (Layer 0 and Layer N) :
Here we are predicting digits based on the input image given, note that here the image is of dimensions height = 32 pixels, width = 32 pixels, and a depth of 1, so we can assume that it is a grayscale image or a black and white one, keeping that in mind the output is a softmax of all the 10 values, here softmax gives probabilities or ratios for all the 10 digits, we can take the number as output with highest probability or ratio.
Convolution 1 (Layer 1) :
Here we are taking the input and convoluting with filters of size 5 x 5 thereby producing an output of size 28 x 28 check the formula above to calculate the output dimensions, the thing here is we have taken 6 such filters and therefore the depth of conv1 is 6, hence its dimensions were, 28 x 28 x 6 now pass this to the pooling layer
Pooling 1 (Layer 2) :
Here we are taking the 28 x 28 x 6 as input and applying average pooling of a matrix of 2×2 and a stride of 2 i.e hovering a 2 x 2 matrix on the input and taking the average of all those four pixels and jumping with a skip of 2 columns every time thus giving 14 x 14 x 6 as output we are computing the pooling for every layer so here the output depth is 6
Convolution 2 (Layer 3) :
Here we are taking the 14 x 14 x 6 i.e the previous o/p and convoluting with a filter of size 5 x5, with a stride of 1 i.e (no skip), and with zero paddings so we get a 10 x 10 output, now here we are taking 16 such filters of depth 6 and convoluting thus obtaining an output of 10 x 10 x 16
Pooling 2 (Layer 4):
Here we are taking the output of the previous layer and performing average pooling with a stride of 2 i.e (skip two columns) and with a filter of size 2 x 2, here we superimpose this filter on the 10 x 10 x 16 layers therefore for each 10 x 10 we obtain 5 x 5 outputs, therefore, obtaining 5 x 5 x 16
Layer (N-2) and Layer (N-1) :
Finally, we flatten all the 5 x 5 x 16 to a single layer of size 400 values an inputting them to a feed-forward neural network of 120 neurons having a weight matrix of size [400,120] and a hidden layer of 84 neurons connected by the 120 neurons with a weight matrix of [120,84] and these 84 neurons indeed are connected to a 10 output neurons
These o/p neurons finalize the predicted number by softmaxing .How does a Convolutional Neural Network work actually?
It works through weight sharing and sparse connectivity,
So here as you can see the convolution has some weights these weights are shared by all the input neurons, not each input has a separate weight called weight sharing, and not all input neurons are connected to the output neuron a’o only some which are convoluted are fired known as sparse connectivity, CNN is no different from feed-forward neural networks these two properties make them special !!!
1. After every convolution the output is sent to an activation function so as to obtain better features and maintaining positivity eg: ReLu
2. Sparse connectivity and weight sharing are the main reason for a convolutional neural network to work
3. The concept of choosing a number of filters in between layers and padding and stride and filter dimensions are taken on doing a number of experimentations, don’t worry about that, focus on building foundation, someday you will do those experiments and build a more productive one!!!
Stock Android, also called “vanilla” Android, is the most basic version of the Android operating system available. Stock Android devices run the core kernel of Android as designed and developed by Google. It’s typically distinguished by the lack of carrier-installed programs. For example, a stock Android phone on Verizon’s network will not include Verizon-installed apps. For many users removing this bloatware is a huge incentive, allowing them to regain control over their devices.
Stock Android is also typically not reskinned or redesigned by the phone’s manufacturer (OEM). For example, Sony runs a close-to-stock version of Android on most of their phones but reskins the OS to meet their design specifications. For an example of a heavily-reskinned OS, check out Samsung’s modified version of Android, called TouchWiz, or HTC’s own customized version of Android. It’s a huge departure from stock Android’s design language which may or may not be a turnoff.
Because Android is open source, OEMs and carriers can take huge liberties with core functionalities of the operating system. This is both a strength and a weakness. Android’s customization is a huge appeal for many users. Cheaply-licensed versions of the OS allow for cheap, powerful handsets. But it also means that carriers and manufacturers can make decisions that consumers don’t like and have no power to change. Stock Android frees you from all of that. You can experience Android the way it was “meant to be” without carrier or OEM interference.Benefits of Stock Android
Running a stock or close-to-stock version of Android can accrue a number of benefits to the user.
Reclaimed storage space: stock Android removes carrier-installed apps from your device. As a result, you’ll reclaim some storage space for your own use.
Greater control over your device: removing bloatware provides greater control over what is on your device and what your device does.
Improved performance (maybe): carriers don’t always do a great job writing their apps. Poorly-written software slows your phone down and drains your battery.
Faster OS updates: most stock Android phones will get access to Android updates more quickly than their carrier counterparts. Mobile carriers have developed a well-deserved reputation for slow-rolling Android phone owners on OS updates. This often means long delays between official release of a new Android version and availability on carrier devices. Stock Android users don’t need to wait for carriers to modify and reskin Android for their phones. As a result the update can often be installed as soon as its available. This is especially true of Google’s Nexus devices and Google Play edition handsets, which are sold around the premise of immediate updates to their stock Android OS.
Consistent design: designers build stock Android to be visually consistent. When carriers reskin or modify a comportment of the operating system, it often breaks that consistent design language. This can lead to a cluttered, messy feel.
Greater customization: it’s often easier for users running stock Android to root and customize their devices. Without carrier-imposed hurdles to leap, developers and modders have a little more freedom. One of Android’s biggest appeals is deep capability for customization, especially when compared to iOS’ locked-down ecosystem. Stock Android devices allow for more of that, and ROMs and launchers can be more powerful and easier to install.Conclusion
If you want more control over your device’s functionality and update cycle, stock Android is amazing. You might forgo some unique carrier features or designs, but on balance you’ll be getting a phone with more storage space and faster operation.
Alexander Fox is a tech and science writer based in Philadelphia, PA with one cat, three Macs and more USB cables than he could ever use.
Subscribe to our newsletter!
Our latest tutorials delivered straight to your inbox
Sign up for all newsletters.
The Android operating system is the most widespread mobile device operating system in the world. There’s always a new version of Android around the corner, so there’s a good chance you’re not running the latest version.
Do you have the latest version? We’ll show you how to check what version of Android you have, what the latest version offers, how to update, and what’s next for Android.
Table of ContentsThe Latest Android Version is Android 12
At the time of writing, the latest version of the Android OS is 12, released on October 4, 2023.
Of course, unless you’re running a “stock” Android device, you may not have access to Android 12 for quite some time. This is because each device manufacturer tends to develop and put their own custom “skin” on top of Android. For example, Samsung Galaxy phones have One UI, Xiaomi has MIUI, OnePlus has OxygenOS, and so on, which causes the delay.Key Features of Android 12
Like all major versions of Android, Android 12 comes with several key features that will either convince you to update or stick with the Android version that you know and love.
Android 12 is a major refinement of the operating system. The graphical interface has received a major facelift. System colors can automatically adjust based on your wallpaper. Widgets have a new look, animations and motions have been modernized. Everything on the home screen feels more polished and premium.
Another notable set of features in Android 12 relates to accessibility. There’s a new window magnifier, an extra dim mode for those with light sensitivity or who want to browse in the dark.
Depending on your vision needs, you can also bold text across the entire phone and do system-wide color tweaking, including switching the phone to grayscale.
Privacy features bring Android 12 more in line with the latest version of Apple’s iOS. There are new clear indicators when your mic or camera is recording, and you can permanently disable your camera and mic if you don’t want any apps to access them.What Happened to the Dessert Names?
Although the first Android versions didn’t have code names, you may remember that for a long time, each Android version was known by dessert names:
Cupcake (Android 1.5)
Donut (Android 1.6)
Eclair (Android 2.0 – 2.1)
Froyo (Android 2.2 – 2.2.3)
Gingerbread (Android 2.3 – 2.3.7)
Honeycomb (Android 3.0 – 3.2.6)
Ice Cream Sandwich (Android 4.0 – 4.0.4)
Jelly Bean (Android 4.1- 4.3.1)
KitKat (Android 4.4 – 4.4.4)
Lollipop (Android 5.0 – 5.1.1)
Marshmallow (Android 6.0 – 6.0.1)
Nougat (Android 7.0 – 7.1.2)
Oreo (Android 8.0 – 8.1)
Pie (Android 9.0)
With Android 10 (aka “Quince Tart”), Google decided that it would switch over to version numbers just like Apple’s iOS.
The dessert code names haven’t gone away, but they are no longer the official public name of the operating system. For example, Android 11’s internal codename is “Red Velvet Cake.” Android 12’s dessert name is “Snow Cone”!How to Update to the Latest Version of Android
If you’re raring to go and want to upgrade to the latest version of Android, there are a few ways to do it. The one that requires the least effort is simply waiting until you receive a notification that your phone is ready for a system update. Then you can simply schedule the update or proceed with it immediately, downloading the update over Wi-Fi.
If you want to check whether an update is available manually, open Settings and select software update.Why Can’t I Update to the Latest Version of Android?
You may have been excited to see the official release date for the new version of Android has come and gone, but the offer to upgrade to it doesn’t seem to be available. As mentioned above, most Android phone makers take the time to customize Android before releasing it on their phones. This can take a few months, so you may have to wait for those new features.
Then again, companies like Samsung or Xiaomi add features to their custom version of Android that isn’t in the stock Android release or will only come in a future version. For example, a screen recording feature was only added to Android 11, but Samsung Galaxy phones (among others) have had this for years before Android 11’s release.
If your handset is older than two years, you may never receive the option to update your phone. Android phones have a notoriously short support cycle compared to iPhones, and you may find that you’re left out in the cold as they turn their attention to new handsets.
This is changing; for example, Samsung has committed to at least four Android version updates for its Galaxy S22 phone range. If you have a stock Android device such as the Google Pixel 6 or other Pixel phones, you can update as soon as a new Android version drops. However, Android may not support older models because they can’t handle new functionality.What Happens if You Don’t Update?
If you can’t (or don’t want to) update to a newer version of Android, you can keep using your phone as usual. You should still get security updates and bug fixes for a few years. However, you may find that Android apps from the Google Play Store eventually drop support for your Android version, making your phone less useful over time.When is Android 13 Available?
While Google has not given a firm release date for Android 13 “Tiramisu”, general expectations are that it will have a stable release late in Q3 or early in Q4 of 2023. The next Google I/O event will likely provide a firm date. Except for stock Android devices, users can expect to get Android 13 sometime in 2023.Previewing Upcoming Android Versions
If you don’t want to wait to experience the next version of Android, you can try the preview builds meant for developers. If you have a Google Pixel device, you can install a developer preview build using developer tools on your phone. However, we don’t recommend that anyone do this on their primary device.
You can also grab a preview build from Google’s Developer site and run it in an Android Emulator to get a taste of what’s to come.Getting New Android Versions on Unsupported Devices
If your phone manufacturer has abandoned Android updates for your device, you always have the option of installing a custom ROM on your phone. This means erasing the factory system image and replacing it with one made by a third party.
This is an excellent way to update a phone or tablet that is no longer receiving updates but may have competent hardware to run new versions of Android. However, you may face some downsides, such as losing manufacturer-specific features for that device. For example, if you have a fancy foldable phone, it’s unlikely that a custom ROM not meant for that handset would support folding functions.
Flashing your phone with a custom ROM is not for the faint-hearted, but if you follow the steps to root your device, install custom recovery software, and finally flash a custom ROM, you should get through it.I Want to Go Back to an Older Version of Android
Getting the latest version of Android is great, but sometimes you may feel like you prefer the way things used to be, or perhaps there are significant bugs on your phone that you can’t live with until a patch arrives.
It is possible to roll back to a previous version of Android, but not using official methods. Instead, check out our guide on downgrading to an older Android version.
Android phones come with a bunch of pre-installed apps, most of which are Google-made applications that may help you get work done on a daily basis. Some manufacturers install their own set of apps out of the box but the one app that you may notice on any Android app you use will be SIM Toolkit. So what is SIM Toolkit and what can you do with it? That’s what we’re here to talk about in this post.
What is SIM Toolkit?
As smartphones became more and more feature-rich, the process of setting up SIM cards (called provisioning in technical terms) became harder by the day. That’s because provisioning a SIM on a phone needed details like SMS center number, MMS server name, mailbox number, and other data. This data differed from one operator to the other and that’s where SIM Application Toolkit came into being.
SIM Toolkit or SIM Application Toolkit (STK) is a set of commands available on your SIM card that are defined by 3GPP and ETSI specifications and can either be activated by the user or due to a networking event. Essentially, they’re small applications that come preinstalled on your SIM which itself can be considered a mini-computer where programming is possible.
STK was developed as a means to run applications directly on a SIM card that’s based on a GSM network. The standard is used by mobile network operators and service providers to execute actions that trigger various value-added services. These value-added services can then be implemented on your SIM card to bring a carrier’s custom UI and menus onto different handsets.
The Toolkit app that’s available on your phone is programmed into the SIM card by your cellular service provider. This app enables means of interaction between the network and user, reveals the mobile equipment interface, and provides users access to network control.
What feature does the SIM Toolkit offer?
The SIM Toolkit’s operation on your phone can be categorized into various groups that offer different functions.
User Interface control: Display text, menu, play tones, select menu item, and language notifications.
SIM control: Refresh your SIM card, check poll interval, disable polling, enable events, get reader status, switch ON/OFF SIM card.
Network control: This allows sending short messages, USSD and DTMF info, and setting up a call.
Inter-networking control: Can open the browser, send or receive data, open channels, and retain channel status.
Other functions: Give access to timer management and local phone info.
If you’re wondering what all these things mean, to put it simply, the SIM Toolkit offers you an easy way to activate or use your operator’s value-added services. Depending on your operator, you will be offered services like utility services (information about missed calls, International calls, air, and rail info), sports scores, caller tunes, astrology, news, jokes, and the ability to contact your operator’s customer care directly.
Additionally, it’s believed that STK offers users improved security for digital transactions as it allows encryption and verification of your identity.
How does it work?
SIM Toolkit is independent of a smartphone’s make and model and it looks pretty much the same on all Android devices. The only thing that might be different from the SIM Toolkit app from one phone to the other is options and menus that are available on-screen since one network might provide options different from another carrier’s value-added services.
Essentially, the SIM Toolkit allows your phone’s SIM to initiate and relay commands between your phone and network.
Think of SIM Toolkit as a client-server relation where your phone acts as the client while the SIM card that inserted into a phone is server-side. Like any other app, the SIM Toolkit implements multiple layers to work with your phone as well as your service provider. These layers include:
RIL – Vendor side software
SIM Toolkit – Machine code used to translate raw text from RIL to the application
Before modern smartphones, a mobile’s SIM toolkit was locked with a PIN or phone lock to protect its applications from being misused. When locked, you won’t be able to access the applications from within the SIM or on the phone without the SIM card.
Prior to 4G, the SIM toolkit was based on the GSM 11.14 standard. The current standard for SIM toolkit for LTE SIMs is 3GPP 31.111 which also incorporates USIM Application Toolkit for networks that still rely on 3G.
Can you disable SIM Toolkit on Android?
The short answer is no. SIM Toolkit is integrated on your phone through your SIM and is an important utility that allows operators to activate a new SIM card or enable a feature from your network to your phone directly. Since it’s an integral part of your phone, there’s no way you can uninstall or disable the SIM Toolkit app on your Android device.
In our opinion, there’s no harm in leaving the app be on your phone simply because it’s tiny compared to other applications on Android and doesn’t hinder your phone’s usage.
That’s all we have to share with you about the SIM Toolkit app on Android.
This article was published as a part of the Data Science Blogathon.Introduction
Arushi is a data architect in a company named Redeem. The company provides cashback to customers who check in at restaurants & hotels. Customers log in through the app and upload the bills and they got a certain percentage of the total bill amount as cashback. The company is currently using an SQL server to manage the customer database. The user base of the company is increasing very rapidly. In order to meet the accelerated growth of the user base, the company plans to switch to the cloud-based serverless architecture. They got GCP-BigQuery as the solution. It is a cloud-based serverless architecture that is fully managed and can be scaled up and scaled down as per the load.BigQuery Ensures Data-Driven Decision Making
BigQuery is the process of making decisions based on the data and not on intuition. Human intuition or observation tends to be biased and provides false conclusions sometimes. Data-Driven decision-making ensures that it is the data from which the conclusion is to be made as it results in error-free judgment. In order to conduct the process, we must follow these steps:1. Business Problem Formulation
It is necessary that you identify the correct business questions before going down the journey. It acts as a priority and provides clarity to the goals. It can be formulated based on your company’s customer needs, maximizing profits, identifying potential customers etc. In our scenario, Redeem company is interested in identifying and categorizing restaurants and hotels based on revenue per user. It helps to segment the restaurants & hotels, and they can come up with the right strategy to maximize their earnings.2. Identify Data Sources & Variables to Capture
Once the Business problem is formulated, the next step is to identify the sources of data and the mechanism to integrate it and store it in a single place. For example, data can come from CSV files, log files, web forms, marketing campaigns, etc. It is also necessary to identify the variables which are the key to the business problem. In our case, Redeem is capturing the relevant variables(Revenue, Number of user check-in, Customer & User details). This data is captured from the app whenever any user check-in and then it is saved in the Google BigQuery table. See the image of the BigQuery table given below:3. Data Cleaning & Organization 4. Querying the Bigquery Table
Big Query provides SQL-like syntax to query the table. We can do aggregation on columns, can join tables, and do many more tasks. BigQuery is ultra-fast and can fetch results within seconds. Here we can see that we are selecting the sum of revenue from the Revenue table.5. Insights Understanding the BigQuery Architecture
BigQuery is Google’s cloud-based data warehouse system. Its serverless architecture separated computing from storage. It means storage and computing power can be scaled up independently. This architecture provides users flexibility and control in terms of storage and cost respectively. Users don’t worry about the underlying structure, as the Google cloud manages everything. It helps users to focus on business problems without any technical expertise in databases. Data is stored in Google distributed file system, which is highly reliable and automatically scales up as per the load. Users can query through BigQuery clients (Web UI, REST API, CLI, and client-side languages). Data is queried from the storage, and then it goes into the compute part, where all the aggregation and calculations are carried out. Google’s highly reliable network connects the two parts – Storage & compute.
If we go deeper, we see that various low-level technologies like Dremel, Colossus, Jupiter, and Borg are running behind the scenes.
It is the execution engine that converts SQL queries into a tree. Reading data from the storage(Colossus) occurs through slots(leaves of the trees). Aggregation is carried through mixers(branches). Jupiter is the connection between leaf nodes and the colossus and is a reliable network system. It also dynamically provides slots so that a single user can get multiple slots for a query.
It is Google’s distributed file system. It provides enough disk to a user. It also handles replication and recovery during disk crashing. It stores the data in a columnar and compressed format, which helps in space optimization and low cost of running.
It is a large-scale cluster management system. It protects from failures like machine crashes, and power supplies fail, etc.BigQuery Structure
A traditional database structure is like a database, with tables and columns; similarly, BigQuery follows a structure.
As there are different departments within a company, you can have different purposes. A project can have more than one dataset.
Tables are the columnar representation of the data. A dataset can have more than one table.
In our case(Redeem): Project Name – redeemanalytics
Tables: Customer & RevenueUse Case of Customer Segmentation
Customers are very important to any organization. As a business, we uniquely fulfill our customer’s needs, generating revenue and profits. Customers’ needs vary from one to another, and it is part of the segmentation process is to group similar customers in the same group.
Redeem is a cashback company that provides cashback to users of restaurants and hotels. The company generates revenue from restaurants/hotels by providing customers with them. It is essential to identify which customers are getting more check-ins. It helps to strategize a new pricing policy.
Business Problem Formulation: How to Know the customers(Restaurants/Hotels) to whom we are providing very good business and categorize them?
Data Source: Redeem capturing the app’s customer and revenue data, then insert it in the BigQuery table. We have two tables: Customers & Revenue. Let’s have a look and do some Exploratory data analysis in BigQuery.1. How many customers do we have?
Let’s count the unique customers.
The query is quite simple. We selected distinct customers from the Customer table, and we got 1000.
`redeemanalytics.Analytics.Customer`: The sequence is – Project Name.Dataset.Table2. Revenue Generated by the Redeem per user
Restaurants/Hotels provide a certain amount for each user check-in. In this scenario, only those users will be taken into account who check in and upload the bill on the Redeem app.
Let’s see the Revenue table by selecting all the columns.
We can see that there are 4 variables: CustomerId, Month, Revenue, and Number of Users. Our variable of interest, Revenue/User, is not present, but we can create it in the big query table by the formula:
RevenuePerUser = Revenue / Number of Users3. Categorize Customers based on median
The Median is the mid-point of a series when arranging it in ascending order. We can calculate each data point’s median and how far each data point lies away from the median.
Score = (RevenuePerUser – Median of RevenuePerUser ) / Median of RevenuePerUser
We got the Median of Revenue Per User = 1791. Now we will calculate the score by the formula given above.
The result can be saved in a new table named CustmoerScore. A score of 0.5 means it lies 50% higher than the median. We can segment our customers based on the table given below:
= -0.5 Average
< -0.5 Low4. Statistics of Customer Segment
a) Find out the number of customers in the elite segment.
We will query the CustomerScore table and find the Elite Customers count.
b) Similarly, we will find the count of other segments.5. Final Summary of Customer Segment
Segment Count of Customers(% of total count)
6. Insights & Key Business Decision
Elite Customers: These customers are providing very high revenue per user. The customers of these restaurants & hotels are high-net-worth individuals looking for wonderful experiences. We can promote these restaurant offerings to users looking for quality.
Good Customers: These are somewhat below the Elite customers, and the users of these are looking for a balance between quality and quantity. We can promote a nice experience with discount offerings.
Average Customers: Users looking for discount offerings
Low Customers: free services and offering to the users.
The strategy of the Redeem based on the insight is tabulated below:
Customer Segment User Types Key Business Strategy of Redeem
Elite Very High-income individuals Promote Quality(Experience)
Good High-Income Individuals Balance of experience and pricing
Average Average- Income Individuals Discount Offerings
Low Low- Income Individuals Free offeringsConclusion
The key takeaways of the article are:
GCP- BigQuery is a cloud-based data warehouse serverless self-managed solution. It is scalable as per load demand.
It is highly useful for businesses to make data-driven decisions.
We understood the use case: Customer Segmentation with the help of BigQuery.
The media shown in this article is not owned by Analytics Vidhya and is used at the Author’s discretion.
Update the detailed information about What Is Android Architecture And Libraries? on the Flu.edu.vn website. We hope the article's content will meet your needs, and we will regularly update the information to provide you with the fastest and most accurate information. Have a great day!