Login

cloud computing

Cloud computing is a model that provides computing resources to users through the network. These resources include servers, storage devices, applications, etc. Users can access and use these computing resources through various terminal devices, such as computers, mobile devices, tablets, smart watches, etc.

The main advantages of cloud computing include:

Scalability: Cloud computing can provide scalable resources according to user needs, including more or less storage space, processing power, etc.
Reliability: Resources provided by cloud computing are often reused, and user data and applications are stored on multiple different physical and virtual devices to improve data security and availability.
Cost savings: Since the infrastructure and services provided by cloud computing are usually paid on-demand, users do not need to purchase and maintain their own servers and other computing equipment, which can save costs.
Flexibility: Users can flexibly use the resources provided by cloud computing according to their own needs without having to consider infrastructure maintenance and management.

There are various service types of cloud computing, including Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS). Infrastructure as a Service provides users with access to infrastructure resources such as servers, storage and networks; Platform as a Service provides users with access to application development and deployment environments; Software as a Service provides applications for direct use.

At present, cloud computing has been widely used in various fields, including enterprise-level applications, personal applications, big data analysis, Internet of Things devices, mobile application development, etc.

How to apply to use Baidu Wenxin large model?

My AI SEO WordPress plugin released a CN version today. AI SEO CN WordPress Plugin Subscription […]

The new WordPress experience: building websites with SAAS, low-code and no-code

On November 6, 2023, WordPress v6.4.2 was released. Two days later, I migrated my blog to another server. Later […]

Time:2023/09/02

form engine iteration today

Today’s iteration of form engine:

Support multiple forms on one page;

Supports application in veiws engine, so that various actions can be added to the list rendered by veiws engine.

The view layer and control layer of the form engine are separated.

Add a field for a drop-down selection button.

 

Since the form engine and views engine were separated from the low-code platform and some reconstruction was done, this iteration has completely made their capabilities beyond the previous version.

Dismantle the low-code platform - generative is the direction of low-code

Friends who are familiar with me know that during the epidemic, I coded myself and built a BAAS (back-end as a service cloud computing platform) and a low-code platform. The reason […]

Time:2023/07/26

AIGC: Integrate Baidu’s Wenxin Qianfan large model into WordPress and compare it with GPT

# integrates Baidu’s Wenxin Qianfan large model into WordPress and compares it with GPT

Last weekend, Baidu’s Wenxin Qianfan model was integrated into WordPress.
1. Basic process:
1. First apply to experience the Wenxin Qianfan large model on Baidu, which requires certification first.

2. After passing, activate the large model, because Baidu's large model is charged for use and is charged by token. You need to have a balance in your account to activate it.

3. Then, create an application so that it has appid, api key and secret key

4. Then, read the documentation and connect the corresponding interface.
Basically, you get the access token through the api key and secret key, and then submit the question and get the answer.

2. Key code
1. Obtain the key code of the access token

