当前位置: 首页 > news >正文

Asp.net MVC Api项目搭建

整个解决方案按照分层思想来划分不同功能模块,以提供User服务的Api为需求,各个层次的具体实现如下所示:

1、新建数据库User表

数据库使用SQLExpress版本,表的定义如下所示:

CREATE TABLE [dbo].[User] ([Id]               INT           IDENTITY (1, 1) NOT NULL,[Name]             NVARCHAR (50) NOT NULL,[Password]         NVARCHAR (50) NOT NULL,[Age]              INT           NOT NULL,[Birthdate]        DATE          NOT NULL,[CreateTime]       DATETIME      DEFAULT (getdate()) NOT NULL,[CreateUserId]     NVARCHAR (50) NOT NULL,[CreateUserName]   NVARCHAR (50) NOT NULL,[ModifiedTime]     DATETIME      NULL,[ModifiedUserId]   NVARCHAR (50) NULL,[ModifiedUserName] NVARCHAR (50) NULL,PRIMARY KEY CLUSTERED ([Id] ASC)
);

2、实体层

新建类库类型的项目,.net framework框架版本4.5,User实体类如下:

public class User{public int Id { get; set; }public string Name { get; set; }public string Password { get; set; }public int Age { get; set; }public DateTime Birthdate { get; set; }public DateTime CreateTime { get; set; }public string CreateUserId { get; set; }public string CreateUserName { get; set; }public DateTime? ModifiedTime { get; set; }public string ModifiedUserId { get; set; }public string ModifiedUserName { get; set; }}

3、数据库层

该层提供数据库接口操作,采用EntitFramework4.4.0.0作为ORM实体映射框架,

  • 定义数据库操作接口IRepository
public interface IRepository<TEntity> : IDisposable where TEntity : class{IEnumerable<TEntity> Get();IEnumerable<TEntity> Get(Expression<Func<TEntity, bool>> filter);IEnumerable<TEntity> Get<TOderKey>(Expression<Func<TEntity, bool>> filter, int pageIndex, int pageSize, Expression<Func<TEntity, TOderKey>> sortKeySelector, bool isAsc = true);int Count(Expression<Func<TEntity, bool>> predicate);void Update(TEntity instance);void Add(TEntity instance);void Delete(TEntity instance);}
  • 定义数据库上下文类BceDbContext
public class BceDbContext:DbContext{public BceDbContext():base("DaLeiDB"){Database.SetInitializer<AceDbContext>(null);}public DbSet<User> Users { get; set; }protected override void OnModelCreating(DbModelBuilder modelBuilder){modelBuilder.Entity<User>().ToTable("User");base.OnModelCreating(modelBuilder);}}
  • 定义数据库通用操作实现类BceRepository
public class BceRepository<TEntity> : IRepository<TEntity> where TEntity : class{public BceDbContext DbContext { get; private set; }public DbSet<TEntity> DbSet { get; private set; }public BceRepository(BceDbContext context){Guard.ArgumentNotNull(context, "context");this.DbContext = context;this.DbSet = this.DbContext.Set<TEntity>();}public IEnumerable<TEntity> Get(){return this.DbSet.AsQueryable();}public IEnumerable<TEntity> Get(Expression<Func<TEntity, bool>> filter){return this.DbSet.Where(filter).AsQueryable();}public IEnumerable<TEntity> Get<TKey>(Expression<Func<TEntity, bool>> filter, int pageIndex, int pageSize, Expression<Func<TEntity, TKey>> sortKeySelector, bool isAsc = true){Guard.ArgumentNotNull(filter, "predicate");Guard.ArgumentNotNull(sortKeySelector, "sortKeySelector");if (isAsc){return this.DbSet.Where(filter).OrderBy(sortKeySelector).Skip(pageSize * (pageIndex - 1)).Take(pageSize).AsQueryable();}else{return this.DbSet.Where(filter).OrderByDescending(sortKeySelector).Skip(pageSize * (pageIndex - 1)).Take(pageSize).AsQueryable();}}public int Count(Expression<Func<TEntity, bool>> predicate){return this.DbSet.Where(predicate).Count();}public void Add(TEntity instance){Guard.ArgumentNotNull(instance, "instance");this.DbSet.Attach(instance);this.DbContext.Entry(instance).State = EntityState.Added;this.DbContext.SaveChanges();}public void Update(TEntity instance){Guard.ArgumentNotNull(instance, "instance");this.DbSet.Attach(instance);this.DbContext.Entry(instance).State = EntityState.Modified;this.DbContext.SaveChanges();}public void Delete(TEntity instance){Guard.ArgumentNotNull(instance, "instance");this.DbSet.Attach(instance);this.DbContext.Entry(instance).State = EntityState.Deleted;this.DbContext.SaveChanges();}public void Dispose(){this.DbContext.Dispose();}}
  • 定义用户表数据库操作额外的接口IUserRepository
