[Soft Examination System Architecture Designer] Case Analysis in 2022 Over the Years

[Soft Examination System Architecture Designer] Case Analysis in 2022 Over the Years

Case analysis under 2022 The first question of the real questions over the years (25 points)

Read the following narrative about software architecture design and evaluation, and answer questions 1 and 2 on the answer sheet.
[Description]
An e-commerce company plans to upgrade its membership and promotion management system to provide users with personalized services and improve user stickiness. At the beginning of the project, the company's leadership agreed that the main goal of this upgrade was to improve the flexibility of member management. Since the current user scale is small and the business is relatively simple, system performance was not considered too much. In addition to maintaining the existing four-level fixed membership system, the new system also needs to dynamically adjust the discount of products based on the user's consumption amount, preference, repeatability and other related characteristics, and supports active screening and activity theme heights within a specific activity cycle A collection of related users, offering personalized discount promotions.
In the requirements analysis and architecture design stage, the requirements and quality attributes put forward by the company are described as follows:
(a) The administrator can flexibly set discount rules and promotional activity logic on the page, which will take effect after setting:
(b) The system should have a complete The security protection measures support the detection and alarm of malicious attacks:
(c) Under normal load conditions, the system should respond to the user's interface operation request within 0.3 seconds:
(d) The user name is the unique identifier of the system, requiring Start with a letter, consist of numbers and letters, and be no less than 6 characters in length.
(e) Under normal load conditions, the user confirms the order payment information within 3 seconds after paying for the goods:
(f) After the power failure of the main site of the system, the request should be redirected to the backup site within 5 seconds:
(g) The system Support horizontal storage expansion, requiring all expansion and testing work to be completed within 2 man
days
The development team conducts function debugging and system diagnosis:
(j) The system needs to record all user operation behaviors in detail, which is convenient for later reference and audit;
(k) Support the adjustment and configuration of the appearance of the system, and the adjustment work needs to be completed within 4 days.
Based on the analysis of system requirements, quality attribute descriptions and architectural features, the system architect gave two candidate architecture design schemes, and the company is currently organizing relevant experts to evaluate the system architecture.
[Question 1] (12 points)
During the architecture evaluation process, the quality attribute utility tree (utility tree) is an important tool for identifying and prioritizing system quality attributes. Please fill in the appropriate quality attribute names in the blanks of (1) and (2) in Figure 1-1, and fill in the blanks of (3)~(6) in (a)~(k) of the description of the question stem, and complete A utility tree for the system.
[Question 2] (13 points)
Regarding the functions of the system, Li Gong suggested adopting an object-oriented architectural style, packaging the calculation of discount strength and user screening into independent objects, and realizing the corresponding functions through object calls; Wang Gong suggested using The interpreter (interpreters) architectural style encapsulates the calculation of discount strength and user filtering conditions into independent rules, and realizes the corresponding functions by interpreting the rules. For the main functions of the system, please compare and analyze the two architectural styles from three aspects: the modifiability of discount rules, the flexibility of personalized discount definition, and system performance, and point out which architectural style is more suitable for the system.
insert image description here

[My answer to question 1]
(a) The administrator can flexibly set discount rules and promotion logic on the page, and it will take effect after setting: (b
) The system should have complete security protection measures to support malicious attacks Detection and alarm: (safety)
(c) Under normal load conditions, the system should respond to the user's interface operation request within 0.3 seconds: (performance) (
d) The user name is the unique identifier of the system, and it is required to start with a letter. A combination of numbers and letters, with a length of no less than 6 characters. (Safety)
(e) Under normal load conditions, the order payment information should be confirmed within 3 seconds after the user pays for the goods: (Availability) (
f) After the power failure of the main site of the system, the request should be redirected to the backup within 5 seconds Site: (Availability)
(g) The system supports horizontal storage expansion, and all expansion and testing work is required to be completed within 2 days (modifiability)
(h) After the system goes down, it needs to sense the error within 10 seconds and start it automatically Hot Backup System: (Performance)
(i) The system needs built-in interface functions to support the development team in function debugging and system diagnosis: (I don’t know) (
j) The system needs to record all user operations in detail for later reference and audit ; (Security)
(k) Support the adjustment and configuration of the appearance of the system, and the adjustment work needs to be completed within 4 days. (modifiability)

