[Artificial Intelligence Experiment] Predicate representation and production knowledge representation

1. Experiment purpose 1. Familiar with predicate logic notation; 2. Understand and master production knowledge representation methods and implement the rule base of production systems. 2. Experimental content Implemented through C language programming: 1. Monkey picking banana problem 2. Animal identification system (1) Establish rules for identifying seven types of animal identification systems; (2) Determine […]

Semantic Network and Knowledge Graph (2) Knowledge Representation (Predicate Logic & Production Rule Representation & Framework Representation & Semantic Web Representation & XML & RDF & OWL

Knowledge representation: Use computer symbols to describe the knowledge in the human brain, and simulate the reasoning process of the human brain through operations between symbols. Semantic Web Core: RDF OWL knowledge representation method ? First-order predicate logic representation ? Production rule notation ? Frame notation ? Semantic Web Notation ? Distributed knowledge representation Predicate […]

Use Lambda expressions, foreach loops, Predicate operations, and Stream operations to traverse Collection collections

Lambda expression traverses Collection collection Java8 adds a default method forEach(Consumer action) to the Iterable interface. The type of parameter required by this method is a functional interface, and the Iterable interface is the parent interface of the Collection interface, so the Collection collection can also directly call this method. When the program calls forEach(Consumer […]

Functional interface Consumer, BiConsumer, Supplier, Predicate, Function, BiFunction

Functional interface Consumer, BiConsumer, Supplier, Predicate, Function, BiFunction 1. Consumer The Java Consumer interface comes from the java.util.function package introduced in Java 8. Consumer is a functional interface used as a task target for lambda expressions or method references (passing a parameter to execute the specified method). The functional interface of Consumer is an operation […]

Service Gateway SpringCloudGateway and Predicate assertion factory

Introduction to Gateway Spring Cloud Gateway is a product of Spring Cloud itself. It is developed based on Spring 5 and Spring Boot 2.0. Spring Cloud Gateway appears to replace zuul. In the high version of Spring Cloud, zuul 2.0 is not integrated. Spring Cloud Gateway uses a high-performance Reactor Schema communication framework Netty. The […]

[Java] Jdk8 function interface Supplier, Function, Predicate, Consumer, BiFunction, BiPredicate, BiConsumer

Overview Supplier, Function, Predicate, Consumer, BiFunction, BiPredicate, BiConsumer are part of the Java functional interface, which are used to define different types of functions, thus providing a more flexible way to process data in functional programming. Supplier: Represents a supplier that does not accept any parameters, but returns a result. Its abstract method is T […]

Route Predicate Factories Test

Official website: Spring Cloud Gateway Name Description Example After is a request after a certain point in time – After=2023-08-20T17:42:47.789-07:00 [America/Denver] Before is a request before a certain point in time – Before=2031-04-13T15:14:47.433 + 08:00[Asia/Shanghai] Between is a request before two time points – Between=2037-01-20T17:42:47.789-07:00[ America/Denver], 2037-01-21T17:42:47.789-07:00[America/Denver] Cookie The request must contain certain cookies – […]

Spring Cloud Gateway – Routing Predicate Factory

1. The After Route Predicate Factory When the requested time is after the set time, the request can access the service, if the request is accessed before the set time, return 404 server: port: 10020 spring: application: name: gateway-service cloud: gateway: routes: – id: after_route uri: lb://consumer-service #When the request time is after the set […]

Gateway route predicate factory

Predicate Factory Classification Gateway filtering. Remove the first in the path 1. Post moment – predicate factory A time point can be set, and the request will be routed only when the system time is greater than the set time point. – After=time, the date can only be accessed after the set time server: port: […]

RoutePredicateFactories–(SpringCloudGateway’s routing assertion rule test)

Article directory Route Predicate Factories (SpringCloudGateway’s routing assertion rule test) 1 basic configuration 1.1 spring-cloud-gateway version 2.2.9.RELEASE 1.2 gatewayserver/bootstrap.yml 1.3 The actual Consumer interface to be accessed through gateway routing is: localhost:11001/qme or localhost:11002/qme 1.3.1 ProducerFeign 1.3.2 Consumer Feign Controller 1.3.3 ProducerFeignController 2 postman test 2.1 PathRoutePredicateFactory 2.1.1 gateway-service-dev.yaml 2.1.2 Successful request case –> 2.1.3 […]