# 【转+评】淘宝数据魔方技术架构解析

程序员原文:http://www.programmer.com.cn/7578/

NoSQL是SQL的有益补充

# it-e-68 Can Graphics Files Be Enctypted

Of course you can encrypt a graphics file. After all, most encryption algorithms don't care
about the intellectual content of a file. All they chew on is a series of byte values. Therefore,
most any encryption program that works on ordinary text files will work on graphics files as well.
Why would you want to encrypt a graphics file? Mostly to control who can view its contents.
You can invent a proprietary file format and that might slow a file format hack down for, say,
five or ten minutes. You could add a proprietary data compression scheme, possibly a twisted
variation of an already public algorithm. But there are so many people out there with nothing
better to do than hack at unknown data formats that your data would probably be exposed in little
time. But suppose we top off all this effort by encrypting the graphics file itself as we would an
ordinary text file. Would your data then be safe?
Realize that an encrypted graphics file still might not be very secure. For every data
encryption algorithm there exists at least one method of getting around it, although it may take
hundreds of computers and many years to fully employ and execute that method!
For example, one of the more popular methods used to encrypt data is the Vernam or XOR
cipher. This cipher Exclusive ORs the plain-text data with a single, random, fixed-length key.
The longer the key the harder it is to break the cipher. A totally random key the length of your
data is impossible to break. Shorter and less-random keys are easier to break.
XOR is very simple and fast, which is a must for a graphics file translators/viewers that
must decrypt a file on the fly. A problem, however, is that most graphics files contain fixed size
headers which vary only slightly in content from file to file. If you knew the approximate
contents of the header of an encrypted file you could XOR a "decrypted" header with the
encrypted file and possibly produce the key used to encrypt the file. A short key might be very
easily discovered in this way.
If you wish to use a public key/private key encryption method, then storing the public key in
the file format header (usually as a 4-byte field) and only encrypting the image data would be the
way to go. The SMPTE DPX file format supports such an encryption feature.
If you really need to make the contents of a graphics file secure, then I'd suggest not only
using some form of data encryption, but also create an unconventional and proprietary file format
and do not publish its format specification.

###### cipher ['saifə]

n. 零,暗号

• v. 计算,做算术

Continue reading it-e-68 Can Graphics Files Be Enctypted

# it-e-67 Can Graphics Files Be Infected with a Virus

For most types of graphics file formats currently available the answer is "no". A virus (or
worm, Trojan horse, and so forth) is fundamentally a collection of code (that is, a program) that
contains instructions which are executed by a CPU. Most graphics files, however, contain only
static data and no executable code. The code that reads, writes, and displays graphics data is
found in translation and display programs and not in the graphics files themselves. If reading or
writing a graphics file caused a system malfunction is it most likely the fault of the program
reading the file and not of the graphics file data itself.
With the introduction of multimedia we have seen new formats appear, and modifications to
older formats made, that allow executable instructions to be stored within a file format. These
instructions are used to direct multimedia applications to play sounds or music, prompt the user

for information, or display other graphics and video information. And such multimedia display
programs may perform these functions by interfacing with their environment via an API, or by
direct interaction with the operating system. One might also imagine a truly object-oriented
graphics file as containing the code required to read, write, and display itself.
Once again, any catastrophes that result from using these multimedia application is most
like the result of unfound bugs in the software and not some sinister instructions in the graphics
file data. Such "logic bombs" are typically exorcised through the use of testing using a wide
variety of different image files for test cases.
If you have a virus scanning program that indicates a specific graphics file is infected by
virus, then it is very possible that the file coincidentally contains a byte pattern that the scanning
programming recognizes as a key byte signature identifying a virus. Contact the author (or even
read the documentation!) of the virus scanning program to discuss the probability of the
mis-identification of a clean file as being infected by a virus. Save the graphics file, as the author
will most likely wish to examine it as well.
If you suspect a graphics file to be at the heart of a virus problem you are experiencing, then
also consider the possibility that the graphics file's transport mechanism (floppy disk, tape or
shell archive file, compressed archive file, and so forth) might be the original source of the virus
and not the graphics file itself.