1) Security ✓
2) Modifiability ✓
3) h❌e
4) d❌j
5) e❌h
6) a❌k
[Standard answer to question 1]
1) Security
2) Modifiability
3) e
4 ) j
5) h
6) k
[My answer to question 2]
It is more suitable to adopt the interpreter style.
Reason: The company leadership agreed that the main goal of this upgrade is to improve the flexibility of member management. Since the current user scale is small and the business is relatively simple, system performance is not considered too much. 1) The modifiability of discount
rules
The interpreter architecture defines rules outside the program, and does not need to be compiled after modifying the rules, while object-oriented is just the opposite.
2) Flexibility of personalized discount definition
The interpreter is more flexible because it can be modified more conveniently
3) System performance
The object-oriented mode defines the rules in the program, and the interpreter is outside the program, so the object-oriented architecture has an advantage in performance.
[Question 2 Standard Answer]
It is more suitable for the interpreter architecture style.
1) Modifiability Object
-oriented needs to be encapsulated into objects, and the modifiability is not good.
It can be required to set independent discount rules, and the interpreter can analyze the changed rules, which is highly modifiable.
2) Flexibility in the definition of personalized discounts
Object-oriented is relatively fixed and has poor flexibility.
The interpreter can flexibly set rules according to user filtering conditions, which is very flexible.
3) System performance
The object-oriented architecture has high execution efficiency.
The interpreter is dynamically bound and executed during runtime, so the execution efficiency is low.

Case analysis under 2022 The second question of the real questions over the years (25 points)

Read the following statement about software system design and modeling, and answer questions 1 to 3 on the answer sheet.
【Explanation 1】
Coal production is one of the main areas of national economic development, and the safety of its coal mines is very important. An energy company plans to develop a coal mine construction project safety early warning system to protect the lives of employees in coal mine construction projects. The main functions of this system include the following (a)~(h).
(a) Maintenance of project information
(b) Input of influencing factors
c) Input of related accidents
(d) Safety evaluation score
(e) Early warning analysis of project indicators (
f) Filling and reporting of project indicators
(g) Review of project indicators
(h) Confirmation of project indicators
[Questions 1] (9 points)
According to the functional requirements of the coal mine construction project safety early warning system, Wang Gong designed and completed the data flow diagram of the system, as shown in Figure 2-1. Please use the functions (a)~(h) described in the question stem to supplement and perfect the content in the blanks (1)~(6), and briefly introduce the data balance principle followed in the process of hierarchical refinement in the data flow graph.
insert image description here
[Question 2] (9 points)
According to the relevant information represented in the data flow diagram in [Question 1], please supplement and improve the entities (1)~(6) in the overall ER diagram of the coal mine construction project safety early warning system (see Figure 2-2) Fill in the correct answers on the answer sheet.
insert image description here
[Question 3] (7 points)
In the process of structural analysis and design, data flow diagrams and data dictionaries are commonly used technical means. Please use text within 200 words to briefly explain their role in the software requirements analysis and design phase.

【Question 1 My answer】
1) Filling in f project indicators
2) g Project indicator review
3) h Project indicator confirmation
4) d Safety evaluation score
5) b Input of influencing factors
6) e Project indicator early warning analysis
The principle of data balance is in the data A principle that should be followed in the layering process of the flow graph is that the top-level graph often has only one processing, and the processing of the top-level graph is further decomposed in the layer graph. A processing must
have data flow input and output, and keep a balance.
[Standard answer to question 1]
(1)f (2)g (3)h (4)d (5)b (6)e
Layered and refined data balance principles:
1. Balance between parent graph and child graph:
parent graph The balance between graph and subgraph means that the input/output data flow on the boundary of any DFD subgraph must be consistent with the corresponding processing input/output data flow in its parent graph.
2. Data conservation:
The data in all output data streams of a process must be directly available from the input data stream of the process or generated through the processing of the process.

[My answer to question 2]
1) Project administrator
2) Project manager
3) Project indicators
4) Indicator parameter table
5) Accident and influencing factor parameter table
6) Indicator early warning analysis table ❌Project information
[Question 2 standard answer]
(1 ) Project administrator
(2) Project manager
(3) Project index data
(4) Project information
(5) Index parameters
(6) Accident and influencing factor parameters (4~6 are interchangeable)

[Question 3 My Answer]
The data flow diagram can carry out data modeling for demand analysis, clarify the input and output of the system data flow, and provide support reference and help for further structural design; the data dictionary is based on the data flow
diagram , to describe the data flow in the data flow diagram in detail.
[Standard answer to question 3]
1)
The data flow diagram in the requirements analysis stage is used to define the system context and establish the processing description of the business process, decompose the system from top to bottom, move and transform the named data in the system, describe the function and processing statute.
The data dictionary is used to establish an organized combination of business concepts. It is a model core library and an organized list of system-related data elements, so that stakeholders have a common understanding of the elements in the model.
2) Design phase
Map the results of the analysis phase (data flow diagram) into a software architecture (structure diagram) to provide a basis for module division and interface design between modules.
Create a database storage design based on the data storage description in the data dictionary

Case analysis under 2022 The third question of the real questions over the years (25 points)

Question 3 (25 points)
Fault detection and diagnosis of the system is one of the main technologies for aerospace systems to improve equipment reliability. With the development of equipment informatization, more and more resource allocations and resource layouts under the distributed architecture The more decentralized, this places new demands on the fault detection and diagnostic methods of the system. In order to adapt to the development of the distributed and integrated electronic system of aerospace equipment and solve the problem of difficult integration and monitoring of system status due to the scattered deployment of system resources, the company leader arranged Zhang Gong to conduct research. After analysis and research, Mr. Zhang proposed a solution for fault detection and diagnosis of distributed integrated electronic system architecture.
[Question 1] (8 points)
Mr. Zhang suggested that the software architecture of aerospace equipment can adopt a four-layer hierarchical architecture, namely the module support layer, operating system layer, distributed middleware layer and functional application layer. In order to effectively and conveniently realize the fault detection and diagnosis capabilities of the distributed system, the scheme suggests that the fault detection and diagnosis capabilities of the system be built in the distributed middleware, and the fault detector is implemented by using heartbeat or timeout detection technology. Please explain the basic principles and characteristics of the heartbeat detection and timeout detection technologies in 300 words or less.
[Question 2] (8 points)
According to the architectural characteristics of the distributed integrated electronic system, Zhang Gong gave a preliminary design plan, pointing out that the fault monitoring and diagnostic device of each node is mainly responsible for monitoring all fault information in the system, and will Carry out comprehensive analysis and judgment on the fault information, use the fault diagnostic tool to analyze the cause of the fault, and give solutions and measures. The system can configure a core status monitor for each processing machine core of a module, a partition status monitor for each partition, a module status monitor for each module, and a system status monitor for the system, as shown in Figure 3-1 According
insert image description here
to the faults (a)~(h) that may occur in the distributed integrated electronic system given below, please judge which types of monitors these faults belong to, and complete (1)~(8) in Table 3-1 )Whitespace.
(a) Application division by zero
(b) Watchdog failure
© task timeout
(d) Network diagnostic failure
(e) BIT detection failure
(f) Partition stack overflow
(g) Operating system exception
(h) Module power down
insert image description here
[Question 3] (9 points)
Zhang Gong pointed out in the plan that the fault diagnosis of this system is realized by a fault diagnostic device, which can synthesize multiple faults Information and system status, according to the decision-making strategy provided by the intelligent decision-making database, determine the type of failure and the treatment method. Policies in the intelligent decision database can perform qualitative or quantitative analysis of failures. Generally, in quantitative analysis, analytical model-based methods and data-driven methods are prevalent. Zhang Gong proposed in the scheme that the quantitative analysis of the system should adopt the method based on the analytical model. However, this proposal was opposed by Wang Gong, who pointed out that the data-driven method is more suitable for the design of distributed and integrated electronic system architecture. Please use less than 300 words to explain the basic concept of the data-driven method and the reasons Wang Gong proposed for adopting this method.

