Data read-write method and system of switch

By filtering and sorting the switch's read and write requests and determining the execution order, the problem of channel blockage in the prior art is solved and efficient information exchange is achieved.

CN120090976AInactive Publication Date: 2025-06-03SHENZHEN MTN ELECTRONICS
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411278435.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2025-06-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

During information exchange, existing switches process all requests at the same time, resulting in channel blockage, reducing work efficiency.

Method used

By receiving read and write requests, we judge whether the source device is in the trusted device list. If it fails, it will be discarded or manually reviewed. After passing, the request will be parsed, the execution time will be compared with the preset threshold, priority will be divided, request queues will be sorted, and execution will be performed according to priority.

Benefits of technology

The number of read and write requests that need to be executed is reduced, the execution sequence is set, the channel congestion is avoided, and efficient information exchange is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120090976A_ABST
    Figure CN120090976A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of switches, and particularly discloses a data read-write method and system of a switch, and the method comprises the steps: receiving all read-write requests, judging whether source equipment of the read-write requests is in a trusted equipment list, and analyzing the read-write requests to obtain target data of the read-write requests after the judgment is passed; determining the execution time of the read-write request according to the target data, and comparing the execution time with a preset threshold to obtain read-write requests with different priorities; analyzing the data type of the read-write request source equipment, and converting the type of the target data into the data type of the read-write request source equipment; and determining an execution result of each read-write request based on the priority of the read-write request. According to the method, the read-write requests are screened and sorted, so that the number of the read-write requests needing to be executed is reduced, the execution sequence of the read-write requests is set, only the read-write requests need to be executed according to the sequence, all the read-write requests do not need to be processed at the same time, and efficient information exchange is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of switches, and specifically to a data reading and writing method and system for a switch. Background Art

[0002] A switch is a device that completes information exchange functions in a communication system and is used for the forwarding of electrical signals. With the intensification of industrial informatization and intelligence, switches are required in more and more scenarios.

[0003] When the current switch performs information exchange, all requests are simultaneously subjected to information exchange. Although information exchange can be completed, completing all requests at the same time will cause channel congestion and reduce work efficiency. Summary of the Invention

[0004] The purpose of the present invention is to provide a data reading and writing method and system for a switch to solve the problems raised in the above background art.

[0005] To achieve the above purpose, the present invention provides the following technical solutions: A data reading and writing method for a switch, the method comprising: Receiving all reading and writing requests, determining whether the source device of the reading and writing request is in the trusted device list. If the determination fails, manual review is performed on the source device. If the manual review fails, the reading and writing request is discarded. After the manual review passes, the source device is also added to the trusted device list. If the determination passes, the reading and writing request is parsed to obtain the target data of the reading and writing request; Determining the execution time of the reading and writing request based on the target data, comparing the execution time with a preset threshold to obtain reading and writing requests with different priorities; Parsing the data type of the source device of the reading and writing request, and converting the type of the target data into the data type of the source device of the reading and writing request; Based on the priority of the reading and writing request, determining the execution result of each reading and writing request.

[0006] As a further solution of the present invention: the step of determining the execution time of the reading and writing request based on the target data, comparing the execution time with a preset threshold to obtain reading and writing requests with different priorities includes: Dividing the target data into different sub-data segments, determining the execution duration of each sub-data segment, and the sum of the execution durations of all sub-data segments is the execution time of the reading and writing request; Comparing the execution time of the reading and writing request with the preset threshold. The reading and writing request with an execution time less than the preset threshold is a first-priority reading and writing request, and the reading and writing request with an execution time greater than or equal to the preset threshold is a second-priority reading and writing request; Sorting the reading and writing requests with the same priority to obtain the execution queue of the reading and writing requests with the same priority.

[0007] As a further solution of the present invention, the step of sorting the read-write requests with the same priority to obtain the execution queue of the read-write requests with the same priority includes: Confirm the execution time of each read-write request in the read-write requests with the same priority; Compare the execution times of each read-write request pairwise, and the one with the shorter execution time is in the front row to obtain the execution queue.