namespace DaLei.Repository
{public interface IUserRepository{User FindByName(string name);List<User> FindByAge(int start, int end);}
}
  • 定义用户表数据库操作额外的实现类UserRepository
    namespace DaLei.Repository
    {public class UserRepository : BceRepository<User>, IUserRepository{public UserRepository(BceDbContext bceDbContext):base(bceDbContext){}public List<User> FindByAge(int start, int end){var rst = this.DbSet.AsQueryable().Where(u=>u.Age>=start && u.Age<=end).ToList();return rst;}public User FindByName(string name){var rst = this.DbSet.AsQueryable().Where(u => u.Name == name).FirstOrDefault();return rst;}}
    }

4、服务接口层

定义了对外提供用户服务的接口契约,具体如下:

namespace DaLei.IService
{public interface IUserService{User FindByName(string name);List<User> FindByAge(int start, int end);List<User> GetList();}
}

5、服务具体实现层

服务基类实现:

using System;
using System.Collections.Generic;namespace DaLei.Service
{public abstract class ServiceBase : IDisposable{public IList<IDisposable> DisposableObjects { get; private set; }public ServiceBase(){this.DisposableObjects = new List<IDisposable>();}protected void AddDisposableObject(object obj){IDisposable disposable = obj as IDisposable;if (null != disposable){this.DisposableObjects.Add(disposable);}}public void Dispose(){foreach (IDisposable obj in this.DisposableObjects){if (null != obj){obj.Dispose();}}}}
}

用户服务接口具体实现:

using DaLei.IService;
using DaLei.Model;
using DaLei.Repository;
using System.Collections.Generic;namespace DaLei.Service
{public class UserService : ServiceBase,IUserService{private IUserRepository userRepository;public UserService(IUserRepository userRepository){this.userRepository = userRepository;this.AddDisposableObject(userRepository);}public List<User> FindByAge(int start, int end){return this.userRepository.FindByAge(start,end);}public User FindByName(string name){return this.userRepository.FindByName(name);}public List<User> GetList(){return this.userRepository.FindByAge(0, 100);}}
}

6、应用层

新建Asp.net WebApi项目,引用服务接口项目、服务实现项目、实体类项目,unity相关程序集,EntityFramework程序集。

web.config配置连接字符串和unity相关内容:

<?xml version="1.0" encoding="utf-8"?>
<!--有关如何配置 ASP.NET 应用程序的详细信息,请访问https://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration><configSections><section name="unity" type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration" /></configSections><unity><sectionExtension type="Microsoft.Practices.Unity.InterceptionExtension.Configuration.InterceptionConfigurationExtension, Microsoft.Practices.Unity.Interception.Configuration" /><containers><container><extension type="Interception" /><register type="DaLei.IService.IUserService, DaLei.IService" mapTo="DaLei.Service.UserService, DaLei.Service" /><register type="DaLei.Repository.IUserRepository, DaLei.Repository" mapTo="DaLei.Repository.UserRepository, DaLei.Repository"><interceptor type="InterfaceInterceptor" /><policyInjection /></register></container></containers></unity><connectionStrings><add name="DaLeiDB" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;Initial Catalog=DaleiDB;User ID=sa;Password=anpiel0991;" providerName="System.Data.SqlClient" /></connectionStrings><appSettings><add key="webpages:Version" value="3.0.0.0"/><add key="webpages:Enabled" value="false"/><add key="PreserveLoginUrl" value="true"/><add key="ClientValidationEnabled" value="true"/><add key="UnobtrusiveJavaScriptEnabled" value="true"/></appSettings><system.web><compilation debug="true" targetFramework="4.5"/><httpRuntime targetFramework="4.5"/><pages><namespaces><add namespace="System.Web.Helpers"/><add namespace="System.Web.Mvc"/><add namespace="System.Web.Mvc.Ajax"/><add namespace="System.Web.Mvc.Html"/><add namespace="System.Web.Routing"/><add namespace="System.Web.WebPages"/></namespaces>     </pages></system.web><system.webServer><validation validateIntegratedModeConfiguration="false"/><handlers><remove name="ExtensionlessUrlHandler-Integrated-4.0"/><remove name="OPTIONSVerbHandler"/><remove name="TRACEVerbHandler"/><add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler"preCondition="integratedMode,runtimeVersionv4.0"/></handlers></system.webServer><runtime><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/><bindingRedirect oldVersion="0.0.0.0-11.0.0.0" newVersion="11.0.0.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="System.Web.Helpers" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-5.2.7.0" newVersion="5.2.7.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="3.0.0.0"/></dependentAssembly><dependentAssembly><assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35"/><bindingRedirect oldVersion="0.0.0.0-1.6.5135.21930" newVersion="1.6.5135.21930"/></dependentAssembly></assemblyBinding></runtime><system.codedom><compilers><compiler language="c#;cs;csharp" extension=".cs"type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/><compiler language="vb;vbs;visualbasic;vbscript" extension=".vb"type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+"/></compilers></system.codedom>
</configuration>
  • Controller实例化由Unity负责处理,需要实现控制器工厂类
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.Configuration;
using System.Configuration;namespace WebApi.Extensions
{public class UnityControllerFactory : DefaultControllerFactory{static object syncHelper = new object();static Dictionary<string, IUnityContainer> containers = new Dictionary<string, IUnityContainer>();public IUnityContainer UnityContainer { get; private set; }public UnityControllerFactory(string containerName = ""){if (containers.ContainsKey(containerName)){this.UnityContainer = containers[containerName];return;}lock (syncHelper){if (containers.ContainsKey(containerName)){this.UnityContainer = containers[containerName];return;}IUnityContainer container = new UnityContainer();//配置UnityContainerUnityConfigurationSection configSection = ConfigurationManager.GetSection(UnityConfigurationSection.SectionName) as UnityConfigurationSection;if (null == configSection && !string.IsNullOrEmpty(containerName)){throw new ConfigurationErrorsException("The <unity> configuration section does not exist.");}if (null != configSection){if (string.IsNullOrEmpty(containerName)){configSection.Configure(container);}else{configSection.Configure(container, containerName);}}containers.Add(containerName, container);this.UnityContainer = containers[containerName];}}protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType){if (null == controllerType){return null;}return (IController)this.UnityContainer.Resolve(controllerType);}
//public override void ReleaseController(IController controller)
//{
//    this.UnityContainer.Teardown(controller);
//}}
}
  • 设置MVC框架的控制器工厂为自定义类型
using webApi.Extensions;
using System;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;namespace WebApp
{public class Global : HttpApplication{void Application_Start(object sender, EventArgs e){// 在应用程序启动时运行的代码AreaRegistration.RegisterAllAreas();GlobalConfiguration.Configure(WebApiConfig.Register);RouteConfig.RegisterRoutes(RouteTable.Routes);ControllerBuilder.Current.SetControllerFactory(new UnityControllerFactory());}}
}
  • 新建Controller基类,所有的自定义Controller均继承此类
using WebApi.Extensions;
using System.Web.Mvc;
using System;
using System.Collections.Generic;namespace WebApp.Controllers
{public class BaseController:Controller{public IList<IDisposable> DisposableObjects { get; private set; }public BaseController(){this.DisposableObjects = new List<IDisposable>();}protected void AddDisposableObject(object obj){IDisposable disposable = obj as IDisposable;if (null != disposable){this.DisposableObjects.Add(disposable);}}protected override void Dispose(bool disposing){if (disposing){foreach (IDisposable obj in this.DisposableObjects){if (null != obj){obj.Dispose();}}}base.Dispose(disposing);}}
}
  • 新建测试Controller
using DaLei.IService;
using System.Web.Mvc;namespace WebApp.Controllers
{public class TestController : BaseController{private IUserService userService;public TestController(IUserService userService){this.userService = userService;this.AddDisposableObject(userService);}// GET: Testpublic ActionResult Index(){var users = this.userService.GetList();return View();}}
}

浏览器输入地址测试TestController!

相关文章:

Asp.net MVC Api项目搭建

整个解决方案按照分层思想来划分不同功能模块&#xff0c;以提供User服务的Api为需求&#xff0c;各个层次的具体实现如下所示&#xff1a; 1、新建数据库User表 数据库使用SQLExpress版本&#xff0c;表的定义如下所示&#xff1a; CREATE TABLE [dbo].[User] ([Id] …...

C语言中文网 - Shell脚本 - 8

第1章 Shell基础&#xff08;开胃菜&#xff09; 8. Linux Shell命令提示符 启动 Linux 桌面环境自带的终端模拟包&#xff0c;或者从 Linux 控制台登录后&#xff0c;便可以看到 Shell 命令提示符。看见命令提示符就意味着可以输入命令了。命令提示符不是命令的一部分&#x…...

性能测试学习——项目环境搭建和Jmete学习二

项目环境搭建、Jmeter学习二 环境的部署虚拟机的安装虚拟机中添加项目操作步骤 使用环境的注意事项Jmeter的安装和简单使用Jemter的使用的进阶Jemter元件 Jmeter属性执行顺序和作用域作用域以自定义用户变量和用户参数(前置处理器)为例如何解决用户变量和线程组同级时&#xff…...

C++标准模板库(STL)-map介绍

C标准库中的map是一种关联容器&#xff0c;它提供了键值对的映射关系。每个键值对中的键都是唯一的&#xff0c;通过键可以访问对应的值。 map基本操作 插入元素&#xff1a; 使用insert函数插入元素&#xff0c;该函数有两种形式&#xff1a; // 插入一个pair<const Ke…...

使用docker部署ELK日志框架-Elasticsearch

一、ELK知识了解 1-ELK组件 工作原理&#xff1a; &#xff08;1&#xff09;在所有需要收集日志的服务器上部署Logstash&#xff1b;或者先将日志进行集中化管理在日志服务器上&#xff0c;在日志服务器上部署 Logstash。 &#xff08;2&#xff09;Logstash 收集日志&#…...

第7章 模式匹配与正则表达式

目录 1. 不用正则表达式来查找文本模式2. 用正则表达式来查找文本模式2.1 创建正则表达式&#xff08;Regex&#xff09;对象2.2 匹配Regex对象 3. 用正则表达式匹配更多模式3.1 利用括号分组3.2 用管道匹配多个分组3.3 用问号实现可选匹配3.4 用星号匹配零次或多次3.5 用加号匹…...

单元测试实战(三)JPA 的测试

为鼓励单元测试&#xff0c;特分门别类示例各种组件的测试代码并进行解说&#xff0c;供开发人员参考。 本文中的测试均基于JUnit5。 单元测试实战&#xff08;一&#xff09;Controller 的测试 单元测试实战&#xff08;二&#xff09;Service 的测试 单元测试实战&am…...

初刷leetcode题目(3)——数据结构与算法

&#x1f636;‍&#x1f32b;️&#x1f636;‍&#x1f32b;️&#x1f636;‍&#x1f32b;️&#x1f636;‍&#x1f32b;️Take your time ! &#x1f636;‍&#x1f32b;️&#x1f636;‍&#x1f32b;️&#x1f636;‍&#x1f32b;️&#x1f636;‍&#x1f32b;️…...

76基于matlab的免疫算法求解配送中心选址问题,根据配送地址确定最佳配送中心地址位置。

基于matlab的免疫算法求解配送中心选址问题&#xff0c;根据配送地址确定最佳配送中心地址位置。数据可更换自己的&#xff0c;程序已调通&#xff0c;可直接运行。 76matlab免疫算法配送中心选址 (xiaohongshu.com)...

C++二分查找算法:找到 Alice 和 Bob 可以相遇的建筑

本文涉及的基础知识点 二分查找算法合集 离线查询 题目 给你一个下标从 0 开始的正整数数组 heights &#xff0c;其中 heights[i] 表示第 i 栋建筑的高度。 如果一个人在建筑 i &#xff0c;且存在 i < j 的建筑 j 满足 heights[i] < heights[j] &#xff0c;那么这个…...

建立跨层全栈的区块链安全保障系统-应用层,系统层,设施层

目录 建立跨层全栈的区块链安全保障系统 应用层 系统层 设施层...

程序员告诉你:人工智能是什么?

随着科技的快速发展&#xff0c;人工智能这个词汇已经逐渐融入了我们的日常生活。然而&#xff0c;对于大多数人来说&#xff0c;人工智能仍然是一个相对模糊的概念。 首先&#xff0c;让我们从人工智能的定义开始。人工智能是一种模拟人类智能的技术&#xff0c;它涵盖了多个领…...

飞书开发学习笔记(七)-添加机器人及发送webhook消息

飞书开发学习笔记(七)-添加机器人及发送webhook消息 一.添加飞书机器人 1.1 添加飞书机器人过程 在群的右上角点击折叠按键…选择 设置 群机器人中选择 添加机器人 选择自定义机器人&#xff0c;通过webhook发送消息 弹出的信息中有webhook地址&#xff0c;选择复制。 安…...

C/C++统计数 2021年12月电子学会青少年软件编程(C/C++)等级考试一级真题答案解析

目录 C/C统计数 一、题目要求 1、编程实现 2、输入输出 二、算法分析 三、程序编写 四、程序说明 五、运行结果 六、考点分析 C/C统计数 2021年12月 C/C编程等级考试一级编程题 一、题目要求 1、编程实现 给定一个数的序列S&#xff0c;以及一个区间[L, R], 求序列…...

从一到无穷大 #19 TagTree,倒排索引入手是否是优化时序数据库查询的通用方案?

本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可。 本作品 (李兆龙 博文, 由 李兆龙 创作)&#xff0c;由 李兆龙 确认&#xff0c;转载请注明版权。 文章目录 文章主旨时序数据库查询的一般流程扫描维度聚合时间聚合管控语句 TagTree整体结构索引…...

程序员带你入门人工智能

随着人工智能技术的飞速发展&#xff0c;越来越多的程序员开始关注并学习人工智能。作为程序员&#xff0c;我们可能会对如何开始了解人工智能感到困惑。今天&#xff0c;我将向大家介绍一些如何通过自学了解人工智能的经验和方法&#xff0c;帮助大家更好地入门这个充满挑战和…...

机器学习笔记 - 了解常见开源文本识别数据集以及了解如何创建用于文本识别的合成数据

一、部分开源数据集 以下是一些英文可用的开源文本识别数据集。 ICDAR 数据集:ICDAR 代表国际文档分析和识别会议。该活动每两年举行一次。他们带来了一系列塑造了研究社区的场景文本数据集。例如, ICDAR-2013和ICDAR-2015数据集。 MJSynth 数据集:该合成词数据集由牛津大…...

openssl开发详解

文章目录 一、openssl 开发环境二、openssl随机数生成三、openssl对称加密3.1 SM43.2 AES3.3 DES3.4 3DES 四、openssl非对称加密4.1 SM24.2 RSA4.3 ECC 五、openssl的hash5.1 SM35.2 md55.3 sha256 五、证书5.1 证书格式 六、openssl网络编程七、openssl调试FIDO流程 一、open…...

conda虚拟环境中安装的cuda和服务器上安装的cuda的异同

服务器上已安装Nvidia提供的cuda&#xff0c;nvcc -V时会出现已安装的CUDA版本。如下图所示&#xff0c;服务器上已安装好的cuda版本为10.1。 但是当我们在Anaconda虚拟环境下安装pytorch或者paddlepaddle等深度学习框架的GPU版本时&#xff0c;通常会选择较高版本的cuda&…...

股东入股可用的出资形式主要有哪些

股东入股&#xff0c;可用的出资形式主要包括货币以及实物、知识产权、土地使用权等可以用货币估价并可以依法转让的非货币财产。 第一&#xff0c;货币。设立公司必然需要一定数量的流动资金。以支付创建公司时的开支和启动公司运营。因此&#xff0c;股东可以用货币出资。 第…...

预测增强蒙特卡洛:用机器学习加速高成本仿真

1. 项目概述&#xff1a;当蒙特卡洛遇上机器学习在金融工程、量化风控乃至医疗资源模拟这些对精度和可靠性要求极高的领域&#xff0c;蒙特卡洛&#xff08;Monte Carlo, MC&#xff09;仿真是我们绕不开的基石工具。它的魅力在于“简单粗暴”的有效性&#xff1a;通过生成大量…...

AI与HPC能耗测量与碳估算:从系统到代码的工程实践指南

1. 项目概述&#xff1a;为什么我们需要关注AI与HPC的能耗&#xff1f;如果你和我一样&#xff0c;常年泡在数据中心或者高性能计算集群里&#xff0c;最近几年肯定有一个感受越来越强烈&#xff1a;电费账单和机柜散发的热量&#xff0c;正以前所未有的速度成为项目规划和运维…...

机器学习赋能软件工程:从缺陷预测到代码生成的实践指南

1. 项目概述与核心价值作为一名在软件工程领域摸爬滚打了十几年的老兵&#xff0c;我亲眼见证了从瀑布模型到敏捷开发&#xff0c;再到如今DevOps和AI驱动的开发范式的变迁。最近几年&#xff0c;一个最深刻的感受是&#xff1a;我们写的代码和构建的系统越来越复杂&#xff0c…...

MAA明日方舟助手:3步实现每日游戏时间从45分钟到5分钟的智能革命

MAA明日方舟助手&#xff1a;3步实现每日游戏时间从45分钟到5分钟的智能革命 【免费下载链接】MaaAssistantArknights 《明日方舟》小助手&#xff0c;全日常一键长草&#xff01;| A one-click tool for the daily tasks of Arknights, supporting all clients. 项目地址: h…...

从语义网到知识图谱:构建与神经符号融合实战指南

1. 从语义网到知识图谱&#xff1a;一场关于数据理解的革命如果你在2001年读到蒂姆伯纳斯-李那篇关于语义网的著名文章&#xff0c;可能会觉得那是一个遥远而宏大的梦想&#xff1a;让机器像人一样理解网页内容的含义&#xff0c;而不仅仅是展示文本。二十多年过去了&#xff0…...

射电天文数据处理:致密源扣除与系统误差量化实战指南

1. 项目概述&#xff1a;从宇宙网节点探测说起在射电天文学领域&#xff0c;我们常常扮演宇宙的“收音机”调谐师&#xff0c;试图从充满噪声的宇宙背景中&#xff0c;分离出那些微弱却至关重要的天体物理信号。最近&#xff0c;一项关于宇宙网节点射电辐射的研究&#xff0c;再…...

相对噪声模型下梯度下降的收敛性分析与实践指南

1. 项目概述&#xff1a;当梯度方向遇上相对噪声在机器学习和优化的世界里&#xff0c;梯度下降算法就像我们手中的指南针&#xff0c;指引着我们在复杂的高维地形中寻找最低点。但现实往往没那么理想&#xff0c;这个指南针的指针会晃动&#xff0c;我们得到的梯度方向总带着“…...

FPG平台:客户服务专业能力的深度解读

FPG平台&#xff1a;客户服务专业能力的深度解读金融服务的核心是信任&#xff0c;而信任的建立需要在多个细节上保持持续的投入。FPG平台在合规、技术、服务、教育等方向上的实践&#xff0c;为客户提供了一个较为可靠的服务环境。本文从评测视角对其进行系统性的观察&#xf…...

2026年合肥惊现AI奇迹,广禾元引领本土企业行业之巅

2026年合肥AI行业现状与用户痛点2026年&#xff0c;随着科技的飞速发展&#xff0c;合肥的AI行业呈现出蓬勃发展的态势。然而&#xff0c;用户在选择AI服务时&#xff0c;往往面临着诸多痛点。例如&#xff0c;市场上AI企业众多&#xff0c;服务质量参差不齐&#xff0c;用户难…...

Hermes Agent 总记不住你说的话?3 步治好 AI 助手的“健忘症“

你有没有这样的经历&#xff1a;你跟它说"每次写营销文章&#xff0c;记得先加载技能审核"&#xff0c;它答应得好好的。结果下一篇写出来&#xff0c;你又得说一遍同样的话。它就像一个只点头不记事的实习生——每轮对话都重头来过。又或者&#xff0c;昨天刚刚聊完…...