[My answer to question 1]
1) Heartbeat detection technology
The device regularly sends heartbeat information to the server through the network to ensure that the device is currently online.
2) Timeout detection technology
Timeout detection technology is to detect and diagnose the current state of the device when the heartbeat message is not received within a certain period of time, and the server side has a timeout.
[Question 1 standard answer]
Heartbeat is a means for fault detection. In a distributed system, various abnormalities, such as: downtime, disk damage, network failure, etc., occur from time to time. The heartbeat can quickly and effectively locate the wrong node in the cluster, and do timely processing to ensure the normal service of the
cluster Health checks are sent continuously to check if the service is healthy. When the remote node doesn't respond, we can only guess that the packet got lost somewhere in the process. The next action will be to retry or wait for some time until it times out.
[Question 2 My answer]
(a) Application division by zero (module status monitor) ✓
(b) Watchdog failure (core status monitor) ✓
© task timeout (core status monitor) ❌ system status
(d) Network diagnostic failure (system status monitor) ❌module status
(e) BIT detection failure (module status monitor) ❌core status
(f) partition stack overflow (partition status monitor) ✓
(g) operating system abnormality (system status monitor device) ✓
(h) Module power down (module status monitor) ✓
[Standard answer to question 2]
(1) (2) b, e
(3) f
(4) (5) (6) a, d, h
( 7)(8) g, c
[My answer to question 3]
The data-driven method is similar to the pipeline-based filter architecture. After the data is monitored in one module, it is processed in the next module. When there is no data, it is not processed.
Because the network switching module is similar to the bus, if each monitor needs to analyze the data, it is not high in terms of performance and efficiency. This problem can be solved after adopting data-driven.
[Question 3 standard answer]
By analyzing the monitoring data during the operation of the system, the fault diagnosis of the system can be carried out without an accurate mathematical model of the system. The specific methods include machine learning, statistical analysis and signal analysis. Because the aerospace
system It is a very complex system. If Zhang Gong's method based on analytical model is used, this type of method needs to be established on the basis of an accurate mathematical model for fault diagnosis. However, it is difficult to accurately model such a very complex system as the aerospace system. Therefore, Wang Gong proposed a data-driven method that does not require precise system mathematical models

Case analysis under 2022 The fourth question of the real questions over the years (25 points)

Question 4 (25 points)
A large-scale e-commerce platform has established an online B2B store system, and built cargo storage centers in many places across the country, and improved the delivery efficiency of goods by preparing goods in advance. However, in the process of operation, it is found that there will be many situations in which goods are transferred across storage centers, thereby delaying the delivery of goods. To this end, the company plans to establish a new national warehouse goods management system. In addition to realizing the routine management functions of the warehouse center, it analyzes and mines the order information in the online B2B store system in a timely manner, and predicts the warehouse centers in various places through big data analysis. The configuration quantity of various types of goods in the warehouse can improve the transportation efficiency and reduce the cost.
When a user purchases goods through the online B2B store system, the national warehouse goods management system will use the user's address, commodity category, and goods information and address of the warehouse center to provide real-time feedback on the place of shipment (a certain warehouse center) for the user's order and predict delivery time. The response time of the feedback delivery time should be less than 1 second.
In order to meet the performance requirements of the feedback delivery time function, the design team suggested using a data cache cluster in the national warehouse goods management system to store the basic information of the warehouse center, product category, and inventory quantity in the memory cache, while the warehouse center’s Other commodity information is stored in the database system.
[Question 1] (9 points)
When the design team was discussing the data consistency of the cache and database, Li Gong suggested adopting a real-time synchronous data update scheme, while Zhang Gong suggested adopting an asynchronous quasi-real-time data update scheme.
Please use less than 200 words to briefly introduce the basic ideas of the two schemes, explain which scheme should be adopted by the national storage goods management system, and explain the reasons for adopting this scheme.
[Question 2] (9 points)
With the development of business, the number of storage centers and commodities is increasing. It is necessary to deploy multiple cache nodes in the cluster to improve the processing capacity of the cache. Li Gong suggested using the cache sharding method to split the cached data into multiple nodes for storage separately, so as to reduce the access pressure of a single cache node and achieve the splitting effect.
Commonly used cache sharding methods include hash algorithm and consistent hash algorithm. Li Gong recommends using consistent hash algorithm for sharding. Please use text within 200 words to briefly explain the basic principles of the two algorithms, and explain why Li Gong uses the consistent hash algorithm.
[Question 3] (7 points)
The national warehousing goods management system was developed. After a period of operation, the system maintenance personnel found that a large number of hackers intentionally initiated illegal commodity delivery time query requests, resulting in a cache breakdown. Zhang Gong suggested to use the Bloom filter method to solve it as soon as possible. Please explain the working principle and advantages and disadvantages of Bloom filter in 200 words or less.

