CN116389398A - Data access control method, vehicle control method and device - Google Patents
Data access control method, vehicle control method and device Download PDFInfo
- Publication number
- CN116389398A CN116389398A CN202310636410.4A CN202310636410A CN116389398A CN 116389398 A CN116389398 A CN 116389398A CN 202310636410 A CN202310636410 A CN 202310636410A CN 116389398 A CN116389398 A CN 116389398A
- Authority
- CN
- China
- Prior art keywords
- processed
- state
- data
- data stream
- access
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 183
- 238000003860 storage Methods 0.000 claims abstract description 101
- 238000004891 communication Methods 0.000 claims abstract description 15
- 238000012545 processing Methods 0.000 claims description 94
- 230000008569 process Effects 0.000 claims description 62
- 230000008859 change Effects 0.000 claims description 43
- 230000004044 response Effects 0.000 claims description 35
- 230000006870 function Effects 0.000 claims description 18
- 238000004590 computer program Methods 0.000 description 24
- 238000010586 diagram Methods 0.000 description 20
- 238000004422 calculation algorithm Methods 0.000 description 14
- 238000010801 machine learning Methods 0.000 description 11
- 238000004458 analytical method Methods 0.000 description 10
- 239000003814 drug Substances 0.000 description 8
- 238000005259 measurement Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 7
- 238000003062 neural network model Methods 0.000 description 7
- 238000007726 management method Methods 0.000 description 6
- 238000004321 preservation Methods 0.000 description 6
- 238000007639 printing Methods 0.000 description 6
- 238000001514 detection method Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 235000013305 food Nutrition 0.000 description 5
- 230000003993 interaction Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 238000004659 sterilization and disinfection Methods 0.000 description 4
- 235000021270 cold food Nutrition 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000005057 refrigeration Methods 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 230000033228 biological regulation Effects 0.000 description 2
- 238000009529 body temperature measurement Methods 0.000 description 2
- 229940079593 drug Drugs 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 235000013611 frozen food Nutrition 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 150000003839 salts Chemical class 0.000 description 2
- 238000005507 spraying Methods 0.000 description 2
- 235000013311 vegetables Nutrition 0.000 description 2
- 238000013475 authorization Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 210000001061 forehead Anatomy 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000013439 planning Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 208000024891 symptom Diseases 0.000 description 1
- 238000012384 transportation and delivery Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/60—Software-defined switches
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
- H04L49/9005—Buffering arrangements using dynamic buffer space allocation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/90—Buffering arrangements
- H04L49/9015—Buffering arrangements for supporting a linked list
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the application provides a data access control method, a vehicle control method and equipment, wherein the data access control method is applied to programmable equipment, and the programmable equipment is in communication connection with external storage equipment; the method comprises the following steps: acquiring a data stream to be processed, wherein the data stream to be processed comprises at least one data packet to be processed; determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed; based on the access control period and the local access state, updating the data access state corresponding to the data stream to be processed in the access state table to obtain the updated access state, wherein the access state table is stored in the external storage device. The embodiment effectively realizes that the data access state in the access state table can be updated based on the access control period, so that the frequency and the frequency of data writing back are reduced, and the problem of concurrent access can be solved.
Description
Technical Field
The present disclosure relates to the field of network technologies, and in particular, to a data access control method, a vehicle control method, and a device.
Background
The switch of the programmable application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC) has the characteristics of high throughput and low time delay in data packet processing, and is widely applied to various network scenes and applications for several years. However, because of the small on-chip memory of ASIC switches, it is difficult to store and support flow table rules for a large number of data flows in a network, thus making its computational processing power inapplicable.
In order to solve the technical problems, the related technology can utilize a dynamic random access memory (Dynamic Random Access Memory, abbreviated as DRAM) to expand the storage memory of the ASIC switch, and the method can realize convenient and low-cost storage expansion. However, under the above architecture, when the programmable ASIC switch accesses the state data in the external DRAM, inconsistency occurs in the data due to the concurrent access problem, thereby reducing the accuracy and stability of the data processing operation.
Disclosure of Invention
The embodiment of the application provides a data access control method, a vehicle control method and a device, which can solve the problem of concurrent access and ensure the accuracy and stability of data processing.
In a first aspect, an embodiment of the present application provides a data access control method, which is applied to a programmable device, where the programmable device is communicatively connected with an external storage device; the method comprises the following steps:
acquiring a data stream to be processed, wherein the data stream to be processed comprises at least one data packet to be processed;
determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed;
and updating the data access state corresponding to the data stream to be processed in an access state table based on the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
In a second aspect, an embodiment of the present application provides a data access control apparatus, which is applied to a programmable device, where the programmable device is communicatively connected to an external storage device; the device comprises:
the first acquisition module is used for acquiring a data stream to be processed, wherein the data stream to be processed comprises at least one data packet to be processed;
The first determining module is used for determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed;
and the first processing module is used for updating the data access state corresponding to the data stream to be processed in an access state table based on the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor; the memory is configured to store one or more computer instructions, where the one or more computer instructions, when executed by the processor, implement the data access control method shown in the first aspect.
In a fourth aspect, an embodiment of the present invention provides a computer storage medium storing a computer program, where the computer program makes a computer execute the data access control method described in the first aspect.
In a fifth aspect, embodiments of the present invention provide a computer program product comprising: a computer program which, when executed by a processor of an electronic device, causes the processor to perform the steps of the data access control method as described in the first aspect above.
In a sixth aspect, an embodiment of the present invention provides a data access control method, which is applied to a programmable device, where the programmable device is communicatively connected to an external storage device and a user plane function UPF network element; the method comprises the following steps:
acquiring a data stream to be processed sent by the UPF network element, wherein the data stream to be processed comprises at least one data packet to be processed;
determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed;
and updating the data access state corresponding to the data stream to be processed in an access state table by utilizing the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
In a seventh aspect, an embodiment of the present invention provides a data access control apparatus, which is applied to a programmable device, where the programmable device is communicatively connected to an external storage device and a user plane function UPF network element; the device comprises:
a second obtaining module, configured to obtain a data stream to be processed sent by the UPF network element, where the data stream to be processed includes at least one data packet to be processed;
The second determining module is used for determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed;
and the second processing module is used for updating the data access state corresponding to the data stream to be processed in the access state table by utilizing the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
In an eighth aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor; wherein the memory is configured to store one or more computer instructions, where the one or more computer instructions, when executed by the processor, implement the data access control method shown in the sixth aspect above.
In a ninth aspect, an embodiment of the present invention provides a computer storage medium storing a computer program, where the computer program causes a computer to implement the data access control method shown in the sixth aspect.
In a tenth aspect, embodiments of the present invention provide a computer program product comprising: a computer program which, when executed by a processor of an electronic device, causes the processor to perform the steps in the data access control method shown in the sixth aspect described above.
In an eleventh aspect, an embodiment of the present invention provides a vehicle control method applied to a programmable device, where the programmable device is communicatively connected to an external storage device; the method comprises the following steps:
acquiring a data stream to be processed for controlling a vehicle to be controlled, wherein the data stream to be processed comprises at least one data packet to be processed;
determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed;
and updating the data access state corresponding to the data stream to be processed in an access state table by utilizing the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
In a twelfth aspect, an embodiment of the present invention provides a vehicle control apparatus applied to a programmable device, where an external storage device is communicatively connected to the programmable device; the vehicle control device includes:
the third acquisition module is used for acquiring a data stream to be processed for controlling the vehicle to be controlled, wherein the data stream to be processed comprises at least one data packet to be processed;
A third determining module, configured to determine an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, where the local access state is used to identify a data stream size of the data stream to be processed;
and the third processing module is used for updating the data access state corresponding to the data stream to be processed in the access state table by utilizing the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
In a thirteenth aspect, embodiments of the present application provide an electronic device, including: a memory, a processor; wherein the memory is configured to store one or more computer instructions that, when executed by the processor, implement the vehicle control method shown in the eleventh aspect above.
In a fourteenth aspect, an embodiment of the present invention provides a computer storage medium storing a computer program that causes a computer to implement the vehicle control method shown in the above eleventh aspect when executed.
In a fifteenth aspect, embodiments of the present invention provide a computer program product comprising: a computer program which, when executed by a processor of an electronic device, causes the processor to execute the steps in the vehicle control method shown in the above eleventh aspect.
According to the data access control method, the vehicle control method and the device, the access control period to which the data stream to be processed belongs and the local access state of the data stream to be processed are determined by acquiring the data stream to be processed, then the data access state corresponding to the data stream to be processed in the access state table is updated based on the access control period and the local access state, the updated access state is obtained, the data access state in the access state table can be effectively updated based on the access control period, the times and the frequency of data write-back operation are reduced, the access accuracy control of state data can be realized at a small local storage cost, the problem of concurrent access is solved, near zero influence is generated on throughput, the accuracy and the stability of data processing operation are further guaranteed, the practicability of the method is effectively improved, and market popularization and application are facilitated.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the prior art descriptions, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an access operation between a programmable switch and an external memory provided in the related art;
fig. 2 is a schematic diagram of a data access control method according to an embodiment of the present application;
fig. 3 is a flow chart of a data access control method according to an embodiment of the present application;
fig. 4 is a schematic flow chart of determining an access control period to which the data stream to be processed belongs according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a state of change in the number of data packets in at least one process according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an access control cycle provided in an embodiment of the present application;
fig. 7 is a schematic flow chart of determining a local access state of the data stream to be processed according to an embodiment of the present application;
fig. 8 is a flow chart of a data access control method provided in an embodiment of the application of the present application;
fig. 9 is a flowchart of another data access control method according to an embodiment of the present application;
fig. 10 is a schematic flow chart of a vehicle control method according to an embodiment of the present application;
fig. 11 is a schematic structural diagram of a data access control device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an electronic device corresponding to the data access control apparatus provided in the embodiment shown in fig. 11;
Fig. 13 is a schematic structural diagram of another data access control device according to an embodiment of the present application;
fig. 14 is a schematic structural diagram of an electronic device corresponding to the data access control apparatus provided in the embodiment shown in fig. 13;
fig. 15 is a schematic structural diagram of a vehicle control device according to an embodiment of the present application;
fig. 16 is a schematic structural view of an electronic device corresponding to the vehicle control apparatus provided in the embodiment shown in fig. 15;
fig. 17 is a schematic structural diagram of a data access control system according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, the "plurality" generally includes at least two, but does not exclude the case of at least one.
It should be understood that the term "and/or" as used herein is merely one association relationship describing the associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In this context, the characters "," generally indicate that the associated objects are an "or" relationship.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event)" or "in response to detection (stated condition or event), depending on the context.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a product or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such product or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude that an additional identical element is present in a commodity or system comprising the element.
In addition, the sequence of steps in the method embodiments described below is only an example and is not strictly limited.
Definition of terms:
ASIC: application Specific Integrated Circuit, application specific integrated circuits.
DRAM: dynamic Random Access Memory, dynamic random access memory.
RDMA: remote Direct Memory Access, remote direct data access.
NF: network Function, network Function.
LST: local State Table, local state table.
In-flight packet: in-flight packets, i.e., packets that are sent out but not yet responded to.
UPF: user Plane Function, user plane functions.
In order to facilitate understanding of the technical solutions provided by the embodiments of the present application by those skilled in the art, the following briefly describes related technologies:
the switch of the programmable application specific integrated circuit (Application Specific Integrated Circuit, abbreviated as ASIC) has the characteristics of high throughput and low time delay in data packet processing, and is widely applied to various network scenes and applications for several years. However, since the ASIC switch has a small on-chip memory, it is difficult to store and support flow table rules for a large number of data flows in the network, and thus its computing processing power cannot be fully utilized.
In order to solve the above technical problems, the related art provides a way to expand the memory of the programmable ASIC switch by using the external dynamic random access memory (Dynamic Random Access Memory, abbreviated as DRAM), which can realize convenient and low-cost memory expansion. However, under the above architecture, when the programmable ASIC switch accesses the state data in the external DRAM, there is a problem that the data is inconsistent due to the concurrent access problem, which limits the practical application of the programmable ASIC switch and the external DRAM architecture, and thus makes it difficult to expand the storage of the programmable ASIC at low cost.
Specifically, referring to fig. 1, a counter is configured in an external DRAM, a programmable ASIC switch may obtain a data packet PKt1 to be processed, where the size of the data packet PKt1 to be processed may be 300 bytes, and when the PKt1 reaches the programmable ASIC switch at time t1, a read request corresponding to the PKt1 may be generated, where the read request is used to trigger reading a counter value (initial value is 0) in the external DRAM (access reading is performed through a remote direct data access RDMA protocol, a transmission control protocol (Transmission Control Protocol, abbreviated as TCP) protocol), and since the size of the PKt1 is 300 bytes, the counter value needs to be updated from 0 to 300, and then at time t3, the value of the counter is written back into the external DRAM. During the delay between the reading and writing back of the counter value, the programmable ASIC switch acquires the pending packet PKt2, and in particular, when the pending packet PKt2 arrives at t2, another reading is triggered, which results in a concurrent access to the counter. As a result, the counter read triggered by PKt2 acquires the old counter value 0 instead of the updated counter value 300, which causes inconsistent access to the counter value, which may then affect the accuracy of the data processing.
In order to solve the problem that the access of the data states is inconsistent under the programmable ASIC switch and the external DRAM storage architecture, the present embodiment provides a data access control method, a vehicle control method, and a device, where an execution body of the data access control method is a data access control apparatus, in some examples, the data access control apparatus may be implemented as a programmable device, that is, the data access control method may be applied to the programmable device, and the programmable device may be implemented as a programmable switch, a programmable gateway, a programmable router, or the like; specifically, referring to fig. 2, the programmable device is communicatively connected to an external storage device, which may be implemented as an external DRAM, an external static random access memory (Static Random Access Memory, SRAM for short), or the like. The programmable device stores a local state table, and the local state table is used for storing one or more local access states, wherein the local access states are used for identifying the data flow size of a data flow to be processed, or the number of operation bytes generated for the data flow to be processed, or the flow size of the data flow to be processed, or the data packet size of at least one data packet to be processed in the data flow to be processed, and the like; the external storage device stores therein an access state table for storing one or more data access states, which are also used for identifying the data stream size of the data stream to be processed.
In the present embodiment described above, the programmable device makes a network connection with the external storage device, and the network connection may be a wireless or wired network connection. If the programmable device is in communication connection with the external storage device, the network system of the mobile network may be any of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4g+ (lte+), wiMax, 5G, 6G, and the like.
Specifically, the programmable device is configured to obtain a to-be-processed data stream, where the to-be-processed data stream includes at least one to-be-processed data packet, in order to enable a data access control operation, an access control period to which the to-be-processed data stream belongs and a local access state of the to-be-processed data stream may be determined, where the local access state is used to identify a data stream size of the to-be-processed data stream, and the local access state may be obtained by querying a local state table, and the access control period may be determined based on an unresponsive to-be-processed data packet in the to-be-processed data stream; after the access control period of the data stream to be processed and the local access state of the data stream to be processed are determined, the data access state corresponding to the data stream to be processed in the access state table can be updated based on the access control period and the local access state, and the updated access state is obtained, so that the data access control operation based on the access control period corresponding to the data stream can be effectively realized.
As can be seen from the foregoing, the foregoing technical solution implements a concurrency control scheme based on a local state table, specifically, after a data stream to be processed is acquired, by determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, and then updating a data access state corresponding to the data stream to be processed in the access state table based on the access control period and the local access state, to obtain an updated access state, thereby effectively implementing an update operation on the data access state in the access state table based on the access control period, not only reducing the frequency and the frequency of a data write-back operation, but also implementing access accuracy control of state data with a smaller local storage cost, so as to solve the problem of concurrency access, and effectively improve the practicality of the method.
Some embodiments of the present invention are described in detail below with reference to the accompanying drawings. In the case where there is no conflict between the embodiments, the following embodiments and features in the embodiments may be combined with each other. In addition, the sequence of steps in the method embodiments described below is only an example and is not strictly limited.
Fig. 3 is a flow chart of a data access control method according to an embodiment of the present application; referring to fig. 3, the present embodiment provides a data access control method, and an execution body of the method is a data access control device, and it is understood that the data access control device may be implemented as software, or a combination of software and hardware, and in particular, when the data access control device is implemented as hardware, it may be specifically various electronic devices having data access control capability. When the data access control means is implemented as software, it may be installed in the electronic device described above, and in some examples, the data access control means may be implemented as a programmable device, which may include any one of the following: a programmable switch, a programmable gateway, a programmable router, etc., i.e., the data access control method may be applied to a programmable device, and the programmable device is communicatively connected to an external storage device, which may include any one of the following: external DRAM, external SRAM, etc.; specifically, the data access control method may include:
step S301: and obtaining a data stream to be processed, wherein the data stream to be processed comprises at least one data packet to be processed.
Step S302: and determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed.
Step S303: and updating the data access state corresponding to the data stream to be processed in the access state table based on the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
The specific implementation process and implementation effect of each step are described in detail below:
step S301: and obtaining a data stream to be processed, wherein the data stream to be processed comprises at least one data packet to be processed.
When a user has a data access requirement, the programmable device may be enabled to acquire a data stream to be processed, in some examples, the programmable device is in communication connection with a data access device (such as a personal computer PC, a notebook computer, a handheld terminal, a printer, a base station, or a user plane function UPF network element, etc.), and the data access device may actively or passively send the data stream to be processed to the programmable device, so that the programmable device acquires the data stream to be processed, where the data stream to be processed may include at least one data packet to be processed, and different data packets to be processed may correspond to different moments.
In other examples, a man-machine interaction page may be configured in the programmable device, and the obtaining the data stream to be processed includes: displaying a man-machine interaction page for user input to execute operation; acquiring data editing operation input by a user in a man-machine interaction page; the data stream to be processed is acquired based on the data editing operation, so that the programmable device can actively acquire the data stream to be processed.
It should be noted that in different application scenarios, the obtained data streams to be processed may correspond to different data types, for example: in the application scenario of the private network, the data stream to be processed may be a private network data stream to be processed; in an application scenario of vehicle control, the data stream to be processed may be a data stream for controlling a vehicle to be controlled; in an application scenario of the communication network, the data stream to be processed may be a communication data stream to be processed, etc., and a person skilled in the art may perform flexible configuration operation on the data stream to be processed according to a specific application scenario or an application requirement, which is not described herein.
Step S302: and determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed.
Since one or more data packets to be processed may be included in one data stream to be processed, the external storage device stores therein data processing rules for performing analysis processing on the data packets to be processed, for example: data forwarding rules, quality of service (Qos) rules, and the like, so that in order to stably implement data processing operations, when each to-be-processed data packet in a to-be-processed data stream is analyzed and processed, the data processing rules corresponding to the to-be-processed data packet and the corresponding data access states need to be read through an external storage device, and in the process of reading the data access states, continuous updating operations are performed on the data access states based on continuous processing processes of the to-be-processed data packet, so that for the data access states, the updating operations of the data access states are more frequent, the number of times of interaction operations is more, and network resources required by data access control operations are increased.
In order to avoid the above situation, after the data stream to be processed is acquired, an access control period to which the data stream to be processed belongs may be determined, and in some examples, the access control period may be obtained by performing analysis processing on the data stream to be processed, where determining the access control period to which the data stream to be processed belongs may include: acquiring a plurality of data packets to be processed; determining the time interval between any two data packets to be processed; when the time interval is greater than or equal to the preset interval, all the data packets to be processed before the time interval are determined as a data stream to be processed, and the processing time periods corresponding to all the data packets to be processed before the time interval are counted and determined as the time periods corresponding to the access control periods to which the data stream to be processed belongs, so that the accuracy and the reliability of determining the access control periods are effectively ensured.
In other examples, the access control period may be determined not only by a time interval between any two pending data packets, but also based on a pending data packet that is not responded to in the pending data stream, where determining the access control period to which the pending data stream belongs may include: identifying unresponsive pending packets in a pending data stream; and then determining the access control period to which the data flow to be processed belongs based on the unresponsive data packet to be processed, thereby effectively ensuring the accuracy and reliability of determining the access control period.
In order to minimize the number of interactions based on the data access state, in addition to determining the access control period to which the data stream to be processed belongs, a local access state of the data stream to be processed may be determined, where the local access state is used to identify the data stream size of the data stream to be processed, for example: at time t1, if the size of the first data packet to be processed in the data stream to be processed is 1600 bytes, the local access state is used for identifying that the data stream size of the data stream to be processed is 1600; at time t2, if the size of the second to-be-processed data packet in the to-be-processed data stream is 300 bytes, the local access state is used to identify that the data stream size of the to-be-processed data stream is 1600+300.
Specifically, the local access state may be obtained by a detection device located in the programmable device, where the programmable device stores a detection device for analyzing and identifying the data stream to be processed, and after the data stream to be processed is obtained, the local access state of the data stream to be processed may be determined by performing analysis processing on the data stream to be processed based on the detection device, and it should be noted that the local access state may change with the processing progress of the data stream to be processed.
Step S303: and updating the data access state corresponding to the data stream to be processed in the access state table based on the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
The external storage device stores an access state table, where the access state table is used to store data access states of data streams to be processed in a process of performing data processing by the programmable device, and it should be noted that the data access states corresponding to different moments of one data stream to be processed may be the same or different, and the data access states are specifically related to a process of performing analysis processing on the data stream to be processed.
Specifically, when the programmable device processes the data stream to be processed based on the access control period, in order to enable the external storage device to timely and effectively acquire the data access state of the data stream to be processed, the data access state in the access state table needs to be updated; thus, after the access control period and the local access state are acquired, the data access state corresponding to the data stream to be processed in the access state table can be updated based on the access control period and the local access state. In some examples, the updating of the data access state may be implemented by a pre-trained machine learning model or a neural network model, where updating the data access state in the access state table corresponding to the data stream to be processed based on the access control period and the local access state may include: acquiring a pre-trained machine learning model or a neural network model; and inputting the acquired access control period, the local access state and the access state table into a machine learning model or a neural network model to obtain an updated access state output by the neural network model.
In other examples, the updating of the data access state may be implemented not only by a pre-trained machine learning model or a neural network model, but also by a processing state of the access control period, where updating the data access state in the access state table corresponding to the data stream to be processed based on the access control period and the local access state may include: acquiring a processing state of an access control period; when the processing state is the execution completion state, the data access state in the access state table is updated to the local access state, and the updated access state is obtained.
Specifically, in the process of analyzing and processing a data stream to be processed by the programmable device, the processing state of the access control period changes along with the progress of processing the data stream to be processed, so that in order to timely and effectively update the data access state in the access state table, the processing state of the access control period may be acquired, in some examples, a state detector for determining the processing progress of the data stream to be processed may be configured in the programmable device, and the processing state of the access control period may be acquired through the state detector, where the processing state of the access control period may include any one of the following: the method comprises an unexecuted state, an executing state and an executing state, wherein the unexecuted state is used for identifying any one of the data packets to be processed in the data stream to be processed to carry out processing operation, the executing state is used for identifying at least one of the data packets to be processed in the data stream to be processed to carry out processing operation, and the executing state is used for identifying that the processing operation of all the data packets to be processed in the data stream to be processed is completed.
Because different processing states of the access control period can correspond to different state updating strategies, after the processing states of the access control period are acquired, the data access states in the access state table can be updated based on the processing states of the access control period, specifically, when the processing states are execution completion states, the data processing operation of the data stream to be processed is completed, and then the data access states in the access state table can be updated to local access states, so that the updated access states are obtained, and the data access control operation based on the access control period is effectively realized.
For example, when the data access state in the access state table is 100bytes, the local access state corresponding to the data stream to be processed is 1600bytes at the tn time, so that when the access control period of the data stream to be processed is completed, the data access state can be updated based on the local access state, specifically, the data access state in the access state table can be updated from 100bytes to 1600bytes, and the updated access state can be obtained.
According to the data access control method, the access control period to which the data stream to be processed belongs and the local access state of the data stream to be processed are determined by acquiring the data stream to be processed, then the data access state corresponding to the data stream to be processed in the access state table is updated based on the access control period and the local access state, and the updated access state is obtained.
Fig. 4 is a schematic flow chart of determining an access control period to which a data stream to be processed belongs according to an embodiment of the present application; on the basis of the foregoing embodiment, referring to fig. 4, the present embodiment provides a method for determining, based on a continuous period corresponding to an unresponsive pending data packet, an access control period to which a pending data flow belongs, where specifically determining, in this embodiment, the access control period to which the pending data flow belongs may include:
Step S401: at least one data packet in the data stream to be processed that is not responded to is acquired.
After the data stream to be processed is obtained, the data stream to be processed can be analyzed and processed, and at least one unresponsive data packet which exists in the data stream to be processed is obtained. In some examples, the processing the data packet may be determined by whether response information corresponding to the data packet to be processed is received, and at this time, acquiring at least one processing data packet that exists in the data stream to be processed and is not responded to may include: in the process of analyzing and processing the data to be processed, if response information corresponding to a certain data packet to be processed is received within a preset time period (which can be within 1h, 2h, 3h, 4h, 5h, 6h and the like), determining that the data packet to be processed at the moment is the responded data packet to be processed; if the response information corresponding to a certain data packet to be processed is not received within the preset time period, determining that the data packet to be processed at the moment is the data packet in at least one processing without being responded, thereby effectively ensuring the accuracy and the reliability of determining the data packet in at least one processing.
Step S402: a determination is made that there is a continuous period of data packets in at least one process.
After determining that there is at least one in-process data packet in the data stream to be processed that is not responded to, the at least one in-process data packet may be analyzed so that a continuous period of time for which there is at least one in-process data packet may be determined, which in some instances may be obtained by analyzing the at least one in-process data packet through a pre-trained machine learning model or neural network model.
In other examples, the continuous time period may be obtained not only by a pre-trained machine learning model or neural network model, but also by analyzing the number of data packets processed to determine the continuous time period, where determining that there is at least one continuous time period of data packets processed may include: acquiring the quantity change state of the data packets in at least one process; based on the number change status, it is determined that there is a continuous period of time for at least one processed data packet.
Wherein, the continuous time period of the data packets in at least one process has a direct relation with the number change state of the data packets in the process, so after identifying and obtaining the data packets in at least one process which are not responded and exist in the data stream to be processed, the number change state of the data packets in at least one process can be obtained, and it is noted that the number change state can change along with the change of time; in particular, acquiring the status of the change in the number of data packets in the at least one process may include: acquiring a state read request (for identifying that a data packet to be processed exists) and a state response request (for identifying that a processing operation on a certain data packet has been completed) corresponding to a data stream to be processed; based on the status read request and the status response request, a status of a change in the number of data packets in at least one process is determined.
A local state table may be configured in the programmable device for the data streams to be processed, one of which may correspond to one of the local state tables, the local state table being operable to record and store state information identifying the number of data packets in at least one of the processes, the recorded and stored state information being variable as a function of the number of state read requests and state response requests generated or received corresponding to the data stream to be processed. In some examples, determining the status of the change in the number of data packets in the at least one process based on the status read request and the status response request may include: when a state read request corresponding to a data stream to be processed is generated, adding one to the number of data packets in at least one process; when a state response request corresponding to the data stream to be processed is received, the number of the data packets in at least one process is reduced by one, and in the process of analyzing and processing the data stream to be processed, the state of change of the number of the data packets in at least one process can be continuously obtained by continuously counting the state reading request and the state response request.
For example, referring to fig. 5, when the initial state in the local state table is N (may be 0 or another value), at time t1, if the read request 1 is generated, since the read request is used to identify that there is a packet that needs to be processed, the number change state in the local state table is changed from N to n+1, similarly, at time t2, if the read request 2 is generated, the number change state in the local state table is changed from n+1 to n+2, and if the read request 3 is generated, the number change state in the local state table is changed from n+2 to n+3. In contrast, if the response request 1 is received, since the response request is used to identify that the processing operation on a certain data packet has been completed, the number change state in the local state table is changed from n+3 to n+2; similarly, if the response request 2 is received, the number change state in the local state table is changed from n+2 to n+1, so that the number change state of the data packet in at least one process can be obtained.
Since the number change state is associated with a continuous period of data packets in at least one process, after the number change state is acquired, the number change state may be analyzed, and in some examples, determining that a continuous period of data packets in at least one process exists based on the number change state may include: acquiring a period of time during which the number of data packets in at least one process is changed from zero to zero again based on the number change state; the period of time in which the number becomes zero again is determined as a continuous period of time, so that the continuous period of time in which there is at least one processed data packet can be stably determined.
Step S403: based on the continuous time period, the access control period to which the data stream to be processed belongs is determined.
After the continuous time period is acquired, the continuous time period may be analyzed, so that an access control period to which the data stream to be processed belongs may be determined. For example, referring to fig. 6, a state read request is generated at time t1 and another state read request is generated at time t2, which indicates that there are two processing data packets in the time period corresponding to the time period between t1 and t 2; when a response request is acquired at the time t3 and another response request is acquired at the time t4, the processing operation on the data packet in processing is continuously completed in the time period corresponding to the time t3 to the time t4, and further the continuous time period corresponding to the time t1 and the time t4 can be determined as the access control period to which the data stream to be processed belongs, so that the accuracy and the reliability of determining the access control period are effectively ensured.
In this embodiment, by acquiring at least one data packet in the data stream to be processed that is not responded, determining a continuous time period in which the at least one data packet in the data stream to be processed exists, and then determining an access control period to which the data stream to be processed belongs based on the continuous time period, accuracy and reliability of determining the access control period are effectively ensured, and then data access control operation based on the access control period is facilitated, so that stability and reliability in use of the method are further improved.
Fig. 7 is a schematic flow chart of determining a local access state of a data stream to be processed according to an embodiment of the present application; on the basis of any one of the foregoing embodiments, referring to fig. 7, this embodiment provides a technical solution for determining, by using an external storage device, a local access state of a data stream to be processed, where determining, by using the local access state of the data stream to be processed may include:
step S701: based on the external storage device, generating a status reading request corresponding to at least one data packet to be processed in the data stream to be processed.
In the process of data processing of the programmable device, communication connection with the external storage device is needed, at this time, in order to accurately determine the local access state of the data stream to be processed, a state reading request corresponding to each of at least one data packet to be processed in the data stream to be processed may be generated based on the external storage device communicatively connected to the programmable device, where the state reading request is used to obtain a state reading request corresponding to each of at least one data packet to be processed in the external storage device.
It should be noted that, in the process of analyzing and processing the data stream to be processed by the programmable device, not only the state reading request corresponding to each of the at least one data packet to be processed can be obtained through the external storage device, but also the data processing rule can be obtained through the external storage device, and then the analysis and processing operation is performed on the data stream to be processed based on the data processing rule; thus, after the programmable device acquires the data stream to be processed, a status read request corresponding to each of at least one data packet to be processed in the data stream to be processed may be generated based on an external storage device communicatively connected to the programmable device, where the status read request may not only acquire a processing rule (e.g., forwarding rule, quality of service (Quality of Service, qoS for short), etc.) for performing analysis processing on the data packet to be processed, but also read a data packet status corresponding to the data packet to be processed in the external storage device.
Step S702: and sending the state reading request to the external storage device so as to acquire the data packet state corresponding to each of the at least one data packet to be processed through an access state table in the external storage device.
After the state reading request is generated, the state reading request can be sent to the external storage device, after the external storage device acquires the state reading request, the state table can be read based on the state reading request, the data packet states corresponding to at least one data packet to be processed respectively can be acquired, and the acquired data packet states can change along with the change of the analysis processing progress of different data packets to be processed in the data stream to be processed; and then the obtained data packet states corresponding to the at least one data packet to be processed can be returned to the programmable device, so that the programmable device can stably obtain the data packet states corresponding to the at least one data packet to be processed through the external storage device.
Step S703: and determining the local access state of the data flow to be processed based on the data packet state corresponding to each of the at least one data packet to be processed.
Because one to-be-processed data stream may correspond to one or more to-be-processed data packets, different data packet states can be obtained in the process of processing the to-be-processed data packets, and the local access state of the to-be-processed data stream has an association relationship with the data packet state corresponding to each of the at least one to-be-processed data packets, after the data packet state corresponding to each of the at least one to-be-processed data packets is obtained, the data packet state corresponding to each of the at least one to-be-processed data packets can be analyzed and processed, so that the local access state of the to-be-processed data stream can be determined. In some examples, the local access state may be obtained by a pre-trained machine learning model, and at this time, determining the local access state of the data stream to be processed based on the data packet state corresponding to each of the at least one data packet to be processed may include: the method comprises the steps of obtaining a pre-trained machine learning model for identifying the mapping relation between a data packet state and a local access state, inputting the data packet state corresponding to at least one data packet to be processed into the machine learning model, and obtaining the local access state of the data stream to be processed output by the machine learning model.
In other examples, the local access state may be obtained not only by a pre-trained machine learning model, but also by a local state table in the programmable device, where determining the local access state of the to-be-processed data stream based on the packet state corresponding to each of the at least one to-be-processed data packet may include: acquiring a local state table corresponding to a data stream to be processed in programmable equipment; in the access control period, acquiring the current data state of the data stream to be processed through a local state table; and determining the local access state of the data flow to be processed based on the data packet state and the current data state corresponding to the at least one data packet to be processed.
In order to accurately obtain the local access state of the data stream to be processed, a local state table corresponding to the data stream to be processed in the programmable device may be obtained first, where the local state table may be table information configured based on a round trip delay between the programmable device and the external storage device, and in some examples, obtaining the local state table corresponding to the data stream to be processed in the programmable device may include: acquiring Round Trip Time (RTT) between the programmable device and the external storage device; determining state table attributes in the programmable device based on round trip time RTT, wherein the state table attributes may include size information of a local state table, memory size of a table, the number of data packets in maximum processing that the table can support, and the like; after the state table attribute is obtained, a local state table may be determined based on the state table attribute, where the local state table includes a plurality of state entries for identifying local access states, where the plurality of state entries may change with a change in the data packet to be processed, and each state entry is configured to record and store a data size of the data packet to be processed.
In the process of analyzing and processing the data stream to be processed, the state of the data packet to be processed recorded in the local state table changes along with the change of the progress of analyzing and processing the data packet to be processed, so that after the access control period of the data stream to be processed is determined, the current data state of the data stream to be processed can be acquired through the local state table in the access control period, and when the access control period starts to be executed, the current data state of the data stream to be processed is acquired through the local state table to be a preset zero state or a preset initial state, and the preset initial state can be determined based on the historical state in the access state table.
After acquiring the respective packet state and the current data state of the at least one to-be-processed packet, analyzing the respective packet state and the current data state of the at least one to-be-processed packet, and determining the local access state of the to-be-processed data stream may include, in some examples, determining the local access state of the to-be-processed data stream based on the respective packet state and the current data state of the at least one to-be-processed packet: updating the current data state based on the data packet state corresponding to each of the at least one data packet to be processed to obtain an updated state; and determining the updated state corresponding to the last data to be processed in the data stream to be processed as the local access state of the data stream to be processed.
After acquiring the data packet state and the current data state corresponding to the at least one to-be-processed data packet, the current data state may be updated based on the data packet state corresponding to the at least one to-be-processed data packet, so that an updated state may be obtained, for example, when the to-be-processed data stream sequentially includes the to-be-processed data packet 1, the to-be-processed data packet 2, and the to-be-processed data packet 3, and when the to-be-processed data packet 1 is acquired at time t1, the data packet state corresponding to the to-be-processed data packet 1 may be acquired through the external storage device as 100, and if the current data state in the local state table is 0, the current data state needs to be changed from 0 to 100. Similarly, when the data packet 2 to be processed is acquired at the time t2, the state of the data packet corresponding to the data packet 2 to be processed is 200 through the external storage device, and when the current data state in the local state table at the moment is 100, the current data state is required to be changed from 100 to 300; when the data packet 3 to be processed is acquired at the time t3, the state of the data packet corresponding to the data packet 3 to be processed can be acquired through the external storage device, and when the current data state in the local state table at the moment is 300, the current data state is required to be changed from 300 to 600, so that the state updating operation is effectively realized.
Because the data flow to be processed can comprise a plurality of data packets to be processed, when each data packet to be processed is analyzed and processed, the current data state is updated, namely, each data packet to be processed can correspond to one updated state, and because the local access state of the data flow to be processed is used for identifying the final access state after the data flow to be processed is analyzed and processed, in order to accurately determine the local access state of the data flow to be processed, after the updated state corresponding to each at least one data packet to be processed is obtained, the updated state corresponding to the last data to be processed in the data flow to be processed can be determined as the local access state of the data flow to be processed, thereby effectively ensuring the accuracy and reliability of determining the local access state.
In still other examples, in order to improve the practicality of the method, the present embodiment may further perform a data update operation on the local state table based on the access control period, where after obtaining the local state table corresponding to the data stream to be processed in the programmable device, the method in the present embodiment may further include: when the access control period is the execution completion state, acquiring a table application state corresponding to the local state table; when the table application state is used for identifying that the state table cannot be occupied, storing state data in the local state table; when the table application state is used to identify that the state table can be occupied, then the data in the local state table is updated based on the access state table.
Specifically, for the local state table, different table application states may be corresponding in different application scenarios, and the table application states may include a state for identifying that the state table cannot be occupied, or a state for identifying that the state table can be occupied. In order to accurately manage the local state table, the processing state of the access control period can be acquired, and when the access control period is the execution completion state, the table application state corresponding to the local state table can be acquired, and in some examples, the table application state can be determined by a preset identifier of the local state table; since different table application states may correspond to different management policies, the local state table may be managed based on the different management policies. In some examples, when the table application state is used for identifying that the state table cannot be occupied, it is indicated that the local state table at the moment cannot be edited or adjusted, so that state data in the local state table can be stored, so that a next access control period can perform data access operation based on the local state table; when the table application state is used for identifying that the state table can be occupied, the local state table at the moment can be edited or adjusted, and then the data in the local state table can be updated based on the access state table, namely, related entries in the local state table are deleted, so that the management operation of the local state table based on different management strategies is effectively realized.
In this embodiment, a state read request corresponding to each of at least one to-be-processed data packet in the to-be-processed data stream is generated based on the external storage device, and then the state read request is sent to the external storage device, so that a data packet state corresponding to each of the at least one to-be-processed data packet is obtained through an access state table in the external storage device, and a local access state of the to-be-processed data stream is determined based on the data packet state corresponding to each of the at least one to-be-processed data packet, so that accuracy and reliability in determining the local access state of the to-be-processed data stream are effectively ensured, and then data access operation based on the local access state is facilitated, and practicability of the method is further improved.
In a specific application, taking a programmable switch as a programmable device and taking an external DRAM as an external storage device as an example, the application embodiment provides a method for performing maintenance management operation on a local state table, which specifically may include:
step 1: the programmable switch obtains Round-Trip Time (RTT) between the programmable switch and the external DRAM;
step 2: determining an upper limit value of the number of data packets (or called in-flight data packets) in the process that can be supported by the local state table based on the RTT;
Step 3: and configuring and generating a local state table based on the upper limit value of the number of the data packets in the processing supported by the local state table, wherein the generated local state table comprises one or more state table entries, and each state table entry is used for identifying the size of the data packet to be processed.
Step 4: the local state table is stored in the device memory of the programmable switch and can be maintained and managed on demand.
Based on the maintained and managed local state table, the concurrency control method can be realized, and specifically comprises the following steps:
step 11: acquiring a data stream to be processed, wherein the data stream to be processed comprises at least one data packet to be processed;
step 12: determining an access control period to which a data stream to be processed belongs;
the access control period may be a busy period (busy periods) of the data stream, where the busy period is a continuous period of time during which at least one in-flight data packet (i.e., a data read request is issued, but a response is not returned to the programmable ASIC) in the data stream. In addition, the local state table in the programmable switch can record and identify not only the size of the data packet to be processed, but also the number of data packets in the unresponsive process included in the data flow to be processed; when the data stream to be processed is not processed, the number of data packets in the processing which is not responded is 0; when processing of the data stream to be processed is started, the number of data packets in the unresponsive processing gradually increases, and as the progress of processing of the data stream to be processed is changed, the number of data packets in the unresponsive processing gradually decreases, and when the number of data packets in the unresponsive processing becomes 0 again, an access control period to which the data stream to be processed belongs may be determined, and the access control period may be a continuous period in which the number of data packets in the unresponsive processing becomes 0 again.
Specifically, the number of data packets in the unresponsive process may be determined by counting state read requests and state response requests corresponding to the data flow to be processed, and in some examples, when the programmable switch generates a state read request, the number of data packets in the unresponsive process is incremented by 1; when the programmable switch receives the status response request, the number of data packets in the unresponsive process is reduced by 1, and the number of data packets in the unresponsive process is determined by continuously counting the status read requests and the status response requests.
Step 13: determining a local access state of the data stream to be processed based on the local state table, wherein the local access state is used for identifying the data packet size of the data packet to be processed;
after the data packet to be processed and the local state table in the data stream to be processed are acquired, the local access state of the data packet to be processed can be determined based on the local state table. Since the update operation of the data state can be performed locally on the programmable switch based on the received data packet to be processed in the process of analyzing and processing the data stream to be processed, for example, when the first data packet to be processed in the data stream to be processed is acquired, the local access state of the data stream to be processed can be determined to be 200; when the second to-be-processed data packet in the to-be-processed data stream is acquired later, it may be determined that the local access state of the to-be-processed data stream is 200+300=500, that is, the local access state of the to-be-processed data stream may be continuously changed along with the change of the progress of the analysis processing of the to-be-processed data stream.
In other examples, the local access state may be obtained by the external DRAM, specifically, each time a data packet to be processed is obtained, a state read request corresponding to each of the at least one data packet to be processed may be generated, and the state read request is sent to the external DRAM; after the external DRAM receives the state reading request, the external DRAM can perform access operation on the stored access state table based on the state reading request to obtain the data packet state corresponding to each of the at least one data packet to be processed; the local access state of the data stream to be processed is determined based on the respective packet state of the at least one data packet to be processed.
Wherein determining the local access state of the data stream to be processed based on the packet state corresponding to each of the at least one data packet to be processed may include: acquiring a local state table corresponding to a data stream to be processed in a programmable switch; in the access control period, acquiring the current data state of the data stream to be processed through a local state table; and determining the local access state of the data flow to be processed based on the data packet state and the current data state corresponding to the at least one data packet to be processed.
Specifically, after the data packet state and the current data state corresponding to at least one data packet to be processed respectively, the data packet state and the current data state can be analyzed and compared, when the data packet state is different from the current data state, the sum value 2 of the data packet state and the current data state can be determined as the local access state of the data stream to be processed, so that the local state table can be effectively updated along with the processing progress of the data stream to be processed until the analysis processing of the data stream to be processed is completed, and the local access state of the data stream to be processed can be obtained.
Step 14: when the processing state of the access control period is the execution completion state, the processing operation on the data packet to be processed in the access control period is completed, so that the data access state in the access state table can be updated to be a local access state, and the updated access state is obtained.
For example, referring to fig. 8, the to-be-processed data stream includes six consecutive to-be-processed data packets, where the six consecutive to-be-processed data packets arrive at the programmable switch at times t1, t2, t3, t4, t5, and t6, respectively, and the sizes of the six consecutive to-be-processed data packets are 100 bytes, 200 bytes, 300 bytes, 400 bytes, 500 bytes, and 600 bytes, respectively.
Assuming that there is no data packet being transmitted before time t1, it is known by counting the number of data packets in the unresponsive process that the first five data packets in the data stream to be processed form an access control period (busy period), while the sixth data packet belongs to the next access control period (busy period).
At time t1, the programmable switch may create a corresponding state entry for the data stream to be processed in the local state table, initialize a counter for storing the number of data packets in the unresponsive process to zero or other preset value, increment the counter for storing the number of data packets in the unresponsive process by one each time the programmable switch sends a read request to the external DRAM, and decrement the counter by one each time the programmable switch receives a read response, i.e., a read response corresponding to a read request is returned. When the first read response returns at time s1, a Local Byte Counter (LBC) is initialized in the local state table to a byte count in the read response, which may be, for example, 100 bytes, which is then incremented by the size of the first packet (100 bytes), so the counter has a value of 200.
When the second read response returns at time s2, the old byte count in the read response is discarded and the counter value is incremented by the size of the second packet (200 bytes), so the counter value is updated to 400. The value of the counter increases in a similar manner as the next three read responses arrive. At time s5, the access control period ends, the programmable switch sends a write request to the external memory, wherein the cumulative byte count of the data stream stored in the external memory is updated to the current counter value based on the write request, i.e., the data access state in the external memory is updated from 100 to 1600.
It should be noted that, when the data stream to be processed is analyzed and processed, and when the write response is returned and the number of data packets in the unresponsive processing is 0, the state entry corresponding to the data stream to be processed in the local state table is deleted; otherwise, the entry will be reserved to serve the next access control period; in addition, since the data packet sequence is preserved when the data stream to be processed is acquired through the RDMA protocol, even if a new read request occurs again, normal data access operation can be ensured, and the problem of concurrent conflict is avoided.
According to the technical scheme provided by the application embodiment, a hash table (local state table) is constructed by utilizing SRAM resources of a programmable switch to control access to state data in an external DRAM triggered by each data packet, so that each data operation is ensured to acquire the latest value, and meanwhile, the use of locks is avoided, and the loss of throughput is prevented; specifically, a local state table can be established by using a small amount of local storage, and the problem of inconsistent state data caused by concurrency is avoided by transferring data operation in an access control period to the local of the switch for storage operation;
in addition, based on the counting of the data packets in at least one unresponsive processing and the state data updating mechanism for folding and writing back, the frequency of data writing back can be reduced, the overall performance is improved, specifically, the number of the data packets in at least one unresponsive processing in the access control period can be recorded and identified through the local counter in the local state table, all subsequent states in the same access control period can be updated in the local state table, when the access control period is finished, namely, when the number of the data packets in at least one unresponsive processing in the access control period is detected to be 0, the final local access state corresponding to the data flow to be processed is obtained, and then the final local access state can be written back into the external DRAM through RDMA protocol or TCP protocol, so that the updating operation of the data access state is effectively realized, the concurrent control of state data reading and writing is supported simultaneously, the access accuracy control of the state data is realized, the original throughput of the system is hardly influenced, and the practicability of the scheme is further improved.
Fig. 9 is a flowchart of another data access control method according to an embodiment of the present application; referring to fig. 9, the present embodiment provides another data access control method, in which an execution subject is a data access control device, and it is understood that the data access control device may be implemented as software, or a combination of software and hardware, and in particular, when the data access control device is implemented as hardware, it may be a variety of electronic devices having data access control capabilities. When the data access control means is implemented as software, it may be installed in the electronic device described above, and in some examples, the data access control means may be implemented as a programmable device, which may include any one of the following: a programmable switch, a programmable gateway, a programmable router, etc., i.e. the data access control method may be applied to a programmable device, and the programmable device is communicatively connected to an external storage device and a user plane function UPF network element, where the external storage device may include any one of the following: external DRAM, external SRAM, etc.; specifically, the data access control method may include:
Step S901: acquiring a data stream to be processed sent by a UPF network element, wherein the data stream to be processed comprises at least one data packet to be processed;
step S902: determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed;
step S903: and updating the data access state corresponding to the data stream to be processed in the access state table by using the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
It should be noted that the method in this embodiment may further include the method in the embodiment shown in fig. 3 to 8, and reference is made to the relevant description of the embodiment shown in fig. 3 to 8 for a part of this embodiment that is not described in detail. The implementation process and the technical effect of this technical solution are described in the embodiments shown in fig. 3 to 8, and are not described herein.
Fig. 10 is a schematic flow chart of a vehicle control method according to an embodiment of the present application; referring to fig. 10, the present embodiment provides a vehicle control method, in which the execution subject is a vehicle control device, and it is understood that the vehicle control device may be implemented in software, or a combination of software and hardware, and in particular, when the vehicle control device is implemented in hardware, it may be specifically various electronic devices having vehicle control capabilities. When the vehicle control apparatus is implemented as software, it may be installed in the above-described electronic device, and in some examples, the vehicle control apparatus may be implemented as a programmable device that may include any one of the following: a programmable switch, a programmable gateway, a programmable router, etc., i.e., the vehicle control method may be applied to a programmable device, and the programmable device is communicatively connected to an external storage device, which may include any one of: external DRAM, external SRAM, etc.; specifically, the vehicle control method may include:
Step S1001: acquiring a data stream to be processed for controlling a vehicle to be controlled, wherein the data stream to be processed comprises at least one data packet to be processed;
step S1002: determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed;
step S1003: and updating the data access state corresponding to the data stream to be processed in the access state table by using the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
Specifically, in the process of driving the vehicle to be controlled (unmanned vehicle or manned vehicle), the vehicle to be controlled may be in communication connection with the vehicle control device through the base station, in order to enable accurate and effective control of the vehicle to be controlled, the vehicle control device is configured to control a data stream to be processed of the vehicle to be controlled, and then determine vehicle control information corresponding to the vehicle to be controlled based on the data stream to be processed, and may send the vehicle control information to the vehicle to be controlled, where the vehicle control information may include: vehicle speed information, vehicle driving path information, vehicle parking space information, and the like to perform stable and efficient control operations of the vehicle to be controlled based on the vehicle control information, for example, a lane on which the vehicle to be controlled is traveling may be controlled based on control information of a driving path in the vehicle control information, that is, switching of the vehicle to be controlled from lane 1 to lane 2 may be controlled based on the control information.
In some examples, in order to improve stability and reliability of controlling the vehicle to be controlled, the vehicle to be controlled may be provided with a sensor, and the running state data corresponding to the vehicle to be controlled may be quickly acquired by the sensor, where the running state data corresponding to the vehicle to be controlled may include at least one of the following: the method comprises the steps of current speed, running direction and environment information of a vehicle, wherein the environment information comprises distribution positions of surrounding objects, speed of the vehicle in front of the vehicle and road speed limit of a road on which the vehicle is located. In some examples, the sensors may include an image acquisition sensor, a radar sensor, and a global positioning system GPS, and in particular, the operational status data corresponding to the vehicle to be controlled is determined by the image acquisition sensor, the radar sensor, and the global positioning system GPS.
It is to be noted that, as for the vehicle control device, the vehicle control device may be provided on the vehicle, or the vehicle control device may be provided independently of the vehicle, in which case the vehicle control device may be communicatively connected to the vehicle CPU.
In addition, the vehicle control device may be adjusted according to different vehicles, that is, the algorithm modules included in the vehicle control device may be different according to different vehicle types, and at this time, the vehicle control device may implement not only the control operation of the automatic driving of the vehicle but also other operations. For example, different vehicle control devices may be involved for logistics vehicles, public service vehicles, medical service vehicles, terminal service vehicles. The algorithm modules included in the vehicle control apparatus are respectively illustrated below for these four autonomous vehicles:
Wherein, logistics vehicles refer to vehicles used in logistics scenes, such as: can be a logistics vehicle with an automatic sorting function, a logistics vehicle with a refrigerating and heat-preserving function and a logistics vehicle with a measuring function. These logistics vehicles may involve different algorithm modules.
For example, for a logistics vehicle, an automated sorting device may be provided which can automatically pick up and transport, sort and store goods after the logistics vehicle arrives at the destination. This involves an algorithm module for sorting of goods, which mainly implements logic control of goods taking out, handling, sorting and storing.
For another example, for a cold chain logistics scene, the logistics vehicle can be further provided with a refrigeration and heat preservation device, and the refrigeration and heat preservation device can realize refrigeration or heat preservation of transported fruits, vegetables, aquatic products, frozen foods and other perishable foods, so that the fruits, vegetables, aquatic products, frozen foods and other perishable foods are in a proper temperature environment, and the problem of long-distance transportation of perishable foods is solved. The algorithm module is mainly used for dynamically and adaptively calculating proper temperature of cold food or heat preservation according to information such as food (or article) properties, perishability, transportation time, current seasons, weather and the like, and automatically adjusting the cold food or heat preservation device according to the proper temperature, so that transportation personnel do not need to manually adjust the temperature when different foods or articles are transported by a vehicle, the transportation personnel are liberated from complicated temperature regulation and control, and the efficiency of cold food or heat preservation transportation is improved.
For example, in most logistics scenes, the charge is carried out according to the volume or weight of the packages, the number of the logistics packages is very large, and the volume or weight of the packages is simply measured by an express delivery person, so that the efficiency is very low, and the labor cost is high. Therefore, in some logistics vehicles, a measuring device is additionally arranged, so that the volume or the weight of the logistics package can be automatically measured, and the cost of the logistics package can be calculated. This involves an algorithm module for logistic parcel measurement, which is mainly used to identify the type of logistic parcel, determine the measurement mode of logistic parcel, such as volume measurement or weight measurement or combination measurement of volume and weight simultaneously, and can complete the measurement of volume and weight according to the determined measurement mode, and complete the calculation of cost according to the measurement result.
The public service vehicle is a vehicle that provides a certain public service, for example: can be a fire truck, a deicing vehicle, a watering vehicle, a snow shovel, a garbage disposal vehicle, a traffic guidance vehicle and the like. These public service vehicles may involve different algorithm modules.
For example, for an automatically driven fire engine, the main task is to perform a reasonable fire extinguishing task for a fire scene, which involves an algorithm module for the fire extinguishing task, and the algorithm module at least needs to implement logic of fire condition identification, fire extinguishing scheme planning, automatic control of a fire extinguishing device and the like.
For another example, for deicing vehicles, the main task is to remove ice and snow on the road surface, which involves an algorithm module for deicing that at least needs to implement logic for identifying ice and snow conditions on the road surface, making deicing schemes based on the ice and snow conditions, such as which road segments need to be defrosted, which road segments need not be defrosted, whether salt spraying mode, salt spraying gram number, etc. are used, and automatic control of the deicing device in case of determining the deicing scheme.
The medical service vehicle is an automatic driving vehicle capable of providing one or more medical services, and the vehicle can provide medical services such as disinfection, temperature measurement, medicine preparation, isolation and the like, and the medical service vehicle relates to algorithm modules for providing various self-service medical services, wherein the algorithm modules mainly realize the identification of disinfection requirements and the control of disinfection devices so as to enable the disinfection devices to disinfect patients or identify the positions of the patients, control the temperature measurement devices to automatically measure the temperature of the patients at the positions of the forehead and the like of the patients, or realize the judgment of symptoms, give medicine according to the judgment result and need to realize the identification of medicines and medicine containers, control the medicine taking mechanical arm so as to enable the medicine taking mechanical arm to take medicines for the patients according to the medicine prescription, and the like.
The terminal service vehicle refers to a self-service type automatic driving vehicle capable of replacing some terminal equipment to provide certain convenience services for users, for example, the vehicle can provide printing, attendance checking, scanning, unlocking, payment, retail and other services for the users.
For example, in some application scenarios, users often need to go to a particular location to print or scan a document, which is time consuming and laborious. Therefore, a terminal service vehicle capable of providing printing and scanning services for users is provided, the service vehicles can be connected with user terminal equipment, the users send printing instructions through the terminal equipment, the service vehicle responds to the printing instructions, documents required by the users can be automatically printed and sent to the user positions, and the users do not need to go to a printer to queue, so that the printing efficiency can be greatly improved. Or, the user can respond to the scanning instruction sent by the terminal equipment and move to the user position, and the user can finish scanning on the scanning tool of the service vehicle for placing the document to be scanned, so that the user does not need to queue at a printing and scanning machine, and time and labor are saved. This involves an algorithm module providing print, scan services that at least needs to identify interconnections with the user terminal device, print, response to scan instructions, location of user location, travel control, etc.
For another example, as new retail scenarios develop, more and more electronic commerce uses self-service vending machines to sell goods to various office buildings and public areas, but the self-service vending machines are placed in fixed positions and are not movable, and users need to go to the self-service vending machines before they can purchase the required goods, so that convenience is still poor. The self-service driving vehicles capable of providing retail services are arranged, the service vehicles can bear goods to automatically move, corresponding self-service shopping APP or shopping portals can be provided, a user can place an order to the self-service driving vehicles providing retail services through the APP or shopping portals by means of terminals such as mobile phones, the order comprises names, quantity and user positions of goods to be purchased, after receiving an order placing request, the vehicles can determine whether the current remaining goods have the goods purchased by the user and whether the quantity is enough, and under the condition that the goods purchased by the user are determined to be enough, the goods can be carried to the user positions automatically, and the goods are provided for the user, so that the convenience of shopping of the user is further improved, the user time is saved, and the user can use the time for more important things. This involves the algorithm modules providing retail services that implement mainly logic for responding to user order requests, order processing, merchandise information maintenance, user location positioning, payment management, etc.
It should be noted that the method in this embodiment may further include the method in the embodiment shown in fig. 3 to 8, and reference is made to the relevant description of the embodiment shown in fig. 3 to 8 for a part of this embodiment that is not described in detail. The implementation process and the technical effect of this technical solution are described in the embodiments shown in fig. 3 to 8, and are not described herein.
Fig. 11 is a schematic structural diagram of a data access control device according to an embodiment of the present application; referring to fig. 11, the present embodiment provides a data access control apparatus for performing the data access control method shown in fig. 3, and in some examples, the data access control apparatus may be implemented as a programmable device, that is, the data access control method may be applied to a programmable device, where an external storage device is communicatively connected to the programmable device; the data access control device in this embodiment may include:
a first obtaining module 11, configured to obtain a data stream to be processed, where the data stream to be processed includes at least one data packet to be processed;
a first determining module 12, configured to determine an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, where the local access state is used to identify a data stream size of the data stream to be processed;
The first processing module 13 is configured to update a data access state corresponding to a data stream to be processed in an access state table based on an access control period and a local access state, and obtain an updated access state, where the access state table is stored in an external storage device.
In some examples, the access control period is determined based on outstanding packets in the outstanding data stream.
In some examples, when the first determining module 12 determines the access control period to which the data stream to be processed belongs, the first determining module 12 is configured to perform: acquiring at least one data packet which exists in the data stream to be processed and is not responded to; determining that there is a continuous period of data packets in at least one process; based on the continuous time period, the access control period to which the data stream to be processed belongs is determined.
In some examples, when the first determining module 12 determines that there is a continuous period of time for at least one processed data packet, the first determining module 12 is configured to perform: acquiring the quantity change state of the data packets in at least one process; based on the number change status, it is determined that there is a continuous period of time for at least one processed data packet.
In some examples, when the first determining module 12 obtains the status of the change in the number of data packets in at least one process, the first determining module 12 is configured to perform: acquiring a state reading request and a state response request corresponding to a data stream to be processed; based on the status read request and the status response request, a status of a change in the number of data packets in at least one process is determined.
In some examples, when the first determining module 12 determines that there is a continuous period of time for at least one processed data packet based on the number change status, the first determining module 12 is configured to perform: acquiring a period of time during which the number of data packets in at least one process is changed from zero to zero again based on the number change state; the period in which the number is changed from zero to zero again is determined as a continuous period.
In some examples, when the first determining module 12 determines the local access status of the data stream to be processed, the first determining module 12 is configured to perform: generating a state reading request corresponding to at least one data packet to be processed in the data stream to be processed based on the external storage device; transmitting a state reading request to an external storage device to acquire the data packet state corresponding to each of at least one data packet to be processed through an access state table in the external storage device; and determining the local access state of the data flow to be processed based on the data packet state corresponding to each of the at least one data packet to be processed.
In some examples, when the first determining module 12 determines the local access state of the data flow to be processed based on the packet state corresponding to each of the at least one data packet to be processed, the first determining module 12 is configured to perform: acquiring a local state table corresponding to a data stream to be processed in programmable equipment; in the access control period, acquiring the current data state of the data stream to be processed through a local state table; and determining the local access state of the data flow to be processed based on the data packet state and the current data state corresponding to the at least one data packet to be processed.
In some examples, when the first determining module 12 determines the local access state of the data flow to be processed based on the data packet state and the current data state corresponding to each of the at least one data packet to be processed, the first determining module 12 is configured to perform: updating the current data state based on the data packet state corresponding to each of the at least one data packet to be processed to obtain an updated state; and determining the updated state corresponding to the last data to be processed in the data stream to be processed as the local access state of the data stream to be processed.
In some examples, after obtaining the local state table corresponding to the data stream to be processed in the programmable device, the first processing module 13 in this embodiment is configured to perform the following steps: when the access control period is the execution completion state, acquiring a table application state corresponding to the local state table; when the table application state is used for identifying that the state table cannot be occupied, storing state data in the local state table; when the table application state is used to identify that the state table can be occupied, then the data in the local state table is updated based on the access state table.
In some examples, when the first processing module 13 updates the data access state corresponding to the data stream to be processed in the access state table based on the access control period and the local access state, the first processing module 13 is configured to perform: acquiring a processing state of an access control period; when the processing state is the execution completion state, the data access state in the access state table is updated to the local access state, and the updated access state is obtained.
The data access control device shown in fig. 11 may perform the method of the embodiment shown in fig. 2 to 8, and reference is made to the relevant description of the embodiment shown in fig. 2 to 8 for a part of this embodiment that is not described in detail. The implementation process and the technical effect of this technical solution are described in the embodiments shown in fig. 2 to 8, and are not described herein.
In one possible design, the structure of the data access control device shown in fig. 11 may be implemented as an electronic device. Referring to fig. 12, the data access control apparatus in this embodiment may be implemented as an electronic device, and in some examples, the electronic device may be implemented as a programmable device, for example: programmable switches, programmable gateways or programmable routes, etc.; specifically, the electronic device may include: a first processor 21 and a first memory 22. The first memory 22 is used for storing a program for executing the data access control method provided in the embodiment shown in fig. 3 described above for the corresponding electronic device, and the first processor 21 is configured to execute the program stored in the first memory 22.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the first processor 21, are capable of performing the steps of: acquiring a data stream to be processed, wherein the data stream to be processed comprises at least one data packet to be processed; determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed; and updating the data access state corresponding to the data stream to be processed in the access state table based on the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
Further, the first processor 21 is further configured to perform all or part of the steps in the embodiment shown in fig. 3. The electronic device may further include a first communication interface 23 in a structure for the electronic device to communicate with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for an electronic device, where the computer storage medium includes a program for executing the data access control method in the embodiment of the method shown in fig. 3.
Furthermore, an embodiment of the present invention provides a computer program product comprising: a computer program which, when executed by a processor of an electronic device, causes the processor to perform the data access control method of the method embodiment shown in fig. 3.
Fig. 13 is a schematic structural diagram of another data access control device according to an embodiment of the present application; referring to fig. 13, this embodiment provides another data access control apparatus for performing the data access control method shown in fig. 9, and in some examples, the data access control apparatus may be implemented as a programmable device, that is, the data access control method may be applied to a programmable device, where an external storage device and a user plane function UPF network element are communicatively connected to the programmable device; specifically, the programmable device may be communicatively connected to the UPF network element through a base station, or the programmable device may be directly communicatively connected to the UPF network element; the data access control device in this embodiment may include:
a second obtaining module 31, configured to obtain a data stream to be processed sent by the UPF network element, where the data stream to be processed includes at least one data packet to be processed;
A second determining module 32, configured to determine an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, where the local access state is used to identify a data stream size of the data stream to be processed;
and the second processing module 33 is configured to update, with the access control period and the local access state, the data access state corresponding to the data stream to be processed in the access state table, and obtain an updated access state, where the access state table is stored in the external storage device.
The data access control device shown in fig. 13 may perform the method of the embodiment shown in fig. 9, and reference is made to the related description of the embodiment shown in fig. 9 for a part of this embodiment which is not described in detail. The implementation process and the technical effect of this technical solution are described in the embodiment shown in fig. 9, and are not described herein.
In one possible design, the structure of the data access control device shown in fig. 13 may be implemented as an electronic device. Referring to fig. 14, the data access control apparatus in this embodiment may be implemented as an electronic device, and in some examples, the electronic device may be implemented as a programmable device, for example: programmable switches, programmable gateways or programmable routes, etc.; specifically, the electronic device may include: a second processor 41 and a second memory 42. Wherein the second memory 42 is for storing a program for the corresponding electronic device to execute the data access control method provided in the embodiment shown in fig. 9 described above, the second processor 41 is configured for executing the program stored in the second memory 42.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the second processor 41, are capable of performing the steps of: acquiring a data stream to be processed sent by a UPF network element, wherein the data stream to be processed comprises at least one data packet to be processed; determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed; and updating the data access state corresponding to the data stream to be processed in the access state table by using the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
Further, the second processor 41 is further configured to perform all or part of the steps in the embodiment shown in fig. 9. The electronic device may further include a second communication interface 43 in the structure of the electronic device, for communicating with other devices or a communication network.
In addition, an embodiment of the present invention provides a computer storage medium storing computer software instructions for an electronic device, which includes a program for executing the data access control method in the embodiment of the method shown in fig. 9.
Furthermore, an embodiment of the present invention provides a computer program product comprising: a computer program which, when executed by a processor of an electronic device, causes the processor to perform the data access control method of the method embodiment shown in fig. 9.
Fig. 15 is a schematic structural diagram of a vehicle control device according to an embodiment of the present application; referring to fig. 15, the present embodiment provides a vehicle control apparatus for performing the vehicle control method shown in fig. 10 described above, and in some examples, the vehicle control apparatus may be implemented as a programmable device, that is, the vehicle control method may be applied to a programmable device, which is communicatively connected to an external storage device; the vehicle control apparatus in the present embodiment may include:
a third obtaining module 51, configured to obtain a data stream to be processed for controlling a vehicle to be controlled, where the data stream to be processed includes at least one data packet to be processed;
a third determining module 52, configured to determine an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, where the local access state is used to identify a data stream size of the data stream to be processed;
And a third processing module 53, configured to update, with the access control period and the local access state, the data access state corresponding to the data stream to be processed in the access state table, and obtain an updated access state, where the access state table is stored in the external storage device.
The vehicle control apparatus shown in fig. 15 may perform the method of the embodiment shown in fig. 10, and reference is made to the description of the embodiment shown in fig. 10 for a part of this embodiment that is not described in detail. The implementation process and the technical effect of this technical solution are described in the embodiment shown in fig. 10, and are not described herein.
In one possible design, the structure of the vehicle control apparatus shown in fig. 15 may be implemented as an electronic device. Referring to fig. 16, the vehicle control apparatus for implementing the vehicle control method in the present embodiment may be implemented as an electronic device, and specifically, the electronic device may include: a third processor 61 and a third memory 62. Wherein the third memory 62 is for storing a program for the corresponding electronic device to execute the vehicle control method provided in the embodiment shown in fig. 10 described above, and the third processor 61 is configured to execute the program stored in the third memory 62.
The program comprises one or more computer instructions, wherein the one or more computer instructions, when executed by the third processor 61, are capable of performing the steps of: acquiring a data stream to be processed for controlling a vehicle to be controlled, wherein the data stream to be processed comprises at least one data packet to be processed; determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed; and updating the data access state corresponding to the data stream to be processed in the access state table by using the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
Further, the third processor 61 is further configured to perform all or part of the steps in the embodiment shown in fig. 10. The electronic device may also include a third communication interface 63 in its structure for the electronic device to communicate with other devices or communication networks.
In addition, an embodiment of the present invention provides a computer storage medium for storing computer software instructions for an electronic device, which includes a program for executing the vehicle control method in the embodiment of the method shown in fig. 10.
Furthermore, an embodiment of the present invention provides a computer program product comprising: a computer program which, when executed by a processor of an electronic device, causes the processor to perform the vehicle control method in the method embodiment shown in fig. 10.
Fig. 17 is a schematic structural diagram of a data access control system according to an embodiment of the present application; referring to fig. 17, the present embodiment provides a data access control system, which may include: a programmable device 71 and an external storage device 72 communicatively connected to the programmable device 71;
a programmable device 71, configured to obtain a data stream to be processed, where the data stream to be processed includes at least one data packet to be processed; determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed; based on the access control period and the local access status, generating a status update instruction and transmitting the status update instruction to the external storage device 72;
and the external storage device 72 is configured to update the data access state corresponding to the data stream to be processed in the access state table based on the state update instruction, and obtain the updated access state, where the access state table is stored in the external storage device 72.
Wherein the programmable device may comprise any one of: programmable switches, programmable gateways, programmable routers, etc., the external storage device may include any of the following: external DRAM, external SRAM, etc.; in particular, the data access control system in this embodiment may further include the method in the embodiment shown in fig. 3 to 8, and for the part of this embodiment that is not described in detail, reference may be made to the description related to the embodiment shown in fig. 3 to 8. The implementation process and the technical effect of this technical solution are described in the embodiments shown in fig. 3 to 8, and are not described herein.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or fully authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region, and provide corresponding operation entries for the user to select authorization or rejection.
The apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by adding necessary general purpose hardware platforms, or may be implemented by a combination of hardware and software. Based on such understanding, the foregoing aspects, in essence and portions contributing to the art, may be embodied in the form of a computer program product, which may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flowchart and/or block of the flowchart and/or block diagrams, and combinations of flowcharts and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks. These computer program instructions may also be loaded onto a computer or other programmable apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input, output interfaces, network interfaces, and memory. The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash RAM. Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement data storage by any method or technology. The data may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store data that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims (14)
1. The data access control method is characterized by being applied to programmable equipment, wherein the programmable equipment is in communication connection with external storage equipment; the method comprises the following steps:
acquiring a data stream to be processed, wherein the data stream to be processed comprises at least one data packet to be processed;
determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed;
and updating the data access state corresponding to the data stream to be processed in an access state table based on the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
2. The method of claim 1, wherein the access control period is determined based on outstanding packets in the outstanding data stream.
3. The method of claim 2, wherein determining the access control period to which the data stream to be processed belongs comprises:
acquiring at least one data packet which exists in the data stream to be processed and is not responded to;
Determining that there is a continuous period of time for data packets in the at least one process;
and determining an access control period to which the data stream to be processed belongs based on the continuous time period.
4. A method according to claim 3, wherein determining that there is a continuous period of data packets in the at least one process comprises:
acquiring a quantity change state of the data packets in the at least one process;
based on the number change status, a continuous period of time in which data packets are present in the at least one process is determined.
5. The method of claim 4, wherein obtaining a state of change in the number of data packets in the at least one process comprises:
acquiring a state reading request and a state response request corresponding to the data stream to be processed;
and determining a state of change in the number of data packets in the at least one process based on the state read request and the state response request.
6. The method of claim 4, wherein determining that there is a continuous period of data packets in the at least one process based on the number change status comprises:
acquiring a period of time during which the number of data packets in the at least one process is changed from zero to zero again based on the number change state;
The period of time during which the number becomes zero again from zero is determined as the continuous period of time.
7. The method according to any of claims 1-6, wherein determining the local access status of the data stream to be processed comprises:
generating a state reading request corresponding to at least one data packet to be processed in the data stream to be processed based on the external storage device;
the state reading request is sent to the external storage device, so that the data packet state corresponding to each of at least one data packet to be processed is obtained through an access state table in the external storage device;
and determining the local access state of the data flow to be processed based on the data packet state corresponding to each of the at least one data packet to be processed.
8. The method of claim 7, wherein determining the local access state of the pending data stream based on the respective packet states of the at least one pending packet comprises:
acquiring a local state table corresponding to the data stream to be processed in the programmable device;
in the access control period, acquiring the current data state of the data stream to be processed through the local state table;
And determining the local access state of the data flow to be processed based on the data packet state and the current data state corresponding to the at least one data packet to be processed.
9. The method of claim 8, wherein determining the local access state of the pending data stream based on the respective packet state and current data state of the at least one pending packet comprises:
updating the current data state based on the data packet state corresponding to each of the at least one data packet to be processed to obtain an updated state;
and determining the updated state corresponding to the last data to be processed in the data stream to be processed as the local access state of the data stream to be processed.
10. The method of claim 8, wherein after obtaining a local state table in the programmable device corresponding to the data stream to be processed, the method further comprises:
when the access control period is an execution completion state, acquiring a table application state corresponding to the local state table;
when the table application state is used for identifying that the state table cannot be occupied, storing state data in the local state table;
And when the table application state is used for identifying that the state table can be occupied, updating the data in the local state table based on the access state table.
11. The method according to any one of claims 1-6, wherein updating the data access state in the access state table corresponding to the data stream to be processed based on the access control period and the local access state comprises:
acquiring a processing state of the access control period;
and when the processing state is the execution completion state, updating the data access state in the access state table to the local access state to obtain an updated access state.
12. The data access control method is characterized by being applied to programmable equipment, wherein the programmable equipment is in communication connection with external storage equipment and a user plane function UPF network element; the method comprises the following steps:
acquiring a data stream to be processed sent by the UPF network element, wherein the data stream to be processed comprises at least one data packet to be processed;
determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed;
And updating the data access state corresponding to the data stream to be processed in an access state table by utilizing the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
13. A vehicle control method, characterized by being applied to a programmable device, the programmable device being communicatively connected to an external storage device; the method comprises the following steps:
acquiring a data stream to be processed for controlling a vehicle to be controlled, wherein the data stream to be processed comprises at least one data packet to be processed;
determining an access control period to which the data stream to be processed belongs and a local access state of the data stream to be processed, wherein the local access state is used for identifying the data stream size of the data stream to be processed;
and updating the data access state corresponding to the data stream to be processed in an access state table by utilizing the access control period and the local access state to obtain an updated access state, wherein the access state table is stored in the external storage device.
14. An electronic device, comprising: a memory, a processor; wherein the memory is configured to store one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the method of any of claims 1-13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310636410.4A CN116389398B (en) | 2023-05-30 | 2023-05-30 | Data access control method, vehicle control method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310636410.4A CN116389398B (en) | 2023-05-30 | 2023-05-30 | Data access control method, vehicle control method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116389398A true CN116389398A (en) | 2023-07-04 |
CN116389398B CN116389398B (en) | 2023-10-20 |
Family
ID=86971382
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310636410.4A Active CN116389398B (en) | 2023-05-30 | 2023-05-30 | Data access control method, vehicle control method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116389398B (en) |
Citations (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1409823A (en) * | 1999-10-12 | 2003-04-09 | Mci全球通讯公司 | Customer resources policy control for IP traffic delivery |
JP2005056284A (en) * | 2003-08-07 | 2005-03-03 | Pfu Ltd | File management device |
US20120254482A1 (en) * | 2011-03-31 | 2012-10-04 | Nec Corporation | Storage system, and access path state update method |
US20140025630A1 (en) * | 2012-07-18 | 2014-01-23 | Fujitsu Limited | Data-store management apparatus, data providing system, and data providing method |
CN104253870A (en) * | 2014-09-29 | 2014-12-31 | 广州华多网络科技有限公司 | Method and device for controlling data access period |
CN104796291A (en) * | 2015-04-27 | 2015-07-22 | 清华大学 | System and method for detecting transmission standardization of routers in core routing area |
CN105657048A (en) * | 2016-02-25 | 2016-06-08 | 蓝网科技股份有限公司 | Monitor method and device for information system server |
US20160342364A1 (en) * | 2014-07-31 | 2016-11-24 | Kabushiki Kaisha Toshiba | Tiered storage system, storage controller and data location estimation method |
CN106294546A (en) * | 2016-07-22 | 2017-01-04 | 北京英诺威尔科技股份有限公司 | A kind of method of memory storage particular device port status data |
CN106534185A (en) * | 2016-12-12 | 2017-03-22 | 中国航空工业集团公司西安航空计算技术研究所 | Apparatus and method for real-time monitoring validity of airborne network safety software |
US10333813B1 (en) * | 2015-06-25 | 2019-06-25 | Amazon Technologies, Inc. | Time-out tracking for high-throughput packet transmission |
WO2019120037A1 (en) * | 2017-12-18 | 2019-06-27 | Oppo广东移动通信有限公司 | Model construction method, network resource preloading method and apparatus, medium, and terminal |
CN110019537A (en) * | 2018-12-05 | 2019-07-16 | 阿里巴巴集团控股有限公司 | Local cache method for refreshing, device, computer equipment and storage medium |
CN110502545A (en) * | 2019-08-15 | 2019-11-26 | 中国平安财产保险股份有限公司 | Date storage method, device, equipment and computer readable storage medium |
GB201917328D0 (en) * | 2019-11-28 | 2020-01-15 | Paxton Access Ltd | Access control system and method |
CN111459987A (en) * | 2020-04-27 | 2020-07-28 | 恩亿科(北京)数据科技有限公司 | Cache updating method and device |
CN112162846A (en) * | 2020-11-27 | 2021-01-01 | 腾讯科技(深圳)有限公司 | Transaction processing method, device and computer readable storage medium |
CN113973302A (en) * | 2021-09-15 | 2022-01-25 | 阿里巴巴达摩院(杭州)科技有限公司 | Data identification method, device, storage medium and communication system |
CN114047955A (en) * | 2021-11-29 | 2022-02-15 | 上海阵量智能科技有限公司 | Instruction transmitting apparatus, method, chip, computer device, and storage medium |
CN114611639A (en) * | 2020-12-09 | 2022-06-10 | 北京临近空间飞行器系统工程研究所 | Radio frequency communication method and device, radio frequency communication system and storage medium |
CN115334004A (en) * | 2022-08-02 | 2022-11-11 | 哈尔滨工业大学 | Method for dynamically adjusting size of data window |
CN115686816A (en) * | 2021-07-30 | 2023-02-03 | 腾讯科技(深圳)有限公司 | Data processing method, related device and equipment |
CN115878702A (en) * | 2022-11-30 | 2023-03-31 | 浪潮通用软件有限公司 | Method, device and equipment for realizing operation and maintenance data acquisition |
CN116010093A (en) * | 2022-12-29 | 2023-04-25 | 曙光信息产业(北京)有限公司 | Data processing method, apparatus, computer device and readable storage medium |
-
2023
- 2023-05-30 CN CN202310636410.4A patent/CN116389398B/en active Active
Patent Citations (24)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1409823A (en) * | 1999-10-12 | 2003-04-09 | Mci全球通讯公司 | Customer resources policy control for IP traffic delivery |
JP2005056284A (en) * | 2003-08-07 | 2005-03-03 | Pfu Ltd | File management device |
US20120254482A1 (en) * | 2011-03-31 | 2012-10-04 | Nec Corporation | Storage system, and access path state update method |
US20140025630A1 (en) * | 2012-07-18 | 2014-01-23 | Fujitsu Limited | Data-store management apparatus, data providing system, and data providing method |
US20160342364A1 (en) * | 2014-07-31 | 2016-11-24 | Kabushiki Kaisha Toshiba | Tiered storage system, storage controller and data location estimation method |
CN104253870A (en) * | 2014-09-29 | 2014-12-31 | 广州华多网络科技有限公司 | Method and device for controlling data access period |
CN104796291A (en) * | 2015-04-27 | 2015-07-22 | 清华大学 | System and method for detecting transmission standardization of routers in core routing area |
US10333813B1 (en) * | 2015-06-25 | 2019-06-25 | Amazon Technologies, Inc. | Time-out tracking for high-throughput packet transmission |
CN105657048A (en) * | 2016-02-25 | 2016-06-08 | 蓝网科技股份有限公司 | Monitor method and device for information system server |
CN106294546A (en) * | 2016-07-22 | 2017-01-04 | 北京英诺威尔科技股份有限公司 | A kind of method of memory storage particular device port status data |
CN106534185A (en) * | 2016-12-12 | 2017-03-22 | 中国航空工业集团公司西安航空计算技术研究所 | Apparatus and method for real-time monitoring validity of airborne network safety software |
WO2019120037A1 (en) * | 2017-12-18 | 2019-06-27 | Oppo广东移动通信有限公司 | Model construction method, network resource preloading method and apparatus, medium, and terminal |
CN110019537A (en) * | 2018-12-05 | 2019-07-16 | 阿里巴巴集团控股有限公司 | Local cache method for refreshing, device, computer equipment and storage medium |
CN110502545A (en) * | 2019-08-15 | 2019-11-26 | 中国平安财产保险股份有限公司 | Date storage method, device, equipment and computer readable storage medium |
GB201917328D0 (en) * | 2019-11-28 | 2020-01-15 | Paxton Access Ltd | Access control system and method |
CN111459987A (en) * | 2020-04-27 | 2020-07-28 | 恩亿科(北京)数据科技有限公司 | Cache updating method and device |
CN112162846A (en) * | 2020-11-27 | 2021-01-01 | 腾讯科技(深圳)有限公司 | Transaction processing method, device and computer readable storage medium |
CN114611639A (en) * | 2020-12-09 | 2022-06-10 | 北京临近空间飞行器系统工程研究所 | Radio frequency communication method and device, radio frequency communication system and storage medium |
CN115686816A (en) * | 2021-07-30 | 2023-02-03 | 腾讯科技(深圳)有限公司 | Data processing method, related device and equipment |
CN113973302A (en) * | 2021-09-15 | 2022-01-25 | 阿里巴巴达摩院(杭州)科技有限公司 | Data identification method, device, storage medium and communication system |
CN114047955A (en) * | 2021-11-29 | 2022-02-15 | 上海阵量智能科技有限公司 | Instruction transmitting apparatus, method, chip, computer device, and storage medium |
CN115334004A (en) * | 2022-08-02 | 2022-11-11 | 哈尔滨工业大学 | Method for dynamically adjusting size of data window |
CN115878702A (en) * | 2022-11-30 | 2023-03-31 | 浪潮通用软件有限公司 | Method, device and equipment for realizing operation and maintenance data acquisition |
CN116010093A (en) * | 2022-12-29 | 2023-04-25 | 曙光信息产业(北京)有限公司 | Data processing method, apparatus, computer device and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN116389398B (en) | 2023-10-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114189566B (en) | Wireless communication method, gateway, equipment and system | |
CN115174149B (en) | Data forwarding method, webpage access control method, equipment and system | |
US20180096287A1 (en) | Re-routing a delivery agent to improve the efficiency of transporting packages | |
CN113452811B (en) | Data communication method, device, computer storage medium and system | |
CN115996192B (en) | Data forwarding method, vehicle control method, private network equipment and equipment | |
US11492202B2 (en) | Asset loading system | |
CN114049069A (en) | Cold-chain logistics monitoring method and system and computer equipment | |
US20220101261A1 (en) | Method and apparatus for secure delivery of cargo | |
CN112348428A (en) | Container monitoring method and device, server and storage medium | |
CN113825225B (en) | Roaming registration method, AMF network element, equipment and system of private network | |
CN115002811A (en) | Private network control method, data processing method, equipment control method and equipment | |
CN114996026A (en) | Resource virtualization method, communication assembly, equipment and system | |
CN114466332A (en) | Data communication system and method, and live data transmission method, device and equipment | |
CN116389398B (en) | Data access control method, vehicle control method and device | |
JP6232913B2 (en) | Planar graph generation apparatus, program, and method | |
CN115914102B (en) | Data forwarding method, flow table processing method, equipment and system | |
CN113965455A (en) | Network deployment method, device and computer storage medium | |
CN115842697B (en) | Access control method of private network, control method of virtual reality equipment and equipment | |
CN115835309B (en) | Local data distribution method, vehicle control method and device | |
CN115988568B (en) | Private network equipment, data processing method, vehicle control method and equipment | |
CN116204455B (en) | Cache management system, method, private network cache management system and equipment | |
CN115915457B (en) | Resource scheduling method, vehicle control method, device and system | |
CN114189861B (en) | Wireless network connection method, device and system | |
CN116192223A (en) | Private network information forwarding method, vehicle control method, device and equipment | |
CN109150937A (en) | A kind of processing of run-length data, service information pushing method and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |