In the second half of 2022, system architects' real questions and answer analysis in the afternoon

Question 1 (25 points)

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 stage of requirements analysis and architecture design, the requirements and quality attributes put forward by the company are described as follows:

(a) The administrator can flexibly set discount rules and promotion logic on the page, which will take effect after setting;

(b) The system should have complete security protection measures to support the detection and alarm of malicious attacks;

(c) Under normal load conditions, the system should respond to user interface operation requests within 0.3 seconds;

(d) The user name is the unique identifier of the system, which must start with a letter, be composed 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 product;

(f) After a power outage at the main site of the system, the request should be redirected to the backup site within 5 seconds;

(g) The system supports horizontal storage expansion, and all expansion and testing work is required to be completed within 2 man-days;

(h) After the system goes down, it needs to sense the error within 10 seconds and automatically start the hot backup system;

(i) The system needs built-in interface functions to support the development team in function debugging and system diagnosis;

(j) The system needs to record all user operations in detail for later reference and audit;

(k) Adjust and configure 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)

The quality attribute utility tree is an important tool for identifying and prioritizing system quality attributes during the architecture assessment process. 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 to complete The utility tree of the phylogeny.

 

Question 2 (13 points)

Regarding the functions of the system, Li Gong suggested adopting an object-oriented architectural style, encapsulating discount strength calculation and user screening into independent objects, and implementing corresponding functions through object calls; Wang Gong suggested adopting an interpreter (interpreters) architectural style, Encapsulate the calculation of discount strength and user filtering conditions into independent rules, and realize the corresponding functions by explaining 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.

Choose 2 answers from the following 4 test questions (test question 2 to test question 5).

Question 2 (25 points)

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) Project information maintenance (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

Question 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) mentioned in the question stem to supplement and improve the content in the blanks (1)~(6), and introduce the data balance principle followed in the hierarchical refinement process of the data flow graph.

 

Question 2 (9 points)

Please complete the specific content of entities (1)~(6) in the overall ER diagram of the coal mine construction project safety early warning system (see Figure 2-2) according to the relevant information shown in the data flow diagram in question 1, and fill in the correct answer in the answer on paper.

 

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 requirement analysis and design phase.

Question 3 (25 points)

System fault detection and diagnosis 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 are becoming more and more scattered. Fault detection and diagnosis methods put forward new requirements. 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)

Zhang Gong proposed that the software architecture of aerospace equipment can adopt a four-layer hierarchical architecture, namely, the module support layer, the operating system layer, the distributed middleware layer and the 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 comprehensively analyzing and judging the fault information, using The fault diagnosis tool analyzes the cause of the fault and gives 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 Show.

According to the faults (a)~(h) that may occur in the distributed integrated electronic system given below, please judge which type of monitor these faults belong to, and complete (1)~(8) in Table 3-1 Whitespace.

(a) Application division by zero

(b) Watchdog failure

(c) Task timeout

(d) Network diagnostic failure

(e) BIT detection failure

(f) Partition stack overflow

(g) Operating system exception

(h) Module power down

         Table 3-1 Fault classification

Kernel Status Monitor

( 1 )、( 2 )

Partition Status Monitor

( 3 )

Module Status Monitor

( 4 )、( 5 )、( 6 )

System Status Monitor

( 7 )、( 8 )

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 various fault information and system status, and determine the fault type and treatment method according to the decision-making strategy provided by the intelligent decision-making database. Policies in the intelligent decision database can perform qualitative or quantitative analysis of failures. Generally, in quantitative analysis, analytical model-based approaches and data-driven approaches 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.

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 to improve 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 discussed 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, and 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 development of the national warehousing goods management system was completed. After a period of operation, the system maintenance personnel found that a large number of hackers deliberately 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 5 (25 points)

A company intends to develop a smart access control system based on edge computing, which will be 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, Mr. Zhang further explained the functional modules: the visitor registration module is used for visitors to submit applications and interviewees to confirm applications. The module prepares the training data set; the model training module is used for model training using visitor data, providing a model basis for the identification of end-side devices; the end-side identification module runs on the edge access control device, uses the trained model to identify visitors, and Cloud service collaboration completes the complete business of visitor visits; the device scheduling platform module is used to manage edge access control devices, and managers can use the platform to perform scheduling management and status monitoring of 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.

 

Question 3 (6 points)

Please use the 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.

In the second half of 2022, system architects' real questions and answer analysis in the afternoon

Exam question 1 (25 points)  Click this link to view the real question analysis video https://ke.qq.com/course/329379

Question 1 (12 points)

(1) Security (2) Modification (3) e (4) j (5) h (6) k

Question 2 (13 points)

More suitable for interpreter architecture style.

 

Question 2 (25 points)

Question 1 (9 points)

(1)f  (2)g  (3)h  (4)d  (5)b  (6)e

Question 2 (9 points)

Layered and refined data balance principles:

1. The balance between the parent graph and the subgraph: The balance between the parent graph and the 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 the 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.

Question 2 (9 points)

(1) Project administrator (2) Project manager (3) Project indicator data

(4) Project information (5) Index parameters (6) Accident and influencing factor parameters (4~6 are interchangeable)

 

Question 3 (25 points)

Question 1 (8 points)

Heartbeating is a means for failure 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

Usually the probe will send health checks 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 (8 points)

(1) (2) b、e     (3) f     (4) (5) (6) a、d、h   (7)(8) g、c

Question 3 (9 points)

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 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.

Question 4 (25 points)

Question 1 (9 points)

Real-time solution: strong consistency, actively eliminate the cache after updating the database, and update the cache with read requests. To avoid cache avalanche, the process of updating the cache needs to be controlled synchronously, and only one request is allowed to access the database at a time.

Asynchronous quasi-real-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.

Question 2 (9 points)

Hash sharding: Perform hash calculation on the cached Key, 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 (7 points)

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.

Question 5 (25 points)

Question 1 (5 points)

MQTT (Message Queuing Telemetry Transport) is a client-server based publish/subscribe transport protocol for messages. 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.

Question 2 (14 points)

⑴HTTP       ⑵MQTT     (3)MQTT      (4)MQTT      ⑸HTTP     ⑹HTTP 

(7) Device-side recognition (8) Model training (9) Equipment scheduling platform (10) Visitor registration

Question 3 (6 points)

Data Communication: Communicate with less data volume and faster speed. 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/xiaornshuo/article/details/127867920