[Question 1 standard answer]
Real-time solution:
strong consistency, actively eliminate the cache after updating the database, and update the cache with read requests. In order to avoid cache avalanche, the process of updating the cache needs to be controlled synchronously. Only one request is allowed to access the database asynchronously in real time at the same
time Update scheme:
quasi-consistency, when the database data is updated, the cached data is updated asynchronously, and the data update is completed gradually by using multi-threading technology or MQ (message queue).
The asynchronous quasi-real-time update scheme should be adopted, because the title has strict requirements on performance, and it is required to be completed within 1 second, and most requests are read operations, with few write operations. The biggest problem with the real-time synchronization solution is that the performance during synchronization is uncontrollable.
[Standard answer to question 2]
Hash sharding:
Do hash calculation on the cached Key, and then take the remainder from the total number of cache nodes, and the result is the serial number to be stored in the cache node. The advantage of this algorithm is that it is simple and easy. The disadvantage is that when adding or reducing cache nodes, the change in the total number of cache nodes will cause the calculated nodes to change, resulting in cache invalidation and unavailability.
Consistent hash sharding: Map storage nodes and data to a virtual hash ring with 0~232 end-to-end links. Storage nodes can be hashed according to IP addresses. Data is usually determined by searching in a clockwise direction. The storage node to which it belongs. The advantage of this algorithm is that when adding or deleting nodes, only a small number of keys will drift to other nodes, while most of the nodes hit by keys will remain unchanged, thus ensuring that the hit rate will not drop significantly. The disadvantage is that the cache nodes are not evenly distributed on the ring, which will cause greater pressure on some cache nodes.
The reason for adopting the consistent hash algorithm: when expanding the cache node, the consistent hash sharding method only needs to update the storage location of a small amount of data, while the hash sharding needs to update the storage location of almost all data .
【Question 3 standard answer】
The Bloom filter records and identifies whether a certain data is in a set through a long binary vector and a series of random mapping functions. If the data is not in the collection, it can be identified and does not need to be searched in the database, so it can filter out the queries whose return value of the database query is empty.
Advantages: small memory usage, high query efficiency, no need to store elements themselves, great advantages in some occasions with strict confidentiality requirements.
Disadvantages: There is a certain rate of misjudgment, it cannot be 100% accurate to determine whether an element is in the set, the element itself cannot be obtained, and the element cannot be deleted from the Bloom filter under normal circumstances.

Case analysis under 2022 The fifth question of the real questions over the years (25 points)