[0008] As a further solution of the present invention, the step of parsing the data type of the read-write request source device and converting the type of the target data into the data type of the read-write request source device includes: Parse the data type of the read-write request source device and confirm the type of the target data; Judge whether the type of the target data is consistent with the data type of the read-write request source device. If the judgment result is that the two are inconsistent, convert the type of the target data into the data type of the read-write request source device. If the judgment result is that the two are consistent, there is no need to change the type of the target data.

[0009] As a further solution of the present invention, the step of determining the execution result of each read-write request based on the priority of the read-write request includes: Execute the execution queue of the first priority and the execution queue of the second priority in sequence, and write the execution queue into the buffer disk in the order from front to back; Write the data in the buffer disk into the source device of the read-write request in sequence.

[0010] The technical solution of the present invention also provides a data read-write system for a switch, and the system includes: An analysis module, configured to receive all read-write requests, judge whether the source device of the read-write request is in the trusted device list. If the judgment fails, perform manual review on the source device. If the manual review fails, discard the read-write request. After the manual review passes, the source device is also added to the trusted device list. If the judgment passes, parse the read-write request to obtain the target data of the read-write request; A comparison module, configured to determine the execution time of the read-write request according to the target data, compare the execution time with a preset threshold to obtain read-write requests with different priorities; A parsing module, configured to parse the data type of the read-write request source device and convert the type of the target data into the data type of the read-write request source device; An execution module, configured to determine the execution result of each read-write request based on the priority of the read-write request.

[0011] As a further solution of the present invention, the comparison module includes: A division unit, configured to divide target data into different sub-data segments, determine the execution duration of each sub-data segment, and the sum of the execution durations of all sub-data segments is the execution time of the read / write request; A comparison unit, configured to compare the execution time of the read / write request with a preset threshold. The read / write request with an execution time less than the preset threshold is a first-priority read / write request, and the read / write request with an execution time greater than or equal to the preset threshold is a second-priority read / write request; A sorting unit, configured to sort the read / write requests with the same priority to obtain an execution queue of the read / write requests with the same priority.

[0012] As a further solution of the present invention: the sorting unit includes: A confirmation unit, configured to confirm the execution time of each read / write request in the read / write requests with the same priority; A queue generation unit, configured to compare the execution times of each read / write request pairwise, and the one with a shorter execution time is in the front row to obtain an execution queue.

[0013] As a further solution of the present invention: the parsing module includes: A parsing unit, configured to parse the data type of the source device of the read / write request and confirm the type of the target data; A judgment unit, configured to judge whether the type of the target data is consistent with the data type of the source device of the read / write request. If the judgment result is that the two are inconsistent, convert the type of the target data to the data type of the source device of the read / write request. If the judgment result is that the two are consistent, there is no need to change the type of the target data.

[0014] As a further solution of the present invention: the execution module includes: A first writing unit, configured to sequentially execute the execution queues of the first priority and the second priority, and write the execution queues into the buffer disk in the order from front to back; A second writing unit, configured to sequentially write the data in the buffer disk into the source device of the read / write request.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: By screening and sorting the read / write requests, the present invention not only reduces the number of read / write requests to be executed, but also sets the execution order of the read / write requests. It only needs to execute the read / write requests in order, without the need to process all read / write requests simultaneously, and there will be no channel congestion, realizing high-efficiency information exchange. Description of the Drawings

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention.

[0017] Figure 1 It is a flowchart of the data reading and writing method for a switch.

[0018] Figure 2 It is the second sub - flowchart of the data reading and writing method for a switch.

[0019] Figure 3 It is the third sub - flowchart of the data reading and writing method for a switch.

[0020] Figure 4 It is the fourth sub - flowchart of the data reading and writing method for a switch.

[0021] Figure 5 It is the block diagram of the composition structure of the data reading and writing system for a switch.

[0022] Figure 6 It is the block diagram of the composition structure of the comparison module in the data reading and writing system for a switch.

[0023] Figure 7 It is the block diagram of the composition structure of the sorting unit in the data reading and writing system for a switch.

[0024] Figure 8 It is the block diagram of the composition structure of the parsing module in the data reading and writing system for a switch.

[0025] Figure 9 It is the block diagram of the composition structure of the execution module in the data reading and writing system for a switch. Detailed implementation manners

[0026] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0027] Embodiment 1: Figure 1 It is a flowchart of the data reading and writing method for a switch. In an embodiment of the present invention, a data reading and writing method for a switch, the method includes: Receiving all read - write requests, judging whether the source device of the read - write request is in the trusted device list. If the judgment fails, manual verification is performed on the source device. If the manual verification fails, the read - write request is discarded. After the manual verification passes, the source device is also added to the trusted device list. If the judgment passes, the read - write request is parsed to obtain the target data of the read - write request; The switch will receive read and write requests from many devices at the same time. It is necessary to screen these read and write requests and trace the source devices of the read and write requests. Each source device has its own unique identification number. The database will store a pre-listed trusted device list, and the trusted device list stores the identification numbers of trusted devices. Compare the identification number of the source device of the read and write request with the identification numbers in the trusted device list to check whether the identification number of the source device is in the trusted device list. If the identification number of the source device is in the trusted device list, it means that the source device is a trusted device, and directly parse the read and write request of the trusted device to query which are the target data of the read and write request of the trusted device. If the identification number of the source device is not in the trusted device list, intercept the read and write request of the source device. The administrator judges whether the source device belongs to a trusted device. If the administrator judges that the source device does not belong to a trusted device, directly discard the read and write request. If the administrator judges that the source device belongs to a trusted device, the judgment passes, parse the read and write request of the source device, and add the source device to the trusted device list. The next read and write request of the source device can pass directly.

[0028] Determine the execution time of the read and write request based on the target data, compare the execution time with a preset threshold to obtain read and write requests with different priorities; Know the target data corresponding to the read and write request. Based on the current channel occupancy, the duration required to execute the read and write request can be calculated. This duration is the execution time of the read and write request. In order to distinguish the order of execution of read and write requests, a time threshold is preset. Compare the execution time of the read and write request with this time threshold to obtain the priority of the execution of the read and write request.

[0029] Parse the data type of the source device of the read and write request and convert the type of the target data to the data type of the source device of the read and write request; The format of storing data in each source device is fixed. Knowing the model of the source device can know all the formats of storing data in the source device. Then confirm the type of the target data of the read and write request of the source device and check whether the format of the target data is included in all the formats of storing data in the source device. If the format of the target data is included in all the formats of storing data in the source device, it means that the target data can be directly mapped in the source device. If the format of the target data is not included in all the formats of storing data in the source device, it is necessary to convert the format of the target data into a format that can be stored in the source device to facilitate subsequent direct storage into the source device and reduce the time required for subsequent execution.

[0030] Based on the priority of the read and write request, determine the execution results of each read and write request.

[0031] Determining the priorities of each read / write request determines the order of execution of each read / write request. Each read / write request is executed in the determined order until the last read / write request is executed, and it is confirmed that all read / write requests have been executed.

[0032] Figure 2 It is the second sub-process block diagram of the data read / write method of the switch. In the embodiments of the present invention, the steps of determining the execution time of the read / write request based on the target data and comparing the execution time with a preset threshold to obtain read / write requests with different priorities include: Divide the target data into different sub-data segments, determine the execution duration of each sub-data segment, and the sum of the execution durations of all sub-data segments is the execution time of the read / write request; According to a preset rule (this rule can be classified according to different data types or according to the length of the data), divide the target data into multiple sub-data segments, calculate the time for executing each sub-data segment, obtain the execution duration of each sub-data segment, and add up the execution durations of all sub-data segments in the same target data to obtain the execution time of the target data, which is the execution time of the corresponding read / write request.

[0033] Compare the execution time of the read / write request with the preset threshold. The read / write request with an execution time less than the preset threshold is a first-priority read / write request, and the read / write request with an execution time greater than or equal to the preset threshold is a second-priority read / write request; There is a preset threshold for the execution time. A read / write request with an execution time equal to or exceeding this threshold indicates that the execution time is too long and the priority of this read / write request is low. A read / write request with an execution time less than this threshold indicates that the execution time is short and the priority of this read / write request is high.

[0034] Sort the read / write requests with the same priority to obtain the execution queue of the read / write requests with the same priority.

[0035] Read / write requests with the same priority also need to be sorted to determine the order of execution of all read / write requests. The read / write request to be executed first is in the front, and the read / write request to be executed later is in the back. The read / write requests with the same priority form a specific execution queue.

[0036] The steps of sorting the read / write requests with the same priority to obtain the execution queue of the read / write requests with the same priority include: Confirm the execution time of each read / write request among the read / write requests with the same priority; Correspond the read / write requests with the same priority to their respective execution times, and the execution time of each read / write request can be known; Compare the execution times of each read / write request in pairs, and the one with the shorter execution time is in the front row to obtain the execution queue.

[0037] By comparing the execution time of each read / write request with the execution times of the remaining read / write requests in sequence, the length order of the execution times of all read / write requests in the same priority level can be obtained. By arranging the read / write requests in the same priority level in ascending order of execution time, the execution queue of the read / write requests is formed.

[0038] Figure 3 It is the third sub-process block diagram of the data read / write method of the switch. The steps of parsing the data type of the read / write request source device and converting the type of the target data into the data type of the read / write request source device include: Parse the data type of the read / write request source device and confirm the type of the target data; All types of data cannot be stored in the source device. It can only store a fixed number of formats. Data in other formats need to be format-converted before they can be stored in the source device. Therefore, it is necessary to confirm the data format of the source device and also the format of the target data corresponding to this read / write request.

[0039] Judge whether the type of the target data is consistent with the data type of the read / write request source device. If the judgment result is that the two are inconsistent, convert the type of the target data into the data type of the read / write request source device. If the judgment result is that the two are consistent, there is no need to change the type of the target data.

[0040] Check whether the format of the target data is consistent with the data format of the source device. If the two are consistent, the target data can be directly stored in the read / write request source device; if the two are inconsistent, the format of the target data needs to be converted into a format that can be stored in the read / write request source device, and then the converted target data can be stored in the source device to implement the read / write operation.

[0041] Figure 4 It is the fourth sub-process block diagram of the data read / write method of the switch. The steps of determining the execution results of each read / write request based on the priority of the read / write request include: Execute the execution queue of the first priority level and the execution queue of the second priority level in sequence. The execution queue is written into the buffer disk in the order from front to back; The read / write requests in the same priority level form the execution queue of the read / write requests at this priority level. The target data of each read / write request can be obtained. First, execute the execution queue of the first priority level, write the corresponding target data into the buffer disk in sequence and sort them in the order of precedence to avoid blocking the current channel. After executing the execution queue of the first priority level, then execute the execution queue of the second priority level, and the process is the same as above.

[0042] Write the data in the buffer disk into the read / write request source device in sequence.

[0043] At this time, the buffer disk contains the target data of all read / write requests, and these target data are arranged in the order of the read / write requests. Just write the target data into the corresponding source device of the read / write request in sequence to complete the execution of the read / write request.

[0044] Embodiment 2: Figure 5 It is a block diagram of the composition structure of the data read / write system of the switch. In the embodiment of the present invention, a data read / write system of a switch, the system includes: An analysis module, configured to receive all read / write requests, determine whether the source device of the read / write request is in the trusted device list. If the determination fails, perform manual review on the source device. If the manual review fails, discard the read / write request. After the manual review passes, add the source device to the trusted device list. If the determination passes, parse the read / write request to obtain the target data of the read / write request; A comparison module, configured to determine the execution time of the read / write request according to the target data, compare the execution time with a preset threshold to obtain read / write requests with different priorities; A parsing module, configured to parse the data type of the source device of the read / write request and convert the type of the target data into the data type of the source device of the read / write request; An execution module, configured to determine the execution result of each read / write request based on the priority of the read / write request.

[0045] Figure 6 It is a block diagram of the composition structure of the comparison module in the data read / write system of the switch. In the embodiment of the present invention, the comparison module includes: A division unit, configured to divide the target data into different sub-data segments, determine the execution duration of each sub-data segment, and the sum of the execution durations of all sub-data segments is the execution time of the read / write request; A comparison unit, configured to compare the execution time of the read / write request with a preset threshold. The read / write request with an execution time less than the preset threshold is a first-priority read / write request, and the read / write request with an execution time greater than or equal to the preset threshold is a second-priority read / write request; A sorting unit, configured to sort the read / write requests with the same priority to obtain an execution queue of the read / write requests with the same priority.