1, catastrophe  [kə'tæstrəfi]
n. 大灾难；大祸；惨败

2, sinister  ['sinistə]
a. 不吉利的,凶恶的,左边的

3, exorcise  ['eksɔ:saiz]
vt. 驱邪；除怪

4, coincidentally  [kəu,insi'dentli]

Continue reading it-e-67 Can Graphics Files Be Infected with a Virus

# it-e-66 Introduction to Digital Image Processing

An image is digitized to convert it to a form that can be stored in a computer's memory or on

some form of storage media such as a hard disk or CD-ROM. This digitization procedure can be
done by a scanner, or by a video camera connected to a frame grabber board in a computer. Once an
image has been digitized, it can be operated upon by various image processing operations.
Image processing operations can be roughly divided into three major categories, Image
Compression, Image Enhancement and Restoration, and Measurement Extraction[提取尺寸]. Image
compression is familiar to most people. [1]It involves reducing the amount of memory needed to
store a digital image.
Image defects which could be caused by the digitization process or by faults in the imaging
set-up (for example, bad lighting) can be corrected using Image Enhancement techniques. Once
the image is in good condition, the Measurement Extraction operations can be used to obtain
useful information from the image.
Some examples of Image Enhancement and Measurement Extraction are given below. The
examples shown all operate on 256 grey-scale images. This means that each pixel in the image is
stored as a number between 0 to 255, where 0 represents a black pixel, 255 represents a white
pixel and values in-between represent shades of grey. These operations can be extended to
operate on colour images.
The examples below represent only a few of the many techniques available for operating on
images. Details about the inner workings of the operations have not been given.
Image Enhancement and Restoration
The image at the left of Figure 1 has been corrupted
by noise during the digitization process. The "clean"
image at the right of Figure 1 was obtained by applying a
median filter [中值滤波器]to the image.
An image with poor contrast, such as the one at
the left of Figure 2, can be improved by adjusting the
image histogram to produce the image shown at the
right of Figure 2.

The image at the top left of Figure 3 has a corrugated effect due to a fault in the acquisition
process. This can be removed by doing a 2-dimensional Fast-Fourier Transform[快速傅里叶变换] on the image
(top right of Figure 3), removing the bright spots (bottom left of Figure 3), and finally doing an
inverse Fast Fourier Transform to return to the original image without the corrugated background
(bottom right of Figure 3).

An image which has been captured in poor lighting conditions, and shows a continuous
change in the background brightness across the image (top left of Figure 4) can be corrected
using the following procedure. First remove the foreground objects by applying a 25 by 25
greyscale dilation operation (top right of Figure 4). Then subtract the original image from the
background image (bottom left of Figure 4). Finally invert the colors and improve the contrast by
adjusting the image histogram (bottom right of Figure 4).

The example below demonstrates how one could go about extracting measurements from an
image. The image at the top left of Figure 5 shows some objects. The aim is to extract information
about the distribution of the sizes (visible areas) of the objects. The first step involves segmenting
the image to separate the objects of interest from the background. This usually involves
thresholding the image, which is done by setting the values of pixels above a certain threshold value
to white, and all the others to black (top right of Figure 5). Because the objects touch, thresholding
at a level which includes the full surface of all the objects does not show separate objects. This
problem is solved by performing a watershed separation on the image (lower left of Figure 5). The
image at the lower right of Figure 5 shows the result of performing a logical AND of the two
images at the left of Figure 5. This shows the effect that the watershed separation has on touching
objects in the original image. Finally, some measurements can be extracted from the image.

frame grabber board  帧中继访问设备

1, corrugated  ['kɔrəgeitid]
a. 缩成皱纹的,使起波状的

2, dilation  [dai'leiʃən, di-]
n. 扩张，扩大；膨胀；详述

3, subtract  [səb'trækt]
v. 减去,扣掉,减少

4, segmenting
n. 分段

5, thresholding
n. 阈值转换法；域值

6, watershed  ['wɔ:təʃed, 'wɔ-]
n. （美）流域；分水岭；集水区；转折点

Continue reading it-e-66 Introduction to Digital Image Processing

# it-e-65 Convert a Graphics Format

Why change vectors to bitmaps?
Most of the clip art gallery is vector-based and will need to be converted into bitmap formats
(GIF) prior to putting it on the Web.
Why change bitmaps to vectors?
You will need to change vectors to bitmaps to perform tasks from the Drawing toolbar on a
bitmap picture (such as animate parts of a bitmap picture) you will need to convert it into a vector
format. You can then e.g. ungroup it and apply animations to only parts of it.
Which graphic converter to use?
To change your graphics format, you need to use a graphics converter. A popular graphics
editor you can use for this is Paint Shop Pro. Another graphics editor you can use is Adobe
PhotoShop, which is said to be the best one for this kind of conversion.
How to use your graphic converter?
Open your file in the graphics editor chosen: Select File | Open.
Select File | Save As.
Rename your file and choose a new format. For a bitmap to vectors conversion select the
WMF format. For the opposite conversion, select the GIF format if you have PowerPoint 97,
otherwise select JPEG or TIFF.
Unfortunately, some of the quality may be lost in the switch. MS office also provides
graphics converters.

Continue reading it-e-65 Convert a Graphics Format

# phprpc初步

http://phprpc.org/

java只有源代码，不过包含了个make.bat运行后就生成了三个jar包，服务端只需要phprpc.jar,客户端需要phprpc_client.jar,不需要别的依赖包,very nice,那个phprpc_spring.jar的包尚不知是做什么用的。

>package kzg.phprpc.hello.api;

# it-3-64 Course Description

This course is an introduction to the basic concepts as well as applications of the rapidly
emerging field of digital image processing. It familiarizes the audience with the understanding,
design, and implementation of algorithms in the various subareas of digital image processing
such as image enhancement, image deblurring, image understanding, image security, and image
compression. Over 200 image examples complement the technical descriptions.
Benefits/Learning Objectives
This course will enable you to
explain the fundamental concepts and terminologies employed in digital imaging such as
sampling and aliasing, perceptual quantization; filtering, look-up tables, image histogram,
etc;

explain the various techniques used in image enhancement for contrast manipulation (e.g.,
histogram equalization), sharpening (e.g., unsharp masking) and noise removal (e.g.,
selective averaging, median filtering);
briefly demonstrate the performance of image deblurring algorithms such as inverse filtering
and Wiener filtering by using image examples;
briefly demonstrate the concepts behind digital signatures for image authentication and
invisible watermarking for image copyright protection;
briefly describe the current research topics in image understanding and demonstrate related
algorithm performances using image examples;
explain the basic technologies that serve the existing JPEG and the emerging JPEG2000
standards.
Intended Audience
Scientists, engineers, and managers who need to understand and/or apply the fundamental
concepts and techniques employed in digital image processing. Although no particular background is
needed, some prior knowledge of linear system theory (e.g., Fourier transforms) would be helpful.

1, deblurring
n. [计] 去模糊
v. 由模糊变清晰；擦掉…的污点（deblur的ing形式）

2, histogram  ['histəugræm]
n. 柱状图
[计算机] 直方图

3, perceptual  [pə'septjuəl]
a. 感性的,知觉的

4, quantization  [,kwɔntai'zeiʃən]

5, Fourier  ['furiei]
n. 傅里叶

# phprpc,xml,json,hessian 协议？

http://phprpc.group.iteye.com/group/wiki/1489-net-in-php-binary-soap-xml-json-hessian-serialization-such-as-the-efficiency-of-contrast

--------------

hessian实践:http://kazge.com/archives/450.html

phprpc实践:http://kazge.com/archives/452.html

--------------

# LoonDao初步设想

dao需要单例,因为每个dao都会获取pojo元数据和table数据。

Powered by Hydejack v6.6.1