"`php
private function getAccessToken(){
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => “https://aip.baidubce.com/oauth/2.0/token?client_id=”.$this->client_id.”&client_secret=”.$this->client_secret.”&grant_type=client_credentials”,
CURLOPT_TIMEOUT => 30,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Accept: application/json'
),

));
$response = curl_exec($curl);
curl_close($curl);
$rtn = json_decode($response);
return $rtn->access_token;
}
“`

2. Call the key code of Ernie Bot large model

"`php
public function runErnieBot($message) {
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => “https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions?access_token={$this->getAccessToken()}”,
CURLOPT_TIMEOUT => 30,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>$message,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
“`

3. Call the key code of Ernie Bot Turbo large model

"`php
public function runErnieBotTurbo($message) {
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => “https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/eb-instant?access_token={$this->getAccessToken()}”,
CURLOPT_TIMEOUT => 30,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>$message,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
}
“`

In the past few days of testing, the performance of Baidu Wenxin Qianfan's large model in Chinese is indeed much better than GPT.
The Chinese level of GPT is the level of "explanatory text".
The Chinese level of Baidu Wenxin Qianfan Large Model is at least better than the "explanatory text".

Time:2023/07/17

Iteration of membership subscription module

 

 

For the platform CMS I built myself, the membership subscription part has always been "simple to implement". This weekend I restructured this part and developed the core part.

1. Method

Generally speaking, membership subscription mainly includes three parts: membership subscription plan and purchase, member permission control, and member management.

1. For membership subscription plans and purchases

Just prepare to make some extensions based on the existing mall system.

2. For member permission control,

This needs to be mentioned in particular. We are not planning to do it based on a role permission system, but a separate member-controlled system.

Based on the role authority system, members are made into a role series, and each type of member is made into a role in this role series. It sounds reasonable. However, in this case, it is very troublesome to do or use, especially when there is a lot of business, the various logics will be very complicated, and all kinds of confusion will be caused if you are not careful. And it's not flexible enough.

Moreover, in fact, the membership subscription part of many excellent systems is not role-based. Instead, permission control is implemented based on "marks" or orders. Many well-selling membership subscription plug-ins, including WordPress, are done in this way.

Based on "user tags":

In essence, it is the same principle as the character system. It is to define some "marks" of members. Users who purchase the membership subscription plan associated with this "mark" will be "marked with this mark", so that the control of member permissions can be achieved.

Based on order:

Purchase a membership subscription plan and form an order. After payment, the expiration time will be written into the order. Therefore, you can judge based on the order whether the user is a member, what kind of member it is, and whether it has expired. This way you can control member permissions.

 

I have done an order-based method before, and this time I plan to use "user tags".

There is nothing wrong with being based on orders, but the order system of the platform CMS I am building now supports many order types, making the order model relatively "large". I don't plan to "add weight" to it anymore, so I chose Based on "user tags".

3. Member management

Based on the existing user management extension, we do not plan to do member management alone.

 

2. Applicable scenarios

1. Basic scenario

The entire product has one or several subscription plans, which users purchase and enjoy membership services.

Define membership tags globally. Each membership tag contains at least three fields: name, slug, and associated subscription plan id.

When a user purchases a subscription plan with a membership mark, the membership mark and expiration time will be written into the user's meta data.

2. Platform/multi-tenant scenario

For platforms and multi-tenant SAAS, there is a very important scenario: the subscription plan provided by the vendor itself.

Define the supplier's membership tag in the supplier's user's meta data. The key of the supplier's membership tag cannot be the same as the key of the global membership tag.

When a user purchases a subscription plan from this provider, the corresponding membership tag and expiration date will be written to the purchasing user's meta data.

This iteration only implements basic scenarios, but it must be able to be extended to platform and multi-tenant scenarios.

 

3. Determine whether the membership has expired when logging in

When the user logs in, it is judged whether it has expired. If it has expired, update the member mark in the meta data to false and the expiration date to false.

 

How to build a successful B-side SAAS platform

Last year, I helped an international HR SaaS company to develop a solution. The core of this solution is two successful B-side SAAS platforms […]

Review of an Internet car rental platform (2) - platform, ecology and architecture

Years ago, I wrote "Review of an Internet Car Rental Platform—How to Hold an Entire Industry" (the article is password-protected and cannot be seen by ordinary people). This article is mainly about […]

Time:2022/04/09

Continue to iterate the views engine

Continue to iterate on the views engine.

After this iteration, the views engine has completely become a microkernel architecture. The architecture of form engine and block engine is the same.

Time:2022/03/23

Address selector for form engine

The form engine has been iterated in the past week. Added address selector. Not very satisfied, let’s do this first and talk about it later. The form title implements conditional configuration and does not have to be limited to a fixed value.

OMS has also made some iterations. Added an order type (free). Modified the order model.

The product management system has also made some iterations, adding a product type and a taxonomy for order classification.



copyright © www.lyustu.com all rights reserved.
Theme: TheMoon V3.0. Author:neo yang