[0046] Figure 7 It is a block diagram of the composition structure of the sorting unit in the data read / write system of the switch. In the embodiment of the present invention, the sorting unit includes: A confirmation unit, configured to confirm the execution time of each read / write request in the read / write requests with the same priority; A queue generation unit, configured to compare the execution times of each read / write request pairwise, and the one with a shorter execution time is in the front row to obtain an execution queue.

[0047] Figure 8It is a block diagram of the composition structure of the parsing module in the data reading and writing system of the switch. In the embodiment of the present invention, the parsing module includes: A parsing unit, which is used to parse the data type of the source device of the read-write request and confirm the type of the target data; A judgment unit, which is used to judge whether the type of the target data is consistent with the data type of the source device of the read-write request. If the judgment result is that the two are inconsistent, convert the type of the target data into the data type of the source device of the read-write request. If the judgment result is that the two are consistent, there is no need to change the type of the target data.

[0048] Figure 9 It is a block diagram of the composition structure of the execution module in the data reading and writing system of the switch. In the embodiment of the present invention, the execution module includes: A first writing unit, which is used to sequentially execute the execution queues of the first priority and the second priority, and the execution queues are sequentially written into the buffer disk in the order from front to back; A second writing unit, which is used to sequentially write the data in the buffer disk into the source device of the read-write request.

[0049] All the functions that can be realized by the data reading and writing method of the switch are completed by a computer device. The computer device includes one or more processors and one or more memories. At least one program code is stored in the one or more memories, and the program code is loaded and executed by the one or more processors to realize the functions of the user behavior prediction method based on big data.

[0050] The processor fetches instructions one by one from the memory, analyzes the instructions, and then completes corresponding operations according to the requirements of the instructions, generating a series of control commands, making each part of the computer move automatically, continuously and coordinately, becoming an organic whole, realizing the input of the program, the input of data, and the operation and output of results. All the arithmetic operations or logical operations generated in this process are completed by the arithmetic unit; the memory includes a read-only memory (ROM), and the read-only memory is used to store computer programs, and a protection device is provided outside the memory.

[0051] Exemplarily, a computer program can be divided into one or more modules. One or more modules are stored in the memory and executed by the processor to complete the present invention. One or more modules can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.

[0052] Those skilled in the art can understand that the description of the above service device is merely an example and does not constitute a limitation on the terminal device. It may include more or fewer components than the above description, or combine some components, or different components. For example, it may include input / output devices, network access devices, buses, etc.

[0053] The so-called processor may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The above processor is the control center of the above terminal device, and connects various parts of the entire user terminal through various interfaces and lines.

[0054] The above memory can be used to store computer programs and / or modules. The above processor realizes various functions of the above terminal device by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as information collection template display function, product information release function, etc.); the data storage area can store data created according to the use of the berth status display system (such as product information collection templates corresponding to different product types, product information to be released by different product providers, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disks, memory, plug-in hard disks, smart media cards (SMCs), secure digital (SD) cards, flash cards, at least one magnetic disk storage device, flash device, or other volatile solid-state storage devices.

[0055] When the modules / units integrated in a terminal device are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the modules / units in the above-described embodiment system of the present invention, it can also be completed by instructing relevant hardware through a computer program. The above computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can realize the functions of the above various system embodiments. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.

[0056] It should be noted that in this article, the term "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or device including the element.

[0057] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.

Claims

1. A data reading and writing method for a switch, characterized in that: The method comprises: Receive all read and write requests, determine whether the source device of the read and write request is in the trusted device list, if the determination fails, manually review the source device, if the manual review fails, the read and write request is discarded, if the manual review passes, the source device is added to the trusted device list, if the determination passes, the read and write request is parsed, and the target data of the read and write request is obtained; Determine the execution time of the read / write request based on the target data, compare the execution time with a preset threshold, and obtain read / write requests of different priorities; Parse the data type of the read / write request source device, and convert the type of the target data into the data type of the read / write request source device; Based on the priority of the read and write requests, the execution result of each read and write request is determined.

2. The data reading and writing method of the switch according to claim 1, characterized in that: The step of determining the execution time of the read / write request according to the target data, comparing the execution time with a preset threshold, and obtaining read / write requests of different priorities comprises: Divide the target data into different sub-data segments, determine the execution time of each sub-data segment, and the sum of the execution time of all sub-data segments is the execution time of the read / write request; Compare the execution time of the read / write request with the preset threshold, the read / write request with the execution time less than the preset threshold is the first priority read / write request, and the read / write request with the execution time greater than or equal to the preset threshold is the second priority read / write request; The read and write requests with the same priority are sorted to obtain an execution queue of the read and write requests with the same priority.

3. The data reading and writing method of the switch according to claim 2, characterized in that: The step of sorting the read and write requests of the same priority to obtain an execution queue of the read and write requests of the same priority comprises: Confirm the execution time of each read and write request in the same priority read and write requests; The execution time of each read and write request is compared in pairs, and the ones with shorter execution time are placed in the front row to obtain the execution queue.

4. The data reading and writing method of a switch according to claim 1, characterized in that: The step of parsing the data type of the read / write request source device and converting the type of the target data into the data type of the read / write request source device comprises: Parse the data type of the source device of the read / write request and confirm the type of the target data; Determine whether the type of the target data is consistent with the data type of the read / write request source device. If the judgment result is that the two are inconsistent, the type of the target data is converted to the data type of the read / write request source device. If the judgment result is that the two are consistent, there is no need to change the type of the target data.

5. The data reading and writing method of a switch according to claim 3, characterized in that: The step of determining the execution result of each read / write request based on the priority of the read / write request includes: The execution queue of the first priority and the execution queue of the second priority are executed in sequence, and the execution queues are written into the buffer disk in order from front to back; Write the data in the buffer disk to the source device of the read and write requests in sequence.

6. A data reading and writing system for a switch, characterized in that: The system comprises: The analysis module is used to receive all read and write requests, determine whether the source device of the read and write request is in the trusted device list, and if the determination fails, the source device is manually reviewed. If the manual review fails, the read and write request is discarded. If the manual review passes, the source device is added to the trusted device list. If the determination passes, the read and write request is analyzed to obtain the target data of the read and write request; A comparison module is used to determine the execution time of the read / write request according to the target data, compare the execution time with a preset threshold, and obtain read / write requests of different priorities; A parsing module, used to parse the data type of the read / write request source device and convert the type of the target data into the data type of the read / write request source device; The execution module is used to determine the execution result of each read and write request based on the priority of the read and write request.

7. The data reading and writing system of the switch according to claim 6, characterized in that: The comparison module comprises: A division unit is used to divide the target data into different sub-data segments, determine the execution time of each sub-data segment, and the sum of the execution time of all sub-data segments is the execution time of the read / write request; A comparison unit, used to compare the execution time of the read / write request with a preset threshold, wherein the read / write request whose execution time is less than the preset threshold is a first priority read / write request, and the read / write request whose execution time is greater than or equal to the preset threshold is a second priority read / write request; The sorting unit is used to sort the read and write requests of the same priority to obtain an execution queue of the read and write requests of the same priority.

8. The data reading and writing system of the switch according to claim 7, characterized in that: The sorting unit comprises: A confirmation unit, used to confirm the execution time of each read / write request in the read / write request of the same priority; The queue generation unit is used to compare the execution time of each read and write request in pairs, and the ones with shorter execution time are placed in the front row to obtain the execution queue.

9. The data reading and writing system of the switch according to claim 6, characterized in that: The parsing module comprises: A parsing unit, used to parse the data type of the source device of the read / write request and confirm the type of the target data; The judgment unit is used to judge whether the type of the target data is consistent with the data type of the read / write request source device. If the judgment result is that the two are inconsistent, the type of the target data is converted to the data type of the read / write request source device. If the judgment result is that the two are consistent, there is no need to change the type of the target data.

10. The data reading and writing system of the switch according to claim 8, characterized in that: The execution module includes: A first writing unit is used to sequentially execute the execution queue of the first priority and the execution queue of the second priority, and the execution queues are sequentially written into the buffer disk in a front-to-back order; The second writing unit is used to write the data in the buffer disk into the source device of the read / write request in sequence.

Citation Information

Patent Citations

  • Communication method, device and system

    CN104284142A

  • Verification request method and device, computer equipment and storage medium

    CN110505198A

  • Request processing method and device, storage medium and electronic equipment

    CN113225351A

  • Data access method and system, electronic equipment and computer readable storage medium

    CN113468591A

  • Large language model reasoning system, method and equipment without perception of server

    CN116702907A