Read the following description about Web system architecture design, and answer questions 1 to 3 on the answer sheet.
[Description]
A company intends to develop an intelligent access control system based on edge computing, which is used in scenarios such as parks, new retail, and industrial sites where there are visiting and visited businesses. Before the visit, the visitor can record his personal information in the background by making an online appointment in advance. After the interviewee passes this request in the system, the visitor can directly pass through the "swipe face" method when visiting. Access control, no other verification required. In addition, the administrator of the system can manage the running access control equipment.
Based on project requirements, the company formed a project team and held a project discussion meeting. At the meeting, according to business needs and combined with the idea of ​​edge computing, Zhang Gong proposed that the system can be composed of four functions: visitor registration module, model training module, device-side identification module and equipment scheduling platform module. Li Gong proposed from the technical level that the system can use the Flask framework and the SSM framework as the basis to develop the background server, deploy the developed system through Docker, and use the MQTT protocol to manage Docker.
【Question 1】(5 points)
The MQTT protocol is widely used in the Industrial Internet of Things. Please briefly explain the MQTT protocol within 300 words.
[Question 2] (14 points)
At the meeting, Zhang Gong further explained the functional modules: the visitor registration module is used for visitors to submit applications and interviewees to confirm applications, and mainly handles the submission of visit applications and the review of visit applications , and save visitor data at the same time to prepare a training data set for the training module ; the model training module is used to use visitor data for model training and provide a model basis for the identification business of end-side devices: the end-side identification module runs on the edge access control device, using the training A good model to identify visitors, and cooperate with cloud services to complete the complete business of visitor visits; equipment scheduling platform moduleIt is used to manage edge access control devices. Managers can use the platform to schedule, manage and monitor edge devices to achieve cloud collaboration.
Figure 5-1 shows the architecture diagram of the intelligent access control system based on edge computing. Please combine the characteristics of the HTTP protocol and the MQTT protocol to select the appropriate protocol for (1) ( 6) in Figure 5-1: The description of the functional modules, supplement and improve the blanks at (7) (10) in Figure 5-1.
insert image description here
[Question 3] (6 points)
Please use text within 300 words to briefly analyze the advantages of introducing the edge computing model into the traditional cloud computing model from the aspects of data communication, data security and system performance.

[My answer to question 1]
The MQTT protocol is the protocol used for the connection between things in the Internet of Things. IoT devices using MQTT can quickly subscribe to the cloud server, and exchange information between things through the message mechanism.
[Question 1 Standard Answer]
MQTT (Message Queue Telemetry Transport) is a client-server based message publish/subscribe transport protocol. It works on the TCP/IP protocol family and is a publish/subscribe message protocol designed for remote devices with low hardware performance and poor network conditions. The MQTT protocol is lightweight, simple, open and easy to implement
[My answer to question 2]
1) HTTP protocol ✓
2) MQTT protocol ✓
3) MQTT protocol ✓
4) MQTT protocol ✓
5) HTTP protocol ✓
6) MQTT protocol ❌
7) Visitor data module ❌
8) Model training module ✓
9) Device scheduling platform module ✓
10) Terminal test identification module ❌
[Standard answer to question 2]
⑴HTTP ⑵MQTT (3)MQTT (4)MQTT ⑸HTTP ⑹HTTP
(7) End-side identification (8) Model training (9) Device scheduling platform (10) Visitor registration
[My answer to question 3]
1) Data communication
Data communication with edge devices is completed by the device scheduling platform module, which can better manage edge devices
2) Data security
The data communication with the edge device is completed by the device dispatching platform module, which avoids the impact of the front-end data communication such as applets on the edge device.
3) System performance
Edge computing is put into edge devices, which reduces the burden on the cloud platform and provides higher performance.
[Question 3 standard answer]
Data communication:
The communication data volume is less and the speed is faster. Because the data processing comparison is completed on the edge device, there is no need to return to the server, and the communication efficiency is higher.
Data security:
Data is stored in encrypted form on the edge devices that need to be used, and localized processing and comparison reduce the security risks caused by the transmission of original information on the Internet. Hackers cannot affect the entire system by attacking one device.
System performance:
Higher performance. Taking face recognition as an example, when performing recognition, only the local comparison is performed without transferring the face data to the remote server for comparison.

Guess you like

Origin blog.csdn.net/Last_Impression/article/